Clear runtime saves after editor save
This commit is contained in:
parent
858775fdc8
commit
d426306c94
2 changed files with 9 additions and 1 deletions
|
|
@ -480,6 +480,11 @@ local function saveRoomFromEditor()
|
|||
removeFromSource("rooms/" .. oldName .. ".sav")
|
||||
gameWorld:renameRoom(oldName, name)
|
||||
end
|
||||
-- The project source is now authoritative. Drop any runtime copy so it
|
||||
-- cannot shadow this editor save the next time the game starts.
|
||||
clearRuntimeSaveData(name)
|
||||
if oldName and oldName ~= name then clearRuntimeSaveData(oldName) end
|
||||
suppressRuntimeAutosave = true
|
||||
gameWorld:invalidatePreview(name)
|
||||
if editorView == "world" then rebuildWorldRoomButtons() end
|
||||
currentRoom.name = name
|
||||
|
|
@ -506,6 +511,7 @@ local function clearRuntimeSaves()
|
|||
end
|
||||
|
||||
local removed = clearRuntimeSaveData(clearAll and nil or roomName)
|
||||
suppressRuntimeAutosave = true
|
||||
clearSaveConfirmationExpires = 0
|
||||
clearSaveConfirmationScope = nil
|
||||
if roomName then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue