using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.PowerCell; /// /// Indicates that the entity's ActivatableUI requires power or else it closes. /// [RegisterComponent, Access(typeof(PowerCellSystem))] public sealed class PowerCellDrawComponent : Component { [ViewVariables(VVAccess.ReadWrite), DataField("enabled")] public bool Enabled; /// /// 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. /// [ViewVariables(VVAccess.ReadWrite), DataField("drawRate")] public float DrawRate = 1f; /// /// 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. /// [ViewVariables(VVAccess.ReadWrite), DataField("useRate")] public float UseRate; /// /// When the next automatic power draw will occur /// [DataField("nextUpdate", customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan NextUpdateTime; }