Partial atmos refactor (#22521)

* Reduce atmos component queries

* Remove method events

* Cache airtight data

* Make MolesArchived nullable

* Fix airtight cache

* only get tile def once

* Immutable mixtures

* firelock queries

* misc

* misc cleanup

* Trim disconnected tiles

* Fix merge issues and bugs

* Why does the PR keep increasing in scope

* debug overlay

* Fix bugs

* Fix test, remove unused events

* Add setmapatmos command

* Fix overlays

* Add map check

* A

* Resolve conflicts with #26102

* Remove some obsolete methods
This commit is contained in:
Leon Friedrich
2024-03-24 03:34:56 +11:00
committed by GitHub
parent 05f282f5ce
commit 18a35e7e83
43 changed files with 922 additions and 666 deletions

View File

@@ -1001,20 +1001,13 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
light.AmbientLightColor = Color.FromHex("#D8B059");
Dirty(mapUid, light, metadata);
// Atmos
var atmos = EnsureComp<MapAtmosphereComponent>(mapUid);
var moles = new float[Atmospherics.AdjustedNumberOfGases];
moles[(int) Gas.Oxygen] = 21.824779f;
moles[(int) Gas.Nitrogen] = 82.10312f;
var mixture = new GasMixture(2500)
{
Temperature = 293.15f,
Moles = moles,
};
var mixture = new GasMixture(moles, Atmospherics.T20C);
_atmos.SetMapAtmosphere(mapUid, false, mixture, atmos);
_atmos.SetMapAtmosphere(mapUid, false, mixture);
}
/// <summary>