refactor(burgs): centralize burg management logic in Burgs module

Moved burg-related functions like `removeBurg`, `changeGroup`, and `toggleCapital` into the Burgs module to improve code organization and maintainability. Updated all references to these functions across the codebase. This change reduces duplication and ensures consistent behavior for burg management operations.
This commit is contained in:
Azgaar 2025-04-17 01:03:14 +02:00
parent a5939be6e2
commit fd9e010153
12 changed files with 213 additions and 215 deletions

View file

@ -409,7 +409,7 @@ function editHeightmap(options) {
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) Burgs.remove(b.i);
if (b.capital) pack.states[b.state].center = b.cell;
}