From: xangelo Date: Wed, 25 May 2022 14:50:53 +0000 (-0400) Subject: new building: mining facilities to increase alloy per tick X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=8c7dc35263549fccbc0cd84c995699f1c16f6a6d;p=browser-rts.git new building: mining facilities to increase alloy per tick --- diff --git a/src/repository/city.ts b/src/repository/city.ts index 6e08ff8..0ab8478 100644 --- a/src/repository/city.ts +++ b/src/repository/city.ts @@ -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 { 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 { // 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 {