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

@@ -13,6 +13,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems
public class AtmosDeviceSystem : EntitySystem
{
[Dependency] private IGameTiming _gameTiming = default!;
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
public override void Initialize()
{
@@ -35,7 +36,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems
return;
// We try to add the device to a valid atmosphere.
if (!Get<AtmosphereSystem>().AddAtmosDevice(component))
if (!_atmosphereSystem.AddAtmosDevice(component))
return;
component.LastProcess = _gameTiming.CurTime;
@@ -45,7 +46,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems
public void LeaveAtmosphere(AtmosDeviceComponent component)
{
if (!Get<AtmosphereSystem>().RemoveAtmosDevice(component))
if (!_atmosphereSystem.RemoveAtmosDevice(component))
return;
component.LastProcess = TimeSpan.Zero;