From cad0ba11d29c9ac4aabf1ea4ae0729e5465ea79a Mon Sep 17 00:00:00 2001 From: XDTM Date: Sun, 25 Mar 2018 17:20:49 +0200 Subject: [PATCH 1/2] 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 69ccee5cb3a..0e38ca803b9 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].") @@ -13,6 +12,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) @@ -20,16 +22,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(M.has_trait(TRAIT_PACIFISM)) + to_chat(M, "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. From 17d62d54eba1bfba7f7f73d0aef305805bc91719 Mon Sep 17 00:00:00 2001 From: XDTM Date: Sun, 25 Mar 2018 17:43:03 +0200 Subject: [PATCH 2/2] . --- code/modules/mob/living/simple_animal/animal_defense.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 0e38ca803b9..380510fae7f 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -26,8 +26,8 @@ /mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == INTENT_HARM) - if(M.has_trait(TRAIT_PACIFISM)) - to_chat(M, "You don't want to hurt [src]!") + 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)