Synchronize world state across editor and room saves
This commit is contained in:
parent
1965e548b4
commit
ee7d36e72b
3 changed files with 75 additions and 13 deletions
8
main.lua
8
main.lua
|
|
@ -66,8 +66,12 @@ function love.quit()
|
|||
-- An explicit editor save/clear removes the runtime copy intentionally;
|
||||
-- don't immediately recreate it while shutting down.
|
||||
if currentRoom and not suppressRuntimeAutosave then
|
||||
currentRoom:save()
|
||||
if gameWorld then gameWorld:setLastRoom(currentRoom.name) end
|
||||
if gameWorld then
|
||||
gameWorld:markDirty(currentRoom)
|
||||
gameWorld:flushRuntime()
|
||||
else
|
||||
currentRoom:save()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue