]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix powered machines working unpowered if the panel is open. (#32135)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 13 Sep 2024 23:58:54 +0000 (01:58 +0200)
committerGitHub <noreply@github.com>
Fri, 13 Sep 2024 23:58:54 +0000 (01:58 +0200)
Content.Client/Power/ActivatableUIRequiresPowerSystem.cs
Content.Server/Power/EntitySystems/ActivatableUIRequiresPowerSystem.cs

index 5a082485a5ac5a645639da1a9aed8e6037ba4ea8..a6a20958f536a85dfc77df19e9b11dfd6fca3278 100644 (file)
@@ -18,9 +18,6 @@ public sealed class ActivatableUIRequiresPowerSystem : SharedActivatableUIRequir
             return;
         }
 
-        if (TryComp<WiresPanelComponent>(ent.Owner, out var panel) && panel.Open)
-            return;
-
         _popup.PopupClient(Loc.GetString("base-computer-ui-component-not-powered", ("machine", ent.Owner)), args.User, args.User);
         args.Cancel();
     }
index 9fd824a3c49559e7cbc80dcae4b5aa32afa9b042..a33bddcaa34faf5d4e4c6b2c6f0f894d2f597c2c 100644 (file)
@@ -1,9 +1,7 @@
-using Content.Server.Power.Components;
 using Content.Shared.Power;
 using Content.Shared.Power.Components;
 using Content.Shared.Power.EntitySystems;
 using Content.Shared.UserInterface;
-using Content.Shared.Wires;
 using ActivatableUISystem = Content.Shared.UserInterface.ActivatableUISystem;
 
 namespace Content.Server.Power.EntitySystems;
@@ -26,9 +24,6 @@ public sealed class ActivatableUIRequiresPowerSystem : SharedActivatableUIRequir
             return;
         }
 
-        if (TryComp<WiresPanelComponent>(ent.Owner, out var panel) && panel.Open)
-            return;
-
         args.Cancel();
     }