From 47e2ffca466fcc10320fc887cb8484c3f54eb68b Mon Sep 17 00:00:00 2001 From: "p.kosyh" Date: Wed, 20 Apr 2011 17:44:10 +0000 Subject: [PATCH] compat layer was broken --- stead/click.lua | 3 +++ stead/kbd.lua | 3 +++ stead/timer.lua | 3 +++ 3 files changed, 9 insertions(+) diff --git a/stead/click.lua b/stead/click.lua index 0f6ec6d..d9a3c94 100644 --- a/stead/click.lua +++ b/stead/click.lua @@ -87,6 +87,9 @@ function(f, s, cmd, press, mb, x, y, px, py, ...) end end end + if stead.api_version < "1.3.5" and r == nil and v == nil then + return nil, true + end return r,v end return f(s, cmd, x, y, px, py, ...) diff --git a/stead/kbd.lua b/stead/kbd.lua index 019df4b..f1f5138 100644 --- a/stead/kbd.lua +++ b/stead/kbd.lua @@ -8,6 +8,9 @@ game.action = stead.hook(game.action, function(f, s, cmd, ...) r,v = call(s, 'kbd', input.key_event.down, input.key_event.key); end + if stead.api_version < "1.3.5" and r == nil and v == nil then + return nil, true + end return r,v end return f(s, cmd, ...); diff --git a/stead/timer.lua b/stead/timer.lua index cf1e0ac..6cb9dba 100644 --- a/stead/timer.lua +++ b/stead/timer.lua @@ -6,6 +6,9 @@ game.action = stead.hook(game.action, function(f, s, cmd, ...) elseif s.timer then r,v = call(s, 'timer'); end + if stead.api_version < "1.3.5" and r == nil and v == nil then + return nil, true + end return r,v end return f(s, cmd, ...);