diff --git a/Content.Server/GameObjects/Components/NodeContainer/NodeGroups/ApcNetNodeGroup.cs b/Content.Server/GameObjects/Components/NodeContainer/NodeGroups/ApcNetNodeGroup.cs index 4b6a11a870..9ff47fa32e 100644 --- a/Content.Server/GameObjects/Components/NodeContainer/NodeGroups/ApcNetNodeGroup.cs +++ b/Content.Server/GameObjects/Components/NodeContainer/NodeGroups/ApcNetNodeGroup.cs @@ -97,6 +97,9 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups var availablePowerFraction = totalCharge / totalMaxCharge; foreach (var receiver in _providerReceivers.SelectMany(kvp => kvp.Value)) { + if (!receiver.NeedsPower || receiver.PowerDisabled) + continue; + receiver.HasApcPower = TryUsePower(receiver.Load * frameTime); } } diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs index bca4524740..8d1e20b8a0 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverComponent.cs @@ -22,7 +22,6 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents public class PowerReceiverComponent : Component, IExamine { [Dependency] private readonly IServerEntityManager _serverEntityManager = default!; - [Dependency] private readonly IMapManager _mapManager = default!; public override string Name => "PowerReceiver"; @@ -64,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents private int _load; /// - /// When true, causes this to appear powered even if not receiving power from an Apc. + /// When false, causes this to appear powered even if not receiving power from an Apc. /// [ViewVariables(VVAccess.ReadWrite)] public bool NeedsPower { get => _needsPower; set => SetNeedsPower(value); } @@ -73,6 +72,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents /// /// When true, causes this to never appear powered. /// + [ViewVariables(VVAccess.ReadWrite)] public bool PowerDisabled { get => _powerDisabled; set => SetPowerDisabled(value); } private bool _powerDisabled;