Skip to content

Commit

Permalink
Make it so you can't use any item to cancel mechanical surgery (#1989)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## 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:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: ritorizo <41831966+ritorizo@users.noreply.github.com>
Co-authored-by: ritorizo <ritorizo@localhost>
Co-authored-by: Mark Suckerberg <mark@suckerberg.gay>
  • Loading branch information
3 people authored Jul 21, 2023
1 parent 574bceb commit 6e66e4e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions code/modules/surgery/mechanic_steps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -16,11 +16,11 @@
"<span class='notice'>[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].</span>")

/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
Expand All @@ -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'
Expand All @@ -40,11 +40,11 @@
"<span class='notice'>[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].</span>")

/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
Expand Down

0 comments on commit 6e66e4e

Please sign in to comment.