diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index e2d93aebf5..ac8681ead7 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -406,6 +406,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define DUMMY_HUMAN_SLOT_HOLOFORM "dummy_holoform_generation" #define DUMMY_HUMAN_SLOT_ADMIN "admintools" #define DUMMY_HUMAN_SLOT_MANIFEST "dummy_manifest_generation" +#define DUMMY_HUMAN_SLOT_HALLUCINATION "dummy_hallucination" #define PR_ANNOUNCEMENTS_PER_ROUND 5 //The number of unique PR announcements allowed per round //This makes sure that a single person can only spam 3 reopens and 3 closes before being ignored diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 0f4c03cdbc..b0c3121c67 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -18,6 +18,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( /datum/hallucination/items = 4, /datum/hallucination/fire = 3, /datum/hallucination/self_delusion = 2, + /datum/hallucination/naked = 2, /datum/hallucination/delusion = 2, /datum/hallucination/shock = 1, /datum/hallucination/death = 1, @@ -1321,3 +1322,26 @@ GLOBAL_LIST_INIT(hallucination_list, list( else to_chat(C,"[G] violently grabs you!") qdel(src) + +/datum/hallucination/naked + var/image/image + +/datum/hallucination/naked/New(mob/living/carbon/C, forced = TRUE) + set waitfor = FALSE + ..() + if (C.client && C.client.prefs) + var/datum/preferences/prefs = C.client.prefs + var/mob/living/carbon/human/dummy/M = generate_or_wait_for_human_dummy(DUMMY_HUMAN_SLOT_HALLUCINATION) + prefs.copy_to(M) + COMPILE_OVERLAYS(M) + CHECK_TICK + image = image(M,C) + unset_busy_human_dummy(DUMMY_HUMAN_SLOT_HALLUCINATION) + image.override = TRUE + target.client.images |= image + QDEL_IN(src, 20 SECONDS) + +/datum/hallucination/naked/Destroy() + if(target.client) + target.client.images.Remove(image) + return ..() \ No newline at end of file