diff --git a/game/engines/default/engine/dialogs/ShowInventory.lua b/game/engines/default/engine/dialogs/ShowInventory.lua index 032aa5dff4b560b234a705906699b2cada2251c4..45da191392ebf6d2e27451cdd06964ace20ddddf 100644 --- a/game/engines/default/engine/dialogs/ShowInventory.lua +++ b/game/engines/default/engine/dialogs/ShowInventory.lua @@ -71,11 +71,12 @@ function _M:select(item) end end function _M:use(item) + local dont_end = false if item and item.object then - self.action(item.object, item.item) + dont_end = self.action(item.object, item.item) end self:generateList() - --game:unregisterDialog(self) + if not dont_end then game:unregisterDialog(self) end end function _M:generateList() diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index bdbd75952d222c38b7624536afa00110ff2c080f..337451da8844daebf8b34e522fd8ee856c9f886f 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -728,6 +728,7 @@ function _M:playerDrop() local d d = self:showInventory(titleupdator(), inven, nil, function(o, item) self:doDrop(inven, item) d:updateTitle(titleupdator()) + return true end) end @@ -739,6 +740,7 @@ function _M:playerWear() end, function(o, item) self:doWear(inven, item, o) d:updateTitle(titleupdator()) + return true end) end @@ -747,6 +749,7 @@ function _M:playerTakeoff() local d d = self:showEquipment(titleupdator(), nil, function(o, inven, item) self:doTakeoff(inven, item, o) d:updateTitle(titleupdator()) + return true end) end diff --git a/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua b/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua index f3bf95235bb67509428206cded9e02169147e4e7..4dbfa610e063e44968cacb5c2e30411f7db70552 100644 --- a/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua +++ b/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua @@ -104,7 +104,8 @@ return { return nil, nil, true end - if melinda and not melinda.dead and not game.player:isQuestStatus("kryl-feijan-escape", engine.Quest.FAILED) then + local g = game.level.map(game.player.x, game.player.y, engine.Map.TERRAIN) + if melinda and not melinda.dead and not game.player:isQuestStatus("kryl-feijan-escape", engine.Quest.FAILED) and g and g.change_level then game.player:setQuestStatus("kryl-feijan-escape", engine.Quest.DONE) world:gainAchievement("MELINDA_SAVED", game.player) end