Items removed due to the "DeleteOnUse" property are removed using EntitySpawner, removing an item removes it from the selected items of all characters. Closes #306
This commit is contained in:
@@ -50,7 +50,14 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
Items[slotIndex].ApplyStatusEffects(ActionType.OnUse, 1.0f, character);
|
||||
|
||||
foreach (ItemComponent ic in Items[slotIndex].components)
|
||||
{
|
||||
if (ic.DeleteOnUse)
|
||||
{
|
||||
Entity.Spawner.AddToRemoveQueue(Items[slotIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user