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:
@@ -172,7 +172,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
var id = VisibleGasId[i];
|
||||
var gas = _atmosphereSystem.GetGas(id);
|
||||
var moles = mixture?.Moles[id] ?? 0f;
|
||||
var moles = mixture?[id] ?? 0f;
|
||||
ref var opacity = ref data.Opacity[i];
|
||||
|
||||
if (moles < gas.GasMolesVisible)
|
||||
@@ -217,13 +217,13 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
oldData = new GasOverlayData(tile.Hotspot.State, oldData.Opacity);
|
||||
}
|
||||
|
||||
if (tile.Air != null)
|
||||
if (tile is {Air: not null, NoGridTile: false})
|
||||
{
|
||||
for (var i = 0; i < VisibleGasId.Length; i++)
|
||||
{
|
||||
var id = VisibleGasId[i];
|
||||
var gas = _atmosphereSystem.GetGas(id);
|
||||
var moles = tile.Air.Moles[id];
|
||||
var moles = tile.Air[id];
|
||||
ref var oldOpacity = ref oldData.Opacity[i];
|
||||
|
||||
if (moles < gas.GasMolesVisible)
|
||||
|
||||
Reference in New Issue
Block a user