ECS Atmos Part 1: Move GridAtmosphere updating and processing to AtmosphereSystem.Processing (#4206)

This commit is contained in:
Vera Aguilera Puerto
2021-06-22 10:28:15 +02:00
committed by GitHub
parent f2816e8081
commit 3f28a4d784
6 changed files with 418 additions and 489 deletions

View File

@@ -149,15 +149,10 @@ namespace Content.Server.Atmos.EntitySystems
{
base.Update(frameTime);
UpdateProcessing(frameTime);
_exposedTimer += frameTime;
foreach (var (mapGridComponent, gridAtmosphereComponent) in EntityManager.ComponentManager.EntityQuery<IMapGridComponent, IGridAtmosphereComponent>(true))
{
if (_pauseManager.IsGridPaused(mapGridComponent.GridIndex)) continue;
gridAtmosphereComponent.Update(frameTime);
}
if (_exposedTimer >= ExposedUpdateDelay)
{
foreach (var exposed in EntityManager.ComponentManager.EntityQuery<AtmosExposedComponent>(true))
@@ -167,7 +162,7 @@ namespace Content.Server.Atmos.EntitySystems
exposed.Update(tile, _exposedTimer);
}
_exposedTimer = 0;
_exposedTimer -= ExposedUpdateDelay;
}
}
}