Manage save game in case of room loading failure (#441)

This commit is contained in:
Julian Murgia
2021-11-15 09:18:15 +01:00
committed by GitHub
parent a117a8dccf
commit 729a60f6c0
3 changed files with 7 additions and 3 deletions

View File

@@ -126,7 +126,9 @@ func set_camera_limits(camera_limit_id: int = 0) -> void:
func save_game(p_savegame_res: Resource) -> void:
p_savegame_res.main = {
ESCSaveGame.MAIN_LAST_SCENE_GLOBAL_ID_KEY: last_scene_global_id,
ESCSaveGame.MAIN_CURRENT_SCENE_FILENAME_KEY: current_scene.filename
ESCSaveGame.MAIN_CURRENT_SCENE_FILENAME_KEY: current_scene.filename \
if current_scene != null \
else "No current scene (not loaded yet)"
}