load dynamically cultures editor

This commit is contained in:
Azgaar 2022-05-19 00:19:24 +03:00 committed by Peter
parent 877ae096bd
commit 69823ceeb0
3 changed files with 14 additions and 8 deletions

View file

@ -7913,7 +7913,7 @@
<script defer src="modules/ui/units-editor.js"></script> <script defer src="modules/ui/units-editor.js"></script>
<script defer src="modules/ui/notes-editor.js"></script> <script defer src="modules/ui/notes-editor.js"></script>
<script defer src="modules/ui/diplomacy-editor.js"></script> <script defer src="modules/ui/diplomacy-editor.js"></script>
<script defer src="modules/ui/zones-editor.js"></script> <script defer src="modules/ui/zones-editor.js?v=18052022"></script>
<script defer src="modules/ui/burgs-overview.js"></script> <script defer src="modules/ui/burgs-overview.js"></script>
<script defer src="modules/ui/rivers-overview.js"></script> <script defer src="modules/ui/rivers-overview.js"></script>
<script defer src="modules/ui/military-overview.js"></script> <script defer src="modules/ui/military-overview.js"></script>

View file

@ -294,13 +294,13 @@ function statesEditorAddLines() {
$body.innerHTML = lines; $body.innerHTML = lines;
// update footer // update footer
byId("statesFooterStates").innerHTML = pack.states.filter(s => s.i && !s.removed).length; statesFooterStates.innerHTML = pack.states.filter(s => s.i && !s.removed).length;
byId("statesFooterCells").innerHTML = pack.cells.h.filter(h => h >= 20).length; statesFooterCells.innerHTML = pack.cells.h.filter(h => h >= 20).length;
byId("statesFooterBurgs").innerHTML = totalBurgs; statesFooterBurgs.innerHTML = totalBurgs;
byId("statesFooterArea").innerHTML = si(totalArea) + unit; statesFooterArea.innerHTML = `${si(totalArea)} ${unit}`;
byId("statesFooterArea").dataset.area = totalArea; statesFooterPopulation.innerHTML = si(totalPopulation);
byId("statesFooterPopulation").innerHTML = si(totalPopulation); statesFooterArea.dataset.area = totalArea;
byId("statesFooterPopulation").dataset.population = totalPopulation; statesFooterPopulation.dataset.population = totalPopulation;
// add listeners // add listeners
$body.querySelectorAll(":scope > div").forEach($line => { $body.querySelectorAll(":scope > div").forEach($line => {

View file

@ -1197,3 +1197,9 @@ async function editStates() {
const StateEditor = await import("../dynamic/editors/states-editor.js"); const StateEditor = await import("../dynamic/editors/states-editor.js");
StateEditor.open(); StateEditor.open();
} }
async function editCultures() {
if (customization) return;
const CulturesEditor = await import("../dynamic/editors/cultures-editor.js");
CulturesEditor.open();
}