mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Complaints from wyrm
This commit is contained in:
parent
ee8098b1ba
commit
a7e446b37b
@ -440,6 +440,11 @@ namespace NewHorizons.Builder.ShipLog
|
||||
|
||||
private static MapModeObject ConstructPrimaryNode(List<NewHorizonsBody> bodies)
|
||||
{
|
||||
float DistanceFromPrimary(NewHorizonsBody body)
|
||||
{
|
||||
return Mathf.Max(body.Config.Orbit.semiMajorAxis, body.Config.Orbit.staticPosition?.Length() ?? 0f);
|
||||
}
|
||||
|
||||
foreach (NewHorizonsBody body in bodies.Where(b => b.Config.Base.centerOfSolarSystem))
|
||||
{
|
||||
bodies.Sort((b, o) => b.Config.Orbit.semiMajorAxis.CompareTo(o.Config.Orbit.semiMajorAxis));
|
||||
|
||||
8
NewHorizons/External/Configs/PlanetConfig.cs
vendored
8
NewHorizons/External/Configs/PlanetConfig.cs
vendored
@ -287,6 +287,14 @@ namespace NewHorizons.External.Configs
|
||||
|
||||
// Disable map marker for dream dimensions
|
||||
if (Dream != null && Dream.inDreamWorld) MapMarker.enabled = false;
|
||||
|
||||
// User error #983
|
||||
// This will not catch if they wrote the two names slightly differently but oh well don't be stupid
|
||||
// Ideally we should just check for loops in PlanetGraph
|
||||
if (Orbit.primaryBody == name)
|
||||
{
|
||||
throw new Exception($"You set {name} to orbit itself, that is invalid. The planet will not load.");
|
||||
}
|
||||
}
|
||||
|
||||
public void Migrate()
|
||||
|
||||
@ -27,6 +27,8 @@ namespace NewHorizons.External.SerializableData
|
||||
return new Vector3(vec.x, vec.y, vec.z);
|
||||
}
|
||||
|
||||
public float Length() => Mathf.Sqrt(x * x + y * y + z * z);
|
||||
|
||||
public override string ToString() => $"{x}, {y}, {z}";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user