Random IoCManager.Resolve<IEntityManager> removals moment

This commit is contained in:
metalgearsloth
2021-12-07 23:48:34 +11:00
parent df69bb4764
commit 16e1bed678
5 changed files with 25 additions and 19 deletions

View File

@@ -1315,7 +1315,7 @@ namespace Content.Server.Atmos.EntitySystems
public bool AddAtmosDevice(AtmosDeviceComponent atmosDevice)
{
var grid = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(atmosDevice.Owner).GridID;
var grid = EntityManager.GetComponent<TransformComponent>(atmosDevice.Owner).GridID;
if (!_mapManager.TryGetGrid(grid, out var mapGrid))
return false;
@@ -1526,7 +1526,7 @@ namespace Content.Server.Atmos.EntitySystems
public bool TryGetMapGrid(GridAtmosphereComponent gridAtmosphere, [NotNullWhen(true)] out IMapGrid? mapGrid)
{
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(gridAtmosphere.Owner, out IMapGridComponent? mapGridComponent))
if (EntityManager.TryGetComponent(gridAtmosphere.Owner, out IMapGridComponent? mapGridComponent))
{
mapGrid = mapGridComponent.Grid;
return true;