mirror of
https://github.com/prosolis/gogobee.git
synced 2026-09-14 19:01:09 +00:00
adventure: stop the log claiming a win it didn't see
Four things the review found, all of them the code telling a player something that isn't true. A run that walks into a dead end filed its ending as "cleared" whatever the caller said, so both the liveblog and the summary reported a clear for a party that merely ran out of map — and the end beat is first-writer-wins, so nothing later could take it back. It says "cleared" only for a boss now. The re-offer branches of babysit and resume returned a zero cost, so a player who was in fact charged read "0 coins" in the verdict. Both re-quote the price they actually took. And the realm-firsts reseed retired its one-shot job even when the read under it had failed, which on a transient fault at Init would have left the ledger mis-dated permanently. The read now says whether it worked, and the job stays open when it didn't. Claude-Session: https://claude.ai/code/session_012bxpQQJDjC1mTtLN3VVtBQ
This commit is contained in:
@@ -508,8 +508,15 @@ func (p *AdventurePlugin) performResume(uid id.UserID, loadoutTok, idemKey strin
|
||||
// re-offer; the settled debit is what tells that apart from a player who
|
||||
// really is already out. Same tell as performExpeditionStart's.
|
||||
if idemKey != "" && p.euro != nil && p.euro.HasExternalTx(idemKey) {
|
||||
return resumeOutcome{Zone: zone, Day: existing.CurrentDay,
|
||||
Supplies: existing.Supplies, Threat: existing.ThreatLevel}, nil
|
||||
out := resumeOutcome{Zone: zone, Day: existing.CurrentDay,
|
||||
Supplies: existing.Supplies, Threat: existing.ThreatLevel}
|
||||
// Re-price the same loadout at the same tier so the verdict this feeds
|
||||
// can still say what it cost. Leaving Purchase zero would file a
|
||||
// "re-outfitted for 0 coins" receipt for a trip that was paid for.
|
||||
if pp, perr := resolveLoadoutOrParse(strings.TrimSpace(loadoutTok), zone.Tier); perr == nil {
|
||||
out.Purchase = pp
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
return resumeOutcome{}, refuseAdv(errResumeBusy,
|
||||
"You already have an active expedition in **%s** (Day %d). Finish it or `!expedition abandon` first.",
|
||||
|
||||
Reference in New Issue
Block a user