diff --git a/Content.Client/Administration/Systems/AdminFrozenSystem.cs b/Content.Client/Administration/Systems/AdminFrozenSystem.cs deleted file mode 100644 index 885585f985..0000000000 --- a/Content.Client/Administration/Systems/AdminFrozenSystem.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Content.Shared.Administration; - -namespace Content.Client.Administration.Systems; - -public sealed class AdminFrozenSystem : SharedAdminFrozenSystem -{ -} diff --git a/Content.Server/Administration/Systems/AdminFrozenSystem.cs b/Content.Server/Administration/Systems/AdminFrozenSystem.cs deleted file mode 100644 index baf7b682b8..0000000000 --- a/Content.Server/Administration/Systems/AdminFrozenSystem.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Content.Shared.Administration; - -namespace Content.Server.Administration.Systems; - -public sealed class AdminFrozenSystem : SharedAdminFrozenSystem -{ - /// - /// Freezes and mutes the given entity. - /// - public void FreezeAndMute(EntityUid uid) - { - var comp = EnsureComp(uid); - comp.Muted = true; - Dirty(uid, comp); - } -} diff --git a/Content.Shared/Administration/AdminFrozenComponent.cs b/Content.Shared/Administration/AdminFrozenComponent.cs index bfcf1db526..28df7c5fd0 100644 --- a/Content.Shared/Administration/AdminFrozenComponent.cs +++ b/Content.Shared/Administration/AdminFrozenComponent.cs @@ -2,7 +2,7 @@ namespace Content.Shared.Administration; -[RegisterComponent, Access(typeof(SharedAdminFrozenSystem))] +[RegisterComponent, Access(typeof(AdminFrozenSystem))] [NetworkedComponent, AutoGenerateComponentState] public sealed partial class AdminFrozenComponent : Component { diff --git a/Content.Shared/Administration/SharedAdminFrozenSystem.cs b/Content.Shared/Administration/AdminFrozenSystem.cs similarity index 91% rename from Content.Shared/Administration/SharedAdminFrozenSystem.cs rename to Content.Shared/Administration/AdminFrozenSystem.cs index 259df2bdf2..7419137da8 100644 --- a/Content.Shared/Administration/SharedAdminFrozenSystem.cs +++ b/Content.Shared/Administration/AdminFrozenSystem.cs @@ -12,15 +12,13 @@ using Content.Shared.Throwing; namespace Content.Shared.Administration; // TODO deduplicate with BlockMovementComponent -public abstract class SharedAdminFrozenSystem : EntitySystem +public sealed class AdminFrozenSystem : EntitySystem { [Dependency] private readonly ActionBlockerSystem _blocker = default!; [Dependency] private readonly PullingSystem _pulling = default!; public override void Initialize() { - base.Initialize(); - SubscribeLocalEvent(OnAttempt); SubscribeLocalEvent(OnAttempt); SubscribeLocalEvent(OnAttempt); @@ -35,6 +33,16 @@ public abstract class SharedAdminFrozenSystem : EntitySystem SubscribeLocalEvent(OnSpeakAttempt); } + /// + /// Freezes and mutes the given entity. + /// + public void FreezeAndMute(EntityUid uid) + { + var comp = EnsureComp(uid); + comp.Muted = true; + Dirty(uid, comp); + } + private void OnInteractAttempt(Entity ent, ref InteractionAttemptEvent args) { args.Cancelled = true;