Merge pull request #15817 from xxalpha/cocks

Scrubber clog event now has a chance to spawn cockroaches.
This commit is contained in:
KorPhaeron
2016-03-13 00:25:59 -06:00
+12 -4
View File
@@ -9,6 +9,8 @@
endWhen = 35
var/interval = 2
var/list/vents = list()
var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","mushroomhallucinogen","lube",
"plantbgone","banana","charcoal","space_drugs","morphine","holywater","ethanol","hot_coco","facid")
/datum/round_event/vent_clog/announce()
priority_announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
@@ -26,10 +28,11 @@
/datum/round_event/vent_clog/tick()
if(activeFor % interval == 0)
var/obj/vent = pick_n_take(vents)
var/obj/machinery/atmospherics/components/unary/vent = pick_n_take(vents)
while(vent && vent.welded)
vent = pick_n_take(vents)
if(vent && vent.loc)
var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","mushroomhallucinogen","lube",
"plantbgone","banana","charcoal","space_drugs","morphine","holywater","ethanol","hot_coco","facid")
var/datum/reagents/R = new/datum/reagents(50)
R.my_atom = vent
R.add_reagent(pick(gunk), 50)
@@ -38,4 +41,9 @@
smoke.set_up(R, 1, vent, silent = 1)
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)
qdel(R)
var/cockroaches = prob(33) ? 3 : 0
while(cockroaches)
new /mob/living/simple_animal/cockroach(get_turf(vent))
cockroaches--