Home
/
browser-rts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e13d33
)
take ore-refinery + mining_facility energy consumption in consideration
author
xangelo
<git@xangelo.ca>
Thu, 26 May 2022 13:51:48 +0000
(09:51 -0400)
committer
xangelo
<git@xangelo.ca>
Thu, 26 May 2022 13:51:48 +0000
(09:51 -0400)
src/repository/city.ts
patch
|
blob
|
history
src/tasks/tick.ts
patch
|
blob
|
history
diff --git
a/src/repository/city.ts
b/src/repository/city.ts
index c3bcae849b50979254c6b6d418a8f3a0217a1892..b2392fcf7f93d345520868519f064968236499cf 100644
(file)
--- 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 d12f1af2d05187b152f30e8cf94bf20ff1e915d3..c61b94504872caad1b6107dbc68d548531b3f86f 100644
(file)
--- a/
src/tasks/tick.ts
+++ b/
src/tasks/tick.ts
@@
-37,7
+37,9
@@
export const tick = new Task<Tick>('tick', async (task, job) => {
homes * 10 +
warehouses * 30 +
solar_panels * 10 +
- accumulators * 100
+ accumulators * 100 +
+ mining_facilities * 80 +
+ ore_refinery * 40
),
0
),