mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
* cleanup * fix fixtures * prediction * fix test * review * fix svalinn visuals * fix chargers * fix portable recharger and its unlit visuals * fix borgs * oomba review * fix examination prediction
52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
using Content.Shared.PowerCell.Components;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Power.Components;
|
|
|
|
/// <summary>
|
|
/// Marker component that makes an entity with <see cref="PredictedBatteryComponent"/> update its appearance data for use with visualizers.
|
|
/// Also works with an entity with <see cref="PowerCellSlotComponent"/> and will relay the state of the inserted powercell.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed partial class PredictedBatteryVisualsComponent : Component;
|
|
|
|
/// <summary>
|
|
/// Keys for the appearance data.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public enum BatteryVisuals : byte
|
|
{
|
|
/// <summary>
|
|
/// The current charge state of the battery.
|
|
/// Either full, empty, or neither.
|
|
/// Uses a <see cref="BatteryState"/>.
|
|
/// </summary>
|
|
State,
|
|
/// <summary>
|
|
/// Is the battery currently charging or discharging?
|
|
/// Uses a <see cref="BatteryChargingState"/>.
|
|
/// </summary>
|
|
Charging,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Charge level status of the battery.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public enum BatteryChargingState : byte
|
|
{
|
|
/// <summary>
|
|
/// PredictedBatteryComponent.ChargeRate > 0
|
|
/// </summary>
|
|
Charging,
|
|
/// <summary>
|
|
/// PredictedBatteryComponent.ChargeRate < 0
|
|
/// </summary>
|
|
Decharging,
|
|
/// <summary>
|
|
/// PredictedBatteryComponent.ChargeRate == 0
|
|
/// </summary>
|
|
Constant,
|
|
}
|