From 6d99e5694f6d05aa2ffd96373188f4cf3fb4bb06 Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 26 May 2022 09:51:48 -0400 Subject: [PATCH] take ore-refinery + mining_facility energy consumption in consideration --- src/repository/city.ts | 4 +++- src/tasks/tick.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/repository/city.ts b/src/repository/city.ts index c3bcae8..b2392fc 100644 --- a/src/repository/city.ts +++ b/src/repository/city.ts @@ -377,7 +377,9 @@ where l.sector_id = ?`, [sector_id]); city.special_attacker_trainer * buildingsMap['special_attacker_trainer'].energy, city.homes * buildingsMap['homes'].energy, city.warehouses * buildingsMap['warehouses'].energy, - city.solar_panels * buildingsMap['solar_panels'].energy + city.solar_panels * buildingsMap['solar_panels'].energy, + city.mining_facilities * buildingsMap['mining_facilities'].energy, + city.ore_refinery * buildingsMap['ore_refinery'].energy ]); return totalEnergy; } diff --git a/src/tasks/tick.ts b/src/tasks/tick.ts index d12f1af..c61b945 100644 --- a/src/tasks/tick.ts +++ b/src/tasks/tick.ts @@ -37,7 +37,9 @@ export const tick = new Task('tick', async (task, job) => { homes * 10 + warehouses * 30 + solar_panels * 10 + - accumulators * 100 + accumulators * 100 + + mining_facilities * 80 + + ore_refinery * 40 ), 0 ), -- 2.25.1