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

@@ -106,10 +106,10 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
private void OnMixerInteractHand(EntityUid uid, GasMixerComponent component, InteractHandEvent args)
{
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(args.User, out ActorComponent? actor))
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
return;
if (IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(component.Owner).Anchored)
if (EntityManager.GetComponent<TransformComponent>(component.Owner).Anchored)
{
_userInterfaceSystem.TryOpen(uid, GasMixerUiKey.Key, actor.PlayerSession);
DirtyUI(uid, component);
@@ -128,7 +128,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
return;
_userInterfaceSystem.TrySetUiState(uid, GasMixerUiKey.Key,
new GasMixerBoundUserInterfaceState(IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(mixer.Owner).EntityName, mixer.TargetPressure, mixer.Enabled, mixer.InletOneConcentration));
new GasMixerBoundUserInterfaceState(EntityManager.GetComponent<MetaDataComponent>(mixer.Owner).EntityName, mixer.TargetPressure, mixer.Enabled, mixer.InletOneConcentration));
}
private void OnToggleStatusMessage(EntityUid uid, GasMixerComponent mixer, GasMixerToggleStatusMessage args)