mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Merge master into branch
This commit is contained in:
commit
2053a7d530
4 changed files with 13 additions and 4 deletions
|
|
@ -7849,7 +7849,7 @@
|
|||
<script src="modules/military-generator.js"></script>
|
||||
<script src="modules/markers-generator.js?v=1.87.13"></script>
|
||||
<script src="modules/coa-generator.js"></script>
|
||||
<script src="modules/submap.js"></script>
|
||||
<script src="modules/submap.js?v=1.88.05"></script>
|
||||
<script src="libs/polylabel.min.js"></script>
|
||||
<script src="libs/lineclip.min.js"></script>
|
||||
<script src="libs/alea.min.js"></script>
|
||||
|
|
@ -7903,7 +7903,7 @@
|
|||
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
||||
|
||||
<script defer src="modules/io/save.js"></script>
|
||||
<script defer src="modules/io/load.js?v=1.88.01"></script>
|
||||
<script defer src="modules/io/load.js?v=1.88.05"></script>
|
||||
<script defer src="modules/io/cloud.js"></script>
|
||||
<script defer src="modules/io/export.js"></script>
|
||||
<script defer src="modules/io/formats.js"></script>
|
||||
|
|
|
|||
|
|
@ -500,6 +500,15 @@ async function parseLoadedData(data) {
|
|||
});
|
||||
|
||||
pack.burgs.forEach(burg => {
|
||||
if ((!burg.i || burg.removed) && burg.lock) {
|
||||
ERROR &&
|
||||
console.error(
|
||||
`Data Integrity Check. Burg ${burg.i || "0"} is removed or invalid but still locked. Unlocking the burg`
|
||||
);
|
||||
delete burg.lock;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!burg.i || burg.removed) return;
|
||||
if (burg.cell === undefined || burg.x === undefined || burg.y === undefined) {
|
||||
ERROR &&
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ window.Submap = (function () {
|
|||
} else {
|
||||
b.cell = cityCell;
|
||||
}
|
||||
if (!b.lock) b.lock = options.lockBurgs;
|
||||
if (b.i && !b.lock) b.lock = options.lockBurgs;
|
||||
cells.burg[b.cell] = id;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ function regenerateProvinces() {
|
|||
|
||||
function regenerateBurgs() {
|
||||
const {cells, states} = pack;
|
||||
const lockedburgs = pack.burgs.filter(b => b.lock);
|
||||
const lockedburgs = pack.burgs.filter(b => b.i && !b.removed && b.lock);
|
||||
rankCells();
|
||||
|
||||
cells.burg = new Uint16Array(cells.i.length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue