X-Git-Url: https://git.xangelo.ca/?a=blobdiff_plain;f=src%2Frender%2Fkingdom-overview.ts;h=2e787d6bdf82daaebe49e27d11d21ef142463366;hb=9cb3a0584377f61cf3382fef4541246d1b1202bc;hp=c44d8f852081950664658ee7a05c1fb58644c298;hpb=516deaa637cb322ddbb4fb9121d56d23fef5d7a8;p=browser-rts.git diff --git a/src/render/kingdom-overview.ts b/src/render/kingdom-overview.ts index c44d8f8..2e787d6 100644 --- a/src/render/kingdom-overview.ts +++ b/src/render/kingdom-overview.ts @@ -1,50 +1,78 @@ import { Account } from "../repository/accounts"; -import { City } from "../repository/city"; +import { CityWithLocation, CityRepository } from "../repository/city"; import * as _ from 'lodash'; -export function renderKingomOverview(city: City, account: Account): string { - return `
Lord | +Captain | ${account.username} | Population | -${city.population.toLocaleString()}/${_.max([city.farms * 70, city.population])} | +${city.population.toLocaleString()}/${cityRepo.maxPopulation(city)} |
---|---|---|---|---|---|
Land | +Space | ${city.totalSpace.toLocaleString()} (${Math.ceil(city.usedSpace/city.totalSpace * 100)}% used) | Soldiers | ${city.soldiers.toLocaleString()} | |
Location | -${city.location_x},${city.location_y} | +Sector ${city.sector_id} - (${city.location_x},${city.location_y}) | Attackers | ${city.attackers.toLocaleString()} | |
Gold | -${city.gold.toLocaleString()} | +Credits | +${city.credits.toLocaleString()} | Defenders | ${city.defenders.toLocaleString()} |
Ore | -${city.ore.toLocaleString()} | +Alloys | +${city.alloys.toLocaleString()} @ ${percent(city.alloys, cityRepo.maxAlloy(city), 100)} % Ore Refiniery Utilization | Special Attackers | ${city.sp_attackers.toLocaleString()} |
Logs | -${city.logs.toLocaleString()} | +Energy | ++ ${city.energy.toLocaleString()} (${energyRateOfChange.toLocaleString()}) + @ ${percent(city.energy, cityRepo.maxEnergy(city), 100)}% Accumulator Utilization + | Special Defenders | ${city.sp_defenders.toLocaleString()} |
Bushels | -${city.bushels.toLocaleString()} | +Food | ++ ${city.food.toLocaleString()} (${foodRateOfChange.toLocaleString()}) @ ${percent(city.food, cityRepo.maxFood(city), 100)}% Warehouse utilization + |