Fixes spawning logic of vent-spawned antags (#17844)

* fixes vent spawning antags breaking

* adds exception to xenobio vents

* simplifies the proc

* tidies the logic
This commit is contained in:
S34N
2022-05-24 12:46:24 +01:00
committed by GitHub
parent 787080565a
commit 3d24eeedd8
7 changed files with 28 additions and 35 deletions
+4 -1
View File
@@ -50,7 +50,10 @@
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a terror spider?", null, TRUE, source = spider_type)
if(length(candidates) < spawncount)
message_admins("Warning: not enough players volunteered to be terrors. Could only spawn [length(candidates)] out of [spawncount]!")
var/list/vents = get_valid_vent_spawns(exclude_mobs_nearby = TRUE, exclude_visible_by_mobs = TRUE)
var/list/vents = get_valid_vent_spawns(exclude_mobs_nearby = TRUE)
if(!length(vents))
message_admins("Warning: No suitable vents detected for spawning terrors. Force picking from station vents regardless of state!")
vents = get_valid_vent_spawns(unwelded_only = FALSE, min_network_size = 0)
while(spawncount && length(vents) && length(candidates))
var/obj/vent = pick_n_take(vents)
var/mob/living/simple_animal/hostile/poison/terror_spider/S = new spider_type(vent.loc)