From fbf107ed35fd5f113804a61d818b8c997aee53cd Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 24 Dec 2019 20:41:39 -0600 Subject: [PATCH] Reuse the calculated contributions of each building when displaying stats --- gorge.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gorge.js b/gorge.js index 3984394..4f4b5ff 100644 --- a/gorge.js +++ b/gorge.js @@ -1055,10 +1055,10 @@ function prodSummary(id) { ); list.push( - { "text": "Your " + render(belongings[id].count) + " " + (belongings[id].count == 1 ? buildings[id].name + " is" : buildings[id].plural + " are") + " producing " + round(productivityOf(id).food, 1) + " food/sec" } + { "text": "Your " + render(belongings[id].count) + " " + (belongings[id].count == 1 ? buildings[id].name + " is" : buildings[id].plural + " are") + " producing " + round(contributions[id].food, 1) + " food/sec" } ); - let percentage = round(100 * productivityOf(id).food / currentProductivity["food"], 2); + let percentage = round(100 * contributions[id].food / currentProductivity["food"], 2); if (isNaN(percentage)) { percentage = 0;