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
@@ -1,3 +1,4 @@
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Atmos.Piping.Components;
|
||||
using Content.Server.Atmos.Piping.Unary.Components;
|
||||
using Content.Server.NodeContainer;
|
||||
@@ -31,9 +32,10 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
if (!nodeContainer.TryGetNode(injector.InletName, out PipeNode? inlet))
|
||||
return;
|
||||
|
||||
var environment = args.Atmosphere.GetTile(injector.Owner.Transform.Coordinates)!;
|
||||
var atmosphereSystem = Get<AtmosphereSystem>();
|
||||
var environment = atmosphereSystem.GetTileMixture(injector.Owner.Transform.Coordinates, true);
|
||||
|
||||
if (environment.Air == null)
|
||||
if (environment == null)
|
||||
return;
|
||||
|
||||
if (inlet.Air.Temperature > 0)
|
||||
@@ -42,8 +44,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
|
||||
var removed = inlet.Air.Remove(transferMoles);
|
||||
|
||||
environment.AssumeAir(removed);
|
||||
environment.Invalidate();
|
||||
atmosphereSystem.Merge(environment, removed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user