From 4560f008fc3848a06a3ac19904753bb984c5802e Mon Sep 17 00:00:00 2001 From: FabianK3 <21039694+FabianK3@users.noreply.github.com> Date: Fri, 15 Nov 2024 20:55:07 +0100 Subject: [PATCH] Hydraulic rescue tool refactoring (#20162) ### Introduction The recently to atmos added hydraulic rescue tool is a robotic tool and has none of the common item/tool properties. This PR refactors the tool to a non-robotic version and fixes a bug in the recently added functionality (#20138 - Airlocks can be opened instantly by moving during the action duration). ### What changed? - Added `/obj/item/crowbar/hydraulic_rescue_tool` to tools.dm - Removed robotic version under AI (`/obj/item/crowbar/robotic/jawsoflife`) - Updated all occurrences (Sprite label due to updating the sprite filename) - Fix action skip bug in airlock.dm when using the tool (See [5cc808b](https://github.com/Aurorastation/Aurora.3/pull/20162/commits/5cc808ba53787a2bf44be476e9503860e5440f9c)) --- code/game/machinery/doors/airlock.dm | 12 +++++++----- code/game/machinery/doors/blast_door.dm | 2 +- code/game/objects/items/weapons/tools.dm | 17 +++++++++++++++++ .../mob/living/silicon/ai/ai_remote_control.dm | 16 +--------------- ...iank3-hydraulic-rescue-tool-refactoring.yml | 7 +++++++ ...awsoflife.dmi => hydraulic_rescue_tool.dmi} | Bin maps/sccv_horizon/sccv_horizon.dmm | 2 +- 7 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 html/changelogs/fabiank3-hydraulic-rescue-tool-refactoring.yml rename icons/obj/item/tools/{jawsoflife.dmi => hydraulic_rescue_tool.dmi} (100%) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 826f1f828e4..fb30f0bb2b8 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1463,7 +1463,7 @@ About the new airlock wires panel: cut_sound = 'sound/weapons/smash.ogg' cut_delay *= 1 cutting = TRUE - else if(istype(tool, /obj/item/crowbar/robotic/jawsoflife)) + else if(istype(tool, /obj/item/crowbar/hydraulic_rescue_tool)) if(bolt_cut_state == BOLTS_FINE) user.visible_message(SPAN_DANGER("[user] starts using the [tool] on the airlock's bolt cover!"), SPAN_WARNING("You start applying pressure on the airlock's bolt cover using the [tool]..."), @@ -1746,16 +1746,16 @@ About the new airlock wires panel: user.visible_message("[user] removes the electronics from the airlock assembly.", SPAN_NOTICE("You remove the electronics from the airlock assembly.")) CreateAssembly() return - else if(arePowerSystemsOn() && !istype(attacking_item, /obj/item/crowbar/robotic/jawsoflife)) + else if(arePowerSystemsOn() && !istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool)) to_chat(user, SPAN_NOTICE("The airlock's motors resist your efforts to force it.")) else if(locked) - if (istype(attacking_item, /obj/item/crowbar/robotic/jawsoflife)) + if (istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool)) cut_bolts(attacking_item, user) else to_chat(user, SPAN_NOTICE("The airlock's bolts prevent it from being forced.")) else if(density) - if(arePowerSystemsOn() && istype(attacking_item, /obj/item/crowbar/robotic/jawsoflife)) + if(arePowerSystemsOn() && istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool)) user.visible_message(SPAN_DANGER("[user] starts using the [attacking_item] on the airlock!"), SPAN_WARNING("You start applying pressure on the airlock using the [attacking_item]..."), SPAN_NOTICE("You hear metal cracking and deforming...") @@ -1765,7 +1765,9 @@ About the new airlock wires panel: take_damage(50) set_broken() to_chat(user, SPAN_NOTICE("The hydraulic strength easily overcomes the resistance of the airlock's motors opening the way ahead!")) - open(1) + open(1) + else + open(1) else close(1) return TRUE diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index a3b2c1f2d9e..11d74f6ab56 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -118,7 +118,7 @@ /obj/machinery/door/blast/attackby(obj/item/attacking_item, mob/user) if(!istype(attacking_item, /obj/item/forensics)) src.add_fingerprint(user) - if((istype(attacking_item, /obj/item/material/twohanded/fireaxe) && attacking_item:wielded == 1) || attacking_item.ishammer() || istype(attacking_item, /obj/item/crowbar/robotic/jawsoflife)) + if((istype(attacking_item, /obj/item/material/twohanded/fireaxe) && attacking_item:wielded == 1) || attacking_item.ishammer() || istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool)) if (((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating )) force_toggle() else diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 1bc0a6f0825..1ab37b4bc8a 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -747,6 +747,23 @@ icon_state = "rescue_axe_red" item_state = "rescue_axe_red" +/obj/item/crowbar/hydraulic_rescue_tool + name = "Hydraulic rescue tool" + desc = "A hydraulic rescue tool that functions like a crowbar by applying strong amounts of hydraulic pressure to force open different things. Also known as jaws of life." + icon = 'icons/obj/item/tools/hydraulic_rescue_tool.dmi' + icon_state = "jawspry" + force = 15 + throwforce = 1 + w_class = WEIGHT_CLASS_NORMAL + drop_sound = 'sound/items/drop/crowbar.ogg' + pickup_sound = 'sound/items/pickup/crowbar.ogg' + usesound = /singleton/sound_category/crowbar_sound + origin_tech = list(TECH_ENGINEERING = 1) + matter = list(DEFAULT_WALL_MATERIAL = 50) + attack_verb = list("attacked", "rammed", "battered", "bludgeoned") + sharp = FALSE + edge = FALSE + // Pipe wrench /obj/item/pipewrench name = "pipe wrench" diff --git a/code/modules/mob/living/silicon/ai/ai_remote_control.dm b/code/modules/mob/living/silicon/ai/ai_remote_control.dm index f8086ff1ebe..42e7f04aea6 100644 --- a/code/modules/mob/living/silicon/ai/ai_remote_control.dm +++ b/code/modules/mob/living/silicon/ai/ai_remote_control.dm @@ -25,7 +25,7 @@ /obj/item/robot_module/aicontrol/Initialize() . = ..() - modules += new /obj/item/crowbar/robotic/jawsoflife(src) + modules += new /obj/item/crowbar/hydraulic_rescue_tool(src) modules += new /obj/item/wrench/robotic(src) modules += new /obj/item/device/healthanalyzer(src) modules += new /obj/item/extinguisher/mini(src) @@ -58,17 +58,3 @@ /mob/living/silicon/robot/shell/choose_icon() return - -/obj/item/crowbar/robotic/jawsoflife - name = "jaws of life" - desc = "A set of specialized tools that functions as both the ordinary crowbar, but is additionally capable of brute forcing bolted doors without power." - icon = 'icons/obj/item/tools/jawsoflife.dmi' - icon_state = "jawspry" - item_flags = ITEM_FLAG_NO_BLUDGEON - force = 0 - sharp = FALSE - edge = FALSE - -/obj/item/crowbar/robotic/jawsoflife/attack(mob/living/target_mob, mob/living/user, target_zone) - user.visible_message("\The [user] [pick("boops", "squeezes", "pokes", "prods", "strokes", "bonks")] \the [target_mob] with \the [src]") - return FALSE diff --git a/html/changelogs/fabiank3-hydraulic-rescue-tool-refactoring.yml b/html/changelogs/fabiank3-hydraulic-rescue-tool-refactoring.yml new file mode 100644 index 00000000000..4c93ab14baa --- /dev/null +++ b/html/changelogs/fabiank3-hydraulic-rescue-tool-refactoring.yml @@ -0,0 +1,7 @@ +author: FabianK3 + +delete-after: True + +changes: + - bugfix: "Fixed bug allowing the hydraulic rescue tool to open doors instantly." + - refactor: "Refactored the robotic jawsoflife to an actual tool, now called Hydraulic rescue tool." diff --git a/icons/obj/item/tools/jawsoflife.dmi b/icons/obj/item/tools/hydraulic_rescue_tool.dmi similarity index 100% rename from icons/obj/item/tools/jawsoflife.dmi rename to icons/obj/item/tools/hydraulic_rescue_tool.dmi diff --git a/maps/sccv_horizon/sccv_horizon.dmm b/maps/sccv_horizon/sccv_horizon.dmm index cc6fc1373e1..b6c72b14ad7 100644 --- a/maps/sccv_horizon/sccv_horizon.dmm +++ b/maps/sccv_horizon/sccv_horizon.dmm @@ -30561,7 +30561,7 @@ /obj/item/storage/bag/inflatable, /obj/item/storage/bag/inflatable, /obj/item/device/hand_labeler, -/obj/item/crowbar/robotic/jawsoflife, +/obj/item/crowbar/hydraulic_rescue_tool, /turf/simulated/floor/tiled/dark/full, /area/engineering/atmos/storage) "erN" = (