sky-burgs-sky-routes

This commit is contained in:
barrulus 2025-09-05 21:07:42 +01:00
parent 2c3692f000
commit 73ab86b957
23 changed files with 919 additions and 49 deletions

View file

@ -401,11 +401,14 @@ function editHeightmap(options) {
// find best cell for burgs
for (const b of pack.burgs) {
if (!b.i || b.removed) continue;
b.cell = findBurgCell(b.x, b.y);
// Keep flying burgs at their current (possibly water) cell
if (!b.flying) {
b.cell = findBurgCell(b.x, b.y);
}
b.feature = pack.cells.f[b.cell];
pack.cells.burg[b.cell] = b.i;
if (!b.capital && pack.cells.h[b.cell] < 20) removeBurg(b.i);
if (!b.capital && pack.cells.h[b.cell] < 20 && !b.flying) removeBurg(b.i);
if (b.capital) pack.states[b.state].center = b.cell;
}