diff --git a/game/engine/Zone.lua b/game/engine/Zone.lua index 17eb274a66086cf839b7b2e170b77e9a3818281a..33b5464ad0b2e327bc35bfaa138a97e8510c4784 100644 --- a/game/engine/Zone.lua +++ b/game/engine/Zone.lua @@ -488,7 +488,7 @@ function _M:newLevel(level_data, lev, old_lev, game) -- Check for connectivity from entrance to exit local a = Astar.new(map, game:getPlayer()) print("[LEVEL GENERATION] checking entrance to exit A*", ux, uy, "to", dx, dy) - if ux and uy and dx and dy and (ux ~= dx or uy ~= dy) and not spot.no_level_connectivity and not a:calc(ux, uy, dx, dy) then + if ux and uy and dx and dy and (ux ~= dx or uy ~= dy) and not spots.no_level_connectivity and not a:calc(ux, uy, dx, dy) then print("Level unconnected, no way from entrance to exit", ux, uy, "to", dx, dy) level:removed() return self:newLevel(level_data, lev, old_lev, game) diff --git a/game/engine/dialogs/Chat.lua b/game/engine/dialogs/Chat.lua index 24961363bf47736d2d7bd7edc7c7c668a3198665..24cc9096a997c20156bb7d0124ebaec05dd1138b 100644 --- a/game/engine/dialogs/Chat.lua +++ b/game/engine/dialogs/Chat.lua @@ -104,9 +104,11 @@ function _M:generateList() -- Makes up the list local list = {} + local nb = 1 for i, a in ipairs(self.chat:get(self.cur_id).answers) do if not a.cond or a.cond(self.npc, self.player) then - list[#list+1] = { name=string.char(string.byte('a')+i-1)..") "..a[1], answer=i, color=a.color} + list[#list+1] = { name=string.char(string.byte('a')+nb-1)..") "..a[1], answer=i, color=a.color} + nb = nb + 1 end end self.list = list diff --git a/game/engine/dialogs/ShowPickupFloor.lua b/game/engine/dialogs/ShowPickupFloor.lua index 4ba6a246d86fed4f961898b4feb7fe444551af71..d4b4f1daa078d2c633836acb012c003e56b67fef 100644 --- a/game/engine/dialogs/ShowPickupFloor.lua +++ b/game/engine/dialogs/ShowPickupFloor.lua @@ -79,7 +79,7 @@ function _M:generateList() local o = game.level.map:getObject(self.x, self.y, idx) if not o then break end if not self.filter or self.filter(o) then - list[#list+1] = { name=string.char(string.byte('a') + i)..") "..o:getName(), color=o:getDisplayColor(), object=o, item=idx } + list[#list+1] = { name=string.char(string.byte('a') + i - 1)..") "..o:getName(), color=o:getDisplayColor(), object=o, item=idx } i = i + 1 end idx = idx + 1