# Center
execute unless entity @e[tag=center,distance=..0.1] run summon marker ~ ~ ~ {Tags:["center","unspellable"]}
scoreboard players set @e[distance=..0.1,limit=1] room_state 1


# Doors
execute if entity @s[tag=N] run function rooms:1_layout/door_facing/north
execute if entity @s[tag=S] run function rooms:1_layout/door_facing/south
execute if entity @s[tag=E] run function rooms:1_layout/door_facing/east
execute if entity @s[tag=W] run function rooms:1_layout/door_facing/west

# N rooms
scoreboard players add n_rooms dungeon 1

tag @s add next_done


# ------- Used when making the gates / walls ----
tag @s[tag=E] add W
tag @s[tag=W] add E
tag @s[tag=N] add S
tag @s[tag=S] add N
