ShowHealthBarsComponent.cs 756 B

123456789101112131415161718192021222324252627
  1. using Content.Shared.Damage.Prototypes;
  2. using Content.Shared.StatusIcon;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Shared.Overlays;
  6. /// <summary>
  7. /// This component allows you to see health bars above damageable mobs.
  8. /// </summary>
  9. [RegisterComponent, NetworkedComponent]
  10. [AutoGenerateComponentState(true)]
  11. public sealed partial class ShowHealthBarsComponent : Component
  12. {
  13. /// <summary>
  14. /// Displays health bars of the damage containers.
  15. /// </summary>
  16. [DataField]
  17. [AutoNetworkedField]
  18. public List<ProtoId<DamageContainerPrototype>> DamageContainers = new()
  19. {
  20. "Biological"
  21. };
  22. [DataField]
  23. public ProtoId<HealthIconPrototype>? HealthStatusIcon = "HealthIconFine";
  24. }