Replace IEntityManager resolves in systems for cached EntityManager

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 13:00:43 +01:00
parent 2699540526
commit c8b65be747
98 changed files with 338 additions and 338 deletions

View File

@@ -34,7 +34,7 @@ namespace Content.Server.Light.EntitySystems
if (match.CurrentState != SmokableState.Lit)
continue;
_atmosphereSystem.HotspotExpose(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(match.Owner).Coordinates, 400, 50, true);
_atmosphereSystem.HotspotExpose(EntityManager.GetComponent<TransformComponent>(match.Owner).Coordinates, 400, 50, true);
}
}
@@ -84,7 +84,7 @@ namespace Content.Server.Light.EntitySystems
component.PointLightComponent.Enabled = component.CurrentState == SmokableState.Lit;
}
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out ItemComponent? item))
if (EntityManager.TryGetComponent(component.Owner, out ItemComponent? item))
{
switch (component.CurrentState)
{
@@ -97,7 +97,7 @@ namespace Content.Server.Light.EntitySystems
}
}
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out AppearanceComponent? appearance))
if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearance))
{
appearance.SetData(SmokingVisuals.Smoking, component.CurrentState);
}