working on snapshots
This commit is contained in:
parent
b95a963f07
commit
3167b2f77d
|
@ -26,11 +26,10 @@ stead.restore_snapshot = function (nr)
|
||||||
if not ss[nr] then return nil, true end -- nothing todo
|
if not ss[nr] then return nil, true end -- nothing todo
|
||||||
local i,v
|
local i,v
|
||||||
|
|
||||||
|
stead:init();
|
||||||
|
-- game.lifes:zap();
|
||||||
gamefile("main.lua", true);
|
gamefile("main.lua", true);
|
||||||
stead.pclr();
|
|
||||||
-- if type(init) == 'function' then -- no hooks here!!!
|
|
||||||
-- init();
|
|
||||||
-- end
|
|
||||||
local f, err = loadstring(ss[nr]);
|
local f, err = loadstring(ss[nr]);
|
||||||
if not f then return end
|
if not f then return end
|
||||||
local i,r = f();
|
local i,r = f();
|
||||||
|
|
|
@ -1638,8 +1638,6 @@ function gamefile(file, forget)
|
||||||
if forget then
|
if forget then
|
||||||
game._scripts = { }
|
game._scripts = { }
|
||||||
end
|
end
|
||||||
stead:init();
|
|
||||||
game.lifes:zap();
|
|
||||||
dofile(file);
|
dofile(file);
|
||||||
game:ini();
|
game:ini();
|
||||||
if #game._scripts == 0 or file ~= game._scripts[#game._scripts] then
|
if #game._scripts == 0 or file ~= game._scripts[#game._scripts] then
|
||||||
|
@ -1647,7 +1645,6 @@ function gamefile(file, forget)
|
||||||
stead.table.insert(game._scripts, file);
|
stead.table.insert(game._scripts, file);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return goto(here())
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function do_savegame(s, h)
|
function do_savegame(s, h)
|
||||||
|
|
Reference in a new issue