Fix load function
This commit is contained in:
parent
0e3867eb68
commit
36d945cf47
2 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,7 @@ _M.Filename = _M.PoolDir .. _M.State[1]
|
|||
_M.StartPowerup = 0
|
||||
|
||||
_M.NeatConfig = {
|
||||
Threads = 4,
|
||||
Threads = 8,
|
||||
--Filename = "DP1.state",
|
||||
SaveFile = _M.Filename .. ".pool",
|
||||
Filename = _M.Filename,
|
||||
|
|
3
pool.lua
3
pool.lua
|
@ -407,7 +407,7 @@ end
|
|||
|
||||
-- FIXME Save/load mechanism has to be rethought with items running in parallel
|
||||
local function loadFile(filename, after)
|
||||
print("Loading pool from " .. filename)
|
||||
message("Loading pool from " .. filename, 0x00999900)
|
||||
local file = io.open(filename, "r")
|
||||
if file == nil then
|
||||
message("File could not be loaded", 0x00990000)
|
||||
|
@ -431,6 +431,7 @@ end
|
|||
|
||||
local function loadPool(after)
|
||||
loadFile(_M.saveLoadFile, after)
|
||||
after()
|
||||
end
|
||||
|
||||
local function processRenderForm(form)
|
||||
|
|
Loading…
Add table
Reference in a new issue