Proc to easy spawn in hallucinations (#27582)

* Proc to easy spawn in hallucinations

* Comment
This commit is contained in:
DGamerL
2024-12-09 18:57:26 +01:00
committed by GitHub
parent 98aec4ed8c
commit e2b0bac2b6
@@ -2064,3 +2064,14 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
/mob/living/carbon/human/proc/check_brain_threshold(threshold_level)
var/obj/item/organ/internal/brain/brain_organ = get_int_organ(/obj/item/organ/internal/brain)
return brain_organ.damage >= (brain_organ.max_damage * threshold_level)
/*
* Invokes a hallucination on the mob. Hallucination must be a path or a string of a path
*/
/mob/living/carbon/human/proc/invoke_hallucination(hallucination_to_make)
var/string_path = text2path(hallucination_to_make)
if(!ispath(hallucination_to_make))
if(!string_path)
return
hallucination_to_make = string_path
new hallucination_to_make(get_turf(src), src)