diff --git a/crafter.js b/crafter.js index 3a40c8b..eec3141 100644 --- a/crafter.js +++ b/crafter.js @@ -47,6 +47,7 @@ function init() { //no ing let ing = Object(); ing.name = "No Ingredient"; + ing.displayName = "No Ingredient"; ing.tier = 0; ing.lvl = 0; ing.skills = ["ARMOURING", "TAILORING", "WEAPONSMITHING", "WOODWORKING", "JEWELING", "COOKING", "ALCHEMISM", "SCRIBING"]; @@ -55,14 +56,15 @@ function init() { ing.consumableIDs = {"dura": 0, "charges": 0}; ing.posMods = {"left": 0, "right": 0, "above": 0, "under": 0, "touching": 0, "notTouching": 0}; ing.id = 4000; - ingMap.set(ing["name"], ing); - ingList.push(ing["name"]); - ingIDMap.set(ing["id"], ing["name"]); + ingMap.set(ing["displayName"], ing); + ingList.push(ing["displayName"]); + ingIDMap.set(ing["id"], ing["displayName"]); let numerals = new Map([[1, "I"], [2, "II"], [3, "III"], [4, "IV"], [5, "V"], [6, "VI"]]); for (let i = 0; i < 5; i ++) { for (const powderIng of powderIngreds) { let ing = Object(); ing.name = "" + damageClasses[i+1] + " Powder " + numerals.get(powderIngreds.indexOf(powderIng) + 1); + ing.displayName = ing.name ing.tier = 0; ing.lvl = 0; ing.skills = ["ARMOURING", "TAILORING", "WEAPONSMITHING", "WOODWORKING"]; @@ -90,17 +92,17 @@ function init() { } ing.consumableIDs = {"dura": 0, "charges": 0}; ing.posMods = {"left": 0, "right": 0, "above": 0, "under": 0, "touching": 0, "notTouching": 0}; - ingMap.set(ing["name"],ing); - ingList.push(ing["name"]); - ingIDMap.set(ing["id"], ing["name"]); + ingMap.set(ing["displayName"],ing); + ingList.push(ing["displayName"]); + ingIDMap.set(ing["id"], ing["displayName"]); } } for (const ing of ings) { - ingMap.set(ing["name"], ing); - ingList.push(ing["name"]); - ingIDMap.set(ing["id"], ing["name"]); + ingMap.set(ing["displayName"], ing); + ingList.push(ing["displayName"]); + ingIDMap.set(ing["id"], ing["displayName"]); } for (const recipe of recipes) { recipeMap.set(recipe["name"], recipe); diff --git a/display.js b/display.js index 63b07a3..4280d9f 100644 --- a/display.js +++ b/display.js @@ -83,7 +83,7 @@ function expandIngredient(ing) { } expandedIng.set(id, idMap); } - let normIds = ['lvl','name','tier','skills','id']; + let normIds = ['lvl','name', 'displayName','tier','skills','id']; for (const id of normIds) { expandedIng.set(id, ing[id]); }