diff --git a/tests/Aetheria.Shared.Tests/StationPlacementTests.cs b/tests/Aetheria.Shared.Tests/StationPlacementTests.cs index c94f40831..d9845a0c8 100644 --- a/tests/Aetheria.Shared.Tests/StationPlacementTests.cs +++ b/tests/Aetheria.Shared.Tests/StationPlacementTests.cs @@ -133,17 +133,25 @@ public sealed class StationPlacementTests : IDisposable Assert.True(ahead > 0 && behind > 0, $"the seeds put stations on one side only (ahead {ahead}, behind {behind})"); } - // A rosette or binary is a bodyless node, a root included; the station's source is never such a node, however many there are. + // A binary under a body is a bodyless node; the station's source is never such a node, however many there are. The authored + // settings leave none standing (every binary's ring folds into its node), so the zones are wide and light enough for rings to stand, + // with every satellite a binary: that is the sample in which the candidate rule's exclusion of a bodyless node does any work. [Fact] public void AStationNeverSitsOnABinarysBodylessNode() { var binaries = 0; var stations = 0; - foreach (var built in GeneratedZones(null, 0, 4)) + foreach (var built in GeneratedZones(null, 0, 4, int.MaxValue, z => + { + z.SatelliteCreationProbability = 1; + z.BinaryCreationProbability = 1; + z.ZoneRadius.Minimum *= 3; z.ZoneRadius.Maximum *= 3; + z.ZoneMass.Minimum *= .1f; z.ZoneMass.Maximum *= .1f; + })) { var zone = built.Zone; var bodyOrbits = zone.Planets.Values.Select(b => b.Orbit.Key).ToHashSet(); - binaries += zone.Orbits.Count(o => !bodyOrbits.Contains(o.Key) && zone.Wells.Reach(o.Key) > 0f); + binaries += zone.Orbits.Count(o => o.Value.Data.Parent.IsSet() && !bodyOrbits.Contains(o.Key) && zone.Wells.Reach(o.Key) > 0f); var ridden = zone.Entities.OfType().Select(e => e.OrbitData).ToHashSet(); foreach (var station in Orbitals(built).Where(e => TypeOf(built.Items, e) == HullType.Station)) {