Power cell slot QOL (#15373)
This commit is contained in:
25
Content.Server/PowerCell/PowerCellDrawComponent.cs
Normal file
25
Content.Server/PowerCell/PowerCellDrawComponent.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user