Prevent bloodstones from spawning on top of each other (#12478)

* Prevent bloodstones from spawning on top of each other

* Use pick_n_take

* normal if structure

Co-authored-by: Theos <theubernyan@gmail.com>
This commit is contained in:
adamsong
2021-10-22 16:14:49 -05:00
committed by GitHub
parent 97d8998e30
commit d1a1339c1c

View File

@@ -178,9 +178,13 @@
altogether."
/datum/game_mode/proc/begin_bloodstone_phase()
var/list/stone_spawns = GLOB.generic_event_spawns.Copy()
var/list/bloodstone_areas = list()
for(var/i = 0, i < 4, i++) //four bloodstones
var/spawnpoint = get_turf(pick(GLOB.generic_event_spawns))
var/stone_spawn = pick_n_take(stone_spawns)
if(!stone_spawn)
stone_spawn = pick(GLOB.generic_event_spawns) // Fallback on all spawns
var/spawnpoint = get_turf(stone_spawn)
var/stone = new /obj/structure/destructible/cult/bloodstone(spawnpoint)
notify_ghosts("Bloodcult has an object of interest: [stone]!", source=stone, action=NOTIFY_ORBIT, header="Praise the Geometer!")
var/area/A = get_area(stone)