Clear runtime saves after editor save

This commit is contained in:
Your Name 2026-08-11 16:37:11 -04:00
parent 858775fdc8
commit d426306c94
2 changed files with 9 additions and 1 deletions

View file

@ -55,7 +55,9 @@ end
-- Autosave on close so a position reached by moving within a room (short of a
-- room-to-room transition, which already autosaves in nextRoom) survives.
function love.quit()
if currentRoom then
-- 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
end