Inline Deleted

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:30:03 +01:00
parent 149707a566
commit b2035543e2
60 changed files with 94 additions and 79 deletions

View File

@@ -22,7 +22,7 @@ namespace Content.Server.AI.Operators.Inventory
public override Outcome Execute(float frameTime)
{
if (_target.Deleted ||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(_target.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(_target.Uid).EntityLifeStage) >= EntityLifeStage.Deleted ||
!_target.HasComponent<ItemComponent>() ||
_target.IsInContainer() ||
!_owner.InRangeUnobstructed(_target, popup: true))