* Work on abstracting out chargeup functionality/ui from grav gen * Work on station anchor * Finish implementing station anchors * uhh yeah * ok. * fix tests * whoops * Get the last extraneous yaml fail * PJB review * beast mode... ACTIVATE! --------- Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com> Co-authored-by: EmoGarbage404 <retron404@gmail.com>
78 lines
1.5 KiB
C#
78 lines
1.5 KiB
C#
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
|
|
}
|