Use EntitySystem dependencies in a bunch of systems.

This commit is contained in:
Vera Aguilera Puerto
2021-07-26 12:58:17 +02:00
parent 4e93340fb0
commit 1033d8bbe5
31 changed files with 130 additions and 130 deletions

View File

@@ -12,6 +12,7 @@ namespace Content.Server.Atmos.EntitySystems
public class AirtightSystem : EntitySystem
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
public override void Initialize()
{
@@ -42,7 +43,7 @@ namespace Content.Server.Atmos.EntitySystems
if (airtight.FixVacuum)
{
Get<AtmosphereSystem>().FixVacuum(airtight.LastPosition.Item1, airtight.LastPosition.Item2);
_atmosphereSystem.FixVacuum(airtight.LastPosition.Item1, airtight.LastPosition.Item2);
}
}
@@ -93,9 +94,8 @@ namespace Content.Server.Atmos.EntitySystems
if (!gridId.IsValid())
return;
var atmosphereSystem = Get<AtmosphereSystem>();
atmosphereSystem.UpdateAdjacent(gridId, pos);
atmosphereSystem.InvalidateTile(gridId, pos);
_atmosphereSystem.UpdateAdjacent(gridId, pos);
_atmosphereSystem.InvalidateTile(gridId, pos);
}
private AtmosDirection Rotate(AtmosDirection myDirection, Angle myAngle)