From 03f0257ae9b0c3d2d349bd2bcc4670a7ac92e139 Mon Sep 17 00:00:00 2001
From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Thu, 11 Jul 2024 17:04:10 +1000
Subject: [PATCH] Revert "Picking a ghostrole as an admin will now deadmin you.
(#29790)" (#29901)
This reverts commit 1a50760e674134de6065bff3bc76739526ea5429.
---
Content.Server/Ghost/Roles/GhostRoleSystem.cs | 13 -------------
Content.Shared/CCVar/CCVars.cs | 2 +-
2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/Content.Server/Ghost/Roles/GhostRoleSystem.cs b/Content.Server/Ghost/Roles/GhostRoleSystem.cs
index dfb0c8e086..b6627f1154 100644
--- a/Content.Server/Ghost/Roles/GhostRoleSystem.cs
+++ b/Content.Server/Ghost/Roles/GhostRoleSystem.cs
@@ -31,9 +31,6 @@ using Robust.Shared.Utility;
using Content.Server.Popups;
using Content.Shared.Verbs;
using Robust.Shared.Collections;
-using Content.Server.Administration.Managers;
-using Content.Shared.CCVar;
-using Robust.Shared.Configuration;
namespace Content.Server.Ghost.Roles
{
@@ -51,8 +48,6 @@ namespace Content.Server.Ghost.Roles
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
- [Dependency] private readonly IAdminManager _adminManager = default!;
- [Dependency] private readonly IConfigurationManager _cfg = default!;
private uint _nextRoleIdentifier;
private bool _needsUpdateGhostRoleCount = true;
@@ -592,14 +587,6 @@ namespace Content.Server.Ghost.Roles
// forced into a ghost role.
LeaveAllRaffles(message.Player);
CloseEui(message.Player);
-
- // The player is no longer a ghost, so they should not be adminned anymore. Deadmin them.
- // Ensures that admins do not forget to deadmin themselves upon entering a ghost role.
- var autoDeAdmin = _cfg.GetCVar(CCVars.AdminDeadminOnJoin);
- if (autoDeAdmin && _adminManager.IsAdmin(message.Entity))
- {
- _adminManager.DeAdmin(message.Player);
- }
}
private void OnMindAdded(EntityUid uid, GhostTakeoverAvailableComponent component, MindAddedMessage args)
diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs
index 044a95c458..a0e9157e92 100644
--- a/Content.Shared/CCVar/CCVars.cs
+++ b/Content.Shared/CCVar/CCVars.cs
@@ -870,7 +870,7 @@ namespace Content.Shared.CCVar
CVarDef.Create("admin.show_pii_onban", false, CVar.SERVERONLY);
///
- /// If an admin joins a round by readying up or using the late join button, automatically
+ /// If an admin joins a round by reading up or using the late join button, automatically
/// de-admin them.
///
public static readonly CVarDef AdminDeadminOnJoin =