From 346aae2e9faf2cc4a38e1379d46b7dcda447e29f Mon Sep 17 00:00:00 2001 From: MPatrick Date: Thu, 21 Sep 2023 14:42:05 +0200 Subject: [PATCH 1/3] defining the bikehorn as a tool, and refactoring the honker construction process to use the tool define instead of the absolute link --- 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..a7b8a37a3f746 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" //currently only used for the H.O.N.K. mech construction, I should probably make the honkbot manual construction dependant on this too. // 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..36712cc25bf9f 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 + tool_speed = 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' From 5ac4b4d5fb93de60e68bc1bb4c101e5bc2ae095a Mon Sep 17 00:00:00 2001 From: thebigpgm153 Date: Fri, 22 Sep 2023 12:54:07 +0200 Subject: [PATCH 2/3] wrong name for toolspeed --- code/game/objects/items/clown_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 36712cc25bf9f..ce20d2bc87112 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -153,7 +153,7 @@ throw_range = 7 attack_verb = list("HONKED") tool_behaviour = TOOL_BIKEHORN - tool_speed = 1 + 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' From a3dac8f02e5aa8c10562c3881469c4fac9202269 Mon Sep 17 00:00:00 2001 From: thebigpgm153 Date: Fri, 22 Sep 2023 16:01:21 +0200 Subject: [PATCH 3/3] removed a comment that makes no sense --- code/__DEFINES/tools.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__DEFINES/tools.dm b/code/__DEFINES/tools.dm index a7b8a37a3f746..28b769fb88511 100644 --- a/code/__DEFINES/tools.dm +++ b/code/__DEFINES/tools.dm @@ -17,7 +17,7 @@ #define TOOL_KNIFE "knife" #define TOOL_BLOODFILTER "bloodfilter" #define TOOL_RUSTSCRAPER "rustscraper" -#define TOOL_BIKEHORN "bike horn" //currently only used for the H.O.N.K. mech construction, I should probably make the honkbot manual construction dependant on this too. +#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