mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
1.16.0 (#716)
## Major features - API now allows you to register a custom builder method. This method takes the planet game object and the json string of its `extras` module, allowing you to alter your planet accordingly. ## Improvements - Can now update the orbits of the HGT. Implements #225
This commit is contained in:
commit
db9d47f050
@ -35,7 +35,7 @@ namespace NewHorizons.Handlers
|
||||
public static float SolarSystemRadius { get; private set; }
|
||||
public static float DefaultFurthestOrbit => 30000f;
|
||||
|
||||
public static List<Action<GameObject, string>> CustomBuilders;
|
||||
public static List<Action<GameObject, string>> CustomBuilders = new();
|
||||
|
||||
public static void Init(List<NewHorizonsBody> bodies)
|
||||
{
|
||||
@ -712,9 +712,9 @@ namespace NewHorizons.Handlers
|
||||
{
|
||||
customBuilder.Invoke(go, JsonConvert.SerializeObject(body.Config.extras));
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
NHLogger.LogError($"Failed to use custom builder on body {body.Config.name}");
|
||||
NHLogger.LogError($"Failed to use custom builder on body {body.Config.name} - {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user