This commit is contained in:
Azgaar 2022-05-08 19:22:19 +03:00
commit 02e0669282
3 changed files with 4 additions and 2 deletions

View file

@ -367,6 +367,7 @@ window.Submap = (function () {
pack.burgs.forEach((b, id) => { pack.burgs.forEach((b, id) => {
if (id == 0) return; // skip empty city of neturals if (id == 0) return; // skip empty city of neturals
[b.x, b.y] = projection(b.x, b.y); [b.x, b.y] = projection(b.x, b.y);
b.population = b.population * options.scale; // adjust for populationRate change
// disable out-of-map (removed) burgs // disable out-of-map (removed) burgs
if (!inMap(b.x, b.y)) { if (!inMap(b.x, b.y)) {

View file

@ -320,7 +320,7 @@ function getMFCGlink(burg) {
} }
const parameters = {name, population, size, seed, river, coast, farms, citadel, urban_castle, hub, plaza, temple, walls, shantytown, gates: -1}; const parameters = {name, population, size, seed, river, coast, farms, citadel, urban_castle, hub, plaza, temple, walls, shantytown, gates: -1};
const url = new URL("https://watabou.github.io/city-generator"); const url = new URL("https://watabou.github.io/city-generator/");
url.search = new URLSearchParams(parameters); url.search = new URLSearchParams(parameters);
if (sea) url.searchParams.append("sea", sea); if (sea) url.searchParams.append("sea", sea);

View file

@ -120,7 +120,8 @@ window.UISubmap = (function () {
rescaleStyles: checked("submapRescaleStyles"), rescaleStyles: checked("submapRescaleStyles"),
smoothHeightMap: scale > 2, smoothHeightMap: scale > 2,
inverse: (x, y) => [x / origScale + x0, y / origScale + y0], inverse: (x, y) => [x / origScale + x0, y / origScale + y0],
projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale] projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale],
scale: origScale,
}; };
// converting map position on the planet // converting map position on the planet