Skip to content

Commit 97db3f4

Browse files
David Engelhartclaude
andcommitted
lumopolis: the districts-tier loop skips orbs with continue, so V8 counts its branch correctly
CI's coverage gate failed on 77463e3 with branches at 99.94% for world/engine. The one-line form `for (...) if (!n.orb) n.group.visible = ownTier(...) !== 'districts'` made V8 report the skipped branch with a negative hit count (-615), which the gate reads as uncovered. Locally the count came out the same, but the coverage helper only looked for zeros. Writing the loop with a block and `if (n.orb) continue` gives plain counts (97 orbs and 749 buildings). The behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d8d88b1 commit 97db3f4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/renderer/src/world/engine/threeRenderer.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,10 @@ function buildThreeRenderer(host: HTMLElement, opts: RendererOptions, undo: Arra
12481248
if (tier === appliedTier) return
12491249
appliedTier = tier
12501250
const far = tier === 'districts'
1251-
for (const n of nodes.values()) if (!n.orb) n.group.visible = ownTier(n.id, tier, districtOf) !== 'districts'
1251+
for (const n of nodes.values()) {
1252+
if (n.orb) continue
1253+
n.group.visible = ownTier(n.id, tier, districtOf) !== 'districts'
1254+
}
12521255
for (const o of [...slabMeshes, ...slabLines]) o.visible = far
12531256
for (const e of edges.values()) {
12541257
const sh = far ? e.low : e.tall

0 commit comments

Comments
 (0)