(54ae135f5) Items can be dragged and dropped directly from the inventory into containers without having to select the container first.

This commit is contained in:
Joonas Rikkonen
2019-03-28 18:11:40 +02:00
parent a351ffcbda
commit f51c9c14df
7 changed files with 102 additions and 12 deletions
@@ -88,10 +88,19 @@ namespace Barotrauma
{
if (Items[i] == null) return i;
}
return -1;
}
public bool CanBePut(Item item)
{
for (int i = 0; i < capacity; i++)
{
if (CanBePut(item, i)) { return true; }
}
return false;
}
public virtual bool CanBePut(Item item, int i)
{
if (ItemOwnsSelf(item)) return false;