fixes in modules

This commit is contained in:
p.kosyh 2010-07-16 19:56:49 +00:00
parent 5fb2e29b2e
commit b7da8a56b6
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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)