ChargerComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Content.Shared.Power;
  2. using Content.Shared.Whitelist;
  3. namespace Content.Server.Power.Components
  4. {
  5. [RegisterComponent]
  6. public sealed partial class ChargerComponent : Component
  7. {
  8. [ViewVariables]
  9. public CellChargerStatus Status;
  10. /// <summary>
  11. /// The charge rate of the charger, in watts
  12. /// </summary>
  13. [DataField("chargeRate")]
  14. public float ChargeRate = 20.0f;
  15. /// <summary>
  16. /// The container ID that is holds the entities being charged.
  17. /// </summary>
  18. [DataField("slotId", required: true)]
  19. public string SlotId = string.Empty;
  20. /// <summary>
  21. /// A whitelist for what entities can be charged by this Charger.
  22. /// </summary>
  23. [DataField("whitelist")]
  24. public EntityWhitelist? Whitelist;
  25. /// <summary>
  26. /// Indicates whether the charger is portable and thus subject to EMP effects
  27. /// and bypasses checks for transform, anchored, and ApcPowerReceiverComponent.
  28. /// </summary>
  29. [DataField]
  30. public bool Portable = false;
  31. }
  32. }