Files
Delta-v/Content.Server/_DV/Wires/WiresSystem.Power.cs
T
deltanedasanddeltanedas 766245e810 add apc wires (#3372)
* add disabling apc power with wire

* update apc yml

* make wire lights work for APC

* show it as Disabled in the ui

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-04-06 03:51:55 +01:00

18 lines
492 B
C#

using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
namespace Content.Server.Wires;
public sealed partial class WiresSystem
{
public bool HasPower(EntityUid uid)
{
// for APCs check if the power wire isn't snipped/pulsed
if (TryComp<PowerNetworkBatteryComponent>(uid, out var comp))
return comp.PowerEnabled;
// for other devices check for APCPowerReceiver
return this.IsPowered(uid, EntityManager);
}
}