mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Almost forgor
This commit is contained in:
parent
6caa2d8991
commit
1182865753
@ -46,6 +46,7 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
atmo.name = "Atmosphere";
|
atmo.name = "Atmosphere";
|
||||||
atmo.transform.localPosition = Vector3.zero;
|
atmo.transform.localPosition = Vector3.zero;
|
||||||
atmo.transform.localEulerAngles = Vector3.zero;
|
atmo.transform.localEulerAngles = Vector3.zero;
|
||||||
|
atmo.SetActive(true);
|
||||||
|
|
||||||
Material material;
|
Material material;
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,8 @@ namespace NewHorizons.Builder.Body
|
|||||||
if (config.Base.cometTailRotation != null) alignment = config.Base.cometTailRotation;
|
if (config.Base.cometTailRotation != null) alignment = config.Base.cometTailRotation;
|
||||||
|
|
||||||
cometTail.transform.rotation = Quaternion.Euler(alignment);
|
cometTail.transform.rotation = Quaternion.Euler(alignment);
|
||||||
|
|
||||||
|
cometTail.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,12 +62,15 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
var proxyGO = GameObject.Instantiate(_proxySandFunnel, scaleRoot.transform);
|
var proxyGO = GameObject.Instantiate(_proxySandFunnel, scaleRoot.transform);
|
||||||
proxyGO.name = "Proxy_Funnel";
|
proxyGO.name = "Proxy_Funnel";
|
||||||
|
proxyGO.SetActive(true);
|
||||||
|
|
||||||
var geoGO = GameObject.Instantiate(_geoSandFunnel, scaleRoot.transform);
|
var geoGO = GameObject.Instantiate(_geoSandFunnel, scaleRoot.transform);
|
||||||
geoGO.name = "Geo_Funnel";
|
geoGO.name = "Geo_Funnel";
|
||||||
|
geoGO.SetActive(true);
|
||||||
|
|
||||||
var volumesGO = GameObject.Instantiate(_volumesSandFunnel, scaleRoot.transform);
|
var volumesGO = GameObject.Instantiate(_volumesSandFunnel, scaleRoot.transform);
|
||||||
volumesGO.name = "Volumes_Funnel";
|
volumesGO.name = "Volumes_Funnel";
|
||||||
|
volumesGO.SetActive(true);
|
||||||
var sfv = volumesGO.GetComponentInChildren<SimpleFluidVolume>();
|
var sfv = volumesGO.GetComponentInChildren<SimpleFluidVolume>();
|
||||||
var fluidVolume = sfv.gameObject;
|
var fluidVolume = sfv.gameObject;
|
||||||
switch (funnelType)
|
switch (funnelType)
|
||||||
|
|||||||
@ -47,12 +47,14 @@ namespace NewHorizons.Builder.Body
|
|||||||
lavaSphere.transform.name = "LavaSphere";
|
lavaSphere.transform.name = "LavaSphere";
|
||||||
lavaSphere.GetComponent<MeshRenderer>().material.SetFloat(HeightScale, heightScale);
|
lavaSphere.GetComponent<MeshRenderer>().material.SetFloat(HeightScale, heightScale);
|
||||||
if (module.tint != null) lavaSphere.GetComponent<MeshRenderer>().material.SetColor(EmissionColor, module.tint.ToColor());
|
if (module.tint != null) lavaSphere.GetComponent<MeshRenderer>().material.SetColor(EmissionColor, module.tint.ToColor());
|
||||||
|
lavaSphere.SetActive(true);
|
||||||
|
|
||||||
var sectorCullGroup = lavaSphere.GetComponent<SectorCullGroup>();
|
var sectorCullGroup = lavaSphere.GetComponent<SectorCullGroup>();
|
||||||
sectorCullGroup.SetSector(sector);
|
sectorCullGroup.SetSector(sector);
|
||||||
|
|
||||||
var moltenCoreProxy = GameObject.Instantiate(_moltenCoreProxy, moltenCore.transform); ;
|
var moltenCoreProxy = GameObject.Instantiate(_moltenCoreProxy, moltenCore.transform); ;
|
||||||
moltenCoreProxy.name = "MoltenCore_Proxy";
|
moltenCoreProxy.name = "MoltenCore_Proxy";
|
||||||
|
moltenCoreProxy.SetActive(true);
|
||||||
|
|
||||||
var proxyLavaSphere = moltenCoreProxy.transform.Find("LavaSphere (1)");
|
var proxyLavaSphere = moltenCoreProxy.transform.Find("LavaSphere (1)");
|
||||||
proxyLavaSphere.transform.localScale = Vector3.one;
|
proxyLavaSphere.transform.localScale = Vector3.one;
|
||||||
|
|||||||
@ -28,6 +28,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
var sandSphere = GameObject.Instantiate(_sandSphere, sandGO.transform);
|
var sandSphere = GameObject.Instantiate(_sandSphere, sandGO.transform);
|
||||||
sandSphere.name = "Sphere";
|
sandSphere.name = "Sphere";
|
||||||
|
sandSphere.SetActive(true);
|
||||||
if (module.tint != null)
|
if (module.tint != null)
|
||||||
{
|
{
|
||||||
var oldMR = sandSphere.GetComponent<TessellatedSphereRenderer>();
|
var oldMR = sandSphere.GetComponent<TessellatedSphereRenderer>();
|
||||||
@ -50,11 +51,13 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
var occlusionSphere = GameObject.Instantiate(_sandOcclusion, sandGO.transform);
|
var occlusionSphere = GameObject.Instantiate(_sandOcclusion, sandGO.transform);
|
||||||
occlusionSphere.name = "Occlusion";
|
occlusionSphere.name = "Occlusion";
|
||||||
|
occlusionSphere.SetActive(true);
|
||||||
|
|
||||||
var proxyShadowCasterGO = GameObject.Instantiate(_sandProxyShadowCaster, sandGO.transform);
|
var proxyShadowCasterGO = GameObject.Instantiate(_sandProxyShadowCaster, sandGO.transform);
|
||||||
proxyShadowCasterGO.name = "ProxyShadowCaster";
|
proxyShadowCasterGO.name = "ProxyShadowCaster";
|
||||||
var proxyShadowCaster = proxyShadowCasterGO.GetComponent<ProxyShadowCaster>();
|
var proxyShadowCaster = proxyShadowCasterGO.GetComponent<ProxyShadowCaster>();
|
||||||
proxyShadowCaster.SetSuperGroup(sandGO.GetComponent<ProxyShadowCasterSuperGroup>());
|
proxyShadowCaster.SetSuperGroup(sandGO.GetComponent<ProxyShadowCasterSuperGroup>());
|
||||||
|
proxyShadowCasterGO.SetActive(true);
|
||||||
|
|
||||||
sandSphere.AddComponent<ChildColliderSettings>();
|
sandSphere.AddComponent<ChildColliderSettings>();
|
||||||
|
|
||||||
|
|||||||
@ -159,6 +159,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
{
|
{
|
||||||
var blackHoleAmbience = GameObject.Instantiate(_blackHoleAmbience, blackHole.transform);
|
var blackHoleAmbience = GameObject.Instantiate(_blackHoleAmbience, blackHole.transform);
|
||||||
blackHoleAmbience.name = "BlackHoleAmbience";
|
blackHoleAmbience.name = "BlackHoleAmbience";
|
||||||
|
blackHoleAmbience.SetActive(true);
|
||||||
blackHoleAmbience.GetComponent<SectorAudioGroup>().SetSector(sector);
|
blackHoleAmbience.GetComponent<SectorAudioGroup>().SetSector(sector);
|
||||||
|
|
||||||
var blackHoleAudioSource = blackHoleAmbience.GetComponent<AudioSource>();
|
var blackHoleAudioSource = blackHoleAmbience.GetComponent<AudioSource>();
|
||||||
@ -169,6 +170,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
var blackHoleOneShot = GameObject.Instantiate(_blackHoleEmissionOneShot, blackHole.transform);
|
var blackHoleOneShot = GameObject.Instantiate(_blackHoleEmissionOneShot, blackHole.transform);
|
||||||
blackHoleOneShot.name = "BlackHoleEmissionOneShot";
|
blackHoleOneShot.name = "BlackHoleEmissionOneShot";
|
||||||
|
blackHoleOneShot.SetActive(true);
|
||||||
var oneShotAudioSource = blackHoleOneShot.GetComponent<AudioSource>();
|
var oneShotAudioSource = blackHoleOneShot.GetComponent<AudioSource>();
|
||||||
oneShotAudioSource.maxDistance = size * 3f;
|
oneShotAudioSource.maxDistance = size * 3f;
|
||||||
oneShotAudioSource.minDistance = size * 0.4f;
|
oneShotAudioSource.minDistance = size * 0.4f;
|
||||||
@ -199,6 +201,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
{
|
{
|
||||||
var blackHoleVolume = GameObject.Instantiate(_blackHoleVolume, blackHole.transform);
|
var blackHoleVolume = GameObject.Instantiate(_blackHoleVolume, blackHole.transform);
|
||||||
blackHoleVolume.name = "BlackHoleVolume";
|
blackHoleVolume.name = "BlackHoleVolume";
|
||||||
|
blackHoleVolume.SetActive(true);
|
||||||
var blackHoleSphereCollider = blackHoleVolume.GetComponent<SphereCollider>();
|
var blackHoleSphereCollider = blackHoleVolume.GetComponent<SphereCollider>();
|
||||||
blackHoleSphereCollider.radius = size * 0.4f;
|
blackHoleSphereCollider.radius = size * 0.4f;
|
||||||
if (sizeController != null) sizeController.sphereCollider = blackHoleSphereCollider;
|
if (sizeController != null) sizeController.sphereCollider = blackHoleSphereCollider;
|
||||||
@ -270,6 +273,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
ambientLight.transform.localScale = Vector3.one;
|
ambientLight.transform.localScale = Vector3.one;
|
||||||
ambientLight.transform.localPosition = Vector3.zero;
|
ambientLight.transform.localPosition = Vector3.zero;
|
||||||
ambientLight.name = "AmbientLight";
|
ambientLight.name = "AmbientLight";
|
||||||
|
ambientLight.SetActive(true);
|
||||||
var light = ambientLight.GetComponent<Light>();
|
var light = ambientLight.GetComponent<Light>();
|
||||||
light.range = size * 7f;
|
light.range = size * 7f;
|
||||||
if (sizeController != null) sizeController.light = light;
|
if (sizeController != null) sizeController.light = light;
|
||||||
@ -280,6 +284,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
whiteHoleVolumeGO.transform.localScale = Vector3.one;
|
whiteHoleVolumeGO.transform.localScale = Vector3.one;
|
||||||
whiteHoleVolumeGO.GetComponent<SphereCollider>().radius = size;
|
whiteHoleVolumeGO.GetComponent<SphereCollider>().radius = size;
|
||||||
whiteHoleVolumeGO.name = "WhiteHoleVolume";
|
whiteHoleVolumeGO.name = "WhiteHoleVolume";
|
||||||
|
whiteHoleVolumeGO.SetActive(true);
|
||||||
if (sizeController != null) sizeController.sphereCollider = whiteHoleVolumeGO.GetComponent<SphereCollider>();
|
if (sizeController != null) sizeController.sphereCollider = whiteHoleVolumeGO.GetComponent<SphereCollider>();
|
||||||
|
|
||||||
var whiteHoleFluidVolume = whiteHoleVolumeGO.GetComponent<WhiteHoleFluidVolume>();
|
var whiteHoleFluidVolume = whiteHoleVolumeGO.GetComponent<WhiteHoleFluidVolume>();
|
||||||
@ -306,6 +311,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
var zeroGVolume = GameObject.Instantiate(_whiteHoleZeroGVolume, whiteHole.transform);
|
var zeroGVolume = GameObject.Instantiate(_whiteHoleZeroGVolume, whiteHole.transform);
|
||||||
zeroGVolume.name = "ZeroGVolume";
|
zeroGVolume.name = "ZeroGVolume";
|
||||||
zeroGVolume.transform.localPosition = Vector3.zero;
|
zeroGVolume.transform.localPosition = Vector3.zero;
|
||||||
|
zeroGVolume.SetActive(true);
|
||||||
zeroGVolume.GetComponent<SphereCollider>().radius = size * 10f;
|
zeroGVolume.GetComponent<SphereCollider>().radius = size * 10f;
|
||||||
zeroGVolume.GetComponent<ZeroGVolume>()._attachedBody = OWRB;
|
zeroGVolume.GetComponent<ZeroGVolume>()._attachedBody = OWRB;
|
||||||
|
|
||||||
@ -313,6 +319,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
rulesetVolume.name = "RulesetVolume";
|
rulesetVolume.name = "RulesetVolume";
|
||||||
rulesetVolume.transform.localPosition = Vector3.zero;
|
rulesetVolume.transform.localPosition = Vector3.zero;
|
||||||
rulesetVolume.transform.localScale = Vector3.one * size / 100f;
|
rulesetVolume.transform.localScale = Vector3.one * size / 100f;
|
||||||
|
rulesetVolume.SetActive(true);
|
||||||
rulesetVolume.GetComponent<SphereShape>().enabled = true;
|
rulesetVolume.GetComponent<SphereShape>().enabled = true;
|
||||||
|
|
||||||
if (sizeController != null)
|
if (sizeController != null)
|
||||||
|
|||||||
@ -66,6 +66,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
surfaceAudio.SetSector(sector);
|
surfaceAudio.SetSector(sector);
|
||||||
|
|
||||||
sunAudio.name = "Audio_Star";
|
sunAudio.name = "Audio_Star";
|
||||||
|
sunAudio.SetActive(true);
|
||||||
|
|
||||||
GameObject sunAtmosphere = null;
|
GameObject sunAtmosphere = null;
|
||||||
if (starModule.hasAtmosphere)
|
if (starModule.hasAtmosphere)
|
||||||
@ -74,6 +75,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
sunAtmosphere.transform.position = planetGO.transform.position;
|
sunAtmosphere.transform.position = planetGO.transform.position;
|
||||||
sunAtmosphere.transform.localScale = Vector3.one * OuterRadiusRatio;
|
sunAtmosphere.transform.localScale = Vector3.one * OuterRadiusRatio;
|
||||||
sunAtmosphere.name = "Atmosphere_Star";
|
sunAtmosphere.name = "Atmosphere_Star";
|
||||||
|
sunAtmosphere.SetActive(true);
|
||||||
|
|
||||||
var atmospheres = sunAtmosphere.transform.Find("AtmoSphere");
|
var atmospheres = sunAtmosphere.transform.Find("AtmoSphere");
|
||||||
atmospheres.transform.localScale = Vector3.one;
|
atmospheres.transform.localScale = Vector3.one;
|
||||||
@ -102,6 +104,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
var ambientLightGO = Object.Instantiate(_starAmbientLight, starGO.transform);
|
var ambientLightGO = Object.Instantiate(_starAmbientLight, starGO.transform);
|
||||||
ambientLightGO.transform.localPosition = Vector3.zero;
|
ambientLightGO.transform.localPosition = Vector3.zero;
|
||||||
ambientLightGO.name = "AmbientLight_Star";
|
ambientLightGO.name = "AmbientLight_Star";
|
||||||
|
ambientLightGO.SetActive(true);
|
||||||
|
|
||||||
Light ambientLight = ambientLightGO.GetComponent<Light>();
|
Light ambientLight = ambientLightGO.GetComponent<Light>();
|
||||||
ambientLight.range = starModule.size * OuterRadiusRatio;
|
ambientLight.range = starModule.size * OuterRadiusRatio;
|
||||||
@ -227,6 +230,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
sunAtmosphere.transform.position = proxyGO.transform.position;
|
sunAtmosphere.transform.position = proxyGO.transform.position;
|
||||||
sunAtmosphere.transform.localScale = Vector3.one * OuterRadiusRatio;
|
sunAtmosphere.transform.localScale = Vector3.one * OuterRadiusRatio;
|
||||||
sunAtmosphere.name = "Atmosphere_Star";
|
sunAtmosphere.name = "Atmosphere_Star";
|
||||||
|
sunAtmosphere.SetActive(true);
|
||||||
|
|
||||||
atmosphere = sunAtmosphere.transform.Find("Atmosphere_LOD2").GetComponent<MeshRenderer>();
|
atmosphere = sunAtmosphere.transform.Find("Atmosphere_LOD2").GetComponent<MeshRenderer>();
|
||||||
atmosphere.transform.localScale = Vector3.one;
|
atmosphere.transform.localScale = Vector3.one;
|
||||||
@ -321,11 +325,13 @@ namespace NewHorizons.Builder.Body
|
|||||||
sunSurface.transform.position = rootObject.transform.position;
|
sunSurface.transform.position = rootObject.transform.position;
|
||||||
sunSurface.transform.localScale = Vector3.one;
|
sunSurface.transform.localScale = Vector3.one;
|
||||||
sunSurface.name = "Surface";
|
sunSurface.name = "Surface";
|
||||||
|
sunSurface.SetActive(true);
|
||||||
|
|
||||||
var solarFlareEmitter = Object.Instantiate(_starSolarFlareEmitter, starGO.transform);
|
var solarFlareEmitter = Object.Instantiate(_starSolarFlareEmitter, starGO.transform);
|
||||||
solarFlareEmitter.transform.localPosition = Vector3.zero;
|
solarFlareEmitter.transform.localPosition = Vector3.zero;
|
||||||
solarFlareEmitter.transform.localScale = Vector3.one;
|
solarFlareEmitter.transform.localScale = Vector3.one;
|
||||||
solarFlareEmitter.name = "SolarFlareEmitter";
|
solarFlareEmitter.name = "SolarFlareEmitter";
|
||||||
|
solarFlareEmitter.SetActive(true);
|
||||||
|
|
||||||
if (starModule.tint != null)
|
if (starModule.tint != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -113,6 +113,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
fogGO.name = "OceanFog";
|
fogGO.name = "OceanFog";
|
||||||
fogGO.transform.localPosition = Vector3.zero;
|
fogGO.transform.localPosition = Vector3.zero;
|
||||||
fogGO.transform.localScale = Vector3.one;
|
fogGO.transform.localScale = Vector3.one;
|
||||||
|
fogGO.SetActive(true);
|
||||||
|
|
||||||
if (module.tint != null)
|
if (module.tint != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -314,6 +314,8 @@ namespace NewHorizons.Builder.Props
|
|||||||
// Idk why but it wants reveals to be comma delimited not a list
|
// Idk why but it wants reveals to be comma delimited not a list
|
||||||
if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals);
|
if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals);
|
||||||
|
|
||||||
|
g.SetActive(true);
|
||||||
|
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,6 +412,8 @@ namespace NewHorizons.Builder.Props
|
|||||||
// Idk why but it wants reveals to be comma delimited not a list
|
// Idk why but it wants reveals to be comma delimited not a list
|
||||||
if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals);
|
if (info.reveals != null) slideCollectionContainer._shipLogOnComplete = string.Join(",", info.reveals);
|
||||||
|
|
||||||
|
standingTorch.SetActive(true);
|
||||||
|
|
||||||
return standingTorch;
|
return standingTorch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,11 +25,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Make(GameObject planetGO, Sector sector, PropModule.RaftInfo info, OWRigidbody planetBody)
|
public static GameObject Make(GameObject planetGO, Sector sector, PropModule.RaftInfo info, OWRigidbody planetBody)
|
||||||
{
|
{
|
||||||
InitPrefab();
|
InitPrefab();
|
||||||
|
|
||||||
if (_prefab == null) return;
|
if (_prefab == null) return null;
|
||||||
|
|
||||||
GameObject raftObject = _prefab.InstantiateInactive();
|
GameObject raftObject = _prefab.InstantiateInactive();
|
||||||
raftObject.name = "Raft_Body";
|
raftObject.name = "Raft_Body";
|
||||||
@ -63,6 +63,8 @@ namespace NewHorizons.Builder.Props
|
|||||||
}
|
}
|
||||||
|
|
||||||
raftObject.SetActive(true);
|
raftObject.SetActive(true);
|
||||||
|
|
||||||
|
return raftObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,26 +41,26 @@ namespace NewHorizons.Components
|
|||||||
|
|
||||||
// The star part cant be disabled like the rest and we have to manually disable the renderers
|
// The star part cant be disabled like the rest and we have to manually disable the renderers
|
||||||
// Else it can stop the supernova effect mid way through
|
// Else it can stop the supernova effect mid way through
|
||||||
StarEvolutionControllers = GetComponentsInChildren<StarEvolutionController>();
|
StarEvolutionControllers = GetComponentsInChildren<StarEvolutionController>(true);
|
||||||
_stars = StarEvolutionControllers.Select(x => x.gameObject).ToArray();
|
_stars = StarEvolutionControllers.Select(x => x.gameObject).ToArray();
|
||||||
|
|
||||||
foreach (var star in _stars)
|
foreach (var star in _stars)
|
||||||
{
|
{
|
||||||
_starRenderers = _starRenderers.Concat(star.GetComponentsInChildren<Renderer>());
|
_starRenderers = _starRenderers.Concat(star.GetComponentsInChildren<Renderer>(true));
|
||||||
_starTessellatedRenderers = _starTessellatedRenderers.Concat(star.GetComponentsInChildren<TessellatedRenderer>());
|
_starTessellatedRenderers = _starTessellatedRenderers.Concat(star.GetComponentsInChildren<TessellatedRenderer>(true));
|
||||||
_starParticleRenderers = _starParticleRenderers.Concat(star.GetComponentsInChildren<ParticleSystemRenderer>());
|
_starParticleRenderers = _starParticleRenderers.Concat(star.GetComponentsInChildren<ParticleSystemRenderer>(true));
|
||||||
_solarFlareEmitter = _solarFlareEmitter.Append(star.GetComponentInChildren<SolarFlareEmitter>());
|
_solarFlareEmitter = _solarFlareEmitter.Append(star.GetComponentInChildren<SolarFlareEmitter>(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
var progenitorEvolutionController = root.GetComponentInChildren<StarEvolutionController>();
|
var progenitorEvolutionController = root.GetComponentInChildren<StarEvolutionController>(true);
|
||||||
if (progenitorEvolutionController != null && stellarRemnantGO != null)
|
if (progenitorEvolutionController != null && stellarRemnantGO != null)
|
||||||
{
|
{
|
||||||
progenitorEvolutionController.SetStellarRemnant(stellarRemnantGO);
|
progenitorEvolutionController.SetStellarRemnant(stellarRemnantGO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lightningGenerator == null) lightningGenerator = GetComponentInChildren<CloudLightningGenerator>();
|
if (lightningGenerator == null) lightningGenerator = GetComponentInChildren<CloudLightningGenerator>(true);
|
||||||
|
|
||||||
if (supernovaPlanetEffectController == null) supernovaPlanetEffectController = GetComponentInChildren<NHSupernovaPlanetEffectController>();
|
if (supernovaPlanetEffectController == null) supernovaPlanetEffectController = GetComponentInChildren<NHSupernovaPlanetEffectController>(true);
|
||||||
|
|
||||||
// Start off
|
// Start off
|
||||||
_outOfRange = false;
|
_outOfRange = false;
|
||||||
|
|||||||
@ -96,18 +96,18 @@ namespace NewHorizons.Components.SizeControllers
|
|||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
var sun = GameObject.FindObjectOfType<SunController>();
|
var sun = SearchUtilities.Find("Sun_Body").GetComponent<SunController>();
|
||||||
|
|
||||||
if (sun == null) return;
|
if (sun == null) return;
|
||||||
|
|
||||||
// Need to grab all this early bc the star might only Start after the solar system was made (remnants)
|
// Need to grab all this early bc the star might only Start after the solar system was made (remnants)
|
||||||
_defaultCollapseStartSurfaceMaterial = new Material(sun._collapseStartSurfaceMaterial);
|
if (_defaultCollapseStartSurfaceMaterial == null) _defaultCollapseStartSurfaceMaterial = new Material(sun._collapseStartSurfaceMaterial).DontDestroyOnLoad();
|
||||||
_defaultCollapseEndSurfaceMaterial = new Material(sun._collapseEndSurfaceMaterial);
|
if (_defaultCollapseEndSurfaceMaterial == null) _defaultCollapseEndSurfaceMaterial = new Material(sun._collapseEndSurfaceMaterial).DontDestroyOnLoad();
|
||||||
_defaultStartSurfaceMaterial = new Material(sun._startSurfaceMaterial);
|
if (_defaultStartSurfaceMaterial == null) _defaultStartSurfaceMaterial = new Material(sun._startSurfaceMaterial).DontDestroyOnLoad();
|
||||||
_defaultEndSurfaceMaterial = new Material(sun._endSurfaceMaterial);
|
if (_defaultEndSurfaceMaterial == null) _defaultEndSurfaceMaterial = new Material(sun._endSurfaceMaterial).DontDestroyOnLoad();
|
||||||
|
|
||||||
_defaultNormalRamp = sun._startSurfaceMaterial.GetTexture(ColorRamp);
|
if (_defaultNormalRamp == null) _defaultNormalRamp = sun._startSurfaceMaterial.GetTexture(ColorRamp).DontDestroyOnLoad();
|
||||||
_defaultCollapseRamp = sun._collapseStartSurfaceMaterial.GetTexture(ColorRamp);
|
if (_defaultCollapseRamp == null) _defaultCollapseRamp = sun._collapseStartSurfaceMaterial.GetTexture(ColorRamp).DontDestroyOnLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
|||||||
@ -277,6 +277,7 @@ namespace NewHorizons
|
|||||||
SandBuilder.InitPrefabs();
|
SandBuilder.InitPrefabs();
|
||||||
SingularityBuilder.InitPrefabs();
|
SingularityBuilder.InitPrefabs();
|
||||||
StarBuilder.InitPrefabs();
|
StarBuilder.InitPrefabs();
|
||||||
|
StarEvolutionController.Init();
|
||||||
SupernovaEffectBuilder.InitPrefabs();
|
SupernovaEffectBuilder.InitPrefabs();
|
||||||
TornadoBuilder.InitPrefabs();
|
TornadoBuilder.InitPrefabs();
|
||||||
VolcanoBuilder.InitPrefab();
|
VolcanoBuilder.InitPrefab();
|
||||||
@ -444,6 +445,14 @@ namespace NewHorizons
|
|||||||
|
|
||||||
solarSystemRoot.AddComponent<EyeSunLightParamUpdater>();
|
solarSystemRoot.AddComponent<EyeSunLightParamUpdater>();
|
||||||
|
|
||||||
|
var distantSun = eyeSector.gameObject.FindChild("DistantSun/Directional light");
|
||||||
|
var starController = distantSun.AddComponent<StarController>();
|
||||||
|
starController.Light = distantSun.GetComponent<Light>();
|
||||||
|
starController.Intensity = 0.2f;
|
||||||
|
starController.SunColor = new Color(0.3569f, 0.7843f, 1, 1);
|
||||||
|
distantSun.AddComponent<StarLightController>().Awake();
|
||||||
|
StarLightController.AddStar(starController);
|
||||||
|
|
||||||
if (IsWarpingFromShip && _ship != null)
|
if (IsWarpingFromShip && _ship != null)
|
||||||
{
|
{
|
||||||
var eyeShip = GameObject.Instantiate(_ship);
|
var eyeShip = GameObject.Instantiate(_ship);
|
||||||
@ -470,7 +479,6 @@ namespace NewHorizons
|
|||||||
RemoteHandler.Init();
|
RemoteHandler.Init();
|
||||||
AtmosphereBuilder.Init();
|
AtmosphereBuilder.Init();
|
||||||
BrambleNodeBuilder.Init(BodyDict[CurrentStarSystem].Select(x => x.Config).Where(x => x.Bramble?.dimension != null).ToArray());
|
BrambleNodeBuilder.Init(BodyDict[CurrentStarSystem].Select(x => x.Config).Where(x => x.Bramble?.dimension != null).ToArray());
|
||||||
StarEvolutionController.Init();
|
|
||||||
|
|
||||||
if (isSolarSystem)
|
if (isSolarSystem)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user