]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
BUGFIX: Fix APEs being able to be turned on without power (#32493)
authorAndrew Montagne <andrew@montagne.uk>
Mon, 11 Nov 2024 22:58:31 +0000 (22:58 +0000)
committerGitHub <noreply@github.com>
Mon, 11 Nov 2024 22:58:31 +0000 (23:58 +0100)
Add a check to see the APC is powered before turning the emitter on.

Content.Server/Singularity/EntitySystems/EmitterSystem.cs

index 1ada60e1d64506a232053c11f389efdfad75e106..f828139ed6fe0ee70ac29fcd95643ec70ac79ccf 100644 (file)
@@ -196,7 +196,8 @@ namespace Content.Server.Singularity.EntitySystems
             if (TryComp<ApcPowerReceiverComponent>(uid, out var apcReceiver))
             {
                 apcReceiver.Load = component.PowerUseActive;
-                PowerOn(uid, component);
+                if (apcReceiver.Powered)
+                    PowerOn(uid, component);
             }
             // Do not directly PowerOn().
             // OnReceivedPowerChanged will get fired due to DrawRate change which will turn it on.