]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Small code cleanup to health bar (#28554)
authorAJCM-git <60196617+AJCM-git@users.noreply.github.com>
Mon, 3 Jun 2024 16:22:26 +0000 (12:22 -0400)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2024 16:22:26 +0000 (12:22 -0400)
Content.Client/Commands/ShowHealthBarsCommand.cs
Content.Client/Overlays/EntityHealthBarOverlay.cs
Content.Shared/Overlays/ShowHealthBarsComponent.cs

index ef918313a0d13b1dfa3457d96f4640f355719961..0811f9666378d50e6169710cd0d9a6a1bf792940 100644 (file)
@@ -35,7 +35,7 @@ public sealed class ShowHealthBarsCommand : LocalizedCommands
             var showHealthBarsComponent = new ShowHealthBarsComponent
             {
                 DamageContainers = args.ToList(),
-                HealthStatusIcon = "",
+                HealthStatusIcon = null,
                 NetSyncEnabled = false
             };
 
index 55978d98f7e2480773d56cbec9969ba355d0b953..4f928437395a97d88e28ef43341200cc62527f5e 100644 (file)
@@ -33,7 +33,7 @@ public sealed class EntityHealthBarOverlay : Overlay
 
     public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
     public HashSet<string> DamageContainers = new();
-    public ProtoId<StatusIconPrototype> StatusIcon;
+    public ProtoId<StatusIconPrototype>? StatusIcon;
 
     public EntityHealthBarOverlay(IEntityManager entManager, IPrototypeManager prototype)
     {
index 1297d5683854f934317746751ae067ca0baf257c..4229e27af604baf5e1fddc497f97c1bdae112415 100644 (file)
@@ -19,5 +19,5 @@ public sealed partial class ShowHealthBarsComponent : Component
     public List<string> DamageContainers = new();
 
     [DataField]
-    public ProtoId<StatusIconPrototype> HealthStatusIcon = "HealthIconFine";
+    public ProtoId<StatusIconPrototype>? HealthStatusIcon = "HealthIconFine";
 }