mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Star Light Radius
This commit is contained in:
parent
63cf135550
commit
937e389719
@ -87,6 +87,7 @@ namespace NewHorizons.Builder.Body
|
||||
var light = sunLight.AddComponent<Light>();
|
||||
light.CopyPropertiesFrom(SearchUtilities.Find("Sun_Body/Sector_SUN/Effects_SUN/SunLight").GetComponent<Light>());
|
||||
light.intensity *= starModule.solarLuminosity;
|
||||
light.range = starModule.lightRadius;
|
||||
light.range *= Mathf.Sqrt(starModule.solarLuminosity);
|
||||
|
||||
Color lightColour = light.color;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
@ -55,5 +55,11 @@ namespace NewHorizons.External.Modules.VariableSize
|
||||
/// Colour of the star.
|
||||
/// </summary>
|
||||
public MColor tint;
|
||||
|
||||
/// <summary>
|
||||
/// How far the light from the star can reach.
|
||||
/// </summary>
|
||||
[DefaultValue(50000f)] [Range(0f, double.MaxValue)]
|
||||
public float lightRadius = 50000f;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1772,6 +1772,13 @@
|
||||
"tint": {
|
||||
"description": "Colour of the star.",
|
||||
"$ref": "#/definitions/MColor"
|
||||
},
|
||||
"lightRadius": {
|
||||
"type": "number",
|
||||
"description": "How far the light from the star can reach.",
|
||||
"format": "float",
|
||||
"default": 50000.0,
|
||||
"minimum": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user