Refactors TemperatureComponent and AtmosExposed to ECS (#4927)

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
Flipp Syder
2021-10-29 01:18:43 -07:00
committed by GitHub
parent 68e5a204e3
commit c7c651e3de
7 changed files with 185 additions and 117 deletions

View File

@@ -1,8 +1,11 @@
using Content.Server.Atmos.Components;
using Content.Server.NodeContainer.EntitySystems;
using Content.Server.Temperature.Components;
using Content.Server.Temperature.Systems;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.Maps;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
@@ -70,10 +73,10 @@ namespace Content.Server.Atmos.EntitySystems
{
foreach (var exposed in EntityManager.EntityQuery<AtmosExposedComponent>())
{
// TODO ATMOS: Kill this with fire.
var tile = GetTileMixture(exposed.Owner.Transform.Coordinates);
if (tile == null) continue;
exposed.Update(tile, _exposedTimer, this);
var updateEvent = new AtmosExposedUpdateEvent(exposed.Owner.Transform.Coordinates, tile);
RaiseLocalEvent(exposed.Owner.Uid, ref updateEvent);
}
_exposedTimer -= ExposedUpdateDelay;