expedition air mod (#17369)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -105,14 +105,15 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
|
||||
_entManager.Dirty(gravity, metadata);
|
||||
|
||||
// Atmos
|
||||
var atmos = _entManager.EnsureComponent<MapAtmosphereComponent>(mapUid);
|
||||
atmos.Space = false;
|
||||
var air = _prototypeManager.Index<SalvageAirMod>(mission.Air);
|
||||
// copy into a new array since the yml deserialization discards the fixed length
|
||||
var moles = new float[Atmospherics.AdjustedNumberOfGases];
|
||||
moles[(int) Gas.Oxygen] = 21.824779f;
|
||||
moles[(int) Gas.Nitrogen] = 82.10312f;
|
||||
|
||||
air.Gases.CopyTo(moles, 0);
|
||||
var atmos = _entManager.EnsureComponent<MapAtmosphereComponent>(mapUid);
|
||||
atmos.Space = air.Space;
|
||||
atmos.Mixture = new GasMixture(2500)
|
||||
{
|
||||
// TODO: temperature mods
|
||||
Temperature = 293.15f,
|
||||
Moles = moles,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user