|
|
|
@@ -115,7 +115,6 @@ function displayResources() { |
|
|
|
function renderResources() { |
|
|
|
let list = []; |
|
|
|
|
|
|
|
|
|
|
|
for (const [key, value] of Object.entries(resources)) { |
|
|
|
|
|
|
|
let line1 = render(value, 3, 0) + " " + resourceTypes[key].name; |
|
|
|
@@ -450,7 +449,7 @@ function renderCost(cost) { |
|
|
|
|
|
|
|
for (const [key, value] of Object.entries(cost)) { |
|
|
|
list.push({ |
|
|
|
"text": value + " " + resourceTypes[key].name, |
|
|
|
"text": render(value,0) + " " + resourceTypes[key].name, |
|
|
|
"valid": resources[key] >= value |
|
|
|
}); |
|
|
|
} |
|
|
|
@@ -469,14 +468,14 @@ function renderPrereqs(prereqs) { |
|
|
|
if (key == "buildings") { |
|
|
|
for (const [id, amount] of Object.entries(prereqs.buildings)) { |
|
|
|
list.push({ |
|
|
|
"text": buildings[id].name + " x" + amount, |
|
|
|
"text": buildings[id].name + " x" + render(amount,0), |
|
|
|
"valid": belongings[id].count >= amount |
|
|
|
}); |
|
|
|
} |
|
|
|
} else if (key == "productivity") { |
|
|
|
for (const [id, amount] of Object.entries(prereqs.productivity)) { |
|
|
|
list.push({ |
|
|
|
"text": amount + " " + resourceTypes[id].name + "/s", |
|
|
|
"text": render(amount,0) + " " + resourceTypes[id].name + "/s", |
|
|
|
"valid": currentProductivity[id] >= amount |
|
|
|
}); |
|
|
|
} |
|
|
|
|