Null list
This commit is contained in:
@@ -25,7 +25,7 @@ public sealed class EntityHealthBarOverlay : Overlay
|
|||||||
private readonly MobThresholdSystem _mobThresholdSystem;
|
private readonly MobThresholdSystem _mobThresholdSystem;
|
||||||
private readonly Texture _barTexture;
|
private readonly Texture _barTexture;
|
||||||
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
||||||
public List<string> DamageContainers = new();
|
public List<string>? DamageContainers;
|
||||||
// for icon frame change timer
|
// for icon frame change timer
|
||||||
int iconFrame = 1;
|
int iconFrame = 1;
|
||||||
double delayTime = 0.25;
|
double delayTime = 0.25;
|
||||||
@@ -70,7 +70,7 @@ public sealed class EntityHealthBarOverlay : Overlay
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmg.DamageContainerID == null || !DamageContainers.Contains(dmg.DamageContainerID))
|
if (dmg.DamageContainerID == null || DamageContainers != null && !DamageContainers.Contains(dmg.DamageContainerID))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var worldPosition = _transform.GetWorldPosition(xform);
|
var worldPosition = _transform.GetWorldPosition(xform);
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ namespace Content.Shared.EntityHealthBar
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
[DataField("damageContainers", customTypeSerializer: typeof(PrototypeIdListSerializer<DamageContainerPrototype>))]
|
[DataField("damageContainers", customTypeSerializer: typeof(PrototypeIdListSerializer<DamageContainerPrototype>))]
|
||||||
public List<string> DamageContainers = new();
|
public List<string>? DamageContainers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user