From 936fda06ea38cee458345a44cffdd43d20f26434 Mon Sep 17 00:00:00 2001 From: Renge Date: Thu, 21 Apr 2022 14:50:29 -0400 Subject: [PATCH] fix: bug in RandomMapGenerator --- src/shattered_sword/Tools/RandomMapGenerator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shattered_sword/Tools/RandomMapGenerator.ts b/src/shattered_sword/Tools/RandomMapGenerator.ts index ead6085..d31b8dc 100644 --- a/src/shattered_sword/Tools/RandomMapGenerator.ts +++ b/src/shattered_sword/Tools/RandomMapGenerator.ts @@ -155,7 +155,7 @@ export default class RandomMapGenerator { } if (!thisEntrance) { if (!this.hasExit) { - // throw new Error("Wrong order in map template" + facing); + throw new Error("Wrong order in map template" + facing); } return false; } @@ -164,7 +164,7 @@ export default class RandomMapGenerator { this.rooms.push(room); this.roomPlaced += 1; if (this.hasExit && this.gen.random() <= 0.3) { - return false; + return true; } for (let entrance of nextRoom.entrances) { if (entrance != thisEntrance) {