public override void Update(float frameTime) { base.Update(frameTime); UpdateProcessing(frameTime); UpdateHighPressure(frameTime); _exposedTimer += frameTime; if (_exposedTimer < ExposedUpdateDelay) { return; } foreach (var(exposed, transform) in EntityManager.EntityQuery <AtmosExposedComponent, TransformComponent>()) { // Used for things like disposals/cryo to change which air people are exposed to. var airEvent = new AtmosExposedGetAirEvent(); RaiseLocalEvent(exposed.Owner, ref airEvent, false); airEvent.Gas ??= GetTileMixture(transform.Coordinates); if (airEvent.Gas == null) { continue; } var updateEvent = new AtmosExposedUpdateEvent(transform.Coordinates, airEvent.Gas); RaiseLocalEvent(exposed.Owner, ref updateEvent); } _exposedTimer -= ExposedUpdateDelay; }
public override void Update(float frameTime) { base.Update(frameTime); UpdateProcessing(frameTime); _exposedTimer += frameTime; if (_exposedTimer < ExposedUpdateDelay) { return; } foreach (var(exposed, transform) in EntityManager.EntityQuery <AtmosExposedComponent, TransformComponent>()) { var tile = GetTileMixture(transform.Coordinates); if (tile == null) { continue; } var updateEvent = new AtmosExposedUpdateEvent(transform.Coordinates, tile); RaiseLocalEvent(exposed.Owner, ref updateEvent); } _exposedTimer -= ExposedUpdateDelay; }