|
|
|
@ -13,7 +13,7 @@ namespace Restock
|
|
|
|
|
[KSPField] public string shaderProperty = "_EmissiveColor";
|
|
|
|
|
|
|
|
|
|
// animation curve for the red channel
|
|
|
|
|
[KSPField] public FloatCurve redCurve= new FloatCurve();
|
|
|
|
|
[KSPField] public FloatCurve redCurve = new FloatCurve();
|
|
|
|
|
|
|
|
|
|
// animation curve for the green channel
|
|
|
|
|
[KSPField] public FloatCurve greenCurve = new FloatCurve();
|
|
|
|
@ -42,7 +42,7 @@ namespace Restock
|
|
|
|
|
// should the module disable the stock blackbody glow effect on the included renderers?
|
|
|
|
|
[KSPField] public bool disableBlackbody = false;
|
|
|
|
|
|
|
|
|
|
[KSPField] public List<Renderer> renderers = new List<Renderer>();
|
|
|
|
|
public List<Renderer> renderers = new List<Renderer>();
|
|
|
|
|
|
|
|
|
|
private readonly string _shaderBlackbody = "_TemperatureColor";
|
|
|
|
|
|
|
|
|
@ -54,13 +54,16 @@ namespace Restock
|
|
|
|
|
|
|
|
|
|
private double _lerpRange;
|
|
|
|
|
|
|
|
|
|
private Color _emissiveColor = new Color();
|
|
|
|
|
private MaterialPropertyBlock _propertyBlock = new MaterialPropertyBlock();
|
|
|
|
|
private Color _emissiveColor;
|
|
|
|
|
private MaterialPropertyBlock _propertyBlock;
|
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
|
{
|
|
|
|
|
if (base.vessel == null) return;
|
|
|
|
|
|
|
|
|
|
_emissiveColor = new Color();
|
|
|
|
|
_propertyBlock = new MaterialPropertyBlock();
|
|
|
|
|
|
|
|
|
|
if (enableHeatEmissive)
|
|
|
|
|
{
|
|
|
|
|
if (useCoreTemp)
|
|
|
|
|