Prevent no exit data killing client start

This commit is contained in:
Dev 2024-01-20 00:19:52 +00:00
parent a1f043d088
commit 05533bb166

View File

@ -752,9 +752,10 @@ export class RepeatableQuestGenerator
if (possibleExits.length === 0) if (possibleExits.length === 0)
{ {
this.logger.error("Possible exits was empty"); this.logger.error(`Unable to choose specific exit on map: ${locationKey}, Possible exit pool was empty`);
} }
else
{
// Choose one of the exits we filtered above // Choose one of the exits we filtered above
const chosenExit = this.randomUtil.drawRandomFromList(possibleExits, 1)[0]; const chosenExit = this.randomUtil.drawRandomFromList(possibleExits, 1)[0];
@ -762,6 +763,7 @@ export class RepeatableQuestGenerator
const exitCondition = this.generateExplorationExitCondition(chosenExit); const exitCondition = this.generateExplorationExitCondition(chosenExit);
quest.conditions.AvailableForFinish[0].counter.conditions.push(exitCondition); quest.conditions.AvailableForFinish[0].counter.conditions.push(exitCondition);
} }
}
// Difficulty for exploration goes from 1 extract to maxExtracts // Difficulty for exploration goes from 1 extract to maxExtracts
// Difficulty for reward goes from 0.2...1 -> map // Difficulty for reward goes from 0.2...1 -> map