mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Maintenance Panels openable with regular wrench (#20752)
To allow the fluff maintenance panels to be opened even with low-tech standard wrenches. Not only does it make sense, but also lets them still be opened and worked with even if Engineering were to lose its default impact wrenches. To facilitate the mundane wrench being used for atmos panels as a 'fix RP' action, opening and closing maintenance panels now must be done with the Disarm intent (with description updated to communicate the fact). --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: hazelrat <83198434+hazelrat@users.noreply.github.com>
This commit is contained in:
co-authored by
hazelrat
parent
a2e9e72df8
commit
0744712aeb
@@ -56,7 +56,7 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
|
||||
. += SPAN_NOTICE("---")
|
||||
. += SPAN_NOTICE(detailed_desc)
|
||||
. += SPAN_NOTICE("---")
|
||||
. += SPAN_NOTICE("An impact wrench with the wrenchbit selected can be used to open/close the panel.")
|
||||
. += SPAN_NOTICE("Any wrench, or an impact drill with the wrenchbit selected, can be used to open/close the panel.")
|
||||
if(panel_open)
|
||||
. += SPAN_NOTICE("---")
|
||||
. += SPAN_NOTICE("The following tools can be used to interact with the panel:")
|
||||
@@ -72,15 +72,22 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
|
||||
icon_state = "[panel_location]_[panel_type]_[icon_number]"
|
||||
|
||||
/obj/structure/engineer_maintenance/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/powerdrill)) // these will always open the panel
|
||||
if(attacking_item.iswrench()) // Any wrench is good, but we explicltly include the impact drill to send a helpful msg if they just have the screwdriver bit attached.
|
||||
if(!attacking_item.iswrench())
|
||||
to_chat(user, SPAN_WARNING("\The [attacking_item] must have its wrenchbit inserted to remove \the [src]'s bolts!"))
|
||||
return
|
||||
user.visible_message("[SPAN_BOLD("[user]")] starts [panel_open ? "closing" : "opening"] \the [src]...", SPAN_NOTICE("You start [panel_open ? "closing" : "opening"] \the [src]..."), SPAN_NOTICE("You hear the whirr of an impact wrench..."))
|
||||
if (istype(attacking_item, /obj/item/powerdrill))
|
||||
user.visible_message("[SPAN_BOLD("[user]")] starts [panel_open ? "closing" : "opening"] \the [src]...", SPAN_NOTICE("You start [panel_open ? "closing" : "opening"] \the [src]..."), SPAN_NOTICE("You hear the whirr of an impact drill..."))
|
||||
else
|
||||
user.visible_message("[SPAN_BOLD("[user]")] starts manually [panel_open ? "closing" : "opening"] \the [src]...", SPAN_NOTICE("You start manually [panel_open ? "closing" : "opening"] \the [src]..."))
|
||||
if(attacking_item.usesound)
|
||||
playsound(get_turf(src), attacking_item.usesound, 30, TRUE)
|
||||
if(!do_after(user, rand(2, 3) SECONDS, src))
|
||||
return
|
||||
if (istype(attacking_item, /obj/item/powerdrill))
|
||||
if(!do_after(user, rand(2, 3) SECONDS, src))
|
||||
return
|
||||
else
|
||||
if(!do_after(user, rand(5, 7) SECONDS, src))
|
||||
return
|
||||
user.visible_message("[SPAN_BOLD("[user]")] [panel_open ? "closes" : "opens"] \the [src]!", SPAN_NOTICE("You [panel_open ? "close" : "open"] \the [src]!"))
|
||||
panel_open = !panel_open
|
||||
update_icon()
|
||||
@@ -106,7 +113,6 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
|
||||
"4" = "A high-pressure pipe, together with an electrical flow meter and a keypad can be seen in this hatch. High pressure pipes like these usually carry gases around the place. Probably in higher quantities than usual. The interface allows the user to adjust the flow rate or to close the pipe completely."
|
||||
)
|
||||
panel_tools = list(
|
||||
/obj/item/wrench = /singleton/engineer_maintenance_tool/steam_pipe,
|
||||
/obj/item/pipewrench = /singleton/engineer_maintenance_tool/steam_pipe,
|
||||
/obj/item/hammer = /singleton/engineer_maintenance_tool/steam_pipe,
|
||||
/obj/item/device/multitool = /singleton/engineer_maintenance_tool/steam_pipe
|
||||
|
||||
Reference in New Issue
Block a user