mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v1.6.25 - striping issue check on load
This commit is contained in:
parent
2ac6586489
commit
088b2b1f98
1 changed files with 4 additions and 0 deletions
|
|
@ -1188,6 +1188,10 @@ function parseLoadedData(data) {
|
|||
void function checkDataIntegrity() {
|
||||
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 invalidStates = [...new Set(cells.state)].filter(s => !pack.states[s] || pack.states[s].removed);
|
||||
invalidStates.forEach(s => {
|
||||
const invalidCells = cells.i.filter(i => cells.state[i] === s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue