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

@@ -114,9 +114,9 @@ public class LungSystem : EntitySystem
EntityManager.TryGetComponent((mech.Body).Owner, out InternalsComponent? internals) &&
internals.BreathToolEntity != null &&
internals.GasTankEntity != null &&
IoCManager.Resolve<IEntityManager>().TryGetComponent(internals.BreathToolEntity, out BreathToolComponent? breathTool) &&
EntityManager.TryGetComponent(internals.BreathToolEntity, out BreathToolComponent? breathTool) &&
breathTool.IsFunctional &&
IoCManager.Resolve<IEntityManager>().TryGetComponent(internals.GasTankEntity, out GasTankComponent? gasTank))
EntityManager.TryGetComponent(internals.GasTankEntity, out GasTankComponent? gasTank))
{
TakeGasFrom(uid, frameTime, gasTank.RemoveAirVolume(Atmospherics.BreathVolume), lung);
return;