Resolves ApcVisualizer is Obsolete (#13898)
This commit is contained in:
@@ -3,36 +3,175 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared.APC
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public enum ApcVisuals
|
||||
public enum ApcVisuals : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// APC lights/HUD.
|
||||
/// APC locks.
|
||||
/// </summary>
|
||||
LockState,
|
||||
/// <summary>
|
||||
/// APC channels.
|
||||
/// </summary>
|
||||
ChannelState,
|
||||
/// <summary>
|
||||
/// APC lights/HUD.
|
||||
/// </summary>
|
||||
ChargeState,
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum ApcChargeState
|
||||
public enum ApcPanelState : sbyte
|
||||
{
|
||||
/// <summary>
|
||||
/// APC does not have enough power to charge cell (if necessary) and keep powering the area.
|
||||
/// APC is closed.
|
||||
/// </summary>
|
||||
Lack,
|
||||
Closed = 0,
|
||||
/// <summary>
|
||||
/// APC is opened.
|
||||
/// </summary>
|
||||
Open = 1,
|
||||
/// <summary>
|
||||
/// APC is oaisdoj.
|
||||
/// </summary>
|
||||
Error = -1,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The state of the APC interface lock.
|
||||
/// None of this is implemented.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public enum ApcLockState : sbyte
|
||||
{
|
||||
/// <summary>
|
||||
/// Empty bitmask.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// APC is not full but has enough power.
|
||||
/// Bitfield indicating status of APC lock indicator.
|
||||
/// </summary>
|
||||
Charging,
|
||||
Lock = (1<<0),
|
||||
/// <summary>
|
||||
/// Bit state indicating that the given APC lock is unlocked.
|
||||
/// </summary>
|
||||
Unlocked = None,
|
||||
/// <summary>
|
||||
/// Bit state indicating that the given APC lock is locked.
|
||||
/// </summary>
|
||||
Locked = (1<<0),
|
||||
|
||||
/// <summary>
|
||||
/// APC battery is full and has enough power.
|
||||
/// Bitmask for the full state for a given APC lock indicator.
|
||||
/// </summary>
|
||||
Full,
|
||||
All = (Lock),
|
||||
|
||||
/// <summary>
|
||||
/// The log 2 width in bits of the bitfields indicating the status of an APC lock indicator.
|
||||
/// Used for bit shifting operations (Mask for the state for indicator i is (All << (i << LogWidth))).
|
||||
/// </summary>
|
||||
LogWidth = 0,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// APC power channel states.
|
||||
/// None of this is implemented.
|
||||
/// </summary>
|
||||
public enum ApcChannelState : sbyte
|
||||
{
|
||||
/// <summary>
|
||||
/// Empty bitmask.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Bitfield indicating whether the APC is automatically regulating the given channel.
|
||||
/// </summary>
|
||||
Control = (1<<0),
|
||||
/// <summary>
|
||||
/// Bit state indicating that the APC has been set to automatically toggle the given channel depending on available power.
|
||||
/// </summary>
|
||||
Auto = None,
|
||||
/// <summary>
|
||||
/// Bit state indicating that the APC has been set to always provide/not provide power on the given channel if possible.
|
||||
/// </summary>
|
||||
Manual = Control,
|
||||
|
||||
/// <summary>
|
||||
/// Bitfield indicating whether the APC is currently providing power on the given channel.
|
||||
/// </summary>
|
||||
Power = (1<<1),
|
||||
/// <summary>
|
||||
/// Bit state indicating that the APC is currently not providing power on the given channel.
|
||||
/// </summary>
|
||||
Off = None,
|
||||
/// <summary>
|
||||
/// Bit state indicating that the APC is currently providing power on the given channel.
|
||||
/// </summary>
|
||||
On = Power,
|
||||
|
||||
/// <summary>
|
||||
/// Bitmask for the full state for a given APC power channel.
|
||||
/// </summary>
|
||||
All = Power | Control,
|
||||
|
||||
/// <summary>
|
||||
/// State that indicates the given channel has been automatically disabled.
|
||||
/// </summary>
|
||||
AutoOff = (Off | Auto),
|
||||
/// <summary>
|
||||
/// State that indicates the given channel has been automatically enabled.
|
||||
/// </summary>
|
||||
AutoOn = (On | Auto),
|
||||
/// <summary>
|
||||
/// State that indicates the given channel has been manually disabled.
|
||||
/// </summary>
|
||||
ManualOff = (Off | Manual),
|
||||
/// <summary>
|
||||
/// State that indicates the given channel has been manually enabled.
|
||||
/// </summary>
|
||||
ManualOn = (On | Manual),
|
||||
|
||||
/// <summary>
|
||||
/// The log 2 width in bits of the bitfields indicating the status of an APC power channel.
|
||||
/// Used for bit shifting operations (Mask for the state for channel i is (All << (i << LogWidth))).
|
||||
/// </summary>
|
||||
LogWidth = 1,
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum ApcChargeState : sbyte
|
||||
{
|
||||
/// <summary>
|
||||
/// APC does not have enough power to charge cell (if necessary) and keep powering the area.
|
||||
/// </summary>
|
||||
Lack = 0,
|
||||
|
||||
/// <summary>
|
||||
/// APC is not full but has enough power.
|
||||
/// </summary>
|
||||
Charging = 1,
|
||||
|
||||
/// <summary>
|
||||
/// APC battery is full and has enough power.
|
||||
/// </summary>
|
||||
Full = 2,
|
||||
|
||||
/// <summary>
|
||||
/// APC is being remotely accessed.
|
||||
/// Currently unimplemented, though the corresponding sprite state exists in the RSI.
|
||||
/// </summary>
|
||||
Remote = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The number of valid states charge states the APC can be in.
|
||||
/// </summary>
|
||||
NumStates = 4,
|
||||
|
||||
/// <summary>
|
||||
/// APC is emagged (and not displaying other useful power colors at a glance)
|
||||
/// </summary>
|
||||
Emag,
|
||||
Emag = -1,
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
Reference in New Issue
Block a user