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 supernova = MakeSupernova(starGO, starModule);
|
||||||
|
|
||||||
var controller = starGO.AddComponent<StarEvolutionController>();
|
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.size = starModule.Size;
|
||||||
controller.atmosphere = sunAtmosphere;
|
controller.atmosphere = sunAtmosphere;
|
||||||
controller.supernova = supernova;
|
controller.supernova = supernova;
|
||||||
@ -178,9 +178,17 @@ namespace NewHorizons.Builder.Body
|
|||||||
solarFlareEmitter.transform.localScale = Vector3.one;
|
solarFlareEmitter.transform.localScale = Vector3.one;
|
||||||
solarFlareEmitter.name = "SolarFlareEmitter";
|
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;
|
starGO.transform.position = rootObject.transform.position;
|
||||||
@ -226,7 +234,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
supernova._surface = starGO.GetComponentInChildren<TessellatedSphereRenderer>();
|
supernova._surface = starGO.GetComponentInChildren<TessellatedSphereRenderer>();
|
||||||
supernova._supernovaVolume = null;
|
supernova._supernovaVolume = null;
|
||||||
|
|
||||||
if(starModule.SupernovaTint != null)
|
if (starModule.SupernovaTint != null)
|
||||||
{
|
{
|
||||||
var colour = starModule.SupernovaTint.ToColor();
|
var colour = starModule.SupernovaTint.ToColor();
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ namespace NewHorizons.Components.SizeControllers
|
|||||||
private MeshRenderer[] _atmosphereRenderers;
|
private MeshRenderer[] _atmosphereRenderers;
|
||||||
private HeatHazardVolume _heatVolume;
|
private HeatHazardVolume _heatVolume;
|
||||||
private DestructionVolume _destructionVolume;
|
private DestructionVolume _destructionVolume;
|
||||||
|
private SolarFlareEmitter _flareEmitter;
|
||||||
|
|
||||||
private bool _isCollapsing;
|
private bool _isCollapsing;
|
||||||
private float _collapseStartSize;
|
private float _collapseStartSize;
|
||||||
@ -91,10 +92,12 @@ namespace NewHorizons.Components.SizeControllers
|
|||||||
|
|
||||||
if (willExplode) GlobalMessenger.AddListener("TriggerSupernova", Die);
|
if (willExplode) GlobalMessenger.AddListener("TriggerSupernova", Die);
|
||||||
|
|
||||||
if(scaleCurve != null)
|
if (scaleCurve != null)
|
||||||
{
|
{
|
||||||
maxScale = scaleCurve.keys.Select(x => x.value).Max() * size;
|
maxScale = scaleCurve.keys.Select(x => x.value).Max() * size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_flareEmitter = GetComponentInChildren<SolarFlareEmitter>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnDestroy()
|
public void OnDestroy()
|
||||||
@ -161,6 +164,8 @@ namespace NewHorizons.Components.SizeControllers
|
|||||||
{
|
{
|
||||||
currentColour = _startColour;
|
currentColour = _startColour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_flareEmitter != null) _flareEmitter._tint = currentColour;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,6 @@ namespace NewHorizons.External.Modules.VariableSize
|
|||||||
public MColor Tint { get; set; }
|
public MColor Tint { get; set; }
|
||||||
public MColor EndTint { get; set; }
|
public MColor EndTint { get; set; }
|
||||||
public MColor SupernovaTint { get; set; }
|
public MColor SupernovaTint { get; set; }
|
||||||
public MColor SolarFlareTint { get; set; }
|
|
||||||
public MColor LightTint { get; set; }
|
public MColor LightTint { get; set; }
|
||||||
public float SolarLuminosity { get; set; } = 1f;
|
public float SolarLuminosity { get; set; } = 1f;
|
||||||
public bool HasAtmosphere { get; set; } = true;
|
public bool HasAtmosphere { get; set; } = true;
|
||||||
|
|||||||
@ -600,10 +600,6 @@
|
|||||||
"$ref": "#/$defs/color",
|
"$ref": "#/$defs/color",
|
||||||
"description": "Colour of the star at the end of its life."
|
"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": {
|
"lightTint": {
|
||||||
"$ref": "#/$defs/color",
|
"$ref": "#/$defs/color",
|
||||||
"description": "Colour of the light given off."
|
"description": "Colour of the light given off."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user