Fix devices in terminal mispredicting power state (#38647)
* The simple solution * The better solution * Revert "The better solution" This reverts commit 611e56e031636734abab1ad3e77bf88b69a4de13.
This commit is contained in:
@@ -9,7 +9,7 @@ public static class StaticPowerSystem
|
|||||||
public static bool IsPowered(this EntitySystem system, EntityUid uid, IEntityManager entManager, ApcPowerReceiverComponent? receiver = null)
|
public static bool IsPowered(this EntitySystem system, EntityUid uid, IEntityManager entManager, ApcPowerReceiverComponent? receiver = null)
|
||||||
{
|
{
|
||||||
if (receiver == null && !entManager.TryGetComponent(uid, out receiver))
|
if (receiver == null && !entManager.TryGetComponent(uid, out receiver))
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
return receiver.Powered;
|
return receiver.Powered;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user