From 67e2647753d244ca84645fa84100822aa5b9fa4f Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 01:40:28 +0200 Subject: [PATCH] Gravity: restore the swarm hosts' Empty guard; a standing binary's bodyless node keeps its mass and hosted swarms (finding swarm-on-bodyless-node) Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/ZoneGenerator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/ServerShared/ZoneGenerator.cs b/Assets/Scripts/ServerShared/ZoneGenerator.cs index e4316f68f..dfe89917c 100644 --- a/Assets/Scripts/ServerShared/ZoneGenerator.cs +++ b/Assets/Scripts/ServerShared/ZoneGenerator.cs @@ -219,10 +219,11 @@ public static class ZoneGenerator // Trojan swarms (rulings trojans-first, trojans-ride-host-period-with-stations): a belt on a copy of its host's rail, its // rocks round both L4 and L5. Drawn from a stream of its own, so no other draw in the zone moves; not a GeneratorPlanet, - // so it takes no slot and no station candidacy sees it. + // so it takes no slot and no station candidacy sees it. A standing binary leaves a bodyless node (Empty) that keeps its + // pair's mass and a parent, so the Empty guard is what keeps a swarm off a rail no body is on. var swarmRandom = new Random(seed ^ TrojanStream); var swarmHosts = new HashSet(); - foreach (var host in planets.Where(p => p.Parent != null && !p.Parent.Empty && !p.Belt && p.Distance > 0 + foreach (var host in planets.Where(p => p.Parent != null && !p.Parent.Empty && !p.Empty && !p.Belt && p.Distance > 0 && p.Mass > zoneSettings.PlanetMass && p.Mass <= zoneSettings.SunMass)) { if (swarmRandom.NextFloat() >= zoneSettings.TrojanProbability) continue;