mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-22 07:07:24 +01:00
fix: enhance emblem rendering for states and burgs in the editor (#1343)
* fix: enhance emblem rendering for states and burgs in the editor * fix: update tools.js version to 1.112.0 for improved functionality * Update src/index.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
32227518d2
commit
634c7dba4b
3 changed files with 11 additions and 7 deletions
|
|
@ -101,14 +101,17 @@ function processFeatureRegeneration(event, button) {
|
|||
async function openEmblemEditor() {
|
||||
let type, id, el;
|
||||
|
||||
if (pack.states[1]?.coa) {
|
||||
const firstState = pack.states.find(s => s.i && !s.removed && s.coa);
|
||||
const firstBurg = pack.burgs.find(b => b.i && !b.removed && b.coa);
|
||||
|
||||
if (firstState) {
|
||||
type = "state";
|
||||
id = "stateCOA1";
|
||||
el = pack.states[1];
|
||||
} else if (pack.burgs[1]?.coa) {
|
||||
id = `stateCOA${firstState.i}`;
|
||||
el = firstState;
|
||||
} else if (firstBurg) {
|
||||
type = "burg";
|
||||
id = "burgCOA1";
|
||||
el = pack.burgs[1];
|
||||
id = `burgCOA${firstBurg.i}`;
|
||||
el = firstBurg;
|
||||
} else {
|
||||
tip("No emblems to edit, please generate states and burgs first", false, "error");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -8548,7 +8548,7 @@
|
|||
|
||||
<script defer src="modules/ui/style.js?v=1.108.4"></script>
|
||||
<script defer src="modules/ui/editors.js?v=1.112.1"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.111.0"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.113.3"></script>
|
||||
<script defer src="modules/ui/world-configurator.js?v=1.105.4"></script>
|
||||
<script defer src="modules/ui/heightmap-editor.js?v=1.113.0"></script>
|
||||
<script defer src="modules/ui/provinces-editor.js?v=1.108.1"></script>
|
||||
|
|
|
|||
|
|
@ -676,6 +676,7 @@ class BurgModule {
|
|||
};
|
||||
this.definePopulation(burg);
|
||||
this.defineEmblem(burg);
|
||||
COArenderer.add("burg", burgId, burg.coa, x, y);
|
||||
this.defineFeatures(burg);
|
||||
|
||||
const populations = pack.burgs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue