mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Quantum
This commit is contained in:
parent
9c0966b5b8
commit
8af6d11c52
@ -18,11 +18,22 @@ namespace NewHorizons.Builder.Body
|
|||||||
{
|
{
|
||||||
public static class StellarRemnantBuilder
|
public static class StellarRemnantBuilder
|
||||||
{
|
{
|
||||||
public static void Make(NewHorizonsBody star, GameObject go, OWRigidbody rb, IModBehaviour mod, NewHorizonsBody stellarRemnant = null)
|
public static StellarRemnantController Make(NewHorizonsBody star, GameObject go, OWRigidbody rb, IModBehaviour mod, NewHorizonsBody stellarRemnant = null)
|
||||||
{
|
{
|
||||||
Logger.Log($"Creating stellar remnant for [{star.Config.name}]");
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var currentSRC = go.GetComponentInChildren<StellarRemnantController>();
|
||||||
|
if (currentSRC != null)
|
||||||
|
{
|
||||||
|
foreach (var starEvolutionController1 in go.GetComponentsInChildren<StarEvolutionController>(true))
|
||||||
|
{
|
||||||
|
starEvolutionController1.SetStellarRemnantController(currentSRC);
|
||||||
|
}
|
||||||
|
return currentSRC;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Log($"Creating stellar remnant for [{star.Config.name}]");
|
||||||
|
|
||||||
var config = star.Config;
|
var config = star.Config;
|
||||||
var starModule = star.Config.Star;
|
var starModule = star.Config.Star;
|
||||||
var size = starModule.size;
|
var size = starModule.size;
|
||||||
@ -123,10 +134,13 @@ namespace NewHorizons.Builder.Body
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return stellarRemnantController;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.LogError($"Couldn't make stellar remnant for [{star.Config.name}]:\n{ex}");
|
Logger.LogError($"Couldn't make stellar remnant for [{star.Config.name}]:\n{ex}");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user