| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using Robust.Shared.Serialization;
- namespace Content.Shared.Power;
- /// <summary>
- /// Sent to the server to set whether the machine should be on or off
- /// </summary>
- [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;
- // 0 -> 255
- public byte Charge;
- public PowerChargePowerStatus PowerStatus;
- public short PowerDraw;
- public short PowerDrawMax;
- public short EtaSeconds;
- public PowerChargeState(
- bool on,
- byte charge,
- PowerChargePowerStatus powerStatus,
- short powerDraw,
- short powerDrawMax,
- short etaSeconds)
- {
- On = on;
- 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
- }
|