CatStation/Content.Shared/Power/Components/SharedApcPowerReceiverComponent.cs
Whatstone 56c459e98c
Make more ApcPowerReceiverComponent fields DataFields (#45022)
* Dirty ApcPowerReceiver if state doesn't match defs

* surely this will work and isn't massive hubris

* SPACE

* docs & comments

* voltage, not charge

* no space

* jfc
2026-07-30 05:10:39 +00:00

35 lines
1 KiB
C#

using Robust.Shared.GameStates;
namespace Content.Shared.Power.Components;
/// <summary>
/// Attempts to link with a nearby <see cref="ApcPowerProviderComponent"/>s
/// so that it can receive power from a <see cref="IApcNet"/>.
/// </summary>
[NetworkedComponent]
public abstract partial class SharedApcPowerReceiverComponent : Component
{
/// <summary>
/// If true, this entity either doesn't need power, or is currently receiving the power it needs.
/// </summary>
[ViewVariables]
public bool Powered;
/// <summary>
/// When false, causes this to appear powered even if not receiving power from an Apc.
/// </summary>
[DataField]
public bool NeedsPower = true;
/// <summary>
/// When true, causes this to never appear powered.
/// </summary>
[DataField]
public virtual bool PowerDisabled { get; set; }
/// <summary>
/// Amount of power this needs from an APC to function, in watts.
/// </summary>
[DataField("powerLoad")]
public virtual float Load { get; set; }
}