From 936705bdf48db9a0ca794fd378a59f6e04faec3d Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 22 Jul 2018 11:13:17 -0500 Subject: [PATCH] All resource types are incremented now, not just food --- gorge.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gorge.js b/gorge.js index 04a0a79..2434728 100644 --- a/gorge.js +++ b/gorge.js @@ -94,7 +94,9 @@ function updateProductivity() { } function addResources(delta) { - resources.food += currentProductivity["food"] * delta / 1000; + for (const [resource, amount] of Object.entries(currentProductivity)) { + resources[resource] += amount * delta / 1000; + } } function displayResources() {