diff --git a/code/modules/aberrants/organs/machinery/organ_fabricator.dm b/code/modules/aberrants/organs/machinery/organ_fabricator.dm index 7f2eb0da133..0454d86b307 100644 --- a/code/modules/aberrants/organs/machinery/organ_fabricator.dm +++ b/code/modules/aberrants/organs/machinery/organ_fabricator.dm @@ -103,14 +103,33 @@ /obj/machinery/autolathe/organ_fabricator/attackby(obj/item/I, mob/user) // Warn about deconstruction + + var/list/usable_qualities = list(QUALITY_SCREW_DRIVING) if(panel_open) - var/tool_type = I.get_tool_type(user, list(QUALITY_PRYING), src) - if(tool_type == QUALITY_PRYING) - var/starting_loc = user.loc // Save location so user can't magically deconstruct it from a distance - var/choice = alert("If you deconstruct this machine, the biomatter inside will be destroyed. Are you sure you want to continue?", "Deconstruction Warning", "Deconstruct", "Leave it alone") - if(choice != "Deconstruct" || starting_loc != user.loc) + usable_qualities.Add(QUALITY_PRYING) + + if(usable_qualities) + var/tool_type = I.get_tool_type(user, usable_qualities, src) + switch(tool_type) + if(QUALITY_PRYING) + var/starting_loc = user.loc // Save location so user can't magically deconstruct it from a distance + var/choice = alert("If you deconstruct this machine, the biomatter inside will be destroyed. Are you sure you want to continue?", "Deconstruction Warning", "Deconstruct", "Leave it alone") + if(choice != "Deconstruct" || starting_loc != user.loc) + return TRUE + ..() return + if(QUALITY_SCREW_DRIVING) + var/used_sound = panel_open ? 'sound/machines/Custom_screwdriveropen.ogg' : 'sound/machines/Custom_screwdriverclose.ogg' + if(I.use_tool(user, src, WORKTIME_NEAR_INSTANT, tool_type, FAILCHANCE_VERY_EASY, required_stat = STAT_MEC, instant_finish_tier = 30, forced_sound = used_sound)) + panel_open = !panel_open + to_chat(user, SPAN_NOTICE("You [panel_open ? "open" : "close"] the maintenance hatch of \the [src] with [I].")) + return TRUE + + if(ABORT_CHECK) + return + + ..() /obj/machinery/autolathe/organ_fabricator/on_deconstruction(obj/item/I, mob/user) diff --git a/code/modules/power/hydrogen_generator.dm b/code/modules/power/hydrogen_generator.dm index f48630d3b64..9cea81e7d4c 100644 --- a/code/modules/power/hydrogen_generator.dm +++ b/code/modules/power/hydrogen_generator.dm @@ -96,8 +96,8 @@ // Proc when attacking the generator with something, used for upgrades, inserting fuel cells & wrenching it to the ground /obj/machinery/power/hydrogen_gen/attackby(obj/item/W, mob/user) - - if(default_deconstruction(W, user)) + if(active) + to_chat(user, SPAN_NOTICE("You can't work with [src] while its running!")) return if(default_part_replacement(W, user)) @@ -108,26 +108,32 @@ updateDialog() return - if(active) - to_chat(user, SPAN_NOTICE("You can't work with [src] while its running!")) - else - var/list/usable_qualities = list(QUALITY_BOLT_TURNING) - var/tool_type = W.get_tool_type(user, usable_qualities, src) - switch(tool_type) - if(QUALITY_BOLT_TURNING) - if(istype(get_turf(src), /turf/space) && !anchored) - to_chat(user, SPAN_NOTICE("You can't anchor something to empty space. Idiot.")) - return - if(W.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_EASY, required_stat = STAT_MEC)) - to_chat(user, SPAN_NOTICE("You [anchored ? "un" : ""]anchor the brace with [W].")) - anchored = !anchored - if(anchored) - connect_to_network() - else - disconnect_from_network() - - if(ABORT_CHECK) + var/list/usable_qualities = list(QUALITY_SCREW_DRIVING, QUALITY_BOLT_TURNING, QUALITY_PRYING) + var/tool_type = W.get_tool_type(user, usable_qualities, src) + switch(tool_type) + if(QUALITY_BOLT_TURNING) + if(istype(get_turf(src), /turf/space) && !anchored) + to_chat(user, SPAN_NOTICE("You can't anchor something to empty space. Idiot.")) return + if(W.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_EASY, required_stat = STAT_MEC)) + to_chat(user, SPAN_NOTICE("You [anchored ? "un" : ""]anchor the brace with [W].")) + anchored = !anchored + if(anchored) + connect_to_network() + else + disconnect_from_network() + + if(QUALITY_SCREW_DRIVING) + default_deconstruction(W, user) + return + + if(QUALITY_PRYING) + default_deconstruction(W, user) + return + + if(ABORT_CHECK) + return + ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 04f662c41eb..7bd09e33901 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -410,7 +410,7 @@ For the sake of consistency, I suggest always rounding up on even values when ap to_chat(user, "Projectile Serial Calibration: ERROR.") - var/list/usable_qualities = list() + var/list/usable_qualities = list(QUALITY_SCREW_DRIVING) if(saw_off) usable_qualities.Add(QUALITY_SAWING) @@ -484,6 +484,11 @@ For the sake of consistency, I suggest always rounding up on even values when ap plusing_intraction(I, user) return + //This is litterly just a stop gap so you dont accidently decon your weapon. + if(QUALITY_SCREW_DRIVING) + ..() + return + if(ABORT_CHECK) return diff --git a/code/modules/reagents/machinery/chem_dispenser.dm b/code/modules/reagents/machinery/chem_dispenser.dm index 08eb7699500..21f0b08dc74 100644 --- a/code/modules/reagents/machinery/chem_dispenser.dm +++ b/code/modules/reagents/machinery/chem_dispenser.dm @@ -227,8 +227,30 @@ . = ..() /obj/machinery/chemical_dispenser/attackby(obj/item/I, mob/living/user) - if(default_deconstruction(I, user)) - return + var/list/usable_qualities = list(QUALITY_SCREW_DRIVING, QUALITY_PRYING) + + if(length(hacked_reagents)) + usable_qualities.Add(QUALITY_PULSING) + + if(usable_qualities) + var/tool_type = I.get_tool_type(user, usable_qualities, src) + switch(tool_type) + + if(QUALITY_PULSING) + to_chat(usr, SPAN_WARNING("You pulse a few wires, changing the dispensing restrictions.")) + hacked() + return + + if(QUALITY_SCREW_DRIVING) + default_deconstruction(I, user) + return + + if(QUALITY_PRYING) + default_deconstruction(I, user) + return + + if(ABORT_CHECK) + return if(default_part_replacement(I, user)) return @@ -237,10 +259,6 @@ to_chat(usr, SPAN_WARNING("Your biological understanding isn't enough to use this.")) return - if(istype(I, /obj/item/tool/multitool) && length(hacked_reagents)) - to_chat(usr, SPAN_WARNING("You pulse a few wires, unlocking the dispensing restrictions.")) - hacked() - var/obj/item/reagent_containers/B = I if(beaker) to_chat(user, "Something is already loaded into the machine.")