The creepy clown epidemic has arrived at Space Station 13. (#21164)

* Implements a full spooky clown event for halloween.dm

* temp

* made requested fixes

* reeeee

* Clowns actually work now. Minor refactors to hallucination thanks oranges

* CLOWNS FINALLY WORK PROPERLY JESUS FUCK

* Fix incorrect prob method call
This commit is contained in:
bgobandit
2016-10-30 19:51:19 +13:00
committed by oranges
parent d3bbe1634e
commit e7d0db78f1
2 changed files with 59 additions and 2 deletions
+44
View File
@@ -54,6 +54,50 @@
if(IsMultiple(activeFor, 4))
spawn_meteors(3, meteorsSPOOKY) //meteor list types defined in gamemode/meteor/meteors.dm
//Creepy clown invasion
/datum/round_event_control/creepy_clowns
name = "Clowns"
typepath = /datum/round_event/creepy_clowns
holidayID = HALLOWEEN
weight = 20
earliest_start = 0
/datum/round_event/creepy_clowns
endWhen = 40
/datum/round_event/creepy_clowns/start()
for(var/mob/living/carbon/human/H in living_mob_list)
if(!H.client || !istype(H))
return
H << "<span class='danger'>Honk...</span>"
H << 'sound/spookoween/scary_clown_appear.ogg'
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 50)
/datum/round_event/creepy_clowns/tick()
if(IsMultiple(activeFor, 4))
for(var/mob/living/carbon/human/H in living_mob_list)
if (prob(66))
playsound(H.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 100, 1)
if (prob(33))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 25)
else if (prob(25))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown/scary(T, H, 25)
else if (prob(5))
var/turf/T = get_turf(H)
if(T)
spawn_atom_to_turf(/obj/effect/mob_spawn/human/corpse/clown, H, 1)
else if (prob(1))
spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown, H, 1)
/datum/round_event/creepy_clowns/announce()
priority_announce("Honk... Honk... honk... HONK! HONK! HONKHONKHONKHONKHONK", "HONK!", 'sound/spookoween/scary_horn.ogg')
//spooky foods (you can't actually make these when it's not halloween)
/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/spookyskull
name = "skull cookie"
+15 -2
View File
@@ -206,6 +206,18 @@ Gunshots/explosions/opening doors/less rare audio (done)
target << "<span class='notice'>[xeno_name] scrambles into the ventilation ducts!</span>"
qdel(src)
/obj/effect/hallucination/simple/clown
image_icon = 'icons/mob/animal.dmi'
image_state = "clown"
/obj/effect/hallucination/simple/clown/New(loc,var/mob/living/carbon/T,duration)
..(loc, T)
name = pick(clown_names)
QDEL_IN(src,duration)
/obj/effect/hallucination/simple/clown/scary
image_state = "scary_clown"
/obj/effect/hallucination/singularity_scare
//Singularity moving towards you.
//todo Hide where it moved with fake space images
@@ -303,11 +315,12 @@ Gunshots/explosions/opening doors/less rare audio (done)
if(target.client)
delusions |= A
target.client.images |= A
sleep(duration)
QDEL_IN(src, duration)
/obj/effect/hallucination/delusion/Destroy()
for(var/image/I in delusions)
if(target.client)
target.client.images.Remove(I)
qdel(src)
/obj/effect/hallucination/fakeattacker/New(loc,var/mob/living/carbon/T)
target = T