diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 46339343dd2..91541afc491 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -781,17 +781,15 @@ if(!check_rights(R_SERVER | R_EVENT)) return - var/mob/living/carbon/C = locateUID(href_list["hallucinate"]) + var/mob/living/carbon/human/C = locateUID(href_list["hallucinate"]) if(!istype(C)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return - var/haltype = input(usr, "Select the hallucination type:", "Hallucinate") as null|anything in subtypesof(/obj/effect/hallucination) + var/haltype = input(usr, "Select the hallucination type:", "Hallucinate") as null|anything in (subtypesof(/obj/effect/hallucination) + subtypesof(/datum/hallucination_manager)) if(!haltype) return - C.Hallucinate(20 SECONDS) - var/datum/status_effect/transient/hallucination/H = C.has_status_effect(STATUS_EFFECT_HALLUCINATION) - H.hallucinate(haltype) + C.invoke_hallucination(haltype) message_admins("[key_name(usr)] has given [key_name(C)] the [haltype] hallucination") log_admin("[key_name_admin(usr)] has given [key_name_admin(C)] the [haltype] hallucination") href_list["datumrefresh"] = href_list["hallucinate"]