mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fixed asteroids
This commit is contained in:
parent
7b2dca04df
commit
8d7da14a3f
@ -33,7 +33,7 @@ namespace NewHorizons.Body
|
||||
{"HasMapMarker", false },
|
||||
{"SurfaceGravity", 1 },
|
||||
{"SurfaceSize", size },
|
||||
{"HideOrbitLine", true }
|
||||
{"HasReferenceFrame", false }
|
||||
}
|
||||
},
|
||||
{"Orbit", new Dictionary<string, object>()
|
||||
@ -43,7 +43,8 @@ namespace NewHorizons.Body
|
||||
{"LongitudeOfAscendingNode", belt.LongitudeOfAscendingNode },
|
||||
{"TrueAnomaly", 360f * (i + Random.Range(-0.2f, 0.2f)) / (float)count },
|
||||
{"PrimaryBody", bodyName },
|
||||
{"SemiMajorAxis", maxSize * Random.Range(belt.InnerRadius, belt.OuterRadius) }
|
||||
{"SemiMajorAxis", Random.Range(belt.InnerRadius, belt.OuterRadius) },
|
||||
{"ShowOrbitLine", false }
|
||||
}
|
||||
},
|
||||
{"ProcGen", new Dictionary<string, object>()
|
||||
|
||||
2
NewHorizons/External/BaseModule.cs
vendored
2
NewHorizons/External/BaseModule.cs
vendored
@ -17,6 +17,6 @@ namespace NewHorizons.External
|
||||
public float GroundSize { get; set; }
|
||||
public float BlackHoleSize { get; set; }
|
||||
public float LavaSize { get; set; }
|
||||
public bool HideOrbitLine { get; set; }
|
||||
public bool HasReferenceFrame { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
1
NewHorizons/External/OrbitModule.cs
vendored
1
NewHorizons/External/OrbitModule.cs
vendored
@ -19,5 +19,6 @@ namespace NewHorizons.External
|
||||
public float AxialTilt { get; set; }
|
||||
public float SiderealPeriod { get; set; }
|
||||
public bool IsTidallyLocked { get; set; }
|
||||
public bool ShowOrbitLine { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +198,8 @@ namespace NewHorizons
|
||||
GravityBuilder.Make(go, ao, body.Config.Base.SurfaceGravity, sphereOfInfluence, body.Config.Base.SurfaceSize);
|
||||
else Logger.Log("No gravity?");
|
||||
|
||||
RFVolumeBuilder.Make(go, rb, sphereOfInfluence);
|
||||
if(body.Config.Base.HasReferenceFrame)
|
||||
RFVolumeBuilder.Make(go, rb, sphereOfInfluence);
|
||||
|
||||
if (body.Config.Base.HasMapMarker)
|
||||
MarkerBuilder.Make(go, body.Config.Name, body.Config.Orbit.IsMoon);
|
||||
@ -221,7 +222,7 @@ namespace NewHorizons
|
||||
body.Object = go;
|
||||
|
||||
// Some things have to be done the second tick
|
||||
if(body.Config.Orbit != null && !body.Config.Base.HideOrbitLine)
|
||||
if(body.Config.Orbit != null && body.Config.Orbit.ShowOrbitLine)
|
||||
Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => OrbitlineBuilder.Make(body.Object, ao, body.Config.Orbit.IsMoon, body.Config.Orbit));
|
||||
|
||||
// Now that we're done move the planet into place
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user