diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 844f70d43bb..4baf6ef5958 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -421,6 +421,9 @@ #define COMSIG_LIVING_CAN_TRACK "mob_cantrack" #define COMPONENT_CANT_TRACK (1<<0) +///When a carbon mob hugs someone, this is called on the carbon mob. +#define COMSIG_CARBON_HUG "carbon_hug" + // /mob/living/carbon physiology signals #define COMSIG_CARBON_GAIN_WOUND "carbon_gain_wound" //from /datum/wound/proc/apply_wound() (/mob/living/carbon/C, /datum/wound/W, /obj/item/bodypart/L) #define COMSIG_CARBON_LOSE_WOUND "carbon_lose_wound" //from /datum/wound/proc/remove_wound() (/mob/living/carbon/C, /datum/wound/W, /obj/item/bodypart/L) diff --git a/code/datums/brain_damage/brain_trauma.dm b/code/datums/brain_damage/brain_trauma.dm index 8571e65d8dd..c2964549b72 100644 --- a/code/datums/brain_damage/brain_trauma.dm +++ b/code/datums/brain_damage/brain_trauma.dm @@ -56,8 +56,3 @@ SIGNAL_HANDLER UnregisterSignal(owner, COMSIG_MOB_SAY) - - -//Called when hugging. expand into generally interacting, where future coders could switch the intent? -/datum/brain_trauma/proc/on_hug(mob/living/hugger, mob/living/hugged) - return diff --git a/code/datums/brain_damage/creepy_trauma.dm b/code/datums/brain_damage/creepy_trauma.dm index 61e897e9256..aa810aed122 100644 --- a/code/datums/brain_damage/creepy_trauma.dm +++ b/code/datums/brain_damage/creepy_trauma.dm @@ -34,6 +34,7 @@ //antag stuff// antagonist.forge_objectives(obsession.mind) antagonist.greet() + RegisterSignal(owner, COMSIG_CARBON_HUG, .proc/on_hug) /datum/brain_trauma/special/obsessed/on_life() if(!obsession || obsession.stat == DEAD) @@ -76,7 +77,7 @@ if(mood && mood.sanity >= SANITY_GREAT && social_interaction()) speech_args[SPEECH_MESSAGE] = "" -/datum/brain_trauma/special/obsessed/on_hug(mob/living/hugger, mob/living/hugged) +/datum/brain_trauma/special/obsessed/proc/on_hug(mob/living/hugger, mob/living/hugged) if(hugged == obsession) obsession_hug_count++ diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 69fb4d7b8a1..8e842d3c669 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -446,6 +446,7 @@ //SKYRAT EDIT ADDITION END else + SEND_SIGNAL(M, COMSIG_CARBON_HUG, M, src) M.visible_message("[M] hugs [src] to make [p_them()] feel better!", \ null, "You hear the rustling of clothes.", DEFAULT_MESSAGE_RANGE, list(M, src)) to_chat(M, "You hug [src] to make [p_them()] feel better!") @@ -476,8 +477,6 @@ SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) else if (mood.sanity >= SANITY_DISTURBED) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M) - for(var/datum/brain_trauma/trauma in M.get_traumas()) - trauma.on_hug(M, src) AdjustStun(-60) AdjustKnockdown(-60) AdjustUnconscious(-60)