I dont really understand why the MaxAcceptable() returns 0 here if the ActionStore contains the index as a key?
public int MaxAcceptable(InventoryItem item, int index)
{
var actionItem = item as ActionItem;
if (!actionItem) return 0;
if (dockedItems.ContainsKey(index) && !object.ReferenceEquals(item, dockedItems[index].item))
{
return 0;
}
if (actionItem.isConsumable())
{
return int.MaxValue;
}
if (dockedItems.ContainsKey(index))
{
return 0;
}
return 1;
}
The last condition before it returns 1, I get the other 2 but the last one does not make sense to me. From my understanding, its checking if the index of the slot exists? If it does exist, why return 0?