diff --git a/rotatingMachine.html b/rotatingMachine.html index 7e31298..adbc9eb 100644 --- a/rotatingMachine.html +++ b/rotatingMachine.html @@ -15,6 +15,7 @@ startup: { value: 0 }, warmup: { value: 0 }, shutdown: { value: 0 }, + cooldown: { value: 0 }, machineCurve : { value: {}}, //define asset properties @@ -77,10 +78,13 @@ if (window.EVOLV?.nodes?.rotatingMachine?.positionMenu?.saveEditor) { window.EVOLV.nodes.rotatingMachine.positionMenu.saveEditor(this); } - // …plus any custom saves for speed, startup, etc. - ["speed", "startup", "warmup", "shutdown", "cooldown"].forEach( - (field) => (node[field] = parseFloat(document.getElementById(`node-input-${field}`).value) || 0) - ); + + ["speed", "startup", "warmup", "shutdown", "cooldown"].forEach((field) => { + const element = document.getElementById(`node-input-${field}`); + const value = parseFloat(element?.value) || 0; + console.log(`----------------> Saving ${field}: ${value}`); + node[field] = value; + }); } }); diff --git a/src/specificClass.js b/src/specificClass.js index 236633c..f609024 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -501,7 +501,7 @@ class Machine { // Update power measurement break; default: - this.logger.error(`Type '${type}' not recognized for measured update.`); + this.logger.error(`Type '${subType}' not recognized for measured update.`); return; } }