# If no beacon exists, auto-claim the next placed unnamed armor stand
execute unless entity @e[type=armor_stand,nbt={CustomName:'{"text":"ScavengerBase"}'}] run function scavenger:auto_claim_beacon

# Normal cycle + watchdog (only when a beacon exists)
execute if entity @e[type=armor_stand,nbt={CustomName:'{"text":"ScavengerBase"}'}] run function scavenger:cycle_tick
execute if entity @e[type=armor_stand,nbt={CustomName:'{"text":"ScavengerBase"}'}] run function scavenger:beacon_watchdog


