Skip to content

Commit

Permalink
bugfix: arrhythmic knife speed (#5695)
Browse files Browse the repository at this point in the history
* fix

* Update holy_weapons.dm

* Update holy_weapons.dm
  • Loading branch information
endipe authored Aug 13, 2024
1 parent 5662a00 commit 420e015
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/game/objects/items/weapons/holy_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -472,22 +472,29 @@
pickup_sound = 'sound/items/handling/knife_pickup.ogg'
drop_sound = 'sound/items/handling/knife_drop.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/mob/living/carbon/wielder

/obj/item/nullrod/tribal_knife/New()
..()
START_PROCESSING(SSobj, src)

/obj/item/nullrod/tribal_knife/Destroy()
STOP_PROCESSING(SSobj, src)
wielder = null
return ..()

/obj/item/nullrod/tribal_knife/process()
slowdown = rand(-2, 2)
if(iscarbon(loc))
var/mob/living/carbon/wielder = loc
wielder = loc
if(wielder.is_in_hands(src))
wielder.update_equipment_speed_mods()

/obj/item/nullrod/tribal_knife/dropped(mob/user, slot, silent = FALSE)
slowdown = 0
user.update_equipment_speed_mods()
. = ..()

/obj/item/nullrod/pitchfork
name = "unholy pitchfork"
icon_state = "pitchfork0"
Expand Down

0 comments on commit 420e015

Please sign in to comment.