diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 3ccc03acaff..6c363e6770a 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -15,13 +15,8 @@ /mob/living/attackby(obj/item/I, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) - if(stat == DEAD && !isnull(butcher_results)) //can we butcher it? - if(istype(I, /obj/item/weapon/kitchen/knife)) - to_chat(user, "You begin to butcher [src]...") - playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1) - if(do_mob(user, src, 80)) - harvest(user) - return + if(attempt_harvest(I, user)) + return I.attack(src, user) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 44d51324576..93c5dbf871f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -837,6 +837,15 @@ /mob/living/proc/get_permeability_protection() return 0 +/mob/living/proc/attempt_harvest(obj/item/I, mob/user) + if(stat == DEAD && !isnull(butcher_results)) //can we butcher it? + if(istype(I, /obj/item/weapon/kitchen/knife)) + to_chat(user, "You begin to butcher [src]...") + playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1) + if(do_mob(user, src, 80)) + harvest(user) + return 1 + /mob/living/proc/harvest(mob/living/user) if(qdeleted(src)) return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 362846dfd4a..186cafd63b8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -434,6 +434,8 @@ return else user.changeNext_move(CLICK_CD_MELEE) + if(attempt_harvest(O, user)) + return user.do_attack_animation(src) if(istype(O) && istype(user) && !O.attack(src, user)) var/damage = 0 @@ -451,7 +453,6 @@ user.visible_message("[user] gently taps [src] with [O].",\ "This weapon is ineffective, it does no damage.") adjustBruteLoss(damage) - ..() /mob/living/simple_animal/movement_delay()