Equipped items can be swapped by double-clicking, fixed inventories getting messed up when swapping multi-slot items fails (e.g. drag a jumpsuit on an equipped diving suit).

This commit is contained in:
Joonas Rikkonen
2018-03-02 13:45:58 +02:00
parent f1f190a997
commit 07d3d69040
13 changed files with 65 additions and 30 deletions
@@ -386,7 +386,7 @@ namespace Barotrauma
{
Inventory selectedInventory = selectedSlot.Inventory;
int slotIndex = selectedSlot.SlotIndex;
if (selectedInventory.TryPutItem(draggingItem, slotIndex, true, Character.Controlled))
if (selectedInventory.TryPutItem(draggingItem, slotIndex, true, true, Character.Controlled))
{
if (selectedInventory.slots != null) selectedInventory.slots[slotIndex].ShowBorderHighlight(Color.White, 0.1f, 0.4f);
GUI.PlayUISound(GUISoundType.PickItem);