diff --git a/index.html b/index.html index f9b54ef9..725a0e3a 100644 --- a/index.html +++ b/index.html @@ -8093,7 +8093,7 @@ - + diff --git a/modules/io/load.js b/modules/io/load.js index d07679d4..c038eb5c 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -539,6 +539,8 @@ async function parseLoadedData(data, mapVersion) { }); pack.burgs.forEach(burg => { + if (typeof burg.capital === "boolean") burg.capital = Number(burg.capital); + if (!burg.i && burg.lock) { ERROR && console.error(`Data integrity check. Burg 0 is marked as locked, removing the status`); delete burg.lock; @@ -627,7 +629,7 @@ async function parseLoadedData(data, mapVersion) { return; } - if (stateBurgs.length && !capitalBurgs.length) { + if (state.i && stateBurgs.length && !capitalBurgs.length) { ERROR && console.error(`Data integrity check. State ${state.i} has no capital. Assigning the first burg as capital`); stateBurgs[0].capital = 1; diff --git a/versioning.js b/versioning.js index 0c547679..0eea1e86 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.97.01"; // generator version, update each time +const version = "1.97.02"; // generator version, update each time { document.title += " v" + version;