From 08569ff906ffb82a5cfb36593eb6cf9b641a3c75 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 26 Mar 2018 15:18:57 -0400 Subject: [PATCH] Merge pull request #36712 from XDTM/NoPunchingIan Fixes pacifists being able to attack animals --- .../mob/living/simple_animal/animal_defense.dm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 5302c7f569..08f82c8053 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -3,7 +3,6 @@ /mob/living/simple_animal/attack_hand(mob/living/carbon/human/M) ..() switch(M.a_intent) - if("help") if (health > 0) visible_message("[M] [response_help] [src].") @@ -16,6 +15,9 @@ grabbedby(M) if("harm", "disarm") + if(M.has_trait(TRAIT_PACIFISM)) + to_chat(M, "You don't want to hurt [src]!") + return M.do_attack_animation(src, ATTACK_EFFECT_PUNCH) visible_message("[M] [response_harm] [src]!",\ "[M] [response_harm] [src]!", null, COMBAT_MESSAGE_RANGE) @@ -23,16 +25,19 @@ attack_threshold_check(harm_intent_damage) add_logs(M, src, "attacked") updatehealth() - return 1 + return TRUE /mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == INTENT_HARM) + if(user.has_trait(TRAIT_PACIFISM)) + to_chat(user, "You don't want to hurt [src]!") + return FALSE ..(user, 1) playsound(loc, "punch", 25, 1, -1) visible_message("[user] has punched [src]!", \ "[user] has punched [src]!", null, COMBAT_MESSAGE_RANGE) adjustBruteLoss(15) - return 1 + return TRUE /mob/living/simple_animal/attack_paw(mob/living/carbon/monkey/M) if(..()) //successful monkey bite.