Make mass hallucination more admemeable (#11491)

* Make mass hallucination more admemeable

* makes it work

* Update code/modules/events/mass_hallucination.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
Putnam3145
2020-03-20 08:08:11 -07:00
committed by GitHub
parent fc6f43b680
commit 6fffb4045b

View File

@@ -4,11 +4,26 @@
weight = 10
max_occurrences = 2
min_players = 1
var/forced_hallucination
/datum/round_event_control/mass_hallucination/admin_setup()
if(!check_rights(R_FUN))
return
forced_hallucination = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in subtypesof(/datum/hallucination)
/datum/round_event/mass_hallucination
fakeable = FALSE
/datum/round_event/mass_hallucination/start()
var/datum/round_event_control/mass_hallucination/M = control
if(M.forced_hallucination)
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
if (HAS_TRAIT(C,TRAIT_EXEMPT_HEALTH_EVENTS))
continue
new M.forced_hallucination(C, TRUE)
return
switch(rand(1,4))
if(1) //same sound for everyone
var/sound = pick("airlock","airlock_pry","console","explosion","far_explosion","mech","glass","alarm","beepsky","mech","wall_decon","door_hack","tesla")
@@ -37,4 +52,4 @@
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
if (HAS_TRAIT(C,TRAIT_EXEMPT_HEALTH_EVENTS))
continue
new picked_hallucination(C, TRUE)
new picked_hallucination(C, TRUE)