mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 01:57:01 +00:00
Fixes #41217 cl MrDoomBringer fix: Events now announce follow-able atoms to ghosts much more reliably /cl Implements @ShizCalev's suggestion to just have the event ghost-announce normally, then call a separate ghost announcement for the "atom of interest" as it is created.
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
/datum/round_event_control/spider_infestation
|
|
name = "Spider Infestation"
|
|
typepath = /datum/round_event/spider_infestation
|
|
weight = 5
|
|
max_occurrences = 1
|
|
min_players = 15
|
|
|
|
/datum/round_event/spider_infestation
|
|
announceWhen = 400
|
|
|
|
var/spawncount = 1
|
|
|
|
|
|
/datum/round_event/spider_infestation/setup()
|
|
announceWhen = rand(announceWhen, announceWhen + 50)
|
|
spawncount = rand(5, 8)
|
|
|
|
/datum/round_event/spider_infestation/announce(fake)
|
|
priority_announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", 'sound/ai/aliens.ogg')
|
|
|
|
|
|
/datum/round_event/spider_infestation/start()
|
|
var/list/vents = list()
|
|
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
|
if(QDELETED(temp_vent))
|
|
continue
|
|
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
|
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
|
if(temp_vent_parent.other_atmosmch.len > 20)
|
|
vents += temp_vent
|
|
|
|
while((spawncount >= 1) && vents.len)
|
|
var/obj/vent = pick(vents)
|
|
var/spawn_type = /obj/structure/spider/spiderling
|
|
if(prob(66))
|
|
spawn_type = /obj/structure/spider/spiderling/nurse
|
|
announce_to_ghosts(spawn_atom_to_turf(spawn_type, vent, 1, FALSE))
|
|
vents -= vent
|
|
spawncount--
|