* Engine namespace changes.
* Automated remove redundant using statements.
* Simplified Graphics namespace.
* Apparently the container system stores full type names in the map file.😞 This updates those names.
* API Changes to LocalizationManager.LoadCulture.
* Update submodule to v0.3.2
33 lines
1015 B
C#
33 lines
1015 B
C#
using Content.Server.Atmos;
|
|
using Content.Server.GameObjects.Components.Atmos;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Server.GameObjects.EntitySystems
|
|
{
|
|
[UsedImplicitly]
|
|
public class AtmosExposedSystem
|
|
: EntitySystem
|
|
{
|
|
|
|
private const float UpdateDelay = 1f;
|
|
private float _lastUpdate;
|
|
|
|
public override void Update(float frameTime)
|
|
{
|
|
_lastUpdate += frameTime;
|
|
if (_lastUpdate < UpdateDelay) return;
|
|
|
|
// creadth: everything exposable by atmos should be updated as well
|
|
foreach (var atmosExposedComponent in EntityManager.ComponentManager.EntityQuery<AtmosExposedComponent>(true))
|
|
{
|
|
var tile = atmosExposedComponent.Owner.Transform.Coordinates.GetTileAtmosphere(EntityManager);
|
|
if (tile == null) continue;
|
|
atmosExposedComponent.Update(tile, _lastUpdate);
|
|
}
|
|
|
|
_lastUpdate = 0;
|
|
}
|
|
}
|
|
}
|