diff --git a/mods/survival.js b/mods/survival.js index 4ccccd72..0a2e214b 100644 --- a/mods/survival.js +++ b/mods/survival.js @@ -308,6 +308,18 @@ window.addEventListener("load",function(){ shopDiv.appendChild(button); } shopDiv.insertAdjacentHTML("beforeend",`
`); + + createCategoryDiv("prices"); + var pricesDiv = document.getElementById("category-prices"); + pricesDiv.style.display = "none"; + for (var element in elementWorth) { + var name = (elements[element].name||element).replace(/_/g, " ").replace("."," ").replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}).replace(" ","."); + // create text with the name of the element and its worth, separated by • + var text = name+"="+elementWorth[element] + " • "; + pricesDiv.insertAdjacentHTML("beforeend",`${text}`); + } + pricesDiv.innerHTML = pricesDiv.innerHTML.slice(0,-2); + pricesDiv.innerHTML = ""+pricesDiv.innerHTML+"
"; }); runAfterLoad(function(){ checkUnlock = function(element) {