Update ModuleRestockHeatEffects to fix instantiation issues

Untested (will test when I get home)
pull/767/head
Andrew Cassidy 5 years ago
parent 38ecd498b0
commit 6cd78839ae
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1

@ -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)

Loading…
Cancel
Save