Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	AdminTools/Config.cs
#	AdminTools/EventHandlers.cs
#	AdminTools/Extensions.cs
#	AdminTools/Main.cs
  • Loading branch information
Misfiy committed Jun 23, 2024
2 parents af2381d + 761ee24 commit 49d9d3a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
8 changes: 1 addition & 7 deletions AdminTools/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ public void OnPlayerVerified(VerifiedEventArgs ev)
ev.Player.IsOverwatchEnabled = true;
}

if (Main.HiddenTags.Contains(ev.Player.UserId))
{
Log.Debug($"Hiding {ev.Player.UserId}'s tag.");
Timing.CallDelayed(Timing.WaitForOneFrame, () => ev.Player.BadgeHidden = true);
}

if (Main.RoundStartMutes.Count != 0 && !ev.Player.RemoteAdminAccess && !Main.RoundStartMutes.Contains(ev.Player))
{
Log.Debug($"Muting {ev.Player.UserId} (no RA).");
Expand Down Expand Up @@ -128,7 +122,7 @@ public void OnTriggeringTesla(TriggeringTeslaEventArgs ev)

public void OnChangingRole(ChangingRoleEventArgs ev)
{
if (plugin.Config.GodTuts && ev.Player.RemoteAdminAccess && ev.Reason == SpawnReason.ForceClass)
if (plugin.Config.GodTuts && (ev.Reason is SpawnReason.ForceClass or SpawnReason.None))
ev.Player.IsGodModeEnabled = ev.NewRole == RoleTypeId.Tutorial;
}

Expand Down
9 changes: 0 additions & 9 deletions AdminTools/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public static string FormatArguments(this ArraySegment<string> sentence, int ind
public static void SavingPlayerData(this Player player)
{
List<string> overwatchRead = Main.Overwatch;
List<string> tagsRead = Main.HiddenTags;

string userId = player.UserId;

Expand All @@ -39,14 +38,6 @@ public static void SavingPlayerData(this Player player)
}
else if (!player.IsOverwatchEnabled && overwatchRead.Remove(userId))
Log.Debug($"{player.Nickname}({player.UserId}) has remove their overwatch.");

if (player.BadgeHidden && !tagsRead.Contains(userId))
{
tagsRead.Add(userId);
Log.Debug($"{player.Nickname}({player.UserId}) has added their tag hidden.");
}
else if (!player.BadgeHidden && tagsRead.Remove(userId))
Log.Debug($"{player.Nickname}({player.UserId}) has remove their tag hidden.");
}
public static void SpawnWorkbench(Player ply, Vector3 position, Vector3 rotation, Vector3 size, out int benchIndex)
{
Expand Down
1 change: 0 additions & 1 deletion AdminTools/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace AdminTools
public class Main : Plugin<Config>
{
public static List<string> Overwatch { get; internal set; }
public static List<string> HiddenTags { get; internal set; }
public static Dictionary<string, Jailed> JailedPlayers { get; } = new();
public static List<Player> PryGate { get; } = new();
public static List<Player> InstantKill { get; } = new();
Expand Down

0 comments on commit 49d9d3a

Please sign in to comment.