Inline Deleted
This commit is contained in:
@@ -124,7 +124,7 @@ namespace Content.Server.Inventory.Components
|
||||
}
|
||||
|
||||
var containedEntity = _slotContainers[slot].ContainedEntity;
|
||||
if (containedEntity?.Deleted == true)
|
||||
if ((containedEntity != null ? (!IoCManager.Resolve<IEntityManager>().EntityExists(containedEntity.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(containedEntity.Uid).EntityLifeStage) >= EntityLifeStage.Deleted : null) == true)
|
||||
{
|
||||
_slotContainers.Remove(slot);
|
||||
containedEntity = null;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Server.Inventory
|
||||
var user = inventory.Owner;
|
||||
|
||||
// Let's do nothing if the owner of the inventory has been deleted.
|
||||
if (user.Deleted)
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(user.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(user.Uid).EntityLifeStage) >= EntityLifeStage.Deleted)
|
||||
return false;
|
||||
|
||||
// If we don't have that slot or there's already an item there, we do nothing.
|
||||
|
||||
Reference in New Issue
Block a user