mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
1.14.6 (#701)
## Minor features - Added `hideProxy` option to Base module. Implements #700 - Added `track` to day-night audio volumes. Implements #695 ## Improvements - Log error if default system override is invalid. Implements #702 ## Bug fixes - Fixed neutron stars appearing inside of living stars - Fixed first loop immortality after statue pairing. Fixes #703 - Made day-night audio volumes loop. Fixes #695 - Fixed title screen planets with water/sand/lava being sized improperly. Title screen planet sizes reflect their real sizes again. Fixes #678
This commit is contained in:
commit
ee62400cd2
@ -120,7 +120,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
flares.gameObject.transform.localScale = new Vector3(0.85f, 0.85f, 0.85f);
|
flares.gameObject.transform.localScale = new Vector3(0.85f, 0.85f, 0.85f);
|
||||||
|
|
||||||
// Add singularity
|
// Add singularity
|
||||||
var singularityRenderer = SingularityBuilder.MakeSingularityGraphics(planetGO, true, neutronStarSize, neutronStarSize * 2.5f);
|
var singularityRenderer = SingularityBuilder.MakeSingularityGraphics(neutronStar, true, neutronStarSize, neutronStarSize * 2.5f);
|
||||||
singularityRenderer.GetComponent<MeshRenderer>().material.color = new Color(0.5f, 2f, 2f, 1f);
|
singularityRenderer.GetComponent<MeshRenderer>().material.color = new Color(0.5f, 2f, 2f, 1f);
|
||||||
|
|
||||||
return neutronStar;
|
return neutronStar;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using NewHorizons.Builder.Props;
|
using NewHorizons.Builder.Props;
|
||||||
using NewHorizons.Components.Volumes;
|
using NewHorizons.Components.Volumes;
|
||||||
using NewHorizons.External.Modules.Volumes.VolumeInfos;
|
using NewHorizons.External.Modules.Volumes.VolumeInfos;
|
||||||
|
using NewHorizons.Utility;
|
||||||
using NewHorizons.Utility.OuterWilds;
|
using NewHorizons.Utility.OuterWilds;
|
||||||
using OWML.Common;
|
using OWML.Common;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -21,6 +22,7 @@ namespace NewHorizons.Builder.Volumes
|
|||||||
audioVolume.nightAudio = info.nightAudio;
|
audioVolume.nightAudio = info.nightAudio;
|
||||||
audioVolume.modBehaviour = mod;
|
audioVolume.modBehaviour = mod;
|
||||||
audioVolume.volume = info.volume;
|
audioVolume.volume = info.volume;
|
||||||
|
audioVolume.SetTrack(info.track.ConvertToOW());
|
||||||
|
|
||||||
var shape = go.AddComponent<SphereShape>();
|
var shape = go.AddComponent<SphereShape>();
|
||||||
shape.radius = info.radius;
|
shape.radius = info.radius;
|
||||||
|
|||||||
@ -16,6 +16,7 @@ namespace NewHorizons.Components.Volumes
|
|||||||
|
|
||||||
private OWAudioSource _daySource;
|
private OWAudioSource _daySource;
|
||||||
private OWAudioSource _nightSource;
|
private OWAudioSource _nightSource;
|
||||||
|
private OWAudioMixer.TrackName _track;
|
||||||
|
|
||||||
private Transform _planetTransform;
|
private Transform _planetTransform;
|
||||||
private Transform _sunTransform;
|
private Transform _sunTransform;
|
||||||
@ -63,6 +64,8 @@ namespace NewHorizons.Components.Volumes
|
|||||||
_daySource.spread = 180f;
|
_daySource.spread = 180f;
|
||||||
_daySource.dopplerLevel = 0f;
|
_daySource.dopplerLevel = 0f;
|
||||||
_daySource.SetMaxVolume(volume);
|
_daySource.SetMaxVolume(volume);
|
||||||
|
_daySource.SetTrack(_track);
|
||||||
|
_daySource.loop = true;
|
||||||
AudioUtilities.SetAudioClip(_daySource, dayAudio, modBehaviour);
|
AudioUtilities.SetAudioClip(_daySource, dayAudio, modBehaviour);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,6 +80,8 @@ namespace NewHorizons.Components.Volumes
|
|||||||
_nightSource.spread = 180f;
|
_nightSource.spread = 180f;
|
||||||
_nightSource.dopplerLevel = 0f;
|
_nightSource.dopplerLevel = 0f;
|
||||||
_nightSource.SetMaxVolume(volume);
|
_nightSource.SetMaxVolume(volume);
|
||||||
|
_nightSource.SetTrack(_track);
|
||||||
|
_nightSource.loop = true;
|
||||||
AudioUtilities.SetAudioClip(_nightSource, nightAudio, modBehaviour);
|
AudioUtilities.SetAudioClip(_nightSource, nightAudio, modBehaviour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,5 +143,12 @@ namespace NewHorizons.Components.Volumes
|
|||||||
{
|
{
|
||||||
return Vector3.Angle(_planetTransform.position - Locator.GetPlayerTransform().position, Locator.GetPlayerTransform().position - _sunTransform.position) < dayWindow * 0.5f;
|
return Vector3.Angle(_planetTransform.position - Locator.GetPlayerTransform().position, Locator.GetPlayerTransform().position - _sunTransform.position) < dayWindow * 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetTrack(OWAudioMixer.TrackName track)
|
||||||
|
{
|
||||||
|
_track = track;
|
||||||
|
_nightSource?.SetTrack(track);
|
||||||
|
_daySource?.SetTrack(track);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
NewHorizons/External/Modules/BaseModule.cs
vendored
6
NewHorizons/External/Modules/BaseModule.cs
vendored
@ -79,6 +79,12 @@ namespace NewHorizons.External.Modules
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool pushable;
|
public bool pushable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set this to true to have no proxy be generated for this planet.
|
||||||
|
/// This is a small representation of the planet that appears when it is outside of the regular Unity camera range.
|
||||||
|
/// </summary>
|
||||||
|
public bool hideProxy;
|
||||||
|
|
||||||
#region Obsolete
|
#region Obsolete
|
||||||
|
|
||||||
[Obsolete("IsSatellite is deprecated, please use ShowMinimap instead")]
|
[Obsolete("IsSatellite is deprecated, please use ShowMinimap instead")]
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using NewHorizons.External.SerializableEnums;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
@ -35,5 +36,11 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos
|
|||||||
[Range(0f, 1f)]
|
[Range(0f, 1f)]
|
||||||
[DefaultValue(1f)]
|
[DefaultValue(1f)]
|
||||||
public float volume = 1f;
|
public float volume = 1f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audio track of this audio volume.
|
||||||
|
/// Most of the time you'll use environment (the default) for sound effects and music for music.
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue("environment")] public NHAudioMixerTrackName track = NHAudioMixerTrackName.Environment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -493,7 +493,7 @@ namespace NewHorizons.Handlers
|
|||||||
var remnant = otherBodies.Where(x => x.Config.isStellarRemnant && x.Config.name == body.Config.name).FirstOrDefault();
|
var remnant = otherBodies.Where(x => x.Config.isStellarRemnant && x.Config.name == body.Config.name).FirstOrDefault();
|
||||||
// TODO: add proxies for quantum states
|
// TODO: add proxies for quantum states
|
||||||
//var quantumStates = otherBodies.Where(x => x.Config.isQuantumState && x.Config.name == body.Config.name).ToArray();
|
//var quantumStates = otherBodies.Where(x => x.Config.isQuantumState && x.Config.name == body.Config.name).ToArray();
|
||||||
if (!(body.Config.Cloak != null && body.Config.Cloak.radius != 0f))
|
if (!(body.Config.Cloak != null && body.Config.Cloak.radius != 0f) && !body.Config.Base.hideProxy)
|
||||||
{
|
{
|
||||||
Delay.FireOnNextUpdate(() =>
|
Delay.FireOnNextUpdate(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,26 +38,29 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
NHLogger.LogVerbose($"Displaying {selectionCount} bodies on the title screen");
|
NHLogger.LogVerbose($"Displaying {selectionCount} bodies on the title screen");
|
||||||
|
|
||||||
GameObject body1, body2, body3;
|
var planetSizes = new List<(GameObject planet, float size)>();
|
||||||
|
|
||||||
|
var bodyInfo = LoadTitleScreenBody(eligible[indices[0]]);
|
||||||
|
bodyInfo.planet.transform.localRotation = Quaternion.Euler(15, 0, 0);
|
||||||
|
planetSizes.Add(bodyInfo);
|
||||||
|
|
||||||
body1 = LoadTitleScreenBody(eligible[indices[0]]);
|
|
||||||
body1.transform.localRotation = Quaternion.Euler(15, 0, 0);
|
|
||||||
if (selectionCount > 1)
|
if (selectionCount > 1)
|
||||||
{
|
{
|
||||||
body1.transform.localScale = Vector3.one * (body1.transform.localScale.x) * 0.3f;
|
bodyInfo.planet.transform.localPosition = new Vector3(0, -15, 0);
|
||||||
body1.transform.localPosition = new Vector3(0, -15, 0);
|
bodyInfo.planet.transform.localRotation = Quaternion.Euler(10f, 0f, 0f);
|
||||||
body1.transform.localRotation = Quaternion.Euler(10f, 0f, 0f);
|
|
||||||
body2 = LoadTitleScreenBody(eligible[indices[1]]);
|
var bodyInfo2 = LoadTitleScreenBody(eligible[indices[1]]);
|
||||||
body2.transform.localScale = Vector3.one * (body2.transform.localScale.x) * 0.3f;
|
bodyInfo2.planet.transform.localPosition = new Vector3(7, 30, 0);
|
||||||
body2.transform.localPosition = new Vector3(7, 30, 0);
|
bodyInfo2.planet.transform.localRotation = Quaternion.Euler(10f, 0f, 0f);
|
||||||
body2.transform.localRotation = Quaternion.Euler(10f, 0f, 0f);
|
planetSizes.Add(bodyInfo2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectionCount > 2)
|
if (selectionCount > 2)
|
||||||
{
|
{
|
||||||
body3 = LoadTitleScreenBody(eligible[indices[2]]);
|
var bodyInfo3 = LoadTitleScreenBody(eligible[indices[2]]);
|
||||||
body3.transform.localScale = Vector3.one * (body3.transform.localScale.x) * 0.3f;
|
bodyInfo3.planet.transform.localPosition = new Vector3(-5, 10, 0);
|
||||||
body3.transform.localPosition = new Vector3(-5, 10, 0);
|
bodyInfo3.planet.transform.localRotation = Quaternion.Euler(10f, 0f, 0f);
|
||||||
body3.transform.localRotation = Quaternion.Euler(10f, 0f, 0f);
|
planetSizes.Add(bodyInfo3);
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchUtilities.Find("Scene/Background/PlanetPivot/Prefab_HEA_Campfire").SetActive(false);
|
SearchUtilities.Find("Scene/Background/PlanetPivot/Prefab_HEA_Campfire").SetActive(false);
|
||||||
@ -72,39 +75,105 @@ namespace NewHorizons.Handlers
|
|||||||
light.color = Color.white;
|
light.color = Color.white;
|
||||||
light.range = float.PositiveInfinity;
|
light.range = float.PositiveInfinity;
|
||||||
light.intensity = 0.8f;
|
light.intensity = 0.8f;
|
||||||
|
|
||||||
|
// Resize planets relative to each other
|
||||||
|
// If there are multiple planets shrink them down to 30% of the size
|
||||||
|
var maxSize = planetSizes.Select(x => x.size).Max();
|
||||||
|
var minSize = planetSizes.Select(x => x.size).Min();
|
||||||
|
var multiplePlanets = planetSizes.Count > 1;
|
||||||
|
foreach (var (planet, size) in planetSizes)
|
||||||
|
{
|
||||||
|
var adjustedSize = size / maxSize;
|
||||||
|
// If some planets would be too small we'll do a funny thing
|
||||||
|
if (minSize / maxSize < 0.3f)
|
||||||
|
{
|
||||||
|
var t = Mathf.InverseLerp(minSize, maxSize, size);
|
||||||
|
adjustedSize = Mathf.Lerp(0.3f, 1f, t * t);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static GameObject LoadTitleScreenBody(NewHorizonsBody body)
|
planet.transform.localScale *= adjustedSize * (multiplePlanets ? 0.3f : 1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static (GameObject planet, float size) LoadTitleScreenBody(NewHorizonsBody body)
|
||||||
{
|
{
|
||||||
NHLogger.LogVerbose($"Displaying {body.Config.name} on the title screen");
|
NHLogger.LogVerbose($"Displaying {body.Config.name} on the title screen");
|
||||||
var titleScreenGO = new GameObject(body.Config.name + "_TitleScreen");
|
var titleScreenGO = new GameObject(body.Config.name + "_TitleScreen");
|
||||||
|
|
||||||
var maxSize = -1f;
|
var maxRadius = -1f;
|
||||||
|
|
||||||
if (body.Config.HeightMap != null)
|
if (body.Config.HeightMap != null)
|
||||||
{
|
{
|
||||||
HeightMapBuilder.Make(titleScreenGO, null, body.Config.HeightMap, body.Mod, 30);
|
HeightMapBuilder.Make(titleScreenGO, null, body.Config.HeightMap, body.Mod, 30);
|
||||||
maxSize = Mathf.Max(maxSize, body.Config.HeightMap.maxHeight, body.Config.HeightMap.minHeight);
|
maxRadius = Mathf.Max(maxRadius, body.Config.HeightMap.maxHeight, body.Config.HeightMap.minHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body.Config.Atmosphere?.clouds?.texturePath != null && body.Config.Atmosphere?.clouds?.cloudsPrefab != CloudPrefabType.Transparent)
|
if (body.Config.Atmosphere?.clouds?.texturePath != null && body.Config.Atmosphere?.clouds?.cloudsPrefab != CloudPrefabType.Transparent)
|
||||||
{
|
{
|
||||||
// Hacky but whatever I just want a sphere
|
// Hacky but whatever I just want a textured sphere
|
||||||
var cloudTextureMap = new HeightMapModule();
|
var cloudTextureMap = new HeightMapModule();
|
||||||
cloudTextureMap.maxHeight = cloudTextureMap.minHeight = body.Config.Atmosphere.size;
|
cloudTextureMap.maxHeight = cloudTextureMap.minHeight = body.Config.Atmosphere.size;
|
||||||
cloudTextureMap.textureMap = body.Config.Atmosphere.clouds.texturePath;
|
cloudTextureMap.textureMap = body.Config.Atmosphere.clouds.texturePath;
|
||||||
HeightMapBuilder.Make(titleScreenGO, null, cloudTextureMap, body.Mod, 30);
|
HeightMapBuilder.Make(titleScreenGO, null, cloudTextureMap, body.Mod, 30);
|
||||||
maxSize = Mathf.Max(maxSize, cloudTextureMap.maxHeight);
|
|
||||||
|
maxRadius = Mathf.Max(maxRadius, cloudTextureMap.maxHeight);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (body.Config.Base.groundSize > 0f)
|
||||||
{
|
{
|
||||||
|
MakeSphere(titleScreenGO, body.Config.Base.groundSize * 2f);
|
||||||
|
maxRadius = Mathf.Max(maxRadius, body.Config.Base.groundSize);
|
||||||
|
}
|
||||||
|
|
||||||
if (body.Config.Water != null)
|
if (body.Config.Water != null)
|
||||||
{
|
{
|
||||||
var waterGO = GameObject.CreatePrimitive(PrimitiveType.Sphere);
|
var waterRadius = MakeWater(body, titleScreenGO);
|
||||||
var size = 2f * body.Config.Water.size * (body.Config.Water.curve?.FirstOrDefault()?.value ?? 1f);
|
maxRadius = Mathf.Max(maxRadius, waterRadius);
|
||||||
|
}
|
||||||
|
|
||||||
waterGO.transform.localScale = Vector3.one * size;
|
if (body.Config.Lava != null)
|
||||||
|
{
|
||||||
|
var lavaRadius = MakeLava(body, titleScreenGO);
|
||||||
|
maxRadius = Mathf.Max(maxRadius, lavaRadius);
|
||||||
|
}
|
||||||
|
|
||||||
var mr = waterGO.GetComponent<MeshRenderer>();
|
if (body.Config.Sand != null)
|
||||||
|
{
|
||||||
|
var sandRadius = MakeSand(body, titleScreenGO);
|
||||||
|
maxRadius = Mathf.Max(maxRadius, sandRadius);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (body.Config.Rings != null && body.Config.Rings.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (var ring in body.Config.Rings)
|
||||||
|
{
|
||||||
|
RingBuilder.Make(titleScreenGO, null, ring, body.Mod);
|
||||||
|
|
||||||
|
maxRadius = Mathf.Max(maxRadius, ring.outerRadius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var pivot = Object.Instantiate(SearchUtilities.Find("Scene/Background/PlanetPivot"), SearchUtilities.Find("Scene/Background").transform);
|
||||||
|
pivot.GetComponent<RotateTransform>()._degreesPerSecond = 10f;
|
||||||
|
foreach (Transform child in pivot.transform)
|
||||||
|
{
|
||||||
|
Object.Destroy(child.gameObject);
|
||||||
|
}
|
||||||
|
pivot.name = "Pivot";
|
||||||
|
|
||||||
|
titleScreenGO.transform.parent = pivot.transform;
|
||||||
|
titleScreenGO.transform.localPosition = Vector3.zero;
|
||||||
|
titleScreenGO.transform.localScale = Vector3.one * 30f / maxRadius;
|
||||||
|
|
||||||
|
return (titleScreenGO, maxRadius);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns radius
|
||||||
|
private static float MakeWater(NewHorizonsBody body, GameObject root)
|
||||||
|
{
|
||||||
|
var diameter = 2f * body.Config.Water.size * (body.Config.Water.curve?.FirstOrDefault()?.value ?? 1f);
|
||||||
|
|
||||||
|
var mr = MakeSphere(root, diameter);
|
||||||
var colour = body.Config.Water.tint?.ToColor() ?? Color.blue;
|
var colour = body.Config.Water.tint?.ToColor() ?? Color.blue;
|
||||||
mr.material.color = new Color(colour.r, colour.g, colour.b, 0.9f);
|
mr.material.color = new Color(colour.r, colour.g, colour.b, 0.9f);
|
||||||
|
|
||||||
@ -118,67 +187,40 @@ namespace NewHorizons.Handlers
|
|||||||
mr.material.EnableKeyword("_ALPHAPREMULTIPLY_ON");
|
mr.material.EnableKeyword("_ALPHAPREMULTIPLY_ON");
|
||||||
mr.material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
|
mr.material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
|
||||||
|
|
||||||
waterGO.transform.parent = titleScreenGO.transform;
|
return diameter / 2f;
|
||||||
waterGO.transform.localPosition = Vector3.zero;
|
|
||||||
|
|
||||||
maxSize = Mathf.Max(maxSize, size);
|
|
||||||
}
|
}
|
||||||
if (body.Config.Lava != null)
|
|
||||||
|
private static float MakeLava(NewHorizonsBody body, GameObject root)
|
||||||
{
|
{
|
||||||
var lavaGO = GameObject.CreatePrimitive(PrimitiveType.Sphere);
|
var diameter = 2f * body.Config.Lava.size * (body.Config.Lava.curve?.FirstOrDefault()?.value ?? 1f);
|
||||||
var size = 2f * body.Config.Lava.size * (body.Config.Lava.curve?.FirstOrDefault()?.value ?? 1f);
|
|
||||||
|
|
||||||
lavaGO.transform.localScale = Vector3.one * size;
|
var mr = MakeSphere(root, diameter);
|
||||||
|
|
||||||
var mr = lavaGO.GetComponent<MeshRenderer>();
|
|
||||||
mr.material.color = body.Config.Lava.tint?.ToColor() ?? Color.red;
|
mr.material.color = body.Config.Lava.tint?.ToColor() ?? Color.red;
|
||||||
mr.material.SetColor("_EmissionColor", mr.material.color * 2f);
|
mr.material.SetColor("_EmissionColor", mr.material.color * 2f);
|
||||||
|
|
||||||
lavaGO.transform.parent = titleScreenGO.transform;
|
return diameter / 2f;
|
||||||
lavaGO.transform.localPosition = Vector3.zero;
|
|
||||||
|
|
||||||
maxSize = Mathf.Max(maxSize, size);
|
|
||||||
}
|
}
|
||||||
if (body.Config.Sand != null)
|
|
||||||
{
|
|
||||||
var sandGO = GameObject.CreatePrimitive(PrimitiveType.Sphere);
|
|
||||||
var size = 2f * body.Config.Sand.size * (body.Config.Sand.curve?.FirstOrDefault()?.value ?? 1f);
|
|
||||||
|
|
||||||
sandGO.transform.localScale = Vector3.one * size;
|
private static float MakeSand(NewHorizonsBody body, GameObject root)
|
||||||
var mr = sandGO.GetComponent<MeshRenderer>();
|
{
|
||||||
|
var diameter = 2f * body.Config.Sand.size * (body.Config.Sand.curve?.FirstOrDefault()?.value ?? 1f);
|
||||||
|
|
||||||
|
var mr = MakeSphere(root, diameter);
|
||||||
mr.material.color = body.Config.Sand.tint?.ToColor() ?? Color.yellow;
|
mr.material.color = body.Config.Sand.tint?.ToColor() ?? Color.yellow;
|
||||||
mr.material.SetFloat("_Glossiness", 0);
|
mr.material.SetFloat("_Glossiness", 0);
|
||||||
|
|
||||||
sandGO.transform.parent = titleScreenGO.transform;
|
return diameter / 2f;
|
||||||
sandGO.transform.localPosition = Vector3.zero;
|
|
||||||
|
|
||||||
maxSize = Mathf.Max(maxSize, size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var pivot = Object.Instantiate(SearchUtilities.Find("Scene/Background/PlanetPivot"), SearchUtilities.Find("Scene/Background").transform);
|
private static MeshRenderer MakeSphere(GameObject root, float diameter)
|
||||||
pivot.GetComponent<RotateTransform>()._degreesPerSecond = 10f;
|
|
||||||
foreach (Transform child in pivot.transform)
|
|
||||||
{
|
{
|
||||||
Object.Destroy(child.gameObject);
|
var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
|
||||||
}
|
var meshRenderer = sphere.GetComponent<MeshRenderer>();
|
||||||
pivot.name = "Pivot";
|
sphere.transform.parent = root.transform;
|
||||||
|
sphere.transform.localPosition = Vector3.zero;
|
||||||
|
sphere.transform.localScale = Vector3.one * diameter;
|
||||||
|
|
||||||
if (body.Config.Rings != null && body.Config.Rings.Length > 0)
|
return meshRenderer;
|
||||||
{
|
|
||||||
foreach (var ring in body.Config.Rings)
|
|
||||||
{
|
|
||||||
RingBuilder.Make(titleScreenGO, null, ring, body.Mod);
|
|
||||||
|
|
||||||
maxSize = Mathf.Max(maxSize, ring.outerRadius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
titleScreenGO.transform.parent = pivot.transform;
|
|
||||||
titleScreenGO.transform.localPosition = Vector3.zero;
|
|
||||||
titleScreenGO.transform.localScale = Vector3.one * 30f / maxSize;
|
|
||||||
|
|
||||||
return titleScreenGO;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -547,7 +547,8 @@ namespace NewHorizons
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wait for player to be awake and also for frames to pass
|
// Wait for player to be awake and also for frames to pass
|
||||||
Delay.RunWhenOrInNUpdates(() => OnSystemReady(DidWarpFromShip, DidWarpFromVessel), () => _playerAwake && PlayerSpawned, 30);
|
var justLinkedToStatue = PlayerData.KnowsLaunchCodes() && PlayerData._currentGameSave.loopCount == 1;
|
||||||
|
Delay.RunWhenOrInNUpdates(() => OnSystemReady(DidWarpFromShip, DidWarpFromVessel), () => (_playerAwake && PlayerSpawned) || justLinkedToStatue, 30);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -906,6 +907,11 @@ namespace NewHorizons
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(_defaultSystemOverride))
|
||||||
|
{
|
||||||
|
NHLogger.LogError($"The given default system override {_defaultSystemOverride} is invalid - no system exists with that name");
|
||||||
|
}
|
||||||
|
|
||||||
_currentStarSystem = _defaultStarSystem;
|
_currentStarSystem = _defaultStarSystem;
|
||||||
IsWarpingFromShip = false;
|
IsWarpingFromShip = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -577,6 +577,10 @@
|
|||||||
"pushable": {
|
"pushable": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Apply physics to this planet when you bump into it. Will have a spherical collider the size of surfaceSize. \nFor custom colliders they have to all be convex and you can leave surface size as 0.\nThis is meant for stuff like satellites which are relatively simple and can be de-orbited.\nIf you are using an orbit line but a tracking line, it will be removed when the planet is bumped in to."
|
"description": "Apply physics to this planet when you bump into it. Will have a spherical collider the size of surfaceSize. \nFor custom colliders they have to all be convex and you can leave surface size as 0.\nThis is meant for stuff like satellites which are relatively simple and can be de-orbited.\nIf you are using an orbit line but a tracking line, it will be removed when the planet is bumped in to."
|
||||||
|
},
|
||||||
|
"hideProxy": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Set this to true to have no proxy be generated for this planet. \nThis is a small representation of the planet that appears when it is outside of the regular Unity camera range."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3876,6 +3880,11 @@
|
|||||||
"default": 1.0,
|
"default": 1.0,
|
||||||
"maximum": 1.0,
|
"maximum": 1.0,
|
||||||
"minimum": 0.0
|
"minimum": 0.0
|
||||||
|
},
|
||||||
|
"track": {
|
||||||
|
"description": "The audio track of this audio volume.\nMost of the time you'll use environment (the default) for sound effects and music for music. ",
|
||||||
|
"default": "environment",
|
||||||
|
"$ref": "#/definitions/NHAudioMixerTrackName"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
|
||||||
"name": "New Horizons",
|
"name": "New Horizons",
|
||||||
"uniqueName": "xen.NewHorizons",
|
"uniqueName": "xen.NewHorizons",
|
||||||
"version": "1.14.5",
|
"version": "1.14.6",
|
||||||
"owmlVersion": "2.9.3",
|
"owmlVersion": "2.9.3",
|
||||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user