(b0f5305f2) Unstable v0.9.10.0

This commit is contained in:
Juan Pablo Arce
2020-05-22 08:21:34 -03:00
parent 3d2b7bcf63
commit 4f8bd39789
75 changed files with 1023 additions and 407 deletions
@@ -159,6 +159,15 @@ namespace Barotrauma
return false;
#endif
}
if (item.Removed)
{
#if DEBUG
throw new Exception("Tried to put a removed item (" + item.Name + ") in an inventory");
#else
DebugConsole.ThrowError("Tried to put a removed item (" + item.Name + ") in an inventory.\n" + Environment.StackTrace);
return false;
#endif
}
bool inSuitableSlot = false;
bool inWrongSlot = false;
@@ -192,6 +201,9 @@ namespace Barotrauma
int placedInSlot = -1;
foreach (InvSlotType allowedSlot in allowedSlots)
{
if (allowedSlot.HasFlag(InvSlotType.RightHand) && character.AnimController.GetLimb(LimbType.RightHand) == null) { continue; }
if (allowedSlot.HasFlag(InvSlotType.LeftHand) && character.AnimController.GetLimb(LimbType.LeftHand) == null) { continue; }
//check if all the required slots are free
bool free = true;
for (int i = 0; i < capacity; i++)