Files
crystall-punk-14/Content.Server/PowerCell/PowerCellDrawComponent.cs
2023-04-23 12:25:12 +10:00

26 lines
860 B
C#

namespace Content.Server.PowerCell;
/// <summary>
/// Indicates that the entity's ActivatableUI requires power or else it closes.
/// </summary>
[RegisterComponent]
public sealed class PowerCellDrawComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField("enabled")]
public bool Enabled = false;
/// <summary>
/// How much the entity draws while the UI is open.
/// Set to 0 if you just wish to check for power upon opening the UI.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("drawRate")]
public float DrawRate = 1f;
/// <summary>
/// How much power is used whenever the entity is "used".
/// This is used to ensure the UI won't open again without a minimum use power.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("useRate")]
public float UseRate = 0f;
}