PowerChargerVisualizerComponent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Content.Shared.Power;
  2. namespace Content.Client.PowerCell;
  3. [RegisterComponent]
  4. [Access(typeof(PowerChargerVisualizerSystem))]
  5. public sealed partial class PowerChargerVisualsComponent : Component
  6. {
  7. /// <summary>
  8. /// The base sprite state used if the power cell charger does not contain a power cell.
  9. /// </summary>
  10. [DataField("emptyState")]
  11. [ViewVariables(VVAccess.ReadWrite)]
  12. public string EmptyState = "empty";
  13. /// <summary>
  14. /// The base sprite state used if the power cell charger contains a power cell.
  15. /// </summary>
  16. [DataField("occupiedState")]
  17. [ViewVariables(VVAccess.ReadWrite)]
  18. public string OccupiedState = "full";
  19. /// <summary>
  20. /// A mapping of the indicator light overlays for the power cell charger.
  21. /// <see cref="CellChargerStatus.Off"/> Maps to the state used when the charger is out of power/disabled.
  22. /// <see cref="CellChargerStatus.Empty"/> Maps to the state used when the charger does not contain a power cell.
  23. /// <see cref="CellChargerStatus.Charging"/> Maps to the state used when the charger is charging a power cell.
  24. /// <see cref="CellChargerStatus.Charged"/> Maps to the state used when the charger contains a fully charged power cell.
  25. /// </summary>
  26. [DataField("lightStates")]
  27. [ViewVariables(VVAccess.ReadWrite)]
  28. public Dictionary<CellChargerStatus, string> LightStates = new()
  29. {
  30. [CellChargerStatus.Off] = "light-off",
  31. [CellChargerStatus.Empty] = "light-empty",
  32. [CellChargerStatus.Charging] = "light-charging",
  33. [CellChargerStatus.Charged] = "light-charged",
  34. };
  35. }