Inline Deleted
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Content.Server.Engineering.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.Deleted || component.Owner.Deleted)
|
||||
if (component.Deleted || (!IoCManager.Resolve<IEntityManager>().EntityExists(component.Owner.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(component.Owner.Uid).EntityLifeStage) >= EntityLifeStage.Deleted)
|
||||
return;
|
||||
|
||||
if (component.Owner.TryGetComponent<SharedStackComponent>(out var stackComp)
|
||||
@@ -68,7 +68,7 @@ namespace Content.Server.Engineering.EntitySystems
|
||||
|
||||
EntityManager.SpawnEntity(component.Prototype, args.ClickLocation.SnapToGrid(grid));
|
||||
|
||||
if (component.RemoveOnInteract && stackComp == null && !component.Owner.Deleted)
|
||||
if (component.RemoveOnInteract && stackComp == null && !((!IoCManager.Resolve<IEntityManager>().EntityExists(component.Owner.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(component.Owner.Uid).EntityLifeStage) >= EntityLifeStage.Deleted))
|
||||
component.Owner.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user