From 8b7a0e7f277472ca7a483026016078d05c13dbd6 Mon Sep 17 00:00:00 2001
From: Schrodinger71 <132720404+Schrodinger71@users.noreply.github.com>
Date: Tue, 21 Nov 2023 22:50:02 +0300
Subject: [PATCH] Create ShowHealthBarsComponent.cs
---
.../ShowHealthBarsComponent.cs | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 Content.Shared/ADT/EntityHealthBar /ShowHealthBarsComponent.cs
diff --git a/Content.Shared/ADT/EntityHealthBar /ShowHealthBarsComponent.cs b/Content.Shared/ADT/EntityHealthBar /ShowHealthBarsComponent.cs
new file mode 100644
index 00000000000..97816217fe8
--- /dev/null
+++ b/Content.Shared/ADT/EntityHealthBar /ShowHealthBarsComponent.cs
@@ -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;
+
+///
+/// This component allows you to see health bars above damageable mobs.
+///
+[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
+public sealed partial class ShowHealthBarsComponent : Component
+{
+ ///
+ /// If null, displays all health bars.
+ /// If not null, displays health bars of only that damage container.
+ ///
+
+ [AutoNetworkedField]
+ [DataField("damageContainers", customTypeSerializer: typeof(PrototypeIdListSerializer))]
+ public List DamageContainers = new();
+
+ public override bool SendOnlyToOwner => true;
+}