From 7f09cedf89eee05faa4452e1b69fcbf2878f7014 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:05:29 +0100 Subject: [PATCH] [MIRROR] basic mob attack now has should_call_parent [MDB IGNORE] (#17715) * basic mob attack now has should_call_parent (#71461) Adds SHOULD_CALL_PARENT onto basic mob's attack chain, because of a previous issue that living and obj didn't call parent. This PR originally fixed it, but another PR did the exact same fix, so this is just adding the forced parent call. * basic mob attack now has should_call_parent * obj_defense skew Co-authored-by: san7890 Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> Co-authored-by: tastyfish --- code/_onclick/other_mobs.dm | 1 + code/game/objects/obj_defense.dm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index f7f00de4579..06c2d9dd467 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -159,6 +159,7 @@ ///Apparently this is only used by AI datums for basic mobs. A player controlling a basic mob will call attack_animal() when clicking another atom. /atom/proc/attack_basic_mob(mob/user, list/modifiers) + SHOULD_CALL_PARENT(TRUE) SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_BASIC_MOB, user) ///Attacked by monkey. It doesn't need its own *_secondary proc as it just uses attack_hand_secondary instead. diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 2960174baf6..bacd813ba68 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -54,6 +54,7 @@ playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE) /obj/attack_basic_mob(mob/living/basic/user, list/modifiers) + . = ..() if(!user.melee_damage_upper && !user.obj_damage) //No damage user.emote("custom", message = "[user.friendly_verb_continuous] [src].") return FALSE @@ -66,6 +67,7 @@ playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE) /obj/attack_animal(mob/living/simple_animal/user, list/modifiers) + . = ..() if(!user.melee_damage_upper && !user.obj_damage) user.emote("custom", message = "[user.friendly_verb_continuous] [src].") return FALSE