(5a377a8ee) Unstable v0.9.1000.0

This commit is contained in:
Juan Pablo Arce
2020-05-13 12:55:42 -03:00
parent b143329701
commit a1ca41aa5d
426 changed files with 14384 additions and 5708 deletions
@@ -150,7 +150,15 @@ namespace Barotrauma
/// </summary>
public override bool TryPutItem(Item item, Character user, List<InvSlotType> allowedSlots = null, bool createNetworkEvent = true)
{
if (allowedSlots == null || !allowedSlots.Any()) return false;
if (allowedSlots == null || !allowedSlots.Any()) { return false; }
if (item == null)
{
#if DEBUG
throw new Exception("item null");
#else
return false;
#endif
}
bool inSuitableSlot = false;
bool inWrongSlot = false;
@@ -167,7 +175,7 @@ namespace Barotrauma
}
}
//all good
if (inSuitableSlot && !inWrongSlot) return true;
if (inSuitableSlot && !inWrongSlot) { return true; }
//try to place the item in a LimbSlot.Any slot if that's allowed
if (allowedSlots.Contains(InvSlotType.Any) && item.AllowedSlots.Contains(InvSlotType.Any))