Skip to content
Snippets Groups Projects
Commit 9c9699ae authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'small_fixes' into 'master'

Small fixes
parents 5b4a1c44 2874d055
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,11 @@ function _M:generate()
self.key:addIgnore("_DOWN", false)
self.key:addCommands{
_UP = function() self.first = false self:updateText(1) end,
_DOWN = function() self.first = false self:updateText(-1) end,
_UP = function() self:updateText(1) end,
_DOWN = function() self:updateText(-1) end,
__TEXTINPUT = function(c)
if self.first then self.first = false self.tmp = {} self.cursor = 1 end
if #self.tmp and (c == '-' or c == '0' or c == '1' or c == '2' or c == '3' or c == '4' or c == '5' or c == '6' or c == '7' or c == '8' or c == '9') then
if #self.tmp and ((self.cursor == 1 and c == '-') or (c >= '0' and c <= '9')) then
table.insert(self.tmp, self.cursor, c)
self.cursor = self.cursor + 1
self.scroll = util.scroll(self.cursor, self.scroll, self.max_display)
......@@ -65,6 +65,7 @@ function _M:generate()
end
function _M:updateText(v)
self.first = false
local old = self.number
if not v then
self.number = self.tmp and tonumber(table.concat(self.tmp)) or 0
......
......@@ -318,7 +318,7 @@ You feel good!]],
game.player:setEffect(game.player.EFF_VICTORY_RUSH_ZIGUR, 4, {})
elseif danger then
local msg = [[As you die in a dream you suddenly wake up.
Posionous fumes take their toll on your body!]]
Poisonous fumes take their toll on your body!]]
game.logPlayer(game.player)
require("engine.ui.Dialog"):simpleLongPopup("Deep slumber...", msg, 600)
local hit = math.max(0, game.player.life * 2 / 3)
......
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