From a738a912899d9d933dd112e6e58fb61fcd06c83e Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 24 Jul 2026 15:43:15 -0400 Subject: [PATCH] Migrate circuitboards, vending items, bio chips to new attack chain. (#32240) * Migrate circuitboards, vending items, bio chips to new attack chain. * Give the GPS something it can understand. --- code/game/machinery/machine_frame.dm | 19 ++++---- code/game/objects/items/bio_chips/bio_chip.dm | 2 +- .../items/circuitboards/circuitboard.dm | 1 + .../items/circuitboards/circuitboards.dm | 43 ++++++++++--------- code/game/objects/items/vending_items.dm | 1 + code/modules/telesci/telesci_computer.dm | 2 +- 6 files changed, 37 insertions(+), 31 deletions(-) diff --git a/code/game/machinery/machine_frame.dm b/code/game/machinery/machine_frame.dm index c0e67060df3..dcdac37fa49 100644 --- a/code/game/machinery/machine_frame.dm +++ b/code/game/machinery/machine_frame.dm @@ -843,7 +843,9 @@ to destroy them and players will be able to make replacements. . += SPAN_NOTICE("Its suction function is [suction ? "enabled" : "disabled"]. Use it in-hand to switch.") . += SPAN_NOTICE("Its disposal auto-transmit function is [transmit ? "enabled" : "disabled"]. Alt-click it to switch.") -/obj/item/circuitboard/dish_drive/attack_self__legacy__attackchain(mob/living/user) +/obj/item/circuitboard/dish_drive/activate_self(mob/living/user) + if(..()) + return ITEM_INTERACT_COMPLETE suction = !suction to_chat(user, SPAN_NOTICE("You [suction ? "enable" : "disable"] the board's suction function.")) @@ -997,14 +999,13 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/matter_bin = 1) var/target -/obj/item/circuitboard/teleporter_perma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/gps)) - var/obj/item/gps/L = I - if(L.locked_location) - target = get_turf(L.locked_location) - to_chat(user, SPAN_CAUTION("You upload the data from [L]")) - return - return ..() +/obj/item/circuitboard/teleporter_perma/item_interaction(mob/living/user, obj/item/gps/used, list/modifiers) + if(!istype(used)) + return ..() + if(used.locked_location) + target = get_turf(used.locked_location) + to_chat(user, SPAN_CAUTION("You upload the data from [used].")) + return ITEM_INTERACT_COMPLETE /obj/item/circuitboard/telesci_pad board_name = "Telepad" diff --git a/code/game/objects/items/bio_chips/bio_chip.dm b/code/game/objects/items/bio_chips/bio_chip.dm index 217fe3e92c9..41db76352bf 100644 --- a/code/game/objects/items/bio_chips/bio_chip.dm +++ b/code/game/objects/items/bio_chips/bio_chip.dm @@ -35,6 +35,7 @@ ///the implant_fluff datum attached to this implant, purely cosmetic "lore" information var/datum/implant_fluff/implant_data = /datum/implant_fluff + new_attack_chain = TRUE /obj/item/bio_chip/Initialize(mapload) . = ..() @@ -156,7 +157,6 @@ else return 0 - loc = source imp_in = source implanted = TRUE diff --git a/code/game/objects/items/circuitboards/circuitboard.dm b/code/game/objects/items/circuitboards/circuitboard.dm index f5b6cb5c3ea..ad48eeb33aa 100644 --- a/code/game/objects/items/circuitboards/circuitboard.dm +++ b/code/game/objects/items/circuitboards/circuitboard.dm @@ -13,6 +13,7 @@ var/build_path = null var/board_type = "computer" var/list/req_components = null + new_attack_chain = TRUE /obj/item/circuitboard/computer diff --git a/code/game/objects/items/circuitboards/circuitboards.dm b/code/game/objects/items/circuitboards/circuitboards.dm index f5df19d0de1..f993c6b6056 100644 --- a/code/game/objects/items/circuitboards/circuitboards.dm +++ b/code/game/objects/items/circuitboards/circuitboards.dm @@ -485,24 +485,27 @@ contraband_enabled = !contraband_enabled playsound(src, 'sound/effects/pop.ogg', 50) -/obj/item/circuitboard/rdconsole/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) - if(allowed(user)) - user.visible_message(SPAN_NOTICE("[user] waves [user.p_their()] ID past [src]'s access protocol scanner."), SPAN_NOTICE("You swipe your ID past [src]'s access protocol scanner.")) - var/console_choice = tgui_input_list(user, "What do you want to configure the access to?", "Access Modification", access_types) - if(!console_choice) - return - switch(console_choice) - if("R&D Core") - board_name = "RD Console" - build_path = /obj/machinery/computer/rdconsole/core - if("Public") - board_name = "RD Console - Public" - build_path = /obj/machinery/computer/rdconsole/public +/obj/item/circuitboard/rdconsole/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda))) + return ..() + if(!allowed(user)) + to_chat(user, SPAN_WARNING("Access Denied.")) + return ITEM_INTERACT_COMPLETE + user.visible_message( + SPAN_NOTICE("[user] waves [used] past [src]'s access protocol scanner."), + SPAN_NOTICE("You swipe [used] past [src]'s access protocol scanner.") + ) + var/console_choice = tgui_input_list(user, "What do you want to configure the access to?", "Access Modification", access_types) + if(!console_choice) + return ITEM_INTERACT_COMPLETE + switch(console_choice) + if("R&D Core") + board_name = "RD Console" + build_path = /obj/machinery/computer/rdconsole/core + if("Public") + board_name = "RD Console - Public" + build_path = /obj/machinery/computer/rdconsole/public - format_board_name() - to_chat(user, SPAN_NOTICE("Access protocols set to [console_choice].")) - else - to_chat(user, SPAN_WARNING("Access Denied.")) - return - return ..() + format_board_name() + to_chat(user, SPAN_NOTICE("Access protocols set to [console_choice].")) + return ITEM_INTERACT_COMPLETE diff --git a/code/game/objects/items/vending_items.dm b/code/game/objects/items/vending_items.dm index e7279def82a..672b87ca477 100644 --- a/code/game/objects/items/vending_items.dm +++ b/code/game/objects/items/vending_items.dm @@ -16,6 +16,7 @@ var/list/products var/list/contraband var/list/premium + new_attack_chain = TRUE /obj/item/vending_refill/Initialize(mapload) . = ..() diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 07154a566f2..eb862bd185f 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -444,7 +444,7 @@ if("store_to_gps") if(inserted_gps) if(last_tele_data) - inserted_gps.locked_location = last_tele_data + inserted_gps.locked_location = locateUID(last_target_ref) temp_msg = "Location saved" else temp_msg = "ERROR - No data to store"