Draw MapAtmosphere gasses (#17688)

This commit is contained in:
metalgearsloth
2023-06-28 21:22:03 +10:00
committed by GitHub
parent 2488dd4ecd
commit 44a3db398b
11 changed files with 250 additions and 81 deletions

View File

@@ -10,6 +10,7 @@ using Content.Client.Chemistry.UI;
using Content.Client.Construction;
using Content.Server.Atmos;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Construction.Components;
using Content.Server.Gravity;
using Content.Server.Power.Components;
@@ -927,17 +928,16 @@ public abstract partial class InteractionTest
var target = uid ?? MapData.MapUid;
await Server.WaitPost(() =>
{
var atmosSystem = SEntMan.System<AtmosphereSystem>();
var atmos = SEntMan.EnsureComponent<MapAtmosphereComponent>(target);
atmos.Space = false;
var moles = new float[Atmospherics.AdjustedNumberOfGases];
moles[(int) Gas.Oxygen] = 21.824779f;
moles[(int) Gas.Nitrogen] = 82.10312f;
atmos.Mixture = new GasMixture(2500)
atmosSystem.SetMapAtmosphere(target, false, new GasMixture(2500)
{
Temperature = 293.15f,
Moles = moles,
};
}, atmos);
});
}