diff --git a/stead/goto.lua b/stead/goto.lua index fbb419f..c13c305 100644 --- a/stead/goto.lua +++ b/stead/goto.lua @@ -143,7 +143,7 @@ go = stead.hook(go, function(f, ...) end if r == nil and PLAYER_MOVED and v == nil then if cctx() then - cctx().txt = true --hack to cancel game.act + cctx().action = true else r = true end diff --git a/stead/stead.lua b/stead/stead.lua index 19ad4ea..1e3cc45 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -79,7 +79,7 @@ end function callpush(v, ...) stead.call_top = stead.call_top + 1; - stead.cctx[stead.call_top] = { txt = nil, self = v }; + stead.cctx[stead.call_top] = { txt = nil, self = v, action = false }; args = arg arg1 = arg[1] arg2 = arg[2] @@ -697,6 +697,9 @@ function call(v, n, ...) a = stead.pget() b = nil end + if a == nil and b == nil and cctx().action then + a = true + end callpop() return a,b end