mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
fix: adding a capital for neutrals
This commit is contained in:
parent
5803f44b99
commit
72b6314d34
3 changed files with 5 additions and 3 deletions
|
|
@ -8093,7 +8093,7 @@
|
|||
<script defer src="libs/rgbquant.min.js"></script>
|
||||
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
||||
<script defer src="modules/io/save.js?v=1.96.00"></script>
|
||||
<script defer src="modules/io/load.js?v=1.97.00"></script>
|
||||
<script defer src="modules/io/load.js?v=1.97.02"></script>
|
||||
<script defer src="modules/io/cloud.js?v=1.96.00"></script>
|
||||
<script defer src="modules/io/export.js?v=1.96.00"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue