Fix standby lure chat input ownership
This commit is contained in:
parent
219dbb5abc
commit
a1ea341e8c
2 changed files with 16 additions and 2 deletions
|
|
@ -781,7 +781,10 @@ func confirm_pending_bite() -> void:
|
|||
|
||||
func _set_bite_confirmation_pending(is_pending: bool) -> void:
|
||||
if is_pending:
|
||||
_set_fishing_input_priority(true)
|
||||
# The Standby deliberately pauses before the fight begins. Keep chat and
|
||||
# menus available during that pause; fishing only owns input once the
|
||||
# player confirms the bite and enters the actual minigame.
|
||||
_set_fishing_input_priority(false)
|
||||
if _bite_confirmation_pending == is_pending:
|
||||
if not is_pending:
|
||||
_bite_confirmation_requested = false
|
||||
|
|
@ -1142,7 +1145,6 @@ func _activate_bite(confirmation_override: bool = false) -> void:
|
|||
):
|
||||
_cancel_attempt()
|
||||
return
|
||||
_set_fishing_input_priority(true)
|
||||
if (
|
||||
not confirmation_override
|
||||
and _active_lure_has_effect(&"deferred_fight")
|
||||
|
|
@ -1155,6 +1157,7 @@ func _activate_bite(confirmation_override: bool = false) -> void:
|
|||
_presentation.show_bite()
|
||||
return
|
||||
|
||||
_set_fishing_input_priority(true)
|
||||
_set_bite_confirmation_pending(false)
|
||||
_pending_catch = _fish_selector.create_catch(_selected_fish)
|
||||
if _pending_catch == null or not _pending_catch.is_valid():
|
||||
|
|
|
|||
|
|
@ -305,6 +305,17 @@ func _run() -> void:
|
|||
assert(on_screen_keyboard.is_open())
|
||||
on_screen_keyboard.call("_close_keyboard", true)
|
||||
assert(typed_chat_entry.has_focus())
|
||||
|
||||
# A deferred Standby bite has not started the fishing minigame yet. It must
|
||||
# release fishing's input ownership so chat remains available until the
|
||||
# player confirms the bite.
|
||||
chat_fishing_spot.call("_set_fishing_input_priority", true)
|
||||
chat_fishing_spot.call("_set_bite_confirmation_pending", true)
|
||||
for _frame: int in 4:
|
||||
await process_frame
|
||||
assert(not chat_fishing_spot.is_fishing_input_priority_active())
|
||||
assert(chat_ui.is_open())
|
||||
chat_fishing_spot.call("_set_bite_confirmation_pending", false)
|
||||
var left_bumper := InputEventJoypadButton.new()
|
||||
left_bumper.button_index = JOY_BUTTON_LEFT_SHOULDER
|
||||
left_bumper.pressed = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue