function calculateRecipe() {
		for(const materialName in materialList) {
			const material = materialList[materialName];
			const htmlName = materialName.replaceAll(' ', '');
			let newAmount = parseInt($(`input#${htmlName}InventorySpinner`).val());

			/* Account for bad parse (reset it to whatever is in the list) */
			if (isNaN(newAmount) == true) {
				newAmount = material.has;
				$(`input#${htmlName}InventorySpinner`).val(newAmount);
			}
			material.has = newAmount;
			material.needed = material.recipeTotal - material.has;
			if (material.needed < 0) { 
				material.needed == 0; 
			}
			else if (material.needed > material.recipeTotal) { 
				material.needed == material.recipeTotal; 
			}

			if (newAmount > material.recipeTotal) {
				newAmount = material.recipeTotal;
			}
			const recipe = upgradeMaterials[materialName].recipe;
			for (const ingredient in recipe) {
				updateMaterialInventoryList(ingredient, recipe[ingredient] * newAmount);
			}
		}
		updateRecipeList();
		for (const operatorName in selectedOperatorList) {
			updateGoals(selectedOperatorList[operatorName]);
		}
	}
/**
	 * Updates the materials list
	 * @param {String} material Material name
	 * @param {Number} amount Amount of material to add or subtract
	 * @param {Number} multiplier Multiplier factor
	 * 
	 * This recursively looks into the material's recipes to update the lower tier
	 * items needd to craft it.
	 */
Updates the materials list
@param {String} material Material name
@param {Number} amount Amount of material to add or subtract
@param {Number} multiplier Multiplier factor

This recursively looks into the material's recipes to update the lower tier
items needd to craft it.
Updates the materials list @param { String } material Material name @param { Number } amount Amount of material to add or subtract @param { Number } multiplier Multiplier factor This recursively looks into the material ' s recipes to update the lower tier items needd to craft it .
function calculateRecipe() {
		for(const materialName in materialList) {
			const material = materialList[materialName];
			const htmlName = materialName.replaceAll(' ', '');
			let newAmount = parseInt($(`input#${htmlName}InventorySpinner`).val());
			if (isNaN(newAmount) == true) {
				newAmount = material.has;
				$(`input#${htmlName}InventorySpinner`).val(newAmount);
			}
			material.has = newAmount;
			material.needed = material.recipeTotal - material.has;
			if (material.needed < 0) { 
				material.needed == 0; 
			}
			else if (material.needed > material.recipeTotal) { 
				material.needed == material.recipeTotal; 
			}
			if (newAmount > material.recipeTotal) {
				newAmount = material.recipeTotal;
			}
			const recipe = upgradeMaterials[materialName].recipe;
			for (const ingredient in recipe) {
				updateMaterialInventoryList(ingredient, recipe[ingredient] * newAmount);
			}
		}
		updateRecipeList();
		for (const operatorName in selectedOperatorList) {
			updateGoals(selectedOperatorList[operatorName]);
		}
	}
function calculateRecipe ( ) { for ( const materialName in materialList ) { const material = materialList [ materialName ] ; const htmlName = materialName . replaceAll ( ' ' , '' ) ; let newAmount = parseInt ( $ ( ` ${ htmlName } ` ) . val ( ) ) ; if ( isNaN ( newAmount ) == true ) { newAmount = material . has ; $ ( ` ${ htmlName } ` ) . val ( newAmount ) ; } material . has = newAmount ; material . needed = material . recipeTotal - material . has ; if ( material . needed < 0 ) { material . needed == 0 ; } else if ( material . needed > material . recipeTotal ) { material . needed == material . recipeTotal ; } if ( newAmount > material . recipeTotal ) { newAmount = material . recipeTotal ; } const recipe = upgradeMaterials [ materialName ] . recipe ; for ( const ingredient in recipe ) { updateMaterialInventoryList ( ingredient , recipe [ ingredient ] * newAmount ) ; } } updateRecipeList ( ) ; for ( const operatorName in selectedOperatorList ) { updateGoals ( selectedOperatorList [ operatorName ] ) ; } }
Updates the materials list
 @param {String} material Material name
 @param {Number} amount Amount of material to add or subtract
 @param {Number} multiplier Multiplier factor
Updates the materials list @param { String } material Material name @param { Number } amount Amount of material to add or subtract @param { Number } multiplier Multiplier factor
/* Account for bad parse (reset it to whatever is in the list) */