From d5f58ebe26417e25d07bf2e71be41a0154db7b8c Mon Sep 17 00:00:00 2001 From: Bi88a Date: Fri, 8 Mar 2024 11:50:56 -0500 Subject: [PATCH] removes welding step from window deconstruction changes all delay speeds to decon_speed modified: code/game/objects/structures/window.dm --- code/game/objects/structures/window.dm | 52 ++++++++------------------ 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 730735b8b3a22..80670e15a7ebf 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -21,7 +21,7 @@ var/state = WINDOW_OUT_OF_FRAME var/reinf = FALSE var/heat_resistance = 800 - var/decon_speed = 30 + var/decon_speed = 15 var/wtype = "glass" var/fulltile = FALSE var/glass_type = /obj/item/stack/sheet/glass @@ -203,7 +203,7 @@ if(!tool.tool_start_check(user, amount = 0)) return FALSE to_chat(user, span_notice("You begin repairing [src]...")) - if(tool.use_tool(src, user, 4 SECONDS, volume = 50)) + if(tool.use_tool(src, user, decon_speed, volume = 50)) atom_integrity = max_integrity update_nearby_icons() to_chat(user, span_notice("You repair [src].")) @@ -261,12 +261,12 @@ switch(state) if(WINDOW_IN_FRAME) to_chat(user, span_notice("You begin to lever the window out of the frame...")) - if(tool.use_tool(src, user, 10 SECONDS, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored))) + if(tool.use_tool(src, user, decon_speed, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored))) state = WINDOW_OUT_OF_FRAME to_chat(user, span_notice("You pry the window out of the frame.")) if(WINDOW_OUT_OF_FRAME) to_chat(user, span_notice("You begin to lever the window back into the frame...")) - if(tool.use_tool(src, user, 5 SECONDS, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored))) + if(tool.use_tool(src, user, decon_speed, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored))) state = WINDOW_SCREWED_TO_FRAME to_chat(user, span_notice("You pry the window back into the frame.")) else @@ -485,32 +485,18 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) switch(state) if(RWINDOW_SECURE) - if(tool.tool_behaviour == TOOL_WELDER) - if(tool.tool_start_check(user)) - user.visible_message(span_notice("[user] holds \the [tool] to the security screws on \the [src]..."), - span_notice("You begin heating the security screws on \the [src]...")) - if(tool.use_tool(src, user, 15 SECONDS, volume = 100)) - to_chat(user, span_notice("The security screws are glowing white hot and look ready to be removed.")) - state = RWINDOW_BOLTS_HEATED - addtimer(CALLBACK(src, PROC_REF(cool_bolts)), 30 SECONDS) - else if (tool.tool_behaviour) - to_chat(user, span_warning("The security screws need to be heated first!")) - - if(RWINDOW_BOLTS_HEATED) if(tool.tool_behaviour == TOOL_SCREWDRIVER) - user.visible_message(span_notice("[user] digs into the heated security screws and starts removing them..."), - span_notice("You dig into the heated screws hard and they start turning...")) - if(tool.use_tool(src, user, 50, volume = 50)) + to_chat(user, span_notice("You begin to unscrew the window from the frame...")) + if(tool.use_tool(src, user, decon_speed, volume = 50)) state = RWINDOW_BOLTS_OUT to_chat(user, span_notice("The screws come out, and a gap forms around the edge of the pane.")) else if (tool.tool_behaviour) - to_chat(user, span_warning("The security screws need to be removed first!")) + to_chat(user, span_warning("The screws need to be removed first!")) if(RWINDOW_BOLTS_OUT) if(tool.tool_behaviour == TOOL_CROWBAR) - user.visible_message(span_notice("[user] wedges \the [tool] into the gap in the frame and starts prying..."), - span_notice("You wedge \the [tool] into the gap in the frame and start prying...")) - if(tool.use_tool(src, user, 40, volume = 50)) + to_chat(user, span_notice("You wedge \the [tool] into the gap in the frame and start prying...")) + if(tool.use_tool(src, user, decon_speed, volume = 50)) state = RWINDOW_POPPED to_chat(user, span_notice("The panel pops out of the frame, exposing some thin metal bars that looks like they can be cut.")) else if (tool.tool_behaviour) @@ -518,9 +504,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) if(RWINDOW_POPPED) if(tool.tool_behaviour == TOOL_WIRECUTTER) - user.visible_message(span_notice("[user] starts cutting the exposed bars on \the [src]..."), - span_notice("You start cutting the exposed bars on \the [src]")) - if(tool.use_tool(src, user, 20, volume = 50)) + to_chat(user, span_notice("You start cutting the exposed bars on \the [src]")) + if(tool.use_tool(src, user, decon_speed, volume = 50)) state = RWINDOW_BARS_CUT to_chat(user, span_notice("The panels falls out of the way exposing the frame bolts.")) else if (tool.tool_behaviour) @@ -528,9 +513,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) if(RWINDOW_BARS_CUT) if(tool.tool_behaviour == TOOL_WRENCH) - user.visible_message(span_notice("[user] starts unfastening \the [src] from the frame..."), - span_notice("You start unfastening the bolts from the frame...")) - if(tool.use_tool(src, user, 40, volume = 50)) + to_chat(user, span_notice("You start unfastening the bolts from the frame...")) + if(tool.use_tool(src, user, decon_speed, volume = 50)) to_chat(user, span_notice("You unscrew the bolts from the frame and the window pops loose.")) state = WINDOW_OUT_OF_FRAME set_anchored(FALSE) @@ -549,15 +533,11 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) if((obj_flags & NO_DECONSTRUCTION) || (state != WINDOW_OUT_OF_FRAME)) return FALSE to_chat(user, span_notice("You begin to lever the window back into the frame...")) - if(tool.use_tool(src, user, 10 SECONDS, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored))) + if(tool.use_tool(src, user, decon_speed, volume = 75, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored))) state = RWINDOW_SECURE to_chat(user, span_notice("You pry the window back into the frame.")) return ITEM_INTERACT_SUCCESS -/obj/structure/window/proc/cool_bolts() - if(state == RWINDOW_BOLTS_HEATED) - state = RWINDOW_SECURE - visible_message(span_notice("The bolts on \the [src] look like they've cooled off...")) /obj/structure/window/reinforced/examine(mob/user) . = ..() @@ -565,9 +545,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) return switch(state) if(RWINDOW_SECURE) - . += span_notice("It's been screwed in with one way screws, you'd need to heat them to have any chance of backing them out.") - if(RWINDOW_BOLTS_HEATED) - . += span_notice("The screws are glowing white hot, and you'll likely be able to unscrew them now.") + . += span_notice("The window is screwed to the frame.") if(RWINDOW_BOLTS_OUT) . += span_notice("The screws have been removed, revealing a small gap you could fit a prying tool in.") if(RWINDOW_POPPED)