From 80ef97435f80d949077c2007d083e9250146cc7c Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sat, 15 Mar 2025 22:16:06 +0800 Subject: chore: remove useless code --- logic/MapGenerator.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/logic/MapGenerator.lua b/logic/MapGenerator.lua index ae7c29b..095f2f3 100644 --- a/logic/MapGenerator.lua +++ b/logic/MapGenerator.lua @@ -31,18 +31,7 @@ function mapGenerator.continue(roomCount, from) -- try extending from the last room local entranceDoor, exitDoor = room:connect(newMap[1]) - if not entranceDoor or not exitDoor then - -- if not doorless direction available in this room - -- try extend from a random Room - repeat - room = utils.any(G.allRooms) - if room ~= from and not room:isDoorFull() then - print("extended from a random room") - entranceDoor, exitDoor = room:connect(newMap[1]) - break - end - until false - end + if exitDoor then newMap[1]:removeDoor(exitDoor.location) end -- cgit v1.2.3