ECS Atmos Part 2: Moves a lot of Gas Mixture methods to AtmosphereSystem. (#4218)
This commit is contained in:
committed by
GitHub
parent
e16c23a747
commit
263c9ef974
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
@@ -82,7 +83,7 @@ namespace Content.Server.Atmos
|
||||
DismantleCooldown = 0;
|
||||
}
|
||||
|
||||
public void SelfBreakdown(bool spaceIsAllConsuming = false)
|
||||
public void SelfBreakdown(AtmosphereSystem atmosphereSystem, bool spaceIsAllConsuming = false)
|
||||
{
|
||||
var combined = new GasMixture(Atmospherics.CellVolume);
|
||||
|
||||
@@ -99,7 +100,7 @@ namespace Content.Server.Atmos
|
||||
foreach (var tile in _tiles)
|
||||
{
|
||||
if (tile?.Air == null) continue;
|
||||
combined.Merge(tile.Air);
|
||||
atmosphereSystem.Merge(combined, tile.Air);
|
||||
if (!spaceIsAllConsuming || !tile.Air.Immutable) continue;
|
||||
combined.Clear();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user