]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fire damage system fixes (#37241)
authorUpAndLeaves <92269094+Alpha-Two@users.noreply.github.com>
Wed, 7 May 2025 02:03:05 +0000 (03:03 +0100)
committerGitHub <noreply@github.com>
Wed, 7 May 2025 02:03:05 +0000 (22:03 -0400)
Fire fixes

Content.Shared/Atmos/GetFireProtectionEvent.cs
Content.Shared/Clothing/EntitySystems/FireProtectionSystem.cs

index e243295449a721e0b93181af92e5532859d89030..b7a77a8925d134bbda5da9284d31acae6aeb0390 100644 (file)
@@ -29,5 +29,6 @@ public sealed class GetFireProtectionEvent : EntityEventArgs, IInventoryRelayEve
     public void Reduce(float by)
     {
         Multiplier -= by;
+        Multiplier = MathF.Max(Multiplier, 0f);
     }
 }
index b6c29b21ada3e7bc351cda99cc2dbef4c76156d6..8db4e1c9d2b6ba998758b6f847e837fb885a34c3 100644 (file)
@@ -25,7 +25,7 @@ public sealed class FireProtectionSystem : EntitySystem
 
     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)
             return;