Update ModuleRestockHeatEffects to fix instantiation issues

Untested (will test when I get home)
This commit is contained in:
Andrew Cassidy 2019-12-03 12:41:33 -08:00
parent 38ecd498b0
commit 6cd78839ae
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1
2 changed files with 22 additions and 19 deletions

View File

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