From f9d4021ae3eeec95d47b7d73bc581a41e29d0900 Mon Sep 17 00:00:00 2001 From: cakipaul Date: Thu, 10 Jul 2025 23:52:20 +0800 Subject: [PATCH] =?UTF-8?q?DIALOG=5FIGNORE=5FINPUT=20=E4=B8=8E=20ban=5Fski?= =?UTF-8?q?p=20=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scene/dialog/balloon.gd | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scene/dialog/balloon.gd b/scene/dialog/balloon.gd index bf4cbd3a..7950872e 100755 --- a/scene/dialog/balloon.gd +++ b/scene/dialog/balloon.gd @@ -271,11 +271,18 @@ func _on_mutated(_mutation: Dictionary) -> void: func _on_balloon_gui_input(event: InputEvent) -> void: # 根据全局配置,是否允许忽略输入 + # ignore 的情况下不需要 block input if temporary_game_states.has(GlobalConfig.DIALOG_IGNORE_INPUT): - if event.is_action_pressed("interact") or event.is_action_pressed("cancel"): - get_viewport().set_input_as_handled() - return + if not GlobalConfig.DEBUG: + return + SceneManager.pop_debug_dialog_info("程序", "调试模式 DIALOG_IGNORE_INPUT 不生效") + if current_line_ban_skip: + # debug 模式下不禁用 + if not GlobalConfig.DEBUG: + return + SceneManager.pop_debug_dialog_info("程序", "调试模式当前行 #ban_skip 不生效") + if dialogue_line.responses.size() > 0: return @@ -302,12 +309,6 @@ func _on_balloon_gui_input(event: InputEvent) -> void: # elif event.is_action_pressed(next_action) and get_viewport().gui_get_focus_owner() == balloon: if event.is_action_pressed("interact") or event.is_action_pressed("cancel"): get_viewport().set_input_as_handled() - if current_line_ban_skip: - # debug 模式下不禁用 - if not GlobalConfig.DEBUG: - return - print("debug mode, #ban_skip is disabled") - SceneManager.pop_debug_dialog_info("程序", "调试模式 #ban_skip 不生效") manually_skipped_line.emit(dialogue_line.next_id) next(dialogue_line.next_id)