be more compat

This commit is contained in:
p.kosyh@gmail.com 2011-04-23 07:57:13 +00:00
parent f9b428f108
commit 5cba53148f
5 changed files with 13 additions and 1 deletions

View file

@ -87,6 +87,9 @@ function(f, s, cmd, press, mb, x, y, px, py, ...)
end
end
end
if r == nil and v == nil and stead.api_version < "1.3.5" then
return nil, true
end
return r,v
end
return f(s, cmd, x, y, px, py, ...)

View file

@ -221,6 +221,9 @@ player = stead.inherit(player, function(v)
return stead.goto(here(), false, false, true);
end
NEED_SCENE = true
if stead.api_version >= "1.3.5" then
return true -- force action
end
end
return v
end)

View file

@ -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 r == nil and v == nil and stead.api_version < "1.3.5" then
return nil, true
end
return r,v
end
return f(s, cmd, ...);

View file

@ -2101,7 +2101,7 @@ iface = {
return nil, true; -- menu
end
if stead.state and r == nil and v == nil and stead.api_version >= "1.2.0" then -- new goto
if stead.state and r == nil and v == nil and stead.api_version >= "1.3.5" then -- new goto
return nil, nil -- really nothing
end

View file

@ -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 r == nil and v == nil and stead.api_version < "1.3.5" then
return nil, true
end
return r,v
end
return f(s, cmd, ...);