mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-15 03:31:30 +01:00
20 lines
544 B
C#
20 lines
544 B
C#
using Content.Client.Power.Components;
|
|
using Content.Shared.Power.Components;
|
|
using Content.Shared.Power.EntitySystems;
|
|
|
|
namespace Content.Client.Power.EntitySystems;
|
|
|
|
public sealed class PowerNetSystem : SharedPowerNetSystem
|
|
{
|
|
public override bool IsPoweredCalculate(SharedApcPowerReceiverComponent comp)
|
|
{
|
|
return IsPoweredCalculate((ApcPowerReceiverComponent)comp);
|
|
}
|
|
|
|
private bool IsPoweredCalculate(ApcPowerReceiverComponent comp)
|
|
{
|
|
return !comp.PowerDisabled
|
|
&& !comp.NeedsPower;
|
|
}
|
|
}
|