]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove always false checks (#31708)
authorWinkarst <74284083+Winkarst-cpu@users.noreply.github.com>
Sun, 1 Sep 2024 10:45:01 +0000 (13:45 +0300)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 10:45:01 +0000 (12:45 +0200)
Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs
Content.Server/Wires/WiresSystem.cs

index e9f6d008229d321f51f76b0ea107ca0657e15c92..9365b22ad9c1365687759f753f86b361aef33f46 100644 (file)
@@ -67,11 +67,6 @@ public sealed partial class CargoSystem
 
     private void OnPalletUIOpen(EntityUid uid, CargoPalletConsoleComponent component, BoundUIOpenedEvent args)
     {
-        var player = args.Actor;
-
-        if (player == null)
-            return;
-
         UpdatePalletConsoleInterface(uid);
     }
 
@@ -85,11 +80,6 @@ public sealed partial class CargoSystem
 
     private void OnPalletAppraise(EntityUid uid, CargoPalletConsoleComponent component, CargoPalletAppraiseMessage args)
     {
-        var player = args.Actor;
-
-        if (player == null)
-            return;
-
         UpdatePalletConsoleInterface(uid);
     }
 
@@ -313,11 +303,6 @@ public sealed partial class CargoSystem
 
     private void OnPalletSale(EntityUid uid, CargoPalletConsoleComponent component, CargoPalletSellMessage args)
     {
-        var player = args.Actor;
-
-        if (player == null)
-            return;
-
         var xform = Transform(uid);
 
         if (xform.GridUid is not EntityUid gridUid)
index 92a0322ecb833f827036b8bff70cdf8ef32e98f7..3e75659072293ee1a949996895c8bd0f229ff5a7 100644 (file)
@@ -387,11 +387,7 @@ public sealed class WiresSystem : SharedWiresSystem
 
     private void OnWiresActionMessage(EntityUid uid, WiresComponent component, WiresActionMessage args)
     {
-        if (args.Actor == null)
-        {
-            return;
-        }
-        var player = (EntityUid) args.Actor;
+        var player = args.Actor;
 
         if (!EntityManager.TryGetComponent(player, out HandsComponent? handsComponent))
         {