feat: burg group editor - form

This commit is contained in:
Azgaar 2024-10-07 23:44:17 +02:00
parent 511d8f37d8
commit b6708bf698
11 changed files with 274 additions and 68 deletions

11
main.js
View file

@ -171,7 +171,8 @@ let options = {
// create groups for each burg type
{
for (const {name} of options.burgs.groups) {
const sortedGroups = [...options.burgs.groups].sort((a, b) => a.order - b.order);
for (const {name} of sortedGroups) {
burgIcons.append("g").attr("id", name);
burgLabels.append("g").attr("id", name);
}
@ -661,14 +662,18 @@ async function generate(options) {
rankCells();
Cultures.generate();
Cultures.expand();
Burgs.generate();
States.generate();
Routes.generate();
Religions.generate();
Burgs.specify();
States.collectStatistics();
States.defineStateForms();
Provinces.generate();
Provinces.getPoles();
Burgs.specify();
Rivers.specify();
Features.specify();
@ -695,7 +700,7 @@ async function generate(options) {
title: "Generation error",
width: "32em",
buttons: {
"Cleanup data": cleanupData,
"Cleanup data": () => cleanupData(),
Regenerate: function () {
regenerateMap("generation error");
$(this).dialog("close");