Complete remaining client gap features

This commit is contained in:
shenlei
2026-09-04 13:25:05 +09:00
parent 13ccb8d02d
commit 9a4a044da5
47 changed files with 6667 additions and 140 deletions
+13
View File
@@ -88,6 +88,19 @@ func _run() -> void:
(qd._btnrow.get_child(0) as Button).pressed.emit()
_ck(fc.answers == [1, 255], "continue -> script_answer(255)")
# DONE is a button action in ClientVS22. Parsing / receiving the token must
# not fire DoneEvent before the player confirms the close button.
var done_events := 0
qd.done_event.connect(func(): done_events += 1)
var done_parse: Dictionary = qd.parse_script("Finished.[DONE]")
_ck(done_parse.next_button_type == "DONE" and done_events == 0,
"DONE parse stays side-effect free")
fc.script_dialog.emit(0, "Finished.[DONE]")
await process_frame
(qd._btnrow.get_child(0) as Button).pressed.emit()
_ck(done_events == 1 and fc.answers == [1, 255, 255],
"DONE click -> DoneEvent + script_answer(255)")
# ESC dismisses the active script through the legacy QUEST_CANCEL packet.
fc.script_dialog.emit(0, "Cancelable quest.[NEXT]")
await process_frame