BUGFIX: Fix APEs being able to be turned on without power (#32493)
Add a check to see the APC is powered before turning the emitter on.
This commit is contained in:
@@ -196,7 +196,8 @@ namespace Content.Server.Singularity.EntitySystems
|
|||||||
if (TryComp<ApcPowerReceiverComponent>(uid, out var apcReceiver))
|
if (TryComp<ApcPowerReceiverComponent>(uid, out var apcReceiver))
|
||||||
{
|
{
|
||||||
apcReceiver.Load = component.PowerUseActive;
|
apcReceiver.Load = component.PowerUseActive;
|
||||||
PowerOn(uid, component);
|
if (apcReceiver.Powered)
|
||||||
|
PowerOn(uid, component);
|
||||||
}
|
}
|
||||||
// Do not directly PowerOn().
|
// Do not directly PowerOn().
|
||||||
// OnReceivedPowerChanged will get fired due to DrawRate change which will turn it on.
|
// OnReceivedPowerChanged will get fired due to DrawRate change which will turn it on.
|
||||||
|
|||||||
Reference in New Issue
Block a user