From 6e66e4ea421953d7b13c8c7e41191cd6364351f6 Mon Sep 17 00:00:00 2001 From: ritorizo <41831966+ritorizo@users.noreply.github.com> Date: Fri, 21 Jul 2023 03:56:16 +0200 Subject: [PATCH] Make it so you can't use any item to cancel mechanical surgery (#1989) ## About The Pull Request Right now if you click an ipc surgery with anything that is not the right item it "screw" the shell and force you to restart teh surgery which is a pain. (it applies to EVERY item like even gause). You can still close the shell with a knife if you don't have a screwdriver. ## Why It's Good For The Game Said above ## Changelog :cl: tweak: Mechanical surgery won't cancel at any wrong move. /:cl: --------- Signed-off-by: ritorizo <41831966+ritorizo@users.noreply.github.com> Co-authored-by: ritorizo Co-authored-by: Mark Suckerberg --- code/modules/surgery/mechanic_steps.dm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/modules/surgery/mechanic_steps.dm b/code/modules/surgery/mechanic_steps.dm index 2656dfe405ba..f1fd128c2d9e 100644 --- a/code/modules/surgery/mechanic_steps.dm +++ b/code/modules/surgery/mechanic_steps.dm @@ -5,7 +5,7 @@ TOOL_SCREWDRIVER = 100, TOOL_SCALPEL = 75, // med borgs could try to unscrew shell with scalpel /obj/item/kitchen/knife = 50, - /obj/item = 10) // 10% success with any sharp item. + /obj/item = 10) time = 2.4 SECONDS preop_sound = 'sound/items/screwdriver.ogg' success_sound = 'sound/items/screwdriver2.ogg' @@ -16,11 +16,11 @@ "[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].") /datum/surgery_step/mechanic_open/tool_check(mob/user, obj/item/tool) - if(istype(tool)) - preop_sound = tool.usesound - else if(!tool.get_sharpness()) //if its not a tool, then we check if its sharp + if(implement_type == /obj/item && !tool.get_sharpness()) return FALSE - . = ..() + if(tool.usesound) + preop_sound = tool.usesound + return ..() //close shell /datum/surgery_step/mechanic_close @@ -29,7 +29,7 @@ TOOL_SCREWDRIVER = 100, TOOL_SCALPEL = 75, /obj/item/kitchen/knife = 50, - /obj/item = 10) // 10% success with any sharp item. + /obj/item = 10) time = 2.4 SECONDS preop_sound = 'sound/items/screwdriver.ogg' success_sound = 'sound/items/screwdriver2.ogg' @@ -40,11 +40,11 @@ "[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].") /datum/surgery_step/mechanic_close/tool_check(mob/user, obj/item/tool) - if(istype(tool)) - preop_sound = tool.usesound - else if(!tool.get_sharpness()) //if its not a tool, then we check if its sharp + if(implement_type == /obj/item && !tool.get_sharpness()) return FALSE - . = ..() + if(tool.usesound) + preop_sound = tool.usesound + return ..() //prepare electronics /datum/surgery_step/prepare_electronics