Remove more IoCManager IEntityManager resolves

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 10:40:19 +01:00
parent 8985a672de
commit 4919f1db69
4 changed files with 41 additions and 39 deletions

View File

@@ -73,7 +73,7 @@ namespace Content.Server.Light.EntitySystems
_ => throw new ArgumentOutOfRangeException()
};
var entity = EntityManager.SpawnEntity(prototype, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(light.Owner).Coordinates);
var entity = EntityManager.SpawnEntity(prototype, EntityManager.GetComponent<TransformComponent>(light.Owner).Coordinates);
light.LightBulbContainer.Insert(entity);
}
@@ -336,7 +336,7 @@ namespace Content.Server.Light.EntitySystems
light.IsBlinking = isNowBlinking;
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(light.Owner, out AppearanceComponent? appearance))
if (!EntityManager.TryGetComponent(light.Owner, out AppearanceComponent? appearance))
return;
appearance.SetData(PoweredLightVisuals.Blinking, isNowBlinking);
}