]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
flammable entities hotfix (#23113)
authorqwerltaz <69696513+qwerltaz@users.noreply.github.com>
Thu, 28 Dec 2023 23:28:15 +0000 (00:28 +0100)
committerGitHub <noreply@github.com>
Thu, 28 Dec 2023 23:28:15 +0000 (18:28 -0500)
* flammable fix

* move air check and ignition to if statement

Content.Server/Atmos/EntitySystems/FlammableSystem.cs

index a970ef564a1e9fb97db827ff9cf2c598a13a6728..f2434a54becf4e29157d0184e8d10380ffd2cb36 100644 (file)
@@ -382,6 +382,18 @@ namespace Content.Server.Atmos.EntitySystems
 
                 if (flammable.FireStacks > 0)
                 {
+                    var air = _atmosphereSystem.GetContainingMixture(uid);
+
+                    // If we're in an oxygenless environment, put the fire out.
+                    if (air == null || air.GetMoles(Gas.Oxygen) < 1f)
+                    {
+                        Extinguish(uid, flammable);
+                        continue;
+                    }
+
+                    EnsureComp<IgnitionSourceComponent>(uid);
+                    _ignitionSourceSystem.SetIgnited(uid);
+
                     // TODO FLAMMABLE: further balancing
                     var damageScale = Math.Min((int)flammable.FireStacks, 5);
 
@@ -395,20 +407,7 @@ namespace Content.Server.Atmos.EntitySystems
                 else
                 {
                     Extinguish(uid, flammable);
-                    continue;
                 }
-
-                var air = _atmosphereSystem.GetContainingMixture(uid);
-
-                // If we're in an oxygenless environment, put the fire out.
-                if (air == null || air.GetMoles(Gas.Oxygen) < 1f)
-                {
-                    Extinguish(uid, flammable);
-                    continue;
-                }
-
-                EnsureComp<IgnitionSourceComponent>(uid);
-                _ignitionSourceSystem.SetIgnited(uid);
             }
         }
     }