From 6fffb4045be191f43cffdcb78c07d353fe6368f4 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Fri, 20 Mar 2020 08:08:11 -0700 Subject: [PATCH] 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> --- code/modules/events/mass_hallucination.dm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index 1186268e31..dc0b07b464 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -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) \ No newline at end of file + new picked_hallucination(C, TRUE)