Skip to content

Commit

Permalink
[MIRROR] [NO GBP] Critical fixes for cyborg omnitools (#2176) (#3054)
Browse files Browse the repository at this point in the history
* [NO GBP] Critical fixes for cyborg omnitools (#82825)

## About The Pull Request
Fixes several critical fixes for cyborg omnitools, surgical omnitools in
peculiar. Which is:
1. bonesetter omnitool can do compound fracture surgery now
2. omnitool butchering not properly disabled works (why didn't that
runtime. fucking dreammaker)
3. omnitool surgery_initiator not properly disabled
4. cautery in offhand not working

Fixes #82805
Fixes #82868

Honestly I have now regretted for doing this kind of implementation at
the start. with how shoddily coded it is.
Planning to refactor cyborg omnitools, admin omnitool and ayys omnitool
(all have the same base of implementation) to be less snowflakey. but
that's for the future. and will take some time. This is a bandaid fix
for now
## Why It's Good For The Game
this is cbt
## Changelog
:cl:
fix: fixed cyborg bonesetter not working for compound fractures
fix: butchering not disabling in cyborg omnitool
fix: fixes a bug where if you select the omnitool it would be stuck in
surgery initiator mode
fix: cautery in off hand for cyborg omnitools not working
/:cl:

* [NO GBP] Critical fixes for cyborg omnitools

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Singul0 <[email protected]>
  • Loading branch information
3 people authored Apr 26, 2024
1 parent 32527cf commit 7bd3812
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/datums/components/surgery_initiator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
for(var/obj/item/borg/cyborg_omnitool/medical/omnitool in user.held_items)
if(omnitool.tool_behaviour == TOOL_CAUTERY)
has_cautery = TRUE
if(has_cautery)
if(!has_cautery)
patient.balloon_alert(user, "need a cautery in an inactive slot to stop the surgery!")
return
else if(!close_tool || close_tool.tool_behaviour != required_tool_type)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/robot/items/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@

/obj/item/borg/cyborg_omnitool/medical/reference_item_for_parameters()
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = tool_behaviour == (TOOL_SCALPEL && TOOL_SAW)
butchering.butchering_enabled = (tool_behaviour == TOOL_SCALPEL || tool_behaviour == TOOL_SAW)
RemoveElement(/datum/element/eyestab)
RemoveComponentSource(/datum/component/surgery_initiator)
qdel(GetComponent(/datum/component/surgery_initiator))
item_flags = SURGICAL_TOOL
switch(tool_behaviour)
if(TOOL_SCALPEL)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/surgery/bone_mending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/datum/surgery_step/repair_bone_hairline
name = "repair hairline fracture (bonesetter/bone gel/tape)"
implements = list(
/obj/item/bonesetter = 100,
TOOL_BONESET = 100,
/obj/item/stack/medical/bone_gel = 100,
/obj/item/stack/sticky_tape/surgical = 100,
/obj/item/stack/sticky_tape/super = 50,
Expand Down Expand Up @@ -98,7 +98,7 @@
/datum/surgery_step/reset_compound_fracture
name = "reset bone (bonesetter)"
implements = list(
/obj/item/bonesetter = 100,
TOOL_BONESET = 100,
/obj/item/stack/sticky_tape/surgical = 60,
/obj/item/stack/sticky_tape/super = 40,
/obj/item/stack/sticky_tape = 20)
Expand Down

0 comments on commit 7bd3812

Please sign in to comment.