From: xangelo Date: Thu, 26 May 2022 13:51:48 +0000 (-0400) Subject: take ore-refinery + mining_facility energy consumption in consideration X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=6d99e5694f6d05aa2ffd96373188f4cf3fb4bb06;p=browser-rts.git take ore-refinery + mining_facility energy consumption in consideration --- 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 ),