Inventory.FindItem takes the aliases of the items into account (-> possible to change item names without breaking crew AIs and the tutorial)
This commit is contained in:
@@ -144,7 +144,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (itemName == null) return null;
|
||||
|
||||
return Items.FirstOrDefault(i => i != null && (i.Name == itemName || i.HasTag(itemName)));
|
||||
return Items.FirstOrDefault(i => i != null && (i.Prefab.NameMatches(itemName) || i.HasTag(itemName)));
|
||||
}
|
||||
|
||||
public virtual void RemoveItem(Item item)
|
||||
|
||||
Reference in New Issue
Block a user