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:
@@ -27,8 +27,12 @@ public sealed class AutomaticAtmosSystem : EntitySystem
|
||||
// Also, these calls are surprisingly slow.
|
||||
// TODO: Make tiledefmanager cache the IsSpace property, and turn this lookup-through-two-interfaces into
|
||||
// TODO: a simple array lookup, as tile IDs are likely contiguous, and there's at most 2^16 possibilities anyway.
|
||||
if (!((ev.OldTile.IsSpace(_tileDefinitionManager) && !ev.NewTile.IsSpace(_tileDefinitionManager)) ||
|
||||
(!ev.OldTile.IsSpace(_tileDefinitionManager) && ev.NewTile.IsSpace(_tileDefinitionManager))) ||
|
||||
|
||||
var oldSpace = ev.OldTile.IsSpace(_tileDefinitionManager);
|
||||
var newSpace = ev.NewTile.IsSpace(_tileDefinitionManager);
|
||||
|
||||
if (!(oldSpace && !newSpace ||
|
||||
!oldSpace && newSpace) ||
|
||||
_atmosphereSystem.HasAtmosphere(ev.Entity))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user