adventure: fix three review findings on the who page
- timelineLine named the viewer as their own rival on a lost duel: a rival_result arrives on the loser's page via the opponent column, so naming the opponent field pointed at themselves. Thread the page character's name through and name the other party. - buildMapView drew a frontier room twice when two visited rooms both had a door to it (Nodes carried the id twice). Place each id once. - proseGuard's board query ran before the IsGUIDSeen dedup, so a retried dispatch paid for it and threw it away. Check dedup first.
This commit is contained in:
@@ -116,7 +116,16 @@ func buildMapView(m *whoMap) *mapView {
|
||||
// Group nodes by depth column, each column ordered by first appearance.
|
||||
maxDepth := 0
|
||||
byCol := map[int][]string{}
|
||||
placed := make(map[string]bool, len(m.Nodes))
|
||||
for _, n := range m.Nodes {
|
||||
// Two visited rooms can both list a door to the same withheld frontier
|
||||
// room, so the same id can appear twice in Nodes. Place it once, or it
|
||||
// draws as two overlapping discs and its edges resolve to whichever copy
|
||||
// landed last.
|
||||
if placed[n.ID] {
|
||||
continue
|
||||
}
|
||||
placed[n.ID] = true
|
||||
d := depth[n.ID]
|
||||
byCol[d] = append(byCol[d], n.ID)
|
||||
if d > maxDepth {
|
||||
|
||||
Reference in New Issue
Block a user