Every rail's period is derived from the field it orbits in; OrbitPeriod is deleted
Zone.PeriodAround is the one owner: round a body, the pull its well gives at the rail's distance (GravityField.Acceleration); round a bodyless node, the ring law (strength of the orbits inside, plus half of what shares the ring). Orbit.Period and AsteroidBelt.Periods are written once at zone build, before placement; BeltTargets copies the belt's periods. A parentless orbit has no field and stands at its phase. Fixtures lose OrbitPeriod and gain wells where their rails must move. Builds; the new OrbitsFromFieldTests follow in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8f491fd3c9
commit
a4977cbe48
13 changed files with 151 additions and 61 deletions
|
|
@ -531,7 +531,6 @@ public class GeneratorPlanet
|
|||
public float Distance;
|
||||
public float Phase;
|
||||
public float Mass;
|
||||
//public float Period;
|
||||
public float ChildDistanceMinimum;
|
||||
public float ChildDistanceMaximum;
|
||||
public bool Empty = false;
|
||||
|
|
@ -586,7 +585,6 @@ public class GeneratorPlanet
|
|||
ChildDistanceMaximum = (i % 2 == 0 ? p0ChildDist : p1ChildDist)
|
||||
};
|
||||
child.ChildDistanceMinimum = Settings.PlanetSafetyRadius.Evaluate(child.Mass) * 2;
|
||||
//child.Period = Settings..Evaluate(child.Distance);
|
||||
Children.Add(child);
|
||||
}
|
||||
|
||||
|
|
@ -647,7 +645,6 @@ public class GeneratorPlanet
|
|||
Distance = distances[i],
|
||||
Phase = random.NextFloat()
|
||||
};
|
||||
//child.Period = Context.GlobalData.OrbitalPeriod(child.Distance);
|
||||
child.ChildDistanceMinimum = Settings.PlanetSafetyRadius.Evaluate(child.Mass) * 2;
|
||||
// Maximum child distance of child is the smallest distance to either of its neighbors
|
||||
child.ChildDistanceMaximum = min(i == 0 ? child.Distance - ChildDistanceMinimum : child.Distance - distances[i - 1],
|
||||
|
|
|
|||
Loading…
Reference in a new issue