Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydraulic rescue tool refactoring #20162

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]..."),
Expand Down Expand Up @@ -1746,16 +1746,16 @@ About the new airlock wires panel:
user.visible_message("<b>[user]</b> 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...")
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/blast_door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions code/game/objects/items/weapons/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 1 addition & 15 deletions code/modules/mob/living/silicon/ai/ai_remote_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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."
2 changes: 1 addition & 1 deletion maps/sccv_horizon/sccv_horizon.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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" = (
Expand Down
Loading