Fire damage system fixes (#37241)

Fire fixes
This commit is contained in:
UpAndLeaves
2025-05-07 03:03:05 +01:00
committed by GitHub
parent 012eeb3158
commit 8cf6ca78cf
2 changed files with 2 additions and 1 deletions

View File

@@ -29,5 +29,6 @@ public sealed class GetFireProtectionEvent : EntityEventArgs, IInventoryRelayEve
public void Reduce(float by) public void Reduce(float by)
{ {
Multiplier -= by; Multiplier -= by;
Multiplier = MathF.Max(Multiplier, 0f);
} }
} }

View File

@@ -25,7 +25,7 @@ public sealed class FireProtectionSystem : EntitySystem
private void OnArmorExamine(Entity<FireProtectionComponent> ent, ref ArmorExamineEvent args) private void OnArmorExamine(Entity<FireProtectionComponent> ent, ref ArmorExamineEvent args)
{ {
var value = MathF.Round((1f - ent.Comp.Reduction) * 100, 1); var value = MathF.Round(ent.Comp.Reduction * 100, 1);
if (value == 0) if (value == 0)
return; return;