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 end
end end
if r == nil and v == nil and stead.api_version < "1.3.5" then
return nil, true
end
return r,v return r,v
end end
return f(s, cmd, x, y, px, py, ...) 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); return stead.goto(here(), false, false, true);
end end
NEED_SCENE = true NEED_SCENE = true
if stead.api_version >= "1.3.5" then
return true -- force action
end
end end
return v return v
end) end)

View file

@ -8,6 +8,9 @@ game.action = stead.hook(game.action, function(f, s, cmd, ...)
r,v = call(s, 'kbd', r,v = call(s, 'kbd',
input.key_event.down, input.key_event.key); input.key_event.down, input.key_event.key);
end end
if r == nil and v == nil and stead.api_version < "1.3.5" then
return nil, true
end
return r,v return r,v
end end
return f(s, cmd, ...); return f(s, cmd, ...);

View file

@ -2101,7 +2101,7 @@ iface = {
return nil, true; -- menu return nil, true; -- menu
end 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 return nil, nil -- really nothing
end end

View file

@ -6,6 +6,9 @@ game.action = stead.hook(game.action, function(f, s, cmd, ...)
elseif s.timer then elseif s.timer then
r,v = call(s, 'timer'); r,v = call(s, 'timer');
end end
if r == nil and v == nil and stead.api_version < "1.3.5" then
return nil, true
end
return r,v return r,v
end end
return f(s, cmd, ...); return f(s, cmd, ...);