Skip to content

Commit

Permalink
Fix the H.O.N.K. mech assembly process by redefining the bikehorn as …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
thebigpgm153 and MARTIN-Patrick-Edmont authored Sep 23, 2023
1 parent 1164ebf commit 654c933
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions code/game/mecha/mecha_construction_paths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
)

Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/clown_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 654c933

Please sign in to comment.