removed lots of prints... fixed so pot positioning is synced

This commit is contained in:
2025-12-26 01:08:04 +01:00
parent 5f866b718f
commit b85b4fd447
12 changed files with 360 additions and 248 deletions

View File

@@ -102,7 +102,6 @@ func generate_dungeon(map_size: Vector2, _num_rooms: int, min_room_size: int, ma
attempts -= 1
if attempts <= 0:
print("Dungeon generator:Reached maximum attempts")
nrOfRoomErrors += 1
break
@@ -147,21 +146,18 @@ func generate_dungeon(map_size: Vector2, _num_rooms: int, min_room_size: int, ma
# Find an unreachable room and try to connect it
for room in all_rooms:
if not reachable.has(room):
print("Found unreachable room at ", room.x, ",", room.y)
var connected = false
# Try to connect to each reachable room until success
for target_room in reachable:
var door = create_corridor_between_rooms(room, target_room, grid)
if door.size() > 0:
print("Connected unreachable room")
set_door(door, grid)
all_doors.append(door)
connected = true
break
if not connected:
print("Failed to connect room directly, trying intermediate room")
# Try creating intermediate room with multiple positions
for offset_x in [-2, 0, 2]:
for offset_y in [-2, 0, 2]:
@@ -188,7 +184,6 @@ func generate_dungeon(map_size: Vector2, _num_rooms: int, min_room_size: int, ma
attempts2 -= 1
if attempts2 <= 0:
print("Failed to connect all rooms after maximum attempts")
nrOfDoorErrors += 1
break
@@ -562,7 +557,6 @@ func set_door(door: Dictionary, grid: Array) -> void:
match door.dir:
"N", "S":
if door.h > 4:
print("ns - larger door", door.h)
# Set 2x4 corridor
for dx in range(2):
for dy in range(door.h):
@@ -570,7 +564,6 @@ func set_door(door: Dictionary, grid: Array) -> void:
grid[door.x + dx][door.y + dy] = 2
"E", "W":
if door.w > 4:
print("ew - larger door", door.w)
# Set 4x2 corridor
for dx in range(door.w):
for dy in range(2):