Extend pre-impact pause and synchronize both call timers
This commit is contained in:
@@ -12,6 +12,10 @@ func check(ok: bool, message: String) -> void:
|
||||
errors.append(message)
|
||||
push_error("PHONE QA: " + message)
|
||||
|
||||
func check_clocks(expected: String, context: String) -> void:
|
||||
check(game.clock_label.text == expected, "Katya call duration " + context)
|
||||
check(game.stage.mother_clock.text == expected, "Mother call duration " + context)
|
||||
|
||||
func click(id: String) -> void:
|
||||
var gameplay := id in ["question", "cancel"]
|
||||
for action in game.story.actions:
|
||||
@@ -86,12 +90,24 @@ func realtime_check() -> void:
|
||||
# Opt-in, genuinely wait for the complete prologue and production transition.
|
||||
start(1)
|
||||
game.qa_mode = false
|
||||
var warning_finished: Array[float] = []
|
||||
var record_warning := func():
|
||||
if game.running and not game.heard.is_empty() and game.heard[-1] == "hum":
|
||||
warning_finished.append(game.elapsed)
|
||||
game.voice.finished.connect(record_warning)
|
||||
var began := Time.get_ticks_msec()
|
||||
for step in range(3):
|
||||
await game.get_tree().create_timer(30.0).timeout
|
||||
print("PHONE_REALTIME elapsed=", (Time.get_ticks_msec() - began) / 1000.0)
|
||||
await game.get_tree().create_timer(9.0).timeout
|
||||
game.voice.finished.disconnect(record_warning)
|
||||
check(game.impacted and not game.running, "Real 90-second strike")
|
||||
check_clocks("01:30", "real disconnected call")
|
||||
check(warning_finished.size() == 1, "Real warning plays to its natural end")
|
||||
if warning_finished.size() == 1:
|
||||
var warning_gap := float(game.story.timeline.impact) - warning_finished[0]
|
||||
check(warning_gap >= 5, "Real warning leaves five seconds before impact")
|
||||
print("PHONE_REALTIME warning_gap=", warning_gap)
|
||||
for beat in game.story.intro:
|
||||
check(beat.line in game.heard, "Real prologue " + str(beat.line))
|
||||
check("after_call" in game.heard, "Production post-impact reply")
|
||||
@@ -139,10 +155,12 @@ func run(target: Node) -> void:
|
||||
check(carol_count == 58, "All 58 mother lines use Carol")
|
||||
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")
|
||||
check(85 + game.voice_length("hum") <= 90, "Hum reaction fits before strike")
|
||||
var warning_at: float = game.story.timeline.hum
|
||||
check(90 - warning_at - game.voice_length("hum") >= 5, "At least five seconds after full warning before strike")
|
||||
check(game.hum.stream.get_length() >= 90 - warning_at, "Background hum covers the longer wait until impact")
|
||||
for index in range(game.story.intro.size()):
|
||||
var beat: Dictionary = game.story.intro[index]
|
||||
var next_at: float = game.story.intro[index + 1].at if index + 1 < game.story.intro.size() else 85.0
|
||||
var next_at: float = game.story.intro[index + 1].at if index + 1 < game.story.intro.size() else warning_at
|
||||
if float(beat.at) < 45: next_at = minf(next_at, 45)
|
||||
check(float(beat.at) + game.voice_length(beat.line) <= next_at, "Intro line fits before next cue: " + str(beat.line))
|
||||
await capture("phone-menu")
|
||||
@@ -151,11 +169,13 @@ func run(target: Node) -> void:
|
||||
click("back_menu")
|
||||
game.dial_call(1,true,0,true)
|
||||
check(game.dialing and not game.running, "Dial animation precedes the 90-second clock")
|
||||
check_clocks("", "hidden before connection")
|
||||
check(game.stage.mother_status.text == "Входящий звонок", "Mother sees incoming daughter call")
|
||||
await game.get_tree().create_timer(0.55).timeout
|
||||
await capture("phone-dialing")
|
||||
await game.get_tree().create_timer(1.9 if DisplayServer.get_name() == "headless" else 1.5).timeout
|
||||
check(game.running and not game.dialing and game.elapsed < 1.0, "Connection starts a fresh full attempt")
|
||||
check_clocks("00:00", "first connection")
|
||||
check("greeting" in game.heard, "Mother answers after connection")
|
||||
game.stage.update(1.0)
|
||||
check(game.stage.purple_level > game.stage.pink_level, "Mother lights the violet background")
|
||||
@@ -273,6 +293,11 @@ func run(target: Node) -> void:
|
||||
# Every redial repeats the same external world, including the first call.
|
||||
for number in range(1, 11):
|
||||
start(number)
|
||||
check_clocks("00:00", "reset in call " + str(number))
|
||||
at(0.95)
|
||||
check_clocks("00:00", "before first full second")
|
||||
at(1.05)
|
||||
check_clocks("00:01", "one elapsed second")
|
||||
at(23.99)
|
||||
check(not game.fired.has("alarm"), "No early siren: " + str(number))
|
||||
at(24.01)
|
||||
@@ -287,13 +312,23 @@ func run(target: Node) -> void:
|
||||
at(45.01)
|
||||
check(game.fired.get("power") == 45.0 and "темно" in game.place_label.text, "Same visible blackout: " + str(number))
|
||||
check("power" in game.heard, "Mother acknowledges blackout: " + str(number))
|
||||
at(84.99)
|
||||
at(59.95)
|
||||
check_clocks("00:59", "before minute rollover")
|
||||
at(60.05)
|
||||
check_clocks("01:00", "minute rollover")
|
||||
at(warning_at - 0.01)
|
||||
check(not game.fired.has("hum"), "No early hum: " + str(number))
|
||||
at(85.01)
|
||||
check(game.fired.get("hum") == 85.0, "Same hum time: " + str(number))
|
||||
at(warning_at + 0.01)
|
||||
check(game.fired.get("hum") == warning_at, "Same hum time: " + str(number))
|
||||
at(warning_at + game.voice_length("hum") + 0.01)
|
||||
check(not game.impacted and game.heard[-1] == "hum", "Full warning leaves time before impact: " + str(number))
|
||||
at(89.99)
|
||||
check_clocks("01:29", "last second of call")
|
||||
check(not game.impacted, "No early strike: " + str(number))
|
||||
finish("flat")
|
||||
check_clocks("01:30", "duration held after disconnect")
|
||||
at(95)
|
||||
check_clocks("01:30", "post-call notifications do not advance duration")
|
||||
check(game.fired.get("impact") == 90.0, "Same strike time: " + str(number))
|
||||
start(1)
|
||||
at(45.01)
|
||||
@@ -313,7 +348,7 @@ func run(target: Node) -> void:
|
||||
check(game.heard == ["greeting"], "Identical opening " + str(number))
|
||||
if number == 1:
|
||||
check(game.action_button("keys_search") == null, "Prologue has no commands")
|
||||
check(game.clock_label.text.is_empty(), "Prologue hides time")
|
||||
check_clocks("00:00", "prologue shows duration")
|
||||
for beat in game.story.intro: at(beat.at + 0.01)
|
||||
check(game.heard.size() == 19 and "power" in game.heard, "Ordinary conversation and blackout acknowledgement")
|
||||
else:
|
||||
@@ -326,7 +361,7 @@ func run(target: Node) -> void:
|
||||
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))
|
||||
at(85.01)
|
||||
at(warning_at + 0.01)
|
||||
check(game.heard[-1] == "hum", "Hum before strike")
|
||||
finish("flat")
|
||||
await capture("phone-ending")
|
||||
|
||||
Reference in New Issue
Block a user