new building: mining facilities to increase alloy per tick
authorxangelo <git@xangelo.ca>
Wed, 25 May 2022 14:50:53 +0000 (10:50 -0400)
committerxangelo <git@xangelo.ca>
Wed, 25 May 2022 14:50:53 +0000 (10:50 -0400)
src/repository/city.ts

index 6e08ff8ae8c6af3301605b0a722ae2c4b53aa2ff..0ab8478a6d6ebed98d6c67e10b514a72d88c6bef 100644 (file)
@@ -31,6 +31,7 @@ export type City = {
     warehouses: number;
     solar_panels: number;
     accumulators: number;
+    mining_facilities: number;
     barracks: number;
     special_attacker_trainer: number;
     special_defender_trainer: number;
@@ -81,6 +82,7 @@ export class CityRepository extends Repository<City> {
             warehouses: 5,
             solar_panels: 5,
             accumulators: 5,
+            mining_facilities: 5,
             barracks: 0,
             special_attacker_trainer: 0,
             special_defender_trainer: 0,
@@ -341,9 +343,7 @@ where l.sector_id = ?`, [sector_id]);
     async foodProductionPerTick(city: City): Promise<number> {
       // eventually we should supply the warehouse formula 
       // to calculate the max amount of food created per tick
-      return _.max([
-        city.population + _.round(city.farms * 50)
-      ])
+      return city.farms * 50;
     }
 
     async foodUsagePerTick(city: City): Promise<number> {