Skip to content

Commit cf2c5ae

Browse files
committed
Remove Gas Mask checks for Player Toxicity Counter
You can definitely be toxic even with a Gas Mask on, plus these were holdovers from the original implementation anyway
1 parent 93e476c commit cf2c5ae

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

zscript/undeadzeratul/elements/counters/UZPlayerToxicityCounter.zs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class UZPlayerToxicityCounter : BaseCounterHUDElement {
2323
}
2424

2525
override bool ShouldDrawCounter(HCStatusbar sb, float counterValue) {
26-
return !IsGasMaskWorn(sb) && counterValue > 0;
26+
return counterValue > 0;
2727
}
2828

2929
override float GetCounterValue(HCStatusbar sb) {
@@ -36,15 +36,11 @@ class UZPlayerToxicityCounter : BaseCounterHUDElement {
3636
}
3737

3838
override string FormatValue(HCStatusbar sb, float counterValue, float maxValue) {
39-
return (Level.airSupply <= 0 && sb.hpl.airCapacity <= 0) || IsGasMaskWorn(sb)
39+
return (Level.airSupply <= 0 && sb.hpl.airCapacity <= 0)
4040
? "0.00%"
4141
: String.Format("%.2f%%", clamp(counterValue / maxValue * 100.0, 0.0, 100.0));
4242
}
4343

44-
private bool IsGasMaskWorn(HCStatusbar sb) {
45-
return _service && int(_service.GetIntUI("IsGasMaskWorn", objectArg: sb.hpl.FindInventory(_invClass)));
46-
}
47-
4844
private float GetPlayerToxicity(HCStatusbar sb) {
4945
return _service
5046
? _service.GetIntUI("GetPlayerToxicity", objectArg: sb.hpl)

0 commit comments

Comments
 (0)