Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
@@ -220,6 +220,22 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Can the item be put in the inventory in a slot of the specified type (i.e. is there a suitable free slot or a stack the item can be put in).
|
||||
/// </summary>
|
||||
public bool CanBePut(Item item, InvSlotType slotType)
|
||||
{
|
||||
for (int i = 0; i < capacity; i++)
|
||||
{
|
||||
if (slotType.HasFlag(SlotTypes[i]))
|
||||
{
|
||||
if (CanBePutInSlot(item, i)) { return true; }
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanBePutInSlot(Item item, int i, bool ignoreCondition = false)
|
||||
{
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user