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 <noreply@anthropic.com>
This commit is contained in:
parent
0edbe0b455
commit
072e50d275
1 changed files with 2 additions and 5 deletions
|
|
@ -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<Faction, LoadoutGenerator>();
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue