From a0c5ab0a0961a2aaa0325e3eaad0da2707f6895a Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Fri, 17 Jul 2026 22:50:07 +0200 Subject: [PATCH] Permit impact drills to work in IPC surgery and some minor tool fixes (#22840) This permits the impact drills to work for surgeries where a screwdriver would work. For the regular uses that would be opening the hatches on prosthetic limbs and prosthetic organ repairs. This was done as machinists, who primarily do those surgeries, usually print an impact drill for themself anyway so it was an annoyance to have a screwdriver just for that one thing in their entire workshop. While at it, I also changed a few hardcoded tool checks elsewhere to not be as hardcoded. --- code/game/objects/items/recharger_backpack.dm | 2 +- code/game/objects/items/tools/tools.dm | 3 --- code/game/objects/items/weapons/traps.dm | 2 +- code/game/objects/structures/barricades/liquid.dm | 4 ++-- .../real_instruments/Synthesizer/synthesizer.dm | 2 +- html/changelogs/ImpactingTheHatch.yml | 7 +++++++ 6 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 html/changelogs/ImpactingTheHatch.yml diff --git a/code/game/objects/items/recharger_backpack.dm b/code/game/objects/items/recharger_backpack.dm index 471a8e50d4b..a83b03eb540 100644 --- a/code/game/objects/items/recharger_backpack.dm +++ b/code/game/objects/items/recharger_backpack.dm @@ -38,7 +38,7 @@ powersupply = attacking_item update_icon() - else if(istype(attacking_item, /obj/item/screwdriver) && powersupply) + else if(attacking_item.tool_behaviour == TOOL_SCREWDRIVER && powersupply) to_chat(user, SPAN_NOTICE("You remove \the [powersupply] from \the [src]'s power socket")) powersupply.forceMove(get_turf(src)) user.put_in_hands(powersupply) diff --git a/code/game/objects/items/tools/tools.dm b/code/game/objects/items/tools/tools.dm index 85a53a8d476..be52fdb1f4b 100644 --- a/code/game/objects/items/tools/tools.dm +++ b/code/game/objects/items/tools/tools.dm @@ -861,9 +861,6 @@ update_tool(tool) return TRUE -/obj/item/powerdrill/issurgerycompatible() - return FALSE // too unwieldy for most surgeries - /obj/item/steelwool name = "steel wool" desc = "Harvested from the finest NanoTrasen steel sheep." diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 556feae70a5..bb185c09d0b 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -953,7 +953,7 @@ else to_chat(user, SPAN_WARNING("You need at least twelve rods to complete \the [src].")) return - else if(istype(attacking_item, /obj/item/screwdriver)) + else if(attacking_item.tool_behaviour == TOOL_SCREWDRIVER) return else ..() diff --git a/code/game/objects/structures/barricades/liquid.dm b/code/game/objects/structures/barricades/liquid.dm index 79d2ab4852b..fc11a3917c1 100644 --- a/code/game/objects/structures/barricades/liquid.dm +++ b/code/game/objects/structures/barricades/liquid.dm @@ -55,8 +55,8 @@ maxhealth += 50 /obj/structure/barricade/liquid/attackby(obj/item/attacking_item, mob/user) - if(istype(attacking_item, /obj/item/crowbar) && user.a_intent != I_HURT) - var/obj/item/crowbar/ET = attacking_item + if(attacking_item.tool_behaviour == TOOL_CROWBAR && user.a_intent != I_HURT) + var/obj/item/ET = attacking_item user.visible_message(SPAN_NOTICE("[user] starts disassembling [src]."), \ SPAN_NOTICE("You start disassembling [src].")) if(ET.use_tool(src, user, 4 SECONDS)) diff --git a/code/modules/synthesized_instruments/real_instruments/Synthesizer/synthesizer.dm b/code/modules/synthesized_instruments/real_instruments/Synthesizer/synthesizer.dm index 45f91bbcfb3..bcb869f9c8b 100644 --- a/code/modules/synthesized_instruments/real_instruments/Synthesizer/synthesizer.dm +++ b/code/modules/synthesized_instruments/real_instruments/Synthesizer/synthesizer.dm @@ -13,7 +13,7 @@ sound_player = /datum/sound_player/synthesizer /obj/structure/synthesized_instrument/synthesizer/attackby(obj/item/attacking_item, mob/user, params) - if (istype(attacking_item, /obj/item/wrench)) + if (attacking_item.tool_behaviour == TOOL_WRENCH) if (!anchored && !isinspace()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) to_chat(usr, SPAN_NOTICE(" You begin to tighten \the [src] to the floor...")) diff --git a/html/changelogs/ImpactingTheHatch.yml b/html/changelogs/ImpactingTheHatch.yml new file mode 100644 index 00000000000..9e1aca2aa64 --- /dev/null +++ b/html/changelogs/ImpactingTheHatch.yml @@ -0,0 +1,7 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - rscadd: "Impact drills can now be used for robotics surgery the same way regular tools can." + - bugfix: "Fixed a couple of hardcoded tool interactions to use tool behavior instead."