diff --git a/.gitignore b/.gitignore index 8cd42a0d..a110f3e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .bat .vscode .idea -.idea/Fantasy-Map-Generator.iml +.DS_Store \ No newline at end of file diff --git a/index.html b/index.html index 01717609..b8f1d208 100644 --- a/index.html +++ b/index.html @@ -7861,7 +7861,7 @@ - + diff --git a/modules/io/load.js b/modules/io/load.js index 946df93f..1e8c946a 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -439,10 +439,8 @@ async function parseLoadedData(data) { const cells = pack.cells; if (pack.cells.i.length !== pack.cells.state.length) { - ERROR && - console.error( - "Striping issue. Map data is corrupted. The only solution is to edit the heightmap in erase mode" - ); + const message = "Data Integrity Check. Striping issue. To fix edit the heightmap in erase mode"; + ERROR && console.error(message); } const invalidStates = [...new Set(cells.state)].filter(s => !pack.states[s] || pack.states[s].removed); @@ -501,6 +499,14 @@ async function parseLoadedData(data) { pack.burgs.forEach(burg => { if (!burg.i || burg.removed) return; + if (burg.cell === undefined || burg.x === undefined || burg.y === undefined) { + ERROR && + console.error( + `Data Integrity Check. Burg ${burg.i} is missing cell info or coordinates. Removing the burg` + ); + burg.removed = true; + } + if (burg.port < 0) { ERROR && console.error("Data Integrity Check. Burg", burg.i, "has invalid port value", burg.port); burg.port = 0; diff --git a/versioning.js b/versioning.js index bf19a4e5..81e279db 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.87.04"; // generator version, update each time +const version = "1.87.05"; // generator version, update each time { document.title += " v" + version;