mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
load dynamically cultures editor
This commit is contained in:
parent
877ae096bd
commit
69823ceeb0
3 changed files with 14 additions and 8 deletions
|
|
@ -294,13 +294,13 @@ function statesEditorAddLines() {
|
|||
$body.innerHTML = lines;
|
||||
|
||||
// update footer
|
||||
byId("statesFooterStates").innerHTML = pack.states.filter(s => s.i && !s.removed).length;
|
||||
byId("statesFooterCells").innerHTML = pack.cells.h.filter(h => h >= 20).length;
|
||||
byId("statesFooterBurgs").innerHTML = totalBurgs;
|
||||
byId("statesFooterArea").innerHTML = si(totalArea) + unit;
|
||||
byId("statesFooterArea").dataset.area = totalArea;
|
||||
byId("statesFooterPopulation").innerHTML = si(totalPopulation);
|
||||
byId("statesFooterPopulation").dataset.population = totalPopulation;
|
||||
statesFooterStates.innerHTML = pack.states.filter(s => s.i && !s.removed).length;
|
||||
statesFooterCells.innerHTML = pack.cells.h.filter(h => h >= 20).length;
|
||||
statesFooterBurgs.innerHTML = totalBurgs;
|
||||
statesFooterArea.innerHTML = `${si(totalArea)} ${unit}`;
|
||||
statesFooterPopulation.innerHTML = si(totalPopulation);
|
||||
statesFooterArea.dataset.area = totalArea;
|
||||
statesFooterPopulation.dataset.population = totalPopulation;
|
||||
|
||||
// add listeners
|
||||
$body.querySelectorAll(":scope > div").forEach($line => {
|
||||
|
|
|
|||
|
|
@ -1197,3 +1197,9 @@ async function editStates() {
|
|||
const StateEditor = await import("../dynamic/editors/states-editor.js");
|
||||
StateEditor.open();
|
||||
}
|
||||
|
||||
async function editCultures() {
|
||||
if (customization) return;
|
||||
const CulturesEditor = await import("../dynamic/editors/cultures-editor.js");
|
||||
CulturesEditor.open();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue