ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem. (#4285)
* ECS Atmos Part 3: Removes AtmosHelpers, add many methods to AtmosphereSystem * Adds API for adding/removing active tiles. * Adds API for FixVacuum. * Adds API for UpdateAdjacent. * Adds API for IsTileAirBlocked. * Re-organize hotspot code * Adds API for IsTileSpace. * RemoveGasCommand uses AtmosphereSystem * AddGasCommand uses AtmosphereSystem. * SetTemperatureCommand uses AtmosphereSystem. * Adds API for IsSimulatedGrid. * GasLeak uses AtmosphereSystem. * Makes Spark method in GasLeak ALSO use AtmosphereSystem. * GasPassiveVentSystem uses AtmosphereSystem. * GasMinerSystem uses AtmosphereSystem. * GasOutletInjectorSystem uses AtmosphereSystem. * GasVentPumpSystem uses AtmosphereSystem. * GasDualPortVentPumpSystem uses AtmosphereSystem. * GasVolumePumpSystem uses AtmosphereSystem. * GasAnalyzerComponent uses AtmosphereSystem. * Add API for GetAdjacentTileMixtures. * GasVentScrubberSystem uses AtmosphereSystem. * AirtightComponent uses AtmosphereSystem. * GasLeaks's TryFindRandomTile uses AtmosphereSystem. * Adds API for GetAdjacentTiles. * FirelockComponent's IsHoldingFire uses AtmosphereSystem. * Adds API for GetAllTileMixtures. * DeleteGasCommand uses AtmosphereSystem. * FixGridAtmos uses AtmosphereSystem. * FillGasCommand uses AtmosphereSystem. * SetAtmosTemperatureCommand uses AtmosphereSystem.
This commit is contained in:
committed by
GitHub
parent
10ced26b0d
commit
c8ba345cdc
@@ -123,8 +123,7 @@ namespace Content.Server.Atmos.Components
|
||||
{
|
||||
// Already get the pressure before Dirty(), because we can't get the EntitySystem in that thread or smth
|
||||
var pressure = 0f;
|
||||
var gam = EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(Owner.Transform.Coordinates);
|
||||
var tile = gam?.GetTile(Owner.Transform.Coordinates)?.Air;
|
||||
var tile = EntitySystem.Get<AtmosphereSystem>().GetTileMixture(Owner.Transform.Coordinates);
|
||||
if (tile != null)
|
||||
{
|
||||
pressure = tile.Pressure;
|
||||
@@ -182,9 +181,8 @@ namespace Content.Server.Atmos.Components
|
||||
pos = _position.Value;
|
||||
}
|
||||
|
||||
var atmosSystem = EntitySystem.Get<AtmosphereSystem>();
|
||||
var gam = atmosSystem.GetGridAtmosphere(pos);
|
||||
var tile = gam.GetTile(pos)?.Air;
|
||||
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
|
||||
var tile = atmosphereSystem.GetTileMixture(pos);
|
||||
if (tile == null)
|
||||
{
|
||||
error = "No Atmosphere!";
|
||||
@@ -201,7 +199,7 @@ namespace Content.Server.Atmos.Components
|
||||
|
||||
for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
|
||||
{
|
||||
var gas = atmosSystem.GetGas(i);
|
||||
var gas = atmosphereSystem.GetGas(i);
|
||||
|
||||
if (tile.Moles[i] <= Atmospherics.GasMinMoles) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user