ECS Atmos Part 2: Moves a lot of Gas Mixture methods to AtmosphereSystem. (#4218)

This commit is contained in:
Vera Aguilera Puerto
2021-06-23 11:35:30 +02:00
committed by GitHub
parent e16c23a747
commit 263c9ef974
34 changed files with 461 additions and 464 deletions

View File

@@ -2,12 +2,14 @@
using System;
using Content.Server.Atmos;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Body.Circulatory;
using Content.Server.Body.Respiratory;
using Content.Server.Notification;
using Content.Shared.Atmos;
using Content.Shared.Body.Components;
using Content.Shared.MobState;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -67,7 +69,7 @@ namespace Content.Server.Body.Behavior
public void Transfer(GasMixture from, GasMixture to, float ratio)
{
to.Merge(from.RemoveRatio(ratio));
EntitySystem.Get<AtmosphereSystem>().Merge(to, from.RemoveRatio(ratio));
}
public void ToBloodstream(GasMixture mixture)
@@ -84,7 +86,7 @@ namespace Content.Server.Body.Behavior
var to = bloodstream.Air;
to.Merge(mixture);
EntitySystem.Get<AtmosphereSystem>().Merge(to, mixture);
mixture.Clear();
}
@@ -189,7 +191,7 @@ namespace Content.Server.Body.Behavior
bloodstream.PumpToxins(Air);
var lungRemoved = Air.RemoveRatio(0.5f);
to.Merge(lungRemoved);
EntitySystem.Get<AtmosphereSystem>().Merge(to, lungRemoved);
}
}