mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
FIX: keep original burg population after submapping
This commit is contained in:
parent
5a35f0d320
commit
bd21aa6d8e
2 changed files with 3 additions and 1 deletions
|
|
@ -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)) {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue