diff --git a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd index bcd03ce0..d93dd9b5 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd @@ -84,8 +84,6 @@ func do(action: int, params: Array = [], can_interrupt: bool = false) -> void: if can_interrupt: escoria.event_manager.interrupt_running_event() - self.clear_current_action() - var walk_fast = false if params.size() > 2: walk_fast = true if params[2] else false diff --git a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd index c6620a05..9490932d 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd @@ -282,8 +282,8 @@ func _on_event_finished(finished_statement: ESCStatement, return_code: int, chan escoria.save_manager.save_enabled = true if return_code == ESCExecution.RC_CANCEL: - return_code = ESCExecution.RC_OK - + return_code = ESCExecution.RC_OK + _running_events[channel_name] = null _channels_state[channel_name] = true diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index 2c61fa99..557ca1c8 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -113,6 +113,7 @@ func change_scene(room_path: String, enable_automatic_transitions: bool) -> void var game_parent = escoria.game_scene.get_parent() game_parent.remove_child(escoria.game_scene) + #escoria.game_scene.hide_ui() room_scene.add_child(escoria.game_scene) room_scene.move_child(escoria.game_scene, 0) room_scene.game = escoria.game_scene diff --git a/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd b/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd index 52ff5187..0cf3c0ad 100644 --- a/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd +++ b/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd @@ -39,12 +39,9 @@ func _ready() -> void: anchor_right = 1 anchor_bottom = 1 color = Color.white + color.a = 0 mouse_filter = MOUSE_FILTER_IGNORE _tween = Tween.new() - add_child(_tween) - _tween.connect("tween_all_completed", self, "_on_tween_completed") - - transition() # Play a transition animation @@ -61,6 +58,14 @@ func transition( duration: float = 1.0 ) -> int: + # We put this here instead of the constructor since if we have it in the + # constructor, the transition will ALWAYS happen on game start, which might + # not be desired if 'false' is used for automatic_transitions in a + # change_scene call in :init. + if not _tween.is_inside_tree(): + add_child(_tween) + _tween.connect("tween_all_completed", self, "_on_tween_completed") + if transition_name.empty(): transition_name = escoria.project_settings_manager.get_setting( escoria.project_settings_manager.DEFAULT_TRANSITION diff --git a/addons/escoria-ui-9verbs/game.gd b/addons/escoria-ui-9verbs/game.gd index a68f6787..93d98efe 100644 --- a/addons/escoria-ui-9verbs/game.gd +++ b/addons/escoria-ui-9verbs/game.gd @@ -347,8 +347,9 @@ func _on_action_finished() -> void: tooltip.clear() func _on_event_done(_return_code: int, _event_name: String): - escoria.action_manager.clear_current_action() - verbs_menu.unselect_actions() + if _return_code == ESCExecution.RC_OK: + escoria.action_manager.clear_current_action() + verbs_menu.unselect_actions() func apply_custom_settings(custom_settings: Dictionary):