Gate phone dialogue on heard discoveries and fix memory display

This commit is contained in:
Codex
2026-10-30 13:39:50 +02:00
parent b437475b75
commit 69d608765c
38 changed files with 1750 additions and 1204 deletions
+21 -7
View File
@@ -47,7 +47,7 @@ func perform(id: String) -> void:
check(not game.busy.is_empty(), "Command accepted: " + id)
if not game.busy.is_empty():
at(game.reply_at + 0.02)
at(game.busy_end + 0.03)
at(maxf(game.busy_end,game.speech_until) + 0.03)
func start(number: int, knowledge: int = 0) -> void:
game.show_test_menu()
@@ -94,6 +94,12 @@ func finish(expected: String) -> void:
check(game.busy.is_empty() and game.events.is_empty(), "Strike clears pending work")
check(not game.voice.playing, "Strike cuts dialogue")
check(game.outcome == expected, "Expected " + expected + ", got " + game.outcome)
for entry in game.archive:
if not entry.has("line"): continue
var rule: Dictionary = game.story.line_rules.get(entry.line,{})
for key in rule.get("facts",[]): check(key in entry.known,"Spoken line has prior evidence: " + entry.line + "/" + key)
for key in rule.get("items",[]): check(key in entry.items,"Spoken line uses a held item: " + entry.line + "/" + key)
if rule.has("places"): check(entry.place in rule.places,"Spoken line matches current place: " + entry.line)
results.append({"chapter": game.chapter, "outcome": game.outcome, "facts": game.facts.keys()})
# Fast route checks skip the production epilogue; separate checks below
# wait for the real audio and verify that it gates the redial control.
@@ -274,6 +280,8 @@ func run(target: Node) -> void:
carol_count += 1
check(jessica_count == 52, "All 52 Katya lines use Jessica")
check(carol_count == 58, "All 58 mother lines use Carol")
for id in game.story.lines:
check(voices[id].text == game.story.lines[id].text,"Audio manifest matches corrected dialogue: " + id)
check(game.voice_length("greeting") <= game.story.intro[0].at, "Greeting fits before prologue")
check(45 + game.voice_length("power") <= 51, "Blackout reaction fits before conversation resumes")
var warning_at: float = game.story.timeline.hum
@@ -507,9 +515,13 @@ func run(target: Node) -> void:
check(opening_at >= game.voice_length("greeting"), "Greeting is not truncated")
at(opening_at + 0.01)
at(reply_time + 0.01)
check(entry.opening in game.heard and entry.reply in game.heard, "Unique opening " + str(number))
perform("question")
check(entry.question in game.heard and entry.answer in game.heard, "Unique exchange " + str(number))
var opening: Dictionary = game.opening_for(number)
check(opening.opening in game.heard and opening.reply in game.heard, "Knowledge-aware opening " + str(number))
if game.line_allowed(entry.question):
perform("question")
check(entry.question in game.heard and entry.answer in game.heard, "Contextual exchange " + str(number))
else:
check(game.action_button("question") == null,"No context-free question " + str(number))
at(warning_at + 0.01)
check(game.heard[-1] == "hum", "Hum before strike")
finish("flat")
@@ -522,12 +534,12 @@ func run(target: Node) -> void:
game.choose_action("safe")
check(game.busy.is_empty(), "Hidden action rejected")
perform("keys_search")
check(game.facts.has("keys") and game.items.has("keys"), "Key discovery")
check(game.facts.has("keys_exact") and game.items.has("keys"), "Key discovery")
perform("lamp_search")
check(game.facts.has("lamp") and game.items.has("lamp"), "Lamp discovery")
finish("flat")
click("next")
check(game.chapter == 3 and game.facts.has("keys") and game.items.is_empty(), "Redial remembers knowledge only")
check(game.chapter == 3 and game.facts.has("keys_exact") and game.items.is_empty(), "Redial remembers knowledge only")
check(game.action_button("keys_fast") != null and game.action_button("keys_search") == null, "Shortcut replaces slow search")
start(4)
@@ -579,7 +591,7 @@ func run(target: Node) -> void:
at(89.99)
check(game.heard[-1] == "hum" and game.heard.count("hum") == 1 and not game.can_respond(), "Nothing replaces the final line: " + str(number))
finish("flat")
check(not game.items.has("keys") and not game.facts.has("keys"), "Interrupted request grants nothing: " + str(number))
check(not game.items.has("keys") and not game.facts.has("keys_exact"), "Interrupted request grants nothing: " + str(number))
start(2)
wait_for_speech()
var search: Dictionary = game.story.actions.filter(func(action): return action.id == "keys_search")[0]
@@ -728,6 +740,8 @@ func run(target: Node) -> void:
click("resume")
check(game.menu_screen.is_empty() and game.action_button("next") != null, "Menu returns to the completed call outcome")
game.qa_mode = true
var continuity = load("res://scripts/phone_continuity_qa.gd").new()
await continuity.run(self)
await realtime_final_check()
if "--phone-real-time" in OS.get_cmdline_user_args():
await realtime_check()