mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 04:10:55 +01:00
Slight AtmosphereSystem cleanup.
- AtmosExposed query now queries transform as well instead of getting it twice. - Use Proxy methods instead.
This commit is contained in:
@@ -71,18 +71,18 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
|
||||
_exposedTimer += frameTime;
|
||||
|
||||
if (_exposedTimer >= ExposedUpdateDelay)
|
||||
{
|
||||
foreach (var exposed in EntityManager.EntityQuery<AtmosExposedComponent>())
|
||||
{
|
||||
var tile = GetTileMixture(EntityManager.GetComponent<TransformComponent>(exposed.Owner).Coordinates);
|
||||
if (tile == null) continue;
|
||||
var updateEvent = new AtmosExposedUpdateEvent(EntityManager.GetComponent<TransformComponent>(exposed.Owner).Coordinates, tile);
|
||||
RaiseLocalEvent(exposed.Owner, ref updateEvent);
|
||||
}
|
||||
if (_exposedTimer < ExposedUpdateDelay)
|
||||
return;
|
||||
|
||||
_exposedTimer -= ExposedUpdateDelay;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user