Gravity: one belt extent rule, read by Zone, the generator's clearance tree and the station tests

AsteroidBelt.Extent(data, rail) is now static over the belt's data and the only spelling: the clearance tree's
'Distance + BeltHalfWidth' and the instance Extent are gone. The swarm host filter loses its dead '!p.Empty'
(no bodyless node has a parent). Findings extent-second-spelling and dead-empty-guard (trojan-swarms-residuals).

The clearance tree now reads the outermost rock, not the rail plus half-width, so 29 of the 1920 zones of seeds
1-30 place a station or turret differently. TrojanSwarmTests.BaseDigest is repinned for seeds 3-6, which hold such
zones; seeds 1 and 2 are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-10-21 20:28:35 +02:00
commit 73d1cee9de
4 changed files with 22 additions and 16 deletions

View file

@ -221,7 +221,7 @@ public class Zone
foreach (var belt in AsteroidBelts)
{
var rail = Planets[belt.Key].Orbit.Key;
beltExtent[rail] = belt.Value.Extent(Orbits[rail].Data.Distance);
beltExtent[rail] = AsteroidBelt.Extent(belt.Value.Data, Orbits[rail].Data.Distance);
}
var wellNodes = new List<WellNode>();
foreach (var orbit in Orbits)
@ -888,8 +888,10 @@ public class AsteroidBelt
}
// What the belt's rail adds to its parent's L_F (WellTree): an annulus reaches its outermost rock, whose period reads the
// field there; a swarm riding its rail reaches only the rail, whose period every rock shares.
public float Extent(float railDistance) => Data.RidesRail ? railDistance : Math.Max(Radius, railDistance);
// field there; a swarm riding its rail reaches only the rail, whose period every rock shares. The one belt extent rule:
// Zone, ZoneGenerator's clearance tree and the station tests all read it.
public static float Extent(AsteroidBeltData data, float railDistance) =>
data.RidesRail ? railDistance : Math.Max(data.Asteroids.Max(a => a.Distance), railDistance);
// Cut 1 (docs/mining-cut.md): the formula of Zone.cs:269-271 verbatim, `time` in double as `_time` was used.
// The only place a chunk pose is computed; no per-tick copy survives it. Cut 2: size is no longer read from