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
|
|
@ -492,6 +492,7 @@ local function saveRoomFromEditor()
|
|||
gameWorld:invalidatePreview(name)
|
||||
if editorView == "world" then rebuildWorldRoomButtons() end
|
||||
currentRoom.name = name
|
||||
gameWorld:setLevel(currentRoom)
|
||||
editorRoomName = name
|
||||
roomNameField:editText(name)
|
||||
activeField = nil
|
||||
|
|
@ -520,6 +521,7 @@ local function clearRuntimeSaves()
|
|||
clearSaveConfirmationScope = nil
|
||||
if roomName then
|
||||
currentRoom = Room:new{ name = roomName }
|
||||
gameWorld:setLevel(currentRoom)
|
||||
setEditorRoomName(currentRoom.name)
|
||||
editorStatus = "Cleared " .. removed .. " runtime save item(s) and reloaded '" .. roomName .. ".'"
|
||||
else
|
||||
|
|
@ -905,6 +907,7 @@ local function openWorldRoom(cellX, cellY)
|
|||
currentRoom = Room:new{ name = name }
|
||||
editorStatus = "Editing '" .. name .. ".'"
|
||||
end
|
||||
gameWorld:setLevel(currentRoom)
|
||||
gameWorld:setLastRoom(currentRoom.name)
|
||||
setEditorRoomName(currentRoom.name)
|
||||
assetsView()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue