mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Proc to easy spawn in hallucinations (#27582)
* Proc to easy spawn in hallucinations * Comment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user