using Content.Server.Power.Components; using Content.Shared.Power; namespace Content.Server.Power.SMES; /// /// Handles the "user-facing" side of the actual SMES object. /// This is operations that are specific to the SMES, like UI and visuals. /// Logic is handled in /// Code interfacing with the powernet is handled in and . /// [RegisterComponent, Access(typeof(SmesSystem))] public sealed partial class SmesComponent : Component { [ViewVariables] public ChargeState LastChargeState; [ViewVariables] public TimeSpan LastChargeStateTime; [ViewVariables] public int LastChargeLevel; [ViewVariables] public TimeSpan LastChargeLevelTime; [ViewVariables] public TimeSpan VisualsChangeDelay = TimeSpan.FromSeconds(1); /// /// The number of distinct charge levels a SMES has. /// 0 is empty max is full. /// [DataField("numChargeLevels")] public int NumChargeLevels = 6; /// /// The charge level of the SMES as of the most recent update. /// [ViewVariables] public int ChargeLevel = 0; /// /// Whether the SMES is being charged/discharged/neither. /// [ViewVariables] public ChargeState ChargeState = ChargeState.Still; }