Console: seat lines speak PLAYER ordinals, not raw host ids

'SEAT 2 READY' for the first (only) player read as an off-by-one (field
report) -- host 1 is the CONSOLE in the authentic 1995 numbering, so
pods start at host 2.  Human-facing lines now read PLAYER 1/2/... with
the host id in parentheses for cross-reference against the game[host=N]
wire lines; GUI monitor regexes updated (tag-keyed as before, verified
seated/ready/left in isolation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-22 20:54:06 -05:00
co-authored by Claude Opus 4.8
parent 7b3e76db38
commit 2f4b2f9e91
2 changed files with 14 additions and 8 deletions
+8 -5
View File
@@ -547,8 +547,8 @@ class Relay:
for host_id, (callsign, mech) in sorted(self.seat_prefs.items()):
i = host_id - FIRST_GAME_HOST_ID
if 0 <= i < len(pilots):
print(f"[relay] seat {host_id} egg: "
f"vehicle={mech or pilots[i].get('vehicle')} "
print(f"[relay] player {host_id - FIRST_GAME_HOST_ID + 1} "
f"egg: vehicle={mech or pilots[i].get('vehicle')} "
f"callsign={callsign or names[i]!r}", flush=True)
except Exception as e:
print(f"[relay] seat-pref egg rewrite FAILED ({e!r}) -- "
@@ -890,7 +890,8 @@ class Relay:
f"{host_id} '{tag}' (reserved {SEAT_RESERVE_SECONDS:.0f}s)"
f"{pref_note}", flush=True)
cs, mech = self.seat_prefs.get(host_id, ("", ""))
print(f"[relay] SEAT {host_id} PRESENT tag='{tag}' "
print(f"[relay] PLAYER {host_id - FIRST_GAME_HOST_ID + 1} SEATED "
f"(host {host_id}) tag='{tag}' "
f"callsign='{cs}' mech='{mech}' "
f"({len(self.seat_beacons)} seated)", flush=True)
return
@@ -932,7 +933,8 @@ class Relay:
if getattr(c, "ready", False))
i = conn.host_id - FIRST_GAME_HOST_ID
tag = self.roster[i] if 0 <= i < len(self.roster) else "?"
print(f"[relay] SEAT {conn.host_id} READY tag='{tag}' "
print(f"[relay] PLAYER {conn.host_id - FIRST_GAME_HOST_ID + 1} "
f"READY (host {conn.host_id}) tag='{tag}' "
f"({ready_count}/{len(self.by_host)} loaded)", flush=True)
return
if route == ROUTE_BCAST:
@@ -982,7 +984,8 @@ class Relay:
self.seat_prefs.pop(seat, None)
i = seat - FIRST_GAME_HOST_ID
tag = self.roster[i] if 0 <= i < len(self.roster) else "?"
print(f"[relay] SEAT {seat} FREED tag='{tag}' "
print(f"[relay] PLAYER {seat - FIRST_GAME_HOST_ID + 1} LEFT "
f"(host {seat}) tag='{tag}' "
f"({len(self.seat_beacons)} seated)", flush=True)
if conn.host_id is not None and self.by_host.get(conn.host_id) is conn:
del self.by_host[conn.host_id]
+6 -3
View File
@@ -64,9 +64,12 @@ class SessionMonitor:
RE_RELAY_DOWN = re.compile(r"game\[.* host=(\d+)\] dropped")
RE_RELAY_WAITOP = re.compile(r"WAITING FOR OPERATOR")
RE_RELAY_SEAT = re.compile(
r"SEAT (\d+) PRESENT tag='([^']*)' callsign='([^']*)' mech='([^']*)'")
RE_RELAY_FREED = re.compile(r"SEAT (\d+) FREED tag='([^']*)'")
RE_RELAY_READY = re.compile(r"SEAT (\d+) READY tag='([^']*)'")
r"PLAYER (\d+) SEATED \(host \d+\) tag='([^']*)' "
r"callsign='([^']*)' mech='([^']*)'")
RE_RELAY_FREED = re.compile(
r"PLAYER (\d+) LEFT \(host \d+\) tag='([^']*)'")
RE_RELAY_READY = re.compile(
r"PLAYER (\d+) READY \(host \d+\) tag='([^']*)'")
RE_MESH_EGG = re.compile(r"\[([^\]]+)\] egg sent")
RE_MESH_RUN = re.compile(r"\[([^\]]+)\] RunMission #(\d+) sent")