mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
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:
@@ -22,7 +22,10 @@
|
||||
|
||||
/datum/event/alien_infestation/proc/spawn_xenos()
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, TRUE, source = /mob/living/carbon/alien/larva)
|
||||
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 xenomorphs. 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/C = pick_n_take(candidates)
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
if(!length(candidates))
|
||||
return kill()
|
||||
|
||||
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))
|
||||
return
|
||||
message_admins("Warning: No suitable vents detected for spawning blob mouse. Force picking from station vents regardless of state!")
|
||||
vents = get_valid_vent_spawns(unwelded_only = FALSE, min_network_size = 0)
|
||||
var/obj/vent = pick(vents)
|
||||
var/mob/living/simple_animal/mouse/blobinfected/B = new(vent.loc)
|
||||
var/mob/M = pick(candidates)
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
log_and_message_admins("Warning: Could not spawn any mobs for event Spider Infestation")
|
||||
|
||||
/datum/event/spider_infestation/start()
|
||||
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)
|
||||
while(spawncount && length(vents))
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
var/obj/structure/spider/spiderling/S = new(vent.loc)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user