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:
@@ -288,6 +288,11 @@ namespace Barotrauma.Items.Components
|
||||
if (targetCharacter != null) //TODO: Allow OnUse to happen on structures too maybe??
|
||||
ApplyStatusEffects(ActionType.OnUse, 1.0f, targetCharacter != null ? targetCharacter : null);
|
||||
|
||||
if (DeleteOnUse)
|
||||
{
|
||||
Entity.Spawner.AddToRemoveQueue(item);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user