From: Kyle Tyo <36606155+VerinSenpai@users.noreply.github.com> Date: Mon, 25 Aug 2025 13:49:27 +0000 (-0400) Subject: Combine AdminFrozenSystem in shared. (#39885) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=ffc7cc5e5de9fc0ba8ddd928afdfaea348bd1480;p=space-station-14.git Combine AdminFrozenSystem in shared. (#39885) commit --- 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;