Skip to content

Commit

Permalink
Create ShowHealthBarsComponent.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 authored Nov 21, 2023
1 parent 002a4ca commit 8b7a0e7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Content.Shared/ADT/EntityHealthBar /ShowHealthBarsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Shared.Damage.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;

namespace Content.Shared.Backmen.EntityHealthBar;

/// <summary>
/// This component allows you to see health bars above damageable mobs.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class ShowHealthBarsComponent : Component
{
/// <summary>
/// If null, displays all health bars.
/// If not null, displays health bars of only that damage container.
/// </summary>

[AutoNetworkedField]
[DataField("damageContainers", customTypeSerializer: typeof(PrototypeIdListSerializer<DamageContainerPrototype>))]
public List<string> DamageContainers = new();

public override bool SendOnlyToOwner => true;
}

0 comments on commit 8b7a0e7

Please sign in to comment.