Location
src/sim/ant/ant-system.ts line 858
Description
tickNurseActions sets const v10 = true unconditionally and wraps the entire V10+ nurse state machine in if (v10) { ... } else { // Pre-v10 path (legacy teleport) }. The else branch (~line 1025 onward) is permanently unreachable dead code — v10 is a boolean literal, not derived from world.simVersion.
This was the pre-V10 teleport-based nursing model. It became dead when the V10 visible-brood-carry path was made permanent, and was left in place as a const v10 = true flag rather than being deleted. D2 removed all other version-gated legacy paths; this one was missed.
Impact
No runtime impact — the V10 path executes correctly for all V22+ worlds (the only loadable worlds post-D2). The dead else block is misleading: it looks like a viable fallback path and creates confusion about what tickNurseActions actually does. It also silently carries dead comments referencing pre-v10 invariants throughout the function.
Fix
- Remove
const v10 = true (line 858)
- Remove the
if (v10) { wrapper (line 866) — keep the inner body as the unconditional path
- Delete the
} else { branch from line ~1025 to its closing brace
- Update any inline comments that reference "v10+" as a conditional qualifier to remove the qualifier (they describe current always-on behavior)
Severity
Low — cleanup / dead code. No behaviour change.
Location
src/sim/ant/ant-system.tsline 858Description
tickNurseActionssetsconst v10 = trueunconditionally and wraps the entire V10+ nurse state machine inif (v10) { ... } else { // Pre-v10 path (legacy teleport) }. Theelsebranch (~line 1025 onward) is permanently unreachable dead code —v10is a boolean literal, not derived fromworld.simVersion.This was the pre-V10 teleport-based nursing model. It became dead when the V10 visible-brood-carry path was made permanent, and was left in place as a
const v10 = trueflag rather than being deleted. D2 removed all other version-gated legacy paths; this one was missed.Impact
No runtime impact — the V10 path executes correctly for all V22+ worlds (the only loadable worlds post-D2). The dead
elseblock is misleading: it looks like a viable fallback path and creates confusion about whattickNurseActionsactually does. It also silently carries dead comments referencing pre-v10 invariants throughout the function.Fix
const v10 = true(line 858)if (v10) {wrapper (line 866) — keep the inner body as the unconditional path} else {branch from line ~1025 to its closing braceSeverity
Low — cleanup / dead code. No behaviour change.