Resolves PowerChargerVisualizer is Obsolete (#13901)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
39
Content.Client/PowerCell/PowerChargerVisualizerComponent.cs
Normal file
39
Content.Client/PowerCell/PowerChargerVisualizerComponent.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Content.Shared.Power;
|
||||
|
||||
namespace Content.Client.PowerCell;
|
||||
|
||||
[RegisterComponent]
|
||||
[Access(typeof(PowerChargerVisualizerSystem))]
|
||||
public sealed class PowerChargerVisualsComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The base sprite state used if the power cell charger does not contain a power cell.
|
||||
/// </summary>
|
||||
[DataField("emptyState")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string EmptyState = "empty";
|
||||
|
||||
/// <summary>
|
||||
/// The base sprite state used if the power cell charger contains a power cell.
|
||||
/// </summary>
|
||||
[DataField("occupiedState")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string OccupiedState = "full";
|
||||
|
||||
/// <summary>
|
||||
/// A mapping of the indicator light overlays for the power cell charger.
|
||||
/// <see cref="CellChargerStatus.Off"/> Maps to the state used when the charger is out of power/disabled.
|
||||
/// <see cref="CellChargerStatus.Empty"/> Maps to the state used when the charger does not contain a power cell.
|
||||
/// <see cref="CellChargerStatus.Charging"/> Maps to the state used when the charger is charging a power cell.
|
||||
/// <see cref="CellChargerStatus.Charged"/> Maps to the state used when the charger contains a fully charged power cell.
|
||||
/// </summary>
|
||||
[DataField("lightStates")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public readonly Dictionary<CellChargerStatus, string> LightStates = new()
|
||||
{
|
||||
[CellChargerStatus.Off] = "light-off",
|
||||
[CellChargerStatus.Empty] = "light-empty",
|
||||
[CellChargerStatus.Charging] = "light-charging",
|
||||
[CellChargerStatus.Charged] = "light-charged",
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user