Small code cleanup to health bar (#28554)

This commit is contained in:
AJCM-git
2024-06-03 12:22:26 -04:00
committed by GitHub
parent 1e04b3c9f4
commit 619d82ed42
3 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ public sealed class ShowHealthBarsCommand : LocalizedCommands
var showHealthBarsComponent = new ShowHealthBarsComponent var showHealthBarsComponent = new ShowHealthBarsComponent
{ {
DamageContainers = args.ToList(), DamageContainers = args.ToList(),
HealthStatusIcon = "", HealthStatusIcon = null,
NetSyncEnabled = false NetSyncEnabled = false
}; };

View File

@@ -33,7 +33,7 @@ public sealed class EntityHealthBarOverlay : Overlay
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV; public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
public HashSet<string> DamageContainers = new(); public HashSet<string> DamageContainers = new();
public ProtoId<StatusIconPrototype> StatusIcon; public ProtoId<StatusIconPrototype>? StatusIcon;
public EntityHealthBarOverlay(IEntityManager entManager, IPrototypeManager prototype) public EntityHealthBarOverlay(IEntityManager entManager, IPrototypeManager prototype)
{ {

View File

@@ -19,5 +19,5 @@ public sealed partial class ShowHealthBarsComponent : Component
public List<string> DamageContainers = new(); public List<string> DamageContainers = new();
[DataField] [DataField]
public ProtoId<StatusIconPrototype> HealthStatusIcon = "HealthIconFine"; public ProtoId<StatusIconPrototype>? HealthStatusIcon = "HealthIconFine";
} }