diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index dbba7c94010..03cb46d9c44 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -471,6 +471,8 @@ #define COMSIG_CARBON_SWAP_HANDS "carbon_swap_hands" /// From /mob/living/carbon/toggle_throw_mode() #define COMSIG_CARBON_TOGGLE_THROW "carbon_toggle_throw" +/// From /mob/living/carbon/human/hitby() +#define COMSIG_CARBON_THROWN_ITEM_CAUGHT "carbon_thrown_item_caught" // /mob/living/simple_animal/hostile signals diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index 0bd5b90d455..a955b3dde94 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -32,10 +32,12 @@ if(HAS_TRAIT(H, TRAIT_PACIFISM)) to_chat(H, "You feel the knowledge of the scroll in your mind, yet reject its more violent teachings. \ You will instead deflect projectiles into the ground.") + H.RegisterSignal(H, COMSIG_CARBON_THROWN_ITEM_CAUGHT, TYPE_PROC_REF(/mob/living/carbon, throw_mode_on)) /datum/martial_art/the_sleeping_carp/remove(mob/living/carbon/human/H) . = ..() H.faction -= "carp"// :C + H.UnregisterSignal(H, COMSIG_CARBON_THROWN_ITEM_CAUGHT) /datum/martial_art/the_sleeping_carp/explaination_footer(user) to_chat(user, "In addition, by having your throw mode on when being shot at, you enter an active defensive mode where you will block and deflect all projectiles fired at you!") diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 468f7bd46ab..f2ebd0828ef 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -637,6 +637,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven throw_icon.icon_state = "act_throw_off" /mob/living/carbon/proc/throw_mode_on() + SIGNAL_HANDLER //This signal is here so we can turn throw mode back on via carp when an object is caught in_throw_mode = TRUE if(throw_icon) throw_icon.icon_state = "act_throw_on" diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index e2236a7cc0b..0b94acb2c1a 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -11,6 +11,7 @@ put_in_active_hand(AM) visible_message("[src] catches [AM]!") throw_mode_off() + SEND_SIGNAL(src, COMSIG_CARBON_THROWN_ITEM_CAUGHT, AM) return TRUE return ..()