diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 204538f2e5..2638ec176f 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -151,6 +151,7 @@ #define SPEECH_FORCED 7 */ // /mob/living signals +#define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive) #define COMSIG_LIVING_REGENERATE_LIMBS "living_regenerate_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs) #define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living) #define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living) diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 5be3dcc9b6..96d52dcb27 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -135,6 +135,7 @@ RegisterSignal(owner, COMSIG_MOB_EXAMINATE, .proc/examinate_check) RegisterSignal(src, COMSIG_ATOM_HEARER_IN_VIEW, .proc/include_owner) RegisterSignal(owner, COMSIG_LIVING_REGENERATE_LIMBS, .proc/unlist_head) + RegisterSignal(owner, COMSIG_LIVING_FULLY_HEAL, .proc/retrieve_head) /obj/item/dullahan_relay/proc/examinate_check(mob/source, atom/A) if(source.client.eye == src && ((A in view(source.client.view, src)) || (isturf(A) && source.sight & SEE_TURFS) || (ismob(A) && source.sight & SEE_MOBS) || (isobj(A) && source.sight & SEE_OBJS))) @@ -144,9 +145,16 @@ if(!QDELETED(owner)) hearers += owner -/obj/item/dullahan_relay/proc/unlist_head(datum/source, noheal, list/excluded_limbs) +/obj/item/dullahan_relay/proc/unlist_head(datum/source, noheal = FALSE, list/excluded_limbs) excluded_limbs |= BODY_ZONE_HEAD // So we don't gib when regenerating limbs. +/obj/item/dullahan_relay/proc/retrieve_head(datum/source, admin_revive = FALSE) + if(admin_revive) //retrieving the owner's head for ahealing purposes. + var/obj/item/bodypart/head/H = loc + var/turf/T = get_turf(owner) + if(H && istype(H) && T && !(H in owner.GetAllContents())) + H.forceMove(T) + /obj/item/dullahan_relay/process() if(!istype(loc, /obj/item/bodypart/head) || QDELETED(owner)) . = PROCESS_KILL diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e893426ee9..6c72abdfd5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -514,6 +514,7 @@ for(var/organ in C.internal_organs) var/obj/item/organ/O = organ O.setOrganDamage(0) + SEND_SIGNAL(src, COMSIG_LIVING_FULLY_HEAL, admin_revive) //proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)