Fix auto transition when changing room without exit_scene event (#462)

Added a new fourth button in room14 to demonstrate this.
Renamed BYPASS_LAST_SCENE to FORCE_LAST_SCENE_NULL to make it a bit clearer.
Made events "finished" and "interrupted" signals connections as ONESHOT (so they are disconnected once the signal was received).

Also removed some unused files, many others remain.
And fixed some bugs here and there.
This commit is contained in:
Julian Murgia
2021-11-25 15:24:33 +01:00
committed by GitHub
parent d867407d01
commit a49e5a2690
19 changed files with 154 additions and 119 deletions

View File

@@ -50,7 +50,11 @@ func _ready():
# Switch to the selected room
func _on_button_pressed():
escoria.globals_manager.set_global("BYPASS_LAST_SCENE", true, true)
# When next room is loaded, we don't want to consider ESC_LAST_SCENE for
# automatic transitions.
# If FORCE_LAST_SCENE_NULL is True when change_scene starts:
# - ESC_LAST_SCENE is set to empty
escoria.globals_manager.set_global("FORCE_LAST_SCENE_NULL", true, true)
var script = escoria.esc_compiler.compile([
":room_selector",
"change_scene %s" % _options_paths[_selected_id]