From 3a9d3522b085a401dfb1876bf4c4143a139a02f2 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 17 Jul 2026 02:20:36 -0400 Subject: [PATCH] Migrate PAI data cable to the new attack chain. (#32213) * Migrate PAI data cable to the new attack chain. * Include paradise.dme. * Apply suggestions from CRUNCH review Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Alan * Apply suggestion from CRUNCH review Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Alan --------- Signed-off-by: Alan Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> --- code/game/objects/items/paiwire.dm | 11 -------- code/game/objects/items/weapons/misc_items.dm | 8 ------ .../living/silicon/pai/software/pai_apps.dm | 28 +++++++++++++++++++ paradise.dme | 1 - 4 files changed, 28 insertions(+), 20 deletions(-) delete mode 100644 code/game/objects/items/paiwire.dm diff --git a/code/game/objects/items/paiwire.dm b/code/game/objects/items/paiwire.dm deleted file mode 100644 index 05f2ea5dc9f..00000000000 --- a/code/game/objects/items/paiwire.dm +++ /dev/null @@ -1,11 +0,0 @@ -/obj/item/pai_cable/proc/plugin(obj/machinery/M as obj, mob/user as mob) - if(isairlock(M) || istype(M, /obj/machinery/camera)) - user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.") - user.drop_item() - src.loc = M - src.machine = M - else - user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].") - -/obj/item/pai_cable/attack__legacy__attackchain(obj/machinery/M as obj, mob/user as mob) - src.plugin(M, user) diff --git a/code/game/objects/items/weapons/misc_items.dm b/code/game/objects/items/weapons/misc_items.dm index ff3b5fd2a5b..6d0de78837e 100644 --- a/code/game/objects/items/weapons/misc_items.dm +++ b/code/game/objects/items/weapons/misc_items.dm @@ -12,7 +12,6 @@ Kidan Globe Lightning Newton Cradle - PAI cable Red Phone Popsicle Sticks */ @@ -229,13 +228,6 @@ icon_state = "newton" desc = "A device bored paper pushers use to remind themselves that time did not stop yet. Contains gravity." -/obj/item/pai_cable - name = "data cable" - desc = "A flexible coated cable with a universal jack on one end." - icon = 'icons/obj/power.dmi' - icon_state = "wire1" - var/obj/machinery/machine - /obj/item/phone name = "red phone" desc = "Should anything ever go wrong..." diff --git a/code/modules/mob/living/silicon/pai/software/pai_apps.dm b/code/modules/mob/living/silicon/pai/software/pai_apps.dm index eb11c622e05..949442344f5 100644 --- a/code/modules/mob/living/silicon/pai/software/pai_apps.dm +++ b/code/modules/mob/living/silicon/pai/software/pai_apps.dm @@ -427,3 +427,31 @@ data["burn"] = held.getFireLoss() return data + +/obj/item/pai_cable + name = "data cable" + desc = "A flexible coated cable with a universal jack on one end." + icon = 'icons/obj/power.dmi' + icon_state = "wire1" + var/obj/machinery/machine + new_attack_chain = TRUE + +/obj/item/pai_cable/proc/plugin(obj/machinery/target, mob/user) + if(!(isairlock(target) || istype(target, /obj/machinery/camera))) + user.visible_message( + SPAN_WARNING("[user] dumbly fumbles to find a place on [target] to plug in [src]."), + SPAN_WARNING("There aren't any ports on [target] that match the jack belonging to [src].") + ) + return + user.visible_message( + SPAN_WARNING("[user] inserts [src] into a data port on [target]!"), + SPAN_NOTICE("You insert [src] into a data port on [target]."), + SPAN_HEAR("You hear the satisfying click of a wire jack fastening into place.") + ) + user.drop_item() + src.loc = target + src.machine = target + +/obj/item/pai_cable/interact_with_atom(obj/machinery/target, mob/living/user, list/modifiers) + src.plugin(target, user) + return ITEM_INTERACT_COMPLETE diff --git a/paradise.dme b/paradise.dme index b533c98c3ce..55e784a221e 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1332,7 +1332,6 @@ #include "code\game\objects\items\latexballoon.dm" #include "code\game\objects\items\lighters.dm" #include "code\game\objects\items\paint_bucket.dm" -#include "code\game\objects\items\paiwire.dm" #include "code\game\objects\items\picket_signs.dm" #include "code\game\objects\items\random_items.dm" #include "code\game\objects\items\RCD.dm"