From 072e50d2758558d043e6d941066d7f67f5f941cd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 26 Sep 2026 01:23:43 +0200 Subject: [PATCH] Cut 1 fix batch 3 (F3, F4): fix the entrance-throw condition, delete the dead FixedPosition copy F3: the throw fired on selectedStationOrbits.Length == 0, which is also true whenever stationCount rolls 0 -- an unrelated variable. It now checks lagrangeCandidates.Length == 0 directly, the actual "no candidate orbit" case, and the message says so. F4: CreateLagrangeOrbit's FixedPosition copy and its comment described a fallback orbit that no longer exists (widening always returns a real, parented planet orbit). Deleted; nothing reads FixedPosition off a lagrange/turret orbit. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/ZoneGenerator.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/ServerShared/ZoneGenerator.cs b/Assets/Scripts/ServerShared/ZoneGenerator.cs index e3235b412..2144f718c 100644 --- a/Assets/Scripts/ServerShared/ZoneGenerator.cs +++ b/Assets/Scripts/ServerShared/ZoneGenerator.cs @@ -237,9 +237,9 @@ public static class ZoneGenerator .Take(stationCount) .Select(p=>orbitMap[p]) .ToArray(); - if (isTutorialEntrance && selectedStationOrbits.Length == 0) + if (isTutorialEntrance && lagrangeCandidates.Length == 0) throw new InvalidOperationException( - "The tutorial entrance zone must always get a station, but it has no orbit at all -- every planet in the zone is a rootless rosette member with no parent."); + "The tutorial entrance zone must always get a station, but it has no candidate orbit at all -- every planet in the zone is a parentless root."); var loadoutGenerators = new Dictionary(); @@ -257,9 +257,6 @@ public static class ZoneGenerator Parent = baseOrbit.Parent, Distance = baseOrbit.Distance, Phase = baseOrbit.Phase + PI / 3 * sign(random.NextFloat() - .5f), - // Carried through for the tutorial-entrance fallback orbit below, which has no Parent and is - // positioned by FixedPosition alone; every other base orbit here has a Parent and ignores it. - FixedPosition = baseOrbit.FixedPosition, }; pack.Orbits.Add(cache.Upsert(lagrangeOrbit)); return lagrangeOrbit;