Synchronize world state across editor and room saves

This commit is contained in:
Your Name 2026-08-11 21:49:32 -04:00
parent 1965e548b4
commit ee7d36e72b
3 changed files with 75 additions and 13 deletions

View file

@ -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