From 654c93389df9b9c1634a0f4207bc915aef2f3fb2 Mon Sep 17 00:00:00 2001 From: thebigpgm153 <85015113+thebigpgm153@users.noreply.github.com> Date: Sat, 23 Sep 2023 12:40:36 +0000 Subject: [PATCH] Fix the H.O.N.K. mech assembly process by redefining the bikehorn as a tool (#9877) * defining the bikehorn as a tool, and refactoring the honker construction process to use the tool define instead of the absolute link * wrong name for toolspeed * removed a comment that makes no sense --------- Co-authored-by: MPatrick --- code/__DEFINES/tools.dm | 1 + code/game/mecha/mecha_construction_paths.dm | 18 +++++++++--------- code/game/objects/items/clown_items.dm | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/tools.dm b/code/__DEFINES/tools.dm index a76c05542a47e..28b769fb88511 100644 --- a/code/__DEFINES/tools.dm +++ b/code/__DEFINES/tools.dm @@ -17,6 +17,7 @@ #define TOOL_KNIFE "knife" #define TOOL_BLOODFILTER "bloodfilter" #define TOOL_RUSTSCRAPER "rustscraper" +#define TOOL_BIKEHORN "bike horn" // If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY, // tool sound is only played when op is started. If not, it's played twice. #define MIN_TOOL_SOUND_DELAY 20 diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index be17cb590d04a..bf67acd2a3917 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -709,63 +709,63 @@ result = /obj/mecha/combat/honker steps = list( list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/circuitboard/mecha/honker/main, "action" = ITEM_DELETE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/circuitboard/mecha/honker/peripherals, "action" = ITEM_DELETE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/circuitboard/mecha/honker/targeting, "action" = ITEM_DELETE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/stock_parts/scanning_module, "action" = ITEM_MOVE_INSIDE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/stock_parts/capacitor, "action" = ITEM_MOVE_INSIDE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/stock_parts/cell, "action" = ITEM_MOVE_INSIDE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/clothing/mask/gas/clown_hat, "action" = ITEM_DELETE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), list( "key" = /obj/item/clothing/shoes/clown_shoes, "action" = ITEM_DELETE ), list( - "key" = /obj/item/bikehorn + "key" = TOOL_BIKEHORN ), ) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 011cdec1c3020..ce20d2bc87112 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -152,6 +152,8 @@ throw_speed = 3 throw_range = 7 attack_verb = list("HONKED") + tool_behaviour = TOOL_BIKEHORN + toolspeed = 1 ///sound file given to the squeaky component we make in Initialize() so sub-types can specify their own sound var/sound_file = 'sound/items/bikehorn.ogg'