mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Scrubber clog event now has a chance to spawn cockroaches.
This commit is contained in:
@@ -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,14 @@
|
||||
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(20) ? 2 : 0
|
||||
cockroaches += prob(10) ? 1 : 0
|
||||
cockroaches += prob(10) ? 1 : 0
|
||||
if(!cockroaches)
|
||||
if(prob(1) && prob(1))
|
||||
cockroaches = 10
|
||||
while(cockroaches)
|
||||
new /mob/living/simple_animal/cockroach(get_turf(vent))
|
||||
cockroaches--
|
||||
|
||||
Reference in New Issue
Block a user