]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Combine AdminFrozenSystem in shared. (#39885)
authorKyle Tyo <36606155+VerinSenpai@users.noreply.github.com>
Mon, 25 Aug 2025 13:49:27 +0000 (09:49 -0400)
committerGitHub <noreply@github.com>
Mon, 25 Aug 2025 13:49:27 +0000 (15:49 +0200)
commit

Content.Client/Administration/Systems/AdminFrozenSystem.cs [deleted file]
Content.Server/Administration/Systems/AdminFrozenSystem.cs [deleted file]
Content.Shared/Administration/AdminFrozenComponent.cs
Content.Shared/Administration/AdminFrozenSystem.cs [moved from Content.Shared/Administration/SharedAdminFrozenSystem.cs with 91% similarity]

diff --git a/Content.Client/Administration/Systems/AdminFrozenSystem.cs b/Content.Client/Administration/Systems/AdminFrozenSystem.cs
deleted file mode 100644 (file)
index 885585f..0000000
+++ /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 (file)
index baf7b68..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-using Content.Shared.Administration;
-
-namespace Content.Server.Administration.Systems;
-
-public sealed class AdminFrozenSystem : SharedAdminFrozenSystem
-{
-    /// <summary>
-    /// Freezes and mutes the given entity.
-    /// </summary>
-    public void FreezeAndMute(EntityUid uid)
-    {
-        var comp = EnsureComp<AdminFrozenComponent>(uid);
-        comp.Muted = true;
-        Dirty(uid, comp);
-    }
-}
index bfcf1db5261ff7c212482e2412f19bff56913141..28df7c5fd07c2612942787cc38a640834fb2bc12 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Content.Shared.Administration;
 
-[RegisterComponent, Access(typeof(SharedAdminFrozenSystem))]
+[RegisterComponent, Access(typeof(AdminFrozenSystem))]
 [NetworkedComponent, AutoGenerateComponentState]
 public sealed partial class AdminFrozenComponent : Component
 {
similarity index 91%
rename from Content.Shared/Administration/SharedAdminFrozenSystem.cs
rename to Content.Shared/Administration/AdminFrozenSystem.cs
index 259df2bdf2ac14359ee4d8de441104910b7b833b..7419137da816f0a25036f3adea3a3fa539cd8166 100644 (file)
@@ -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<AdminFrozenComponent, UseAttemptEvent>(OnAttempt);
         SubscribeLocalEvent<AdminFrozenComponent, PickupAttemptEvent>(OnAttempt);
         SubscribeLocalEvent<AdminFrozenComponent, ThrowAttemptEvent>(OnAttempt);
@@ -35,6 +33,16 @@ public abstract class SharedAdminFrozenSystem : EntitySystem
         SubscribeLocalEvent<AdminFrozenComponent, SpeakAttemptEvent>(OnSpeakAttempt);
     }
 
+    /// <summary>
+    /// Freezes and mutes the given entity.
+    /// </summary>
+    public void FreezeAndMute(EntityUid uid)
+    {
+        var comp = EnsureComp<AdminFrozenComponent>(uid);
+        comp.Muted = true;
+        Dirty(uid, comp);
+    }
+
     private void OnInteractAttempt(Entity<AdminFrozenComponent> ent, ref InteractionAttemptEvent args)
     {
         args.Cancelled = true;