Skip to content

Commit

Permalink
Inventory: Don't allow stacking non-interactive items
Browse files Browse the repository at this point in the history
Fixes: issue #1522 (stacking items while they are cooking)
  • Loading branch information
dscharrer committed Jun 8, 2021
1 parent 5e71589 commit 1f8c631
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,12 @@ class Inventory : private InventoryAccess {
return false;
}

// Don't allow stacking non-interactive items
// While non-interactive items can't be picked up, they can be made non-interactive while being dragged.
if(!(item->gameFlags & GFLAG_INTERACTIVITY) || !(oldItem->gameFlags & GFLAG_INTERACTIVITY)) {
return false;
}

if((oldItem->ioflags & IO_GOLD) && (item->ioflags & IO_GOLD)) {
oldItem->_itemdata->price += item->_itemdata->price;
item->destroy();
Expand Down

0 comments on commit 1f8c631

Please sign in to comment.