dedicated_server: read the game time as the console prints it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-13 03:51:40 +02:00
parent 71e677ed6a
commit 7322bba2b5
+1 -1
View File
@@ -184,7 +184,7 @@ def settle(server, ticks=600, timeout=600):
server.console('time query gametime')
while time.time() < deadline:
for line in server.lines[start:]:
if m := re.search(r'The time is (\d+)', line):
if m := re.search(r'The (?:game )?time is (\d+)', line):
return int(m.group(1))
time.sleep(0.2)
raise AssertionError(f'{server.log_path.name}: no game time in {timeout} s')