mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
/var/global/sent_spiders_to_station = 0
|
|
|
|
/datum/event/spider_infestation
|
|
announceWhen = 400
|
|
oneShot = 1
|
|
|
|
var/spawncount = 1
|
|
|
|
|
|
/datum/event/spider_infestation/setup()
|
|
announceWhen = rand(announceWhen, announceWhen + 50)
|
|
spawncount = rand(8, 12) //spiderlings only have a 50% chance to grow big and strong
|
|
sent_spiders_to_station = 0
|
|
|
|
/datum/event/spider_infestation/announce()
|
|
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
|
world << sound('sound/AI/aliens.ogg')
|
|
|
|
|
|
/datum/event/spider_infestation/start()
|
|
var/list/vents = list()
|
|
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
|
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
|
if(temp_vent.network.normal_members.len > 50)
|
|
vents += temp_vent
|
|
|
|
while((spawncount >= 1) && vents.len)
|
|
var/obj/vent = pick(vents)
|
|
new /obj/effect/spider/spiderling(vent.loc)
|
|
vents -= vent
|
|
spawncount-- |