adds grubevent

This commit is contained in:
Ketrai
2017-09-10 19:55:32 +02:00
committed by GitHub
parent b25b7127de
commit 4f2c98df32
+26
View File
@@ -0,0 +1,26 @@
/datum/event/grub_infestation
announceWhen = 90
var/spawncount = 1
/datum/event/grub_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 60)
spawncount = rand(4 * severity, 6 * severity) //grub larva only have a 50% chance to grow big and strong
sent_spiders_to_station = 0
/datum/event/grub_infestation/announce()
command_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')
/datum/event/grub_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in using_map.station_levels)
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/grub(vent.loc)
vents -= vent
spawncount--