using Robust.Shared.Serialization; namespace Content.Shared.Power; /// /// Frontier: Sent to the server to perform some action with the charge in the machine. /// [Serializable, NetSerializable] public sealed class PowerChargeActionMessage : BoundUserInterfaceMessage { } /// /// Sent to the server to set whether the machine should be on or off /// [Serializable, NetSerializable] public sealed class SwitchChargingMachineMessage : BoundUserInterfaceMessage { public bool On; public SwitchChargingMachineMessage(bool on) { On = on; } } [Serializable, NetSerializable] public sealed class PowerChargeState : BoundUserInterfaceState { public bool On; public bool ActionUnlocked; // Frontier // 0 -> 255 public byte Charge; public PowerChargePowerStatus PowerStatus; public short PowerDraw; public short PowerDrawMax; public short EtaSeconds; public PowerChargeState( bool on, bool actionUnlocked, // Frontier byte charge, PowerChargePowerStatus powerStatus, short powerDraw, short powerDrawMax, short etaSeconds) { On = on; ActionUnlocked = actionUnlocked; // Frontier Charge = charge; PowerStatus = powerStatus; PowerDraw = powerDraw; PowerDrawMax = powerDrawMax; EtaSeconds = etaSeconds; } } [Serializable, NetSerializable] public enum PowerChargeUiKey { Key } [Serializable, NetSerializable] public enum PowerChargeVisuals { State, Charge, Active } [Serializable, NetSerializable] public enum PowerChargeStatus { Broken, Unpowered, Off, On } [Serializable, NetSerializable] public enum PowerChargePowerStatus : byte { Off, Discharging, Charging, FullyCharged }