DIALOG_IGNORE_INPUT 与 ban_skip 逻辑调整

This commit is contained in:
cakipaul 2025-07-10 23:52:20 +08:00
parent 88ad5c0f60
commit f9d4021ae3

View File

@ -271,10 +271,17 @@ 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)