From 5ba7653ad9e2cd1a2c4d6c992184b17b25d2073b Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 15 Feb 2021 23:12:13 +0300 Subject: [PATCH] v1.5.35 - fixed #569 --- index.html | 2 +- libs/jquery-ui.css | 2 +- modules/coa-generator.js | 2 +- modules/save-and-load.js | 22 +++++++++++++--------- modules/ui/emblems-editor.js | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index b56bff5c..06032157 100644 --- a/index.html +++ b/index.html @@ -2863,8 +2863,8 @@
- +
diff --git a/libs/jquery-ui.css b/libs/jquery-ui.css index 9361f041..8d1b6fcc 100644 --- a/libs/jquery-ui.css +++ b/libs/jquery-ui.css @@ -434,7 +434,7 @@ body .ui-dialog { font-family: Arial,Helvetica,sans-serif; font-size: 1em; } -.ui-widget button { +.ui-widget button[class^="icon-"] { padding: 1px 6px; } .ui-widget.ui-widget-content { diff --git a/modules/coa-generator.js b/modules/coa-generator.js index e2cf6493..1afc64c0 100644 --- a/modules/coa-generator.js +++ b/modules/coa-generator.js @@ -467,7 +467,7 @@ const emblemShape = document.getElementById("emblemShape").value; if (emblemShape === "state" && state && pack.states[state].coa) return pack.states[state].coa.shield; if (pack.cultures[culture].shield) return pack.cultures[culture].shield; - console.error("Emblem shape is not defined on culture level", pack.cultures[culture]); + console.error("Shield shape is not defined on culture level", pack.cultures[culture]); return "heater"; } diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 3a42be49..f51b4786 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -1060,27 +1060,31 @@ function parseLoadedData(data) { } if (version < 1.5) { - // v 1.5 added emblems - emblems = viewbox.append("g").attr("id", "emblems").style("display", "none"); - emblems.append("g").attr("id", "burgEmblems"); - emblems.append("g").attr("id", "provinceEmblems"); - emblems.append("g").attr("id", "stateEmblems"); - regenerateEmblems(); - toggleEmblems(); - // not need to store default styles from v 1.5 localStorage.removeItem("styleClean"); localStorage.removeItem("styleGloom"); localStorage.removeItem("styleAncient"); localStorage.removeItem("styleMonochrome"); + // v 1.5 cultures has shield attribute + pack.cultures.forEach(culture => { + if (culture.removed) return; + culture.shield = Cultures.getRandomShield(); + }); + // v 1.5 added burg type value pack.burgs.forEach(burg => { if (!burg.i || burg.removed) return; burg.type = BurgsAndStates.getType(burg.cell, burg.port); }); - BurgsAndStates.getType(cell, false); + // v 1.5 added emblems + emblems = viewbox.insert("g", "#population").attr("id", "emblems").style("display", "none"); + emblems.append("g").attr("id", "burgEmblems"); + emblems.append("g").attr("id", "provinceEmblems"); + emblems.append("g").attr("id", "stateEmblems"); + regenerateEmblems(); + toggleEmblems(); } }() diff --git a/modules/ui/emblems-editor.js b/modules/ui/emblems-editor.js index 78dede8a..0d9b4b58 100644 --- a/modules/ui/emblems-editor.js +++ b/modules/ui/emblems-editor.js @@ -181,7 +181,7 @@ function editEmblem(type, id, el) { function openInArmoria() { const coa = el.coa && el.coa !== "custom" ? el.coa : {t1: "sable"}; const json = JSON.stringify(coa).replaceAll("#", "%23"); - const url = `http://azgaar.github.io/Armoria/?coa=${json}&from=FMG`; + const url = `https://azgaar.github.io/Armoria/?coa=${json}&from=FMG`; openURL(url); }