mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fixed map marker types + comet tail size
This commit is contained in:
parent
bb15642fde
commit
4f5159828b
@ -12,7 +12,7 @@ namespace NewHorizons.Atmosphere
|
|||||||
atmoGO.SetActive(false);
|
atmoGO.SetActive(false);
|
||||||
atmoGO.transform.parent = body.transform;
|
atmoGO.transform.parent = body.transform;
|
||||||
|
|
||||||
if (atmosphereModule.hasAtmosphere)
|
if (atmosphereModule.HasAtmosphere)
|
||||||
{
|
{
|
||||||
var mat = GameObject.Find("TimberHearth_Body/Atmosphere_TH/AtmoSphere/Atmosphere_LOD0").GetComponent<MeshRenderer>().material;
|
var mat = GameObject.Find("TimberHearth_Body/Atmosphere_TH/AtmoSphere/Atmosphere_LOD0").GetComponent<MeshRenderer>().material;
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
var cometTail = GameObject.Instantiate(GameObject.Find("Comet_Body/Sector_CO/Effects_CO/Effects_CO_TailMeshes"), go.transform);
|
var cometTail = GameObject.Instantiate(GameObject.Find("Comet_Body/Sector_CO/Effects_CO/Effects_CO_TailMeshes"), go.transform);
|
||||||
cometTail.transform.localPosition = Vector3.zero;
|
cometTail.transform.localPosition = Vector3.zero;
|
||||||
cometTail.name = "CometTail";
|
cometTail.name = "CometTail";
|
||||||
cometTail.transform.localScale = Vector3.one * 110 / module.SurfaceSize;
|
cometTail.transform.localScale = Vector3.one * module.SurfaceSize / 110;
|
||||||
cometTail.transform.localRotation = Quaternion.Euler(0, 180, 90);
|
cometTail.transform.localRotation = Quaternion.Euler(0, 180, 90);
|
||||||
/*
|
/*
|
||||||
var alignment = cometTail.AddComponent<AlignWithTargetBody>();
|
var alignment = cometTail.AddComponent<AlignWithTargetBody>();
|
||||||
|
|||||||
@ -8,22 +8,27 @@ namespace NewHorizons.Builder.General
|
|||||||
{
|
{
|
||||||
static class MarkerBuilder
|
static class MarkerBuilder
|
||||||
{
|
{
|
||||||
public static void Make(GameObject body, string name, bool isMoon, bool isStar)
|
public static void Make(GameObject body, string name, IPlanetConfig config)
|
||||||
{
|
{
|
||||||
MapMarker MM = body.AddComponent<MapMarker>();
|
MapMarker mapMarker = body.AddComponent<MapMarker>();
|
||||||
MM.SetValue("_labelID", (UITextType)Utility.AddToUITable.Add(name.ToUpper()));
|
mapMarker.SetValue("_labelID", (UITextType)Utility.AddToUITable.Add(name.ToUpper()));
|
||||||
|
|
||||||
if (isMoon)
|
var markerType = "Planet";
|
||||||
|
|
||||||
|
if (config.Orbit.IsMoon)
|
||||||
{
|
{
|
||||||
MM.SetValue("_markerType", MM.GetType().GetNestedType("MarkerType", BindingFlags.NonPublic).GetField("Moon").GetValue(MM));
|
markerType = "Moon";
|
||||||
}
|
}
|
||||||
else if(isStar)
|
else if (config.Star != null)
|
||||||
{
|
{
|
||||||
MM.SetValue("_markerType", MM.GetType().GetNestedType("MarkerType", BindingFlags.NonPublic).GetField("Sun").GetValue(MM));
|
markerType = "Sun";
|
||||||
}
|
}
|
||||||
|
else if (config.FocalPoint != null)
|
||||||
{
|
{
|
||||||
MM.SetValue("_markerType", MM.GetType().GetNestedType("MarkerType", BindingFlags.NonPublic).GetField("Planet").GetValue(MM));
|
markerType = "HourglassTwins";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mapMarker.SetValue("_markerType", mapMarker.GetType().GetNestedType("MarkerType", BindingFlags.NonPublic).GetField(markerType).GetValue(mapMarker));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
NewHorizons/External/AtmosphereModule.cs
vendored
2
NewHorizons/External/AtmosphereModule.cs
vendored
@ -20,6 +20,6 @@ namespace NewHorizons.External
|
|||||||
public bool HasRain { get; set; }
|
public bool HasRain { get; set; }
|
||||||
public bool HasSnow { get; set; }
|
public bool HasSnow { get; set; }
|
||||||
public bool HasOxygen { get; set; }
|
public bool HasOxygen { get; set; }
|
||||||
public bool hasAtmosphere { get; set; }
|
public bool HasAtmosphere { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,7 +240,7 @@ namespace NewHorizons
|
|||||||
RFVolumeBuilder.Make(go, owRigidBody, sphereOfInfluence);
|
RFVolumeBuilder.Make(go, owRigidBody, sphereOfInfluence);
|
||||||
|
|
||||||
if (body.Config.Base.HasMapMarker)
|
if (body.Config.Base.HasMapMarker)
|
||||||
MarkerBuilder.Make(go, body.Config.Name, body.Config.Orbit.IsMoon, body.Config.Star != null);
|
MarkerBuilder.Make(go, body.Config.Name, body.Config);
|
||||||
|
|
||||||
if (body.Config.Base.HasAmbientLight)
|
if (body.Config.Base.HasAmbientLight)
|
||||||
AmbientLightBuilder.Make(go, sphereOfInfluence);
|
AmbientLightBuilder.Make(go, sphereOfInfluence);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user