do not crash if no New Sealand is available

This commit is contained in:
Zeno Rogue 2024-03-27 16:54:13 +01:00
parent 57f6fb5f71
commit e032e619c0
1 changed files with 2 additions and 1 deletions

View File

@ -387,7 +387,7 @@ EX eLand pickluck(eLand l1, eLand l2) {
} */
EX eLand getNewSealand(eLand old) {
while(true) {
for(int it=0; it<100; it++) {
eLand p = pick(laOcean, pick(laCaribbean, laLivefjord, laWarpSea, laKraken, laDocks));
if(p == laKraken && !landUnlocked(p)) continue;
if(p == laKraken && peace::on) continue;
@ -396,6 +396,7 @@ EX eLand getNewSealand(eLand old) {
if(!isLandIngame(p)) continue;
return p;
}
return old;
}
EX bool createOnSea(eLand old) {