mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* 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
35 lines
1 KiB
C#
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; }
|
|
}
|