Review follow-ups L + I: drop dead openParty, unify the menu-index parser

L: openParty had no production callers (invite path uses joinParty -> seatLeader,
which seats the leader the same way but reads the owner off the expedition row).
Removed it; the tests now seat the leader through a seatLeaderFixture that wraps
seatLeader in a transaction.

I: promoted parseTemperIndex to parseMenuIndex and routed resolveMagicEquipReply
and handleMasterworkEquipReply through it, replacing two hand-inlined copies of
the same digit parser. Behaviour-preserving (the parsed flag was redundant with
the idx<0 guard); the retry-on-bad-parse disagreement is left as-is since this
is a pure dedup.

Full plugin suite green.

Claude-Session: https://claude.ai/code/session_017mEwUmmS7aQTP2NQXj6rUa
This commit is contained in:
prosolis
2026-07-10 08:55:07 -07:00
parent d7a5333048
commit 1f1fbf0251
6 changed files with 48 additions and 77 deletions

View File

@@ -346,9 +346,9 @@ func TestParseTemperIndex(t *testing.T) {
{"cancel", 3, 0, false},
}
for _, tc := range tests {
got, ok := parseTemperIndex(tc.in, tc.n)
got, ok := parseMenuIndex(tc.in, tc.n)
if ok != tc.wantOK || (ok && got != tc.want) {
t.Errorf("parseTemperIndex(%q, %d) = (%d, %v), want (%d, %v)",
t.Errorf("parseMenuIndex(%q, %d) = (%d, %v), want (%d, %v)",
tc.in, tc.n, got, ok, tc.want, tc.wantOK)
}
}