diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index c808a7fda2..204538f2e5 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_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) #define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/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 db929be939..ac399db644 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -134,6 +134,7 @@ START_PROCESSING(SSobj, src) 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) /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))) @@ -143,6 +144,9 @@ if(!QDELETED(owner)) hearers += owner +/obj/item/dullahan_relay/proc/unlist_head(datum/source, noheal, list/excluded_limbs) + excluded_limbs += BODY_ZONE_HEAD // So we don't gib when regenerating limbs. + /obj/item/dullahan_relay/process() if(!istype(loc, /obj/item/bodypart/head) || QDELETED(owner)) . = PROCESS_KILL diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 9341fb6c25..a847116a65 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -335,9 +335,10 @@ //Regenerates all limbs. Returns amount of limbs regenerated /mob/living/proc/regenerate_limbs(noheal, excluded_limbs) - return 0 + SEND_SIGNAL(src, COMSIG_LIVING_REGENERATE_LIMBS, noheal, excluded_limbs) /mob/living/carbon/regenerate_limbs(noheal, list/excluded_limbs) + . = ..() var/list/limb_list = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG) if(excluded_limbs) limb_list -= excluded_limbs