mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Add near/vis checks, log on event spawn failure
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
/datum/event/alien_infestation/announce()
|
||||
if(successSpawn)
|
||||
GLOB.event_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
else
|
||||
var/text = "Warning: Could not spawn any mobs for event Alien Infestation"
|
||||
message_admins(text)
|
||||
log_adminwarn(text)
|
||||
|
||||
/datum/event/alien_infestation/start()
|
||||
var/list/vents = get_valid_vent_spawns()
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
/datum/event/blob/announce()
|
||||
if(successSpawn)
|
||||
GLOB.event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
|
||||
else
|
||||
var/text = "Warning: Could not spawn any mobs for event Blob"
|
||||
message_admins(text)
|
||||
log_adminwarn(text)
|
||||
|
||||
/datum/event/blob/start()
|
||||
processing = FALSE //so it won't fire again in next tick
|
||||
|
||||
@@ -13,6 +13,10 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
/datum/event/spider_infestation/announce()
|
||||
if(successSpawn)
|
||||
GLOB.event_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
else
|
||||
var/text = "Warning: Could not spawn any mobs for event Spider Infestation"
|
||||
message_admins(text)
|
||||
log_adminwarn(text)
|
||||
|
||||
/datum/event/spider_infestation/start()
|
||||
var/list/vents = get_valid_vent_spawns()
|
||||
|
||||
@@ -11,9 +11,13 @@
|
||||
/datum/event/spider_terror/announce()
|
||||
if(successSpawn)
|
||||
GLOB.command_announcement.Announce("Confirmed outbreak of level 3 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/effects/siren-spooky.ogg')
|
||||
else
|
||||
var/text = "Warning: Could not spawn any mobs for event Terror Spiders"
|
||||
message_admins(text)
|
||||
log_adminwarn(text)
|
||||
|
||||
/datum/event/spider_terror/start()
|
||||
var/list/vents = get_valid_vent_spawns()
|
||||
var/list/vents = get_valid_vent_spawns(exclude_visible_by_mobs = TRUE)
|
||||
var/spider_type
|
||||
var/infestation_type = pick(1, 2, 3, 4, 5)
|
||||
switch(infestation_type)
|
||||
@@ -33,18 +37,8 @@
|
||||
spider_type = /mob/living/simple_animal/hostile/poison/terror_spider/princess
|
||||
spawncount = 2
|
||||
while(spawncount && length(vents))
|
||||
var/obj/vent = pick(vents)
|
||||
// If the vent we picked has any living mob nearby, just remove it from the list, loop again, and pick something else.
|
||||
var/turf/T = get_turf(vent)
|
||||
var/hostiles_present = FALSE
|
||||
for(var/mob/living/L in viewers(T))
|
||||
if(L.stat != DEAD)
|
||||
hostiles_present = TRUE
|
||||
break
|
||||
|
||||
vents -= vent
|
||||
if(!hostiles_present)
|
||||
new spider_type(vent.loc)
|
||||
spawncount--
|
||||
successSpawn = TRUE
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
new spider_type(vent.loc)
|
||||
spawncount--
|
||||
successSpawn = TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user