mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Remove solarFlareTint (should just use the star colour)
This commit is contained in:
parent
2280ba3b83
commit
eb38bfb14d
@ -123,7 +123,7 @@ namespace NewHorizons.Builder.Body
|
||||
var supernova = MakeSupernova(starGO, starModule);
|
||||
|
||||
var controller = starGO.AddComponent<StarEvolutionController>();
|
||||
if(starModule.Curve != null) controller.scaleCurve = starModule.GetAnimationCurve();
|
||||
if (starModule.Curve != null) controller.scaleCurve = starModule.GetAnimationCurve();
|
||||
controller.size = starModule.Size;
|
||||
controller.atmosphere = sunAtmosphere;
|
||||
controller.supernova = supernova;
|
||||
@ -178,9 +178,17 @@ namespace NewHorizons.Builder.Body
|
||||
solarFlareEmitter.transform.localScale = Vector3.one;
|
||||
solarFlareEmitter.name = "SolarFlareEmitter";
|
||||
|
||||
if (starModule.SolarFlareTint != null)
|
||||
if (starModule.Tint != null)
|
||||
{
|
||||
solarFlareEmitter.GetComponent<SolarFlareEmitter>().tint = starModule.SolarFlareTint.ToColor();
|
||||
var flareTint = starModule.Tint.ToColor();
|
||||
var emitter = solarFlareEmitter.GetComponent<SolarFlareEmitter>();
|
||||
emitter.tint = flareTint;
|
||||
foreach (var controller in solarFlareEmitter.GetComponentsInChildren<SolarFlareController>())
|
||||
{
|
||||
// It multiplies color by tint but wants something very bright idk
|
||||
controller._color = new Color(20, 20, 20);
|
||||
controller._tint = flareTint;
|
||||
}
|
||||
}
|
||||
|
||||
starGO.transform.position = rootObject.transform.position;
|
||||
@ -226,7 +234,7 @@ namespace NewHorizons.Builder.Body
|
||||
supernova._surface = starGO.GetComponentInChildren<TessellatedSphereRenderer>();
|
||||
supernova._supernovaVolume = null;
|
||||
|
||||
if(starModule.SupernovaTint != null)
|
||||
if (starModule.SupernovaTint != null)
|
||||
{
|
||||
var colour = starModule.SupernovaTint.ToColor();
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ namespace NewHorizons.Components.SizeControllers
|
||||
private MeshRenderer[] _atmosphereRenderers;
|
||||
private HeatHazardVolume _heatVolume;
|
||||
private DestructionVolume _destructionVolume;
|
||||
private SolarFlareEmitter _flareEmitter;
|
||||
|
||||
private bool _isCollapsing;
|
||||
private float _collapseStartSize;
|
||||
@ -91,10 +92,12 @@ namespace NewHorizons.Components.SizeControllers
|
||||
|
||||
if (willExplode) GlobalMessenger.AddListener("TriggerSupernova", Die);
|
||||
|
||||
if(scaleCurve != null)
|
||||
if (scaleCurve != null)
|
||||
{
|
||||
maxScale = scaleCurve.keys.Select(x => x.value).Max() * size;
|
||||
}
|
||||
|
||||
_flareEmitter = GetComponentInChildren<SolarFlareEmitter>();
|
||||
}
|
||||
|
||||
public void OnDestroy()
|
||||
@ -147,7 +150,7 @@ namespace NewHorizons.Components.SizeControllers
|
||||
if (!_isCollapsing)
|
||||
{
|
||||
base.FixedUpdate();
|
||||
|
||||
|
||||
// Only do colour transition stuff if they set an end colour
|
||||
if (endColour != null)
|
||||
{
|
||||
@ -161,6 +164,8 @@ namespace NewHorizons.Components.SizeControllers
|
||||
{
|
||||
currentColour = _startColour;
|
||||
}
|
||||
|
||||
if (_flareEmitter != null) _flareEmitter._tint = currentColour;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -8,7 +8,6 @@ namespace NewHorizons.External.Modules.VariableSize
|
||||
public MColor Tint { get; set; }
|
||||
public MColor EndTint { get; set; }
|
||||
public MColor SupernovaTint { get; set; }
|
||||
public MColor SolarFlareTint { get; set; }
|
||||
public MColor LightTint { get; set; }
|
||||
public float SolarLuminosity { get; set; } = 1f;
|
||||
public bool HasAtmosphere { get; set; } = true;
|
||||
|
||||
@ -600,10 +600,6 @@
|
||||
"$ref": "#/$defs/color",
|
||||
"description": "Colour of the star at the end of its life."
|
||||
},
|
||||
"solarFlareTint": {
|
||||
"$ref": "#/$defs/color",
|
||||
"description": "Colour of the solar flares. The shader is a bit weird so the value you put won't exactly reflect what you see. Try experimenting with different colours to see what works."
|
||||
},
|
||||
"lightTint": {
|
||||
"$ref": "#/$defs/color",
|
||||
"description": "Colour of the light given off."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user