CR: Dialog-Zeilen per confirm/interact bis zur naechsten Auswahl skippen
- confirm (Enter/A) und interact (E) ueberspringen laufende Zeilen, Zeile fuer Zeile bis zur naechsten Antwortauswahl; funktioniert auch in nicht abbrechbaren Dialogen, ohne den Abbruch-Schutz auszuhebeln - Hinweiszeile der Chatbox zeigt die Weiter-Taste, Abbruch nur wo erlaubt - Headless verifiziert (6 Checks) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
77c905de62
commit
84a437825b
3 changed files with 43 additions and 13 deletions
|
|
@ -3,6 +3,18 @@
|
|||
> Abgearbeitete Change Requests aus CHANGEREQUESTS.md, mit Datum und
|
||||
> Anmerkung, was geändert wurde.
|
||||
|
||||
## 2026-07-06 — Gespräche bis zur nächsten Auswahl skippen
|
||||
|
||||
**Request:** „Eine Möglichkeit Gespräche zu skippen bis zur nächsten
|
||||
Auswahl"
|
||||
|
||||
**Umsetzung:** Enter/Ⓐ bzw. E (confirm/interact) überspringen eine
|
||||
laufende Dialog-Zeile sofort; wiederholtes Drücken tickert Zeile für
|
||||
Zeile bis zur nächsten Antwortauswahl (oder zum Dialogende). Funktioniert
|
||||
auch in nicht abbrechbaren Story-Dialogen — dort skippt es nur, bricht
|
||||
aber nicht ab. Die Hinweiszeile der Chatbox zeigt jetzt „Enter / E —
|
||||
weiter" (plus X/Esc-Abbruch, wo erlaubt). Headless verifiziert.
|
||||
|
||||
## 2026-07-06 — Sparringhalle & Kartenraum als eigene Räume
|
||||
|
||||
**Request:** „Sparring Halle & andere Fächer soll eigene Räume sein wie in
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ var _speakers: Dictionary = {}
|
|||
var _speaker_names: Dictionary = {}
|
||||
var _is_effect_pass := true
|
||||
var _is_abort_requested := false
|
||||
var _is_skip_requested := false
|
||||
var _has_applied_effects := false
|
||||
var _abort_lines: Array = [DEFAULT_ABORT_LINE]
|
||||
var _box: CanvasLayer
|
||||
|
|
@ -61,6 +62,7 @@ func start_dialogue(dialogue_path: String, speakers: Dictionary) -> void:
|
|||
_speaker_names = data.get("speakers", {})
|
||||
_is_effect_pass = not GameState.has_completed_dialogue(dialogue_id)
|
||||
_is_abort_requested = false
|
||||
_is_skip_requested = false
|
||||
_has_applied_effects = false
|
||||
_abort_lines = data.get("abort_lines", [])
|
||||
if _abort_lines.is_empty():
|
||||
|
|
@ -71,13 +73,21 @@ func start_dialogue(dialogue_path: String, speakers: Dictionary) -> void:
|
|||
_run_dialogue(data)
|
||||
|
||||
|
||||
## Merkt einen Abbruch-Wunsch (cancel) während laufender Dialog-Zeilen
|
||||
## vor; offene Antwortauswahlen behandelt die Dialog-Box selbst.
|
||||
## Merkt Abbruch- (cancel/dialogue_abort) und Skip-Wünsche
|
||||
## (confirm/interact) während laufender Dialog-Zeilen vor; offene
|
||||
## Antwortauswahlen behandelt die Dialog-Box selbst. Skippen springt
|
||||
## Zeile für Zeile bis zur nächsten Auswahl und funktioniert auch in
|
||||
## nicht abbrechbaren Dialogen.
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if not is_dialogue_active or not is_abort_allowed:
|
||||
if not is_dialogue_active:
|
||||
return
|
||||
if _box != null and _box.has_open_options():
|
||||
return
|
||||
if event.is_action_pressed("confirm") or event.is_action_pressed("interact"):
|
||||
_is_skip_requested = true
|
||||
return
|
||||
if not is_abort_allowed:
|
||||
return
|
||||
if event.is_action_pressed("cancel") or event.is_action_pressed("dialogue_abort"):
|
||||
_is_abort_requested = true
|
||||
|
||||
|
|
@ -136,17 +146,20 @@ func _play_line(node: Dictionary) -> String:
|
|||
|
||||
|
||||
## Wartet das Ende einer Zeile ab (Sprechblasen-Dauer oder Fallback-Timer)
|
||||
## und bricht früh ab, sobald ein Dialog-Abbruch angefordert wurde.
|
||||
## und bricht früh ab, sobald ein Dialog-Abbruch oder ein Zeilen-Skip
|
||||
## (confirm/interact) angefordert wurde.
|
||||
func _wait_for_line(bubble: Node) -> void:
|
||||
_is_skip_requested = false
|
||||
if bubble != null:
|
||||
while bubble.visible and not _is_abort_requested:
|
||||
while bubble.visible and not _is_abort_requested and not _is_skip_requested:
|
||||
await get_tree().process_frame
|
||||
if _is_abort_requested:
|
||||
if _is_abort_requested or _is_skip_requested:
|
||||
bubble.hide_bubble()
|
||||
return
|
||||
var timer := get_tree().create_timer(FALLBACK_LINE_SECONDS)
|
||||
while timer.time_left > 0.0 and not _is_abort_requested:
|
||||
await get_tree().process_frame
|
||||
else:
|
||||
var timer := get_tree().create_timer(FALLBACK_LINE_SECONDS)
|
||||
while timer.time_left > 0.0 and not _is_abort_requested and not _is_skip_requested:
|
||||
await get_tree().process_frame
|
||||
_is_skip_requested = false
|
||||
|
||||
|
||||
## Zeigt eine Zeile mit Antwortoptionen in Box (mit Auswahl) und
|
||||
|
|
|
|||
|
|
@ -27,13 +27,18 @@ func _ready() -> void:
|
|||
|
||||
|
||||
## Zeigt eine Dialog-Zeile mit Sprechernamen; eine noch offene
|
||||
## Antwortauswahl wird dabei geleert. Der Abbruch-Hinweis erscheint nur,
|
||||
## wenn der laufende Dialog abbrechbar ist.
|
||||
## Antwortauswahl wird dabei geleert. Die Hinweiszeile zeigt immer die
|
||||
## Weiter-Taste (Zeilen-Skip) und nur bei abbrechbaren Dialogen
|
||||
## zusätzlich den Abbruch.
|
||||
func show_line(speaker_name: String, text: String) -> void:
|
||||
_speaker_label.text = speaker_name
|
||||
_line_label.text = text
|
||||
_clear_options()
|
||||
_abort_hint.visible = DialogueSystem.is_abort_allowed
|
||||
if DialogueSystem.is_abort_allowed:
|
||||
_abort_hint.text = "Enter / E — weiter · X / Esc — Gespräch beenden"
|
||||
else:
|
||||
_abort_hint.text = "Enter / E — weiter"
|
||||
_abort_hint.visible = true
|
||||
visible = true
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue