[MIRROR] Boxcutters and Switchblades are now both knives when they should be knives [MDB IGNORE] (#17497)

* Boxcutters and Switchblades are now both knives when they should be knives (#71245)

## About The Pull Request

The humble boxcutter always had knife tool behaviour turned to true
instead of only being a knife when the blade is out, and its
rulebreaking older brother the switch blade, despite having a
description that calls it a knife, never had any knife tool behaviour. I
have fixed both of these things.

## Why It's Good For The Game

This is more consistent behaviour.

## Changelog

🆑
fix: Boxcutter is only the knife tool when it is active
fix: Switchblade is now a knife tool when it is active
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Boxcutters and Switchblades are now both knives when they should be knives

Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-11-16 16:17:36 +01:00
committed by GitHub
parent fc8a9e362c
commit 8defd1a41c
2 changed files with 13 additions and 2 deletions
+2 -1
View File
@@ -25,7 +25,7 @@
speed = 7 SECONDS, \
effectiveness = 100, \
)
tool_behaviour = TOOL_KNIFE
AddComponent(/datum/component/transforming, \
start_transformed = start_extended, \
force_on = 10, \
@@ -45,5 +45,6 @@
on = active
playsound(src, on_sound, 50)
tool_behaviour = (active ? TOOL_KNIFE : NONE)
return COMPONENT_NO_DEFAULT_MESSAGE
+11 -1
View File
@@ -401,6 +401,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
speed = 7 SECONDS, \
effectiveness = 100, \
)
AddComponent(/datum/component/transforming, \
start_transformed = start_extended, \
force_on = 20, \
@@ -410,7 +411,16 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
hitsound_on = 'sound/weapons/bladeslice.ogg', \
w_class_on = WEIGHT_CLASS_NORMAL, \
attack_verb_continuous_on = list("slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts"), \
attack_verb_simple_on = list("slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut"))
attack_verb_simple_on = list("slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut"), \
)
RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, PROC_REF(on_transform))
/obj/item/switchblade/proc/on_transform(obj/item/source, mob/user, active)
SIGNAL_HANDLER
tool_behaviour = (active ? TOOL_KNIFE : NONE)
return COMPONENT_NO_DEFAULT_MESSAGE
/obj/item/switchblade/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))