From 2543559ec7331ee547b5d26f233f5ebd377a0db9 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 10 Nov 2021 15:25:52 +0000 Subject: [PATCH] [MIRROR] Chimps no longer get grumpy when you hug them or throw things with no throw force at them. [MDB IGNORE] (#9361) * Chimps no longer get grumpy when you hug them or throw things with no throw force at them. (#62685) * Chimps no longer get pissed when you hug them. * Pun Pun no longer hates hat throwing. * Chimps no longer get grumpy when you hug them or throw things with no throw force at them. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/_onclick/other_mobs.dm | 2 +- code/datums/ai/monkey/monkey_controller.dm | 14 +++++++------- code/modules/mob/living/living_defense.dm | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 427f580ba1b..c5da0db75ed 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -137,7 +137,7 @@ ///Attacked by monkey /atom/proc/attack_paw(mob/user, list/modifiers) - if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_CANCEL_ATTACK_CHAIN) + if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user, modifiers) & COMPONENT_CANCEL_ATTACK_CHAIN) return TRUE return FALSE diff --git a/code/datums/ai/monkey/monkey_controller.dm b/code/datums/ai/monkey/monkey_controller.dm index 96ea93a2a4a..ff4fc5c219f 100644 --- a/code/datums/ai/monkey/monkey_controller.dm +++ b/code/datums/ai/monkey/monkey_controller.dm @@ -132,14 +132,14 @@ have ways of interacting with a specific mob and control it. if(I.force && I.damtype != STAMINA) retaliate(user) -/datum/ai_controller/monkey/proc/on_attack_hand(datum/source, mob/living/user) +/datum/ai_controller/monkey/proc/on_attack_hand(datum/source, mob/living/user, list/modifiers) SIGNAL_HANDLER - if(prob(MONKEY_RETALIATE_PROB)) + if((user.combat_mode || LAZYACCESS(modifiers, RIGHT_CLICK)) && prob(MONKEY_RETALIATE_PROB)) retaliate(user) -/datum/ai_controller/monkey/proc/on_attack_paw(datum/source, mob/living/user) +/datum/ai_controller/monkey/proc/on_attack_paw(datum/source, mob/living/user, list/modifiers) SIGNAL_HANDLER - if(prob(MONKEY_RETALIATE_PROB)) + if((user.combat_mode || LAZYACCESS(modifiers, RIGHT_CLICK)) && prob(MONKEY_RETALIATE_PROB)) retaliate(user) /datum/ai_controller/monkey/proc/on_attack_animal(datum/source, mob/living/user) @@ -147,9 +147,9 @@ have ways of interacting with a specific mob and control it. if(user.melee_damage_upper > 0 && prob(MONKEY_RETALIATE_PROB)) retaliate(user) -/datum/ai_controller/monkey/proc/on_attack_alien(datum/source, mob/living/user) +/datum/ai_controller/monkey/proc/on_attack_alien(datum/source, mob/living/user, list/modifiers) SIGNAL_HANDLER - if(prob(MONKEY_RETALIATE_PROB)) + if((user.combat_mode || LAZYACCESS(modifiers, RIGHT_CLICK)) && prob(MONKEY_RETALIATE_PROB)) retaliate(user) /datum/ai_controller/monkey/proc/on_bullet_act(datum/source, obj/projectile/Proj) @@ -166,7 +166,7 @@ have ways of interacting with a specific mob and control it. var/mob/living/living_pawn = pawn var/obj/item/I = AM var/mob/thrown_by = I.thrownby?.resolve() - if(I.throwforce < living_pawn.health && ishuman(thrown_by)) + if(I.throwforce && I.throwforce < living_pawn.health && ishuman(thrown_by)) var/mob/living/carbon/human/H = thrown_by retaliate(H) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 9097979d1ee..4a68b293fd5 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -346,7 +346,7 @@ return FALSE /mob/living/attack_alien(mob/living/carbon/alien/humanoid/user, list/modifiers) - SEND_SIGNAL(src, COMSIG_MOB_ATTACK_ALIEN, user) + SEND_SIGNAL(src, COMSIG_MOB_ATTACK_ALIEN, user, modifiers) if(LAZYACCESS(modifiers, RIGHT_CLICK)) user.do_attack_animation(src, ATTACK_EFFECT_DISARM) return TRUE