diff --git a/modules/game/gameinterface.lua b/modules/game/gameinterface.lua index a6a16439..ae28ab2c 100644 --- a/modules/game/gameinterface.lua +++ b/modules/game/gameinterface.lua @@ -165,7 +165,13 @@ function GameInterface.createThingMenu(menuPosition, lookThing, useThing, creatu menu:addOption('Trade with ...', function() print('trade with') end) end - -- check for move up + if lookThing then + local parentContainer = lookThing:getParentContainer() + if parentContainer and parentContainer:hasParent() then + local pos = lookThing:getPosition() + menu:addOption('Move up', function() g_game.move(lookThing, { x=pos.x, y=pos.y, z=254 }, lookThing:getCount()) end) + end + end if creatureThing then menu:addSeparator() diff --git a/modules/game/widgets/uigamemap.lua b/modules/game/widgets/uigamemap.lua index 2f0a181a..4a3bbc40 100644 --- a/modules/game/widgets/uigamemap.lua +++ b/modules/game/widgets/uigamemap.lua @@ -38,7 +38,7 @@ function UIGameMap:onDrop(widget, mousePos) local itemPos = item:getPosition() if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then return false end - if item:isStackable() and item:getCount() > 1 then + if item:getCount() > 1 then GameInterface.moveStackableItem(item, toPos) else g_game.move(item, toPos, 1) diff --git a/modules/game/widgets/uiitem.lua b/modules/game/widgets/uiitem.lua index 53901bb6..e2adac02 100644 --- a/modules/game/widgets/uiitem.lua +++ b/modules/game/widgets/uiitem.lua @@ -29,7 +29,7 @@ function UIItem:onDrop(widget, mousePos) local itemPos = item:getPosition() if itemPos.x == self.position.x and itemPos.y == self.position.y and itemPos.z == self.position.z then return false end - if item:isStackable() and item:getCount() > 1 then + if item:getCount() > 1 then GameInterface.moveStackableItem(item, toPos) else g_game.move(item, toPos, 1)