
# Safe Circle
execute if entity @e[type=marker,tag=world_center,distance=..250] run scoreboard players set room_location sector 1

# Separator
execute if entity @e[type=marker,tag=world_center,distance=251..300] run scoreboard players set room_location sector 3

# Rooms Group 2
execute if entity @e[type=marker,tag=world_center,distance=301..600] run scoreboard players set room_location sector 2

# Separator
execute if entity @e[type=marker,tag=world_center,distance=601..650] run scoreboard players set room_location sector 3

# Repeating Rooms Group 1
execute if entity @e[type=marker,tag=world_center,distance=651..1000] run scoreboard players set room_location sector 1

# Separator
execute if entity @e[type=marker,tag=world_center,distance=1001..1100] run scoreboard players set room_location sector 3

# All rooms
execute if entity @e[type=marker,tag=world_center,distance=1101..10000] run scoreboard players set max RNG_Constant 2
execute if entity @e[type=marker,tag=world_center,distance=1101..10000] run function backrooms:rng
execute if score RNG RNG_Variable matches 1 if entity @e[type=marker,tag=world_center,distance=1101..10000] run scoreboard players set room_location sector 1
execute if score RNG RNG_Variable matches 2 if entity @e[type=marker,tag=world_center,distance=1101..10000] run scoreboard players set room_location sector 2

# Void
execute if entity @e[type=marker,tag=world_center,distance=10001..] run scoreboard players set room_location sector 3

execute if score room_location sector matches 1 run function backrooms:sector_1
execute if score room_location sector matches 2 run function backrooms:sector_2
execute if score room_location sector matches 3 run function backrooms:sector_3
execute if score room_location sector matches 4 run function backrooms:sector_4
execute if score room_location sector matches 5 run function backrooms:sector_5
execute if score room_location sector matches 6 run function backrooms:sector_6