mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Fixes doubled attack calls on simple animals
These weren't actually causing double damage, but were doubling sounds and attack logs Butchering was refactored into a separate proc for convenience
This commit is contained in:
@@ -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, "<span class='notice'>You begin to butcher [src]...</span>")
|
||||
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
|
||||
|
||||
@@ -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("<span class='warning'>[user] gently taps [src] with [O].</span>",\
|
||||
"<span class='warning'>This weapon is ineffective, it does no damage.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/movement_delay()
|
||||
|
||||
Reference in New Issue
Block a user