From b7da8a56b660faddd75ba2f726dbf6cbd41797b1 Mon Sep 17 00:00:00 2001 From: "p.kosyh" Date: Fri, 16 Jul 2010 19:56:49 +0000 Subject: [PATCH] fixes in modules --- stead/click.lua | 4 ++-- stead/kbd.lua | 2 +- stead/timer.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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)