summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-15 22:16:06 +0800
committerEltrac <hi@guhub.cn>2025-03-15 22:16:06 +0800
commit80ef97435f80d949077c2007d083e9250146cc7c (patch)
tree1dfc9646fdfba37e984cc8a093be91b3b5d546d8
parentff421b277a95076bd37aa7e3577c425b77458dbf (diff)
chore: remove useless code
-rw-r--r--logic/MapGenerator.lua13
1 files changed, 1 insertions, 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