diff --git a/stead/click.lua b/stead/click.lua index daf1253..e10f931 100644 --- a/stead/click.lua +++ b/stead/click.lua @@ -12,8 +12,8 @@ function(f, s, cmd, x, y, ...) if here().click then return call(here(), 'click', x, y, unpack(arg)); end - if game.click then - return call(game, 'click', x, y, unpack(arg)); + if s.click then + return call(s, 'click', x, y, unpack(arg)); end return nil,true end diff --git a/stead/kbd.lua b/stead/kbd.lua index 01d8ad7..8fe9863 100644 --- a/stead/kbd.lua +++ b/stead/kbd.lua @@ -1,6 +1,6 @@ game.action = stead.hook(game.action, function(f, s, cmd, ...) if cmd == 'user_kbd' then - local r,v = call(game, 'kbd', + local r,v = call(s, 'kbd', input.key_event.down, input.key_event.key); if r == nil and v == nil then return nil, true-- nothing to do diff --git a/stead/timer.lua b/stead/timer.lua index 3a5ffb8..9c7c923 100644 --- a/stead/timer.lua +++ b/stead/timer.lua @@ -1,8 +1,8 @@ game.action = stead.hook(game.action, function(f, s, cmd, ...) if cmd == 'user_timer' then - return call(game, 'timer'); + return call(s, 'timer'); end - return f(cmd, unpack(arg)); + return f(s, cmd, unpack(arg)); end) timer.callback = function(s)