goods export system

This commit is contained in:
Azgaar 2021-08-08 20:47:00 +03:00 committed by Peter
parent 8e9c0c9f78
commit aaa93d5b93
3 changed files with 5 additions and 16 deletions

View file

@ -528,8 +528,8 @@ window.FMG.data.resourceModels = {
Any_forest: 'biome(5, 6, 7, 8, 9)',
Temperate_and_boreal_forests: 'biome(6, 8, 9)',
Hills: 'minHeight(40) || (minHeight(30) && nth(10))',
Mountains: 'minHeight(60) || (minHeight(40) && nth(10))',
Mountains_and_wetlands: 'minHeight(60) || (biome(12) && nth(8))',
Mountains: 'minHeight(60) || (minHeight(20) && nth(10))',
Mountains_and_wetlands: 'minHeight(60) || (biome(12) && nth(7)) || (minHeight(20) && nth(10))',
Headwaters: 'river() && minHeight(40)',
More_habitable: 'minHabitability(20) && habitability()',
Marine_and_rivers: 'shore(-1) && (type("ocean", "freshwater", "salt") || (river() && shore(1, 2)))',

View file

@ -1597,15 +1597,8 @@ function rankCells() {
// cell rural population is suitability adjusted by cell area
cells.pop[i] = s > 0 ? (s * POP_BALANCER * cells.area[i]) / areaMean : 0;
cells.s[i] = s + resBonus;
// debug.append('text').attr('x', cells.p[i][0]).attr('y', cells.p[i][1]).text(cells.s[i]);
}
console.log(resBonuses);
console.log(d3.max(resBonuses));
console.log(d3.mean(resBonuses));
console.log(d3.median(resBonuses.map((v) => rn(v))));
TIME && console.timeEnd('rankCells');
}

View file

@ -90,14 +90,10 @@ function editBurg(id) {
if (b.shanty) document.getElementById("burgShanty").classList.remove("inactive");
else document.getElementById("burgShanty").classList.add("inactive");
// economics block
document.getElementById("burgProduction").innerHTML = getProduction(b.produced);
document.getElementById('burgProduction').innerHTML = getProduction(b.produced);
const deals = pack.trade.deals;
document.getElementById("burgExport").innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
document.getElementById("burgImport").innerHTML = '';
// economics block
document.getElementById('burgProduction').innerHTML = getProduction(b.production);
document.getElementById('burgExport').innerHTML = getProduction(b.export);
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
document.getElementById('burgImport').innerHTML = '';
//toggle lock
updateBurgLockIcon();