diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm index 924488af73e..cc9e4d2e966 100644 --- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm @@ -12,6 +12,8 @@ #define COMSIG_ORGAN_BEING_REPLACED "organ_being_replaced" /// Called when an organ gets surgically removed (mob/living/user, mob/living/carbon/old_owner, target_zone, obj/item/tool) #define COMSIG_ORGAN_SURGICALLY_REMOVED "organ_surgically_removed" +/// Called when an organ gets surgically removed (mob/living/user, mob/living/carbon/new_owner, target_zone, obj/item/tool) +#define COMSIG_ORGAN_SURGICALLY_INSERTED "organ_surgically_inserted" ///Called when movement intent is toggled. #define COMSIG_MOVE_INTENT_TOGGLED "move_intent_toggled" diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm index aaa0bc765e1..2b2b1566de1 100644 --- a/code/modules/surgery/organ_manipulation.dm +++ b/code/modules/surgery/organ_manipulation.dm @@ -252,6 +252,7 @@ span_notice("[user] inserts something into [target]'s [parse_zone(target_zone)]!"), ) display_pain(target, "Your [parse_zone(target_zone)] throbs with pain as your new [tool.name] comes to life!") + target_organ.on_surgical_insertion(user, target, target_zone, tool) else target_organ.forceMove(target.loc) diff --git a/code/modules/surgery/organs/organ_movement.dm b/code/modules/surgery/organs/organ_movement.dm index 7c6907da863..c39541fb8ef 100644 --- a/code/modules/surgery/organs/organ_movement.dm +++ b/code/modules/surgery/organs/organ_movement.dm @@ -224,9 +224,14 @@ /** * Proc that gets called when the organ is surgically removed by someone, can be used for special effects - * Currently only used so surplus organs can explode when surgically removed. */ /obj/item/organ/proc/on_surgical_removal(mob/living/user, mob/living/carbon/old_owner, target_zone, obj/item/tool) SHOULD_CALL_PARENT(TRUE) SEND_SIGNAL(src, COMSIG_ORGAN_SURGICALLY_REMOVED, user, old_owner, target_zone, tool) RemoveElement(/datum/element/decal/blood) +/** + * Proc that gets called when the organ is surgically inserted by someone. Seem familiar? + */ +/obj/item/organ/proc/on_surgical_insertion(mob/living/user, mob/living/carbon/new_owner, target_zone, obj/item/tool) + SHOULD_CALL_PARENT(TRUE) + SEND_SIGNAL(src, COMSIG_ORGAN_SURGICALLY_INSERTED, user, new_owner, target_zone, tool)