diff --git a/stead/gui.lua b/stead/gui.lua index 0425992..79caff6 100644 --- a/stead/gui.lua +++ b/stead/gui.lua @@ -187,7 +187,9 @@ stead.fmt = fmt game.fading = function(s) local rc = false + local p = call(here(), 'pic'); if stead.cmd == 'load' then + game.lastpic = p; return true end if not stead.state then --only for states!!! @@ -196,7 +198,6 @@ game.fading = function(s) if game._time == 1 then -- first cmd return true end - local p = call(here(), 'pic'); if PLAYER_MOVED or game.lastpic ~= p then rc = true end diff --git a/stead/stead.lua b/stead/stead.lua index 303c7c4..622d71e 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -973,6 +973,8 @@ function phrase_action(self) -- here it is ph:disable(); -- /* disable it!!! */ + local last = call(ph, 'ans'); + if type(ph.do_act) == 'string' then local f = loadstring(ph.do_act); if f ~= nil then @@ -983,7 +985,9 @@ function phrase_action(self) elseif type(ph.do_act) == 'function' then ret = ph.do_act(self); end - local last = call(ph, 'ans'); + + if ret == nil then ret = stead.pget(); end + if last == true or ret == true then r = true; end