adventure: show the party, the pets, and what you missed
Four small surfaces the game has had all along and the web has never shown. The party roster on the adventurer page is the one with a bug behind it. The board resolved an expedition by owner id, so a player seated on somebody else's run has been reading as "idle in town" while standing in a tier-4 dungeon. Seats now ride the roster detail beside the supply and threat numbers, and an opted-out player's seat is anonymised rather than dropped: a party of three rendered as a pair contradicts everything printed next to it. Pets show their levelling. They have earned XP from every won fight since that wiring was fixed and the only place a level ever appeared was a Matrix line that scrolled away. The threshold comes from the engine, in the engine's own centi-XP, because a copy of the curve here would drift the first time a band moved. "While you were away" is the one panel on the site about the reader rather than the realm. Two stamps behind it, not one: a single column would show the news, move the clock, and render an empty box over the same events on the reader's first refresh. And the story permalink names its region, which has been hardcoded empty behind a `// reserved` comment since the page shipped.
This commit is contained in:
@@ -412,11 +412,18 @@ func (s *Server) handleAdventureStory(w http.ResponseWriter, r *http.Request) {
|
||||
// the three end-of-expedition types carry a run id at all, and the run behind
|
||||
// one is swept after a fortnight. A dispatch without it reads exactly as it
|
||||
// did before the report existed.
|
||||
runReport := ""
|
||||
// Region rides the same lookup rather than a second query. It is a *fact*
|
||||
// field, never on the story row — the story is the words Pete wrote and they
|
||||
// have no columns for where. So a dispatch filed before the fact table existed
|
||||
// still renders regionless, which is what it always did.
|
||||
runReport, region := "", ""
|
||||
if ev, err := storage.AdventureEventByGUID(guid); err != nil {
|
||||
slog.Error("adventure story: fact lookup failed", "guid", guid, "err", err)
|
||||
} else {
|
||||
runReport = runReportLinkFor(ev)
|
||||
if ev != nil {
|
||||
region = ev.Region
|
||||
}
|
||||
}
|
||||
|
||||
base := s.base(r)
|
||||
@@ -431,7 +438,7 @@ func (s *Server) handleAdventureStory(w http.ResponseWriter, r *http.Request) {
|
||||
Emoji: emoji,
|
||||
Headline: st.Headline,
|
||||
Body: body,
|
||||
Region: "", // reserved: region isn't stored on the row yet
|
||||
Region: region,
|
||||
When: time.Unix(st.SeenAt, 0).UTC().Format("Jan 2, 2006"),
|
||||
Permalink: s.advPermalink(guid),
|
||||
RunReportURL: runReport,
|
||||
|
||||
Reference in New Issue
Block a user