|
|
@@ -111,11 +111,11 @@ function renderResources() { |
|
|
|
|
|
|
|
|
for (const [key, value] of Object.entries(resources)) { |
|
|
for (const [key, value] of Object.entries(resources)) { |
|
|
|
|
|
|
|
|
let line1 = round(value) + " " + resourceTypes[key].name; |
|
|
|
|
|
let line2 = round(currentProductivity[key],1) + " " + resourceTypes[key].name + "/sec"; |
|
|
|
|
|
|
|
|
let line1 = render(value, 3) + " " + resourceTypes[key].name; |
|
|
|
|
|
let line2 = render(currentProductivity[key]) + " " + resourceTypes[key].name + "/sec"; |
|
|
|
|
|
|
|
|
list.push({"text": line1}); |
|
|
|
|
|
list.push({"text": line2}); |
|
|
|
|
|
|
|
|
list.push({"text": line1, "class": "resource-quantity"}); |
|
|
|
|
|
list.push({"text": line2, "class": "resource-rate"}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return renderLines(list); |
|
|
return renderLines(list); |
|
|
@@ -415,6 +415,12 @@ function renderLine(line) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (line.class !== undefined) { |
|
|
|
|
|
for (let entry of line.class.split(",")) { |
|
|
|
|
|
div.classList.add(entry); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return div; |
|
|
return div; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -523,7 +529,7 @@ function prodSummary(id) { |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
list.push( |
|
|
list.push( |
|
|
{"text": "Your " + belongings[id].count + " " + (belongings[id].count == 1 ? buildings[id].name + " is": buildings[id].plural + " are") + " producing " + round(productivityOf(id),1) + " food/sec"} |
|
|
|
|
|
|
|
|
{"text": "Your " + render(belongings[id].count) + " " + (belongings[id].count == 1 ? buildings[id].name + " is": buildings[id].plural + " are") + " producing " + round(productivityOf(id),1) + " food/sec"} |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
let percentage = round(100 * productivityOf(id) / currentProductivity["food"], 2); |
|
|
let percentage = round(100 * productivityOf(id) / currentProductivity["food"], 2); |
|
|
|