flammable entities hotfix (#23113)

* flammable fix

* move air check and ignition to if statement
This commit is contained in:
qwerltaz
2023-12-29 00:28:15 +01:00
committed by GitHub
parent 974d0ed6e7
commit 2fe1164a03

View 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);
}
}
}
}