Skip to content
Snippets Groups Projects
Commit 40d491fd authored by dg's avatar dg
Browse files

main menu dont hang when no savefiles are present

death menu allows for char dump


git-svn-id: http://svn.net-core.org/repos/t-engine4@546 51575b47-30f0-44d4-a5cc-537603b46e54
parent 758fed4d
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ function _M:setKeyHandling()
self:click()
end,
}
game.key = self.key
end
function _M:setMouseHandling()
......@@ -92,6 +93,7 @@ function _M:setMouseHandling()
for i, b in ipairs(self.list) do
self.mouse:registerZone(self.display_x, self.display_y + (i - 1) * (b.h + self.separator), b.w, b.h, b.mouse_over)
end
game.mouse = self.mouse
end
function _M:select(i, offset)
......
......@@ -264,9 +264,9 @@ function _M:dump()
end
nl()
local most_kill, most_kill_max = nil, 0
local most_kill, most_kill_max = "none", 0
local total_kill = 0
for name, nb in pairs(game.player.all_kills) do
for name, nb in pairs(game.player.all_kills or {}) do
if nb > most_kill_max then most_kill_max = nb most_kill = name end
total_kill = total_kill + nb
end
......
......@@ -120,6 +120,7 @@ function _M:use()
save:close()
util.showMainMenu()
elseif act == "dump" then
game:registerDialog(require("mod.dialogs.CharacterSheet").new(self.actor))
elseif act == "cheat" then
game.logPlayer(self.actor, "#LIGHT_BLUE#You resurrect! CHEATER !")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment