switchblade can now be used to butcher and slice necks, icon updates when you toggle it on (#59990)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Fikou
2021-07-05 09:51:25 +02:00
committed by GitHub
parent 2b315303d9
commit 181d64d929
+8 -2
View File
@@ -360,6 +360,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/switchblade
name = "switchblade"
icon_state = "switchblade"
base_icon_state = "switchblade"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
desc = "A sharp, concealable, spring-loaded knife."
@@ -378,19 +379,25 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/switchblade/Initialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/butchering, 7 SECONDS, 100)
set_extended(extended)
/obj/item/switchblade/attack_self(mob/user)
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, TRUE)
set_extended(!extended)
/obj/item/switchblade/update_icon_state()
icon_state = "[base_icon_state][extended ? "_ext" : ""]"
return ..()
/obj/item/switchblade/proc/set_extended(new_extended)
extended = new_extended
update_icon_state()
if(extended)
force = 20
w_class = WEIGHT_CLASS_NORMAL
throwforce = 23
icon_state = "switchblade_ext"
attack_verb_continuous = list("slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
attack_verb_simple = list("slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
@@ -399,7 +406,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 3
w_class = WEIGHT_CLASS_SMALL
throwforce = 5
icon_state = "switchblade"
attack_verb_continuous = list("stubs", "pokes")
attack_verb_simple = list("stub", "poke")
hitsound = 'sound/weapons/genhit.ogg'