From 59462a4f15838ce7c098ce5090505fd4bbd6305c Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 1 Sep 2024 21:42:34 +0200 Subject: [PATCH 01/30] fix: #1118 - get lake shoreline if missing --- utils/pathUtils.js | 10 ++++++++-- versioning.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/utils/pathUtils.js b/utils/pathUtils.js index ff3bbf2a..e148270b 100644 --- a/utils/pathUtils.js +++ b/utils/pathUtils.js @@ -21,7 +21,10 @@ function getVertexPaths({getType, options}) { if (onborderCell === undefined) continue; const feature = pack.features[cells.f[onborderCell]]; - if (feature.type === "lake" && feature.shoreline.every(ofSameType)) continue; // inner lake + if (feature.type === "lake") { + if (!feature.shoreline) Lakes.getShoreline(feature); + if (feature.shoreline.every(ofSameType)) continue; // inner lake + } const startingVertex = cells.v[cellId].find(v => vertices.c[v].some(ofDifferentType)); if (startingVertex === undefined) throw new Error(`Starting vertex for cell ${cellId} is not found`); @@ -104,7 +107,10 @@ function getVertexPath(cellsArray) { if (onborderCell === undefined) continue; const feature = pack.features[cells.f[onborderCell]]; - if (feature.type === "lake" && feature.shoreline.every(ofSameType)) continue; // inner lake + if (feature.type === "lake") { + if (!feature.shoreline) Lakes.getShoreline(feature); + if (feature.shoreline.every(ofSameType)) continue; // inner lake + } const startingVertex = cells.v[cellId].find(v => vertices.c[v].some(ofDifferentType)); if (startingVertex === undefined) throw new Error(`Starting vertex for cell ${cellId} is not found`); diff --git a/versioning.js b/versioning.js index 8a5f9393..403ae70c 100644 --- a/versioning.js +++ b/versioning.js @@ -12,7 +12,7 @@ * * Example: 1.102.0 -> Major version 1, Minor version 102, Patch version 0 */ -const VERSION = "1.101.00"; +const VERSION = "1.101.01"; { document.title += " v" + VERSION; From 23e24845263daf6f22e98b3b8d7fc97d6185b0d1 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 2 Sep 2024 01:56:32 +0200 Subject: [PATCH 02/30] chore: supporters list update --- modules/dynamic/supporters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/dynamic/supporters.js b/modules/dynamic/supporters.js index 478516fa..d6f9019a 100644 --- a/modules/dynamic/supporters.js +++ b/modules/dynamic/supporters.js @@ -580,4 +580,6 @@ MisterPete Johanna Martin Marmalade_MacGuffin James Benware -FortunesFaded`; +FortunesFaded +breadsticks +Murderbits`; From d42fd5cf92c371e0063b50b0c7d75424ef09378f Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 2 Sep 2024 12:16:51 +0200 Subject: [PATCH 03/30] fix: year and era - unlock both on lock icon click --- index.html | 8 +++++--- modules/ui/general.js | 12 +++++++----- versioning.js | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index ef4d1660..8eb8d2c2 100644 --- a/index.html +++ b/index.html @@ -1529,7 +1529,9 @@ - + - + Year and era @@ -8046,7 +8048,7 @@ - + diff --git a/modules/ui/general.js b/modules/ui/general.js index 7fd7e4d5..3530a442 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -429,17 +429,19 @@ function highlightEmblemElement(type, el) { // assign lock behavior document.querySelectorAll("[data-locked]").forEach(function (e) { - e.addEventListener("mouseover", function (event) { + e.addEventListener("mouseover", e => { + e.stopPropagation(); if (this.className === "icon-lock") tip("Click to unlock the option and allow it to be randomized on new map generation"); else tip("Click to lock the option and always use the current value on new map generation"); - event.stopPropagation(); }); e.addEventListener("click", function () { - const id = this.id.slice(5); - if (this.className === "icon-lock") unlock(id); - else lock(id); + const fn = this.className === "icon-lock" ? unlock : lock; + const ids = this.dataset.ids.split(","); + + if (ids.length) ids.forEach(fn); + else fn(this.id.slice(5)); }); }); diff --git a/versioning.js b/versioning.js index 403ae70c..ac005116 100644 --- a/versioning.js +++ b/versioning.js @@ -12,7 +12,7 @@ * * Example: 1.102.0 -> Major version 1, Minor version 102, Patch version 0 */ -const VERSION = "1.101.01"; +const VERSION = "1.101.02"; { document.title += " v" + VERSION; From b273c77166ad4932d3aba0ac8a10e86d06227b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Montero=20Lamas?= Date: Wed, 4 Sep 2024 02:34:48 +0200 Subject: [PATCH 04/30] added icon-dot-circled to locate burg in burg editor menu (#1123) * added icon-dot-circled to locate burg - icon dot-circled - function zoomIntoBurg() * pack.burgs[id] and icons pack.burgs[id].x and y icon target and map pin * Update versioning.js to 1.102.0 * Update index.html burg-editor.js to 1.102.00 --- index.html | 5 +++-- modules/ui/burg-editor.js | 9 +++++++++ versioning.js | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8eb8d2c2..bf6e48e2 100644 --- a/index.html +++ b/index.html @@ -3513,7 +3513,8 @@ - + +