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

@@ -31,6 +31,7 @@ namespace Content.Server.Pointing.EntitySystems
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
private static readonly TimeSpan PointDelay = TimeSpan.FromSeconds(0.5f);
@@ -112,7 +113,7 @@ namespace Content.Server.Pointing.EntitySystems
return false;
}
if (EntitySystem.Get<ActionBlockerSystem>().CanChangeDirection(player))
if (_actionBlockerSystem.CanChangeDirection(player))
{
var diff = coords.ToMapPos(EntityManager) - player.Transform.MapPosition.Position;
if (diff.LengthSquared > 0.01f)