Skip to content

Commit

Permalink
Organ surgeries QOL and mechanical versions (#3605)
Browse files Browse the repository at this point in the history
* Robotic organ surgeries first pass

Ideally gives the organ repair surgeries to each of the organs

* Final edit on the chest organs

Fixes names and surgery steps

* Makes so ear/eye surgery is only preformable if damaged

Good clarity

* Mechanical steps for ear and eye surgeries

Im a little worried about removing the "requires_bodypart_type = NONE" But if its included the surgery appears twice. Once for each version.

* Modularization

I now know what modularization is!
Moves the six surgeries into the monkestation code

* Absolucys organ damage check change

Co-authored-by: Lucy <[email protected]>

* Revert "Modularization"

This reverts commit 11e2f78.

* Reapply "Modularization"

This reverts commit ac90bd9.

* So you gotta tick surgeries

* Modularization for ear surgeries

* Eyes too

Best of luck

---------

Co-authored-by: Lucy <[email protected]>
  • Loading branch information
Gw0sty and Absolucy authored Oct 11, 2024
1 parent 2f39eef commit 1d86f03
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 7 deletions.
6 changes: 3 additions & 3 deletions code/modules/surgery/ear_surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

/datum/surgery/ear_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/internal/ears/target_ears = target.get_organ_slot(ORGAN_SLOT_EARS)
if(!target_ears)
return FALSE
return TRUE
if(target_ears?.damage > 0) // monkestation edit: ear surgery is repeatable so no worries about wasting the surgery
return TRUE
return FALSE

/datum/surgery_step/fix_ears/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
Expand Down
7 changes: 3 additions & 4 deletions code/modules/surgery/eye_surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@

/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/internal/eyes/target_eyes = target.get_organ_slot(ORGAN_SLOT_EYES)
if(!target_eyes)
to_chat(user, span_warning("It's hard to do surgery on someone's eyes when [target.p_they()] [target.p_do()]n't have any."))
return FALSE
return TRUE
if(target_eyes?.damage > 0) // monkestation edit: eye surgery is repeatable so only give the option if damaged.
return TRUE
return FALSE

/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/lobectomy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@
human_target.losebreath += 4
human_target.adjustOrganLoss(ORGAN_SLOT_LUNGS, 10)
return FALSE

14 changes: 14 additions & 0 deletions monkestation/code/modules/surgery/coronary_bypass.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/surgery/coronary_bypass/mechanic
name = "Prosthesis Coronary Bypass"
requires_bodypart_type = BODYTYPE_ROBOTIC
target_mobtypes = list(/mob/living/carbon/human) // Simpler mobs don't have bodypart types
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/open_hatch,
/datum/surgery_step/mechanic_unwrench,
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/incise_heart,
/datum/surgery_step/coronary_bypass,
/datum/surgery_step/mechanic_wrench,
/datum/surgery_step/mechanic_close,
)
14 changes: 14 additions & 0 deletions monkestation/code/modules/surgery/ear_surgery.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/surgery/ear_surgery
requires_bodypart_type = BODYTYPE_ORGANIC

/datum/surgery/ear_surgery/mechanic
name = "Ear surgery"
requires_bodypart_type = BODYTYPE_ROBOTIC
target_mobtypes = list(/mob/living/carbon/human)
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/open_hatch,
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/fix_ears,
/datum/surgery_step/mechanic_close,
)
14 changes: 14 additions & 0 deletions monkestation/code/modules/surgery/eye_surgery.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/surgery/eye_surgery
requires_bodypart_type = BODYTYPE_ORGANIC

/datum/surgery/eye_surgery/mechanic
name = "Eye surgery"
requires_bodypart_type = BODYTYPE_ROBOTIC
target_mobtypes = list(/mob/living/carbon/human)
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/open_hatch,
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/fix_eyes,
/datum/surgery_step/mechanic_close,
)
15 changes: 15 additions & 0 deletions monkestation/code/modules/surgery/gastrectomy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/surgery/gastrectomy/mechanic
name = "Prosthesis Gastrectomy"
requires_bodypart_type = BODYTYPE_ROBOTIC
target_mobtypes = list(/mob/living/carbon/human) // Simpler mobs don't have bodypart types
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/open_hatch,
/datum/surgery_step/mechanic_unwrench,
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/incise,
/datum/surgery_step/gastrectomy,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/mechanic_wrench,
/datum/surgery_step/mechanic_close,
)
14 changes: 14 additions & 0 deletions monkestation/code/modules/surgery/hepatectomy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/surgery/hepatectomy/mechanic
name = "Prosthesis Hepatectomy"
requires_bodypart_type = BODYTYPE_ROBOTIC
target_mobtypes = list(/mob/living/carbon/human) // Simpler mobs don't have bodypart types
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/open_hatch,
/datum/surgery_step/mechanic_unwrench,
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/incise,
/datum/surgery_step/hepatectomy,
/datum/surgery_step/mechanic_wrench,
/datum/surgery_step/mechanic_close,
)
13 changes: 13 additions & 0 deletions monkestation/code/modules/surgery/lobectomy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/datum/surgery/lobectomy/mechanic
name = "Prosthesis Lobectomy"
requires_bodypart_type = BODYTYPE_ROBOTIC
target_mobtypes = list(/mob/living/carbon/human) // Simpler mobs don't have bodypart types
steps = list(
/datum/surgery_step/mechanic_open,
/datum/surgery_step/open_hatch,
/datum/surgery_step/mechanic_unwrench,
/datum/surgery_step/prepare_electronics,
/datum/surgery_step/lobectomy,
/datum/surgery_step/mechanic_wrench,
/datum/surgery_step/mechanic_close,
)
6 changes: 6 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7914,7 +7914,13 @@
#include "monkestation\code\modules\storytellers\storytellers\vote.dm"
#include "monkestation\code\modules\storytellers\storytellers\warrior.dm"
#include "monkestation\code\modules\surgery\blood_filter.dm"
#include "monkestation\code\modules\surgery\coronary_bypass.dm"
#include "monkestation\code\modules\surgery\ear_surgery.dm"
#include "monkestation\code\modules\surgery\eye_surgery.dm"
#include "monkestation\code\modules\surgery\gastrectomy.dm"
#include "monkestation\code\modules\surgery\healing.dm"
#include "monkestation\code\modules\surgery\hepatectomy.dm"
#include "monkestation\code\modules\surgery\lobectomy.dm"
#include "monkestation\code\modules\surgery\nif_debonding.dm"
#include "monkestation\code\modules\surgery\advanced\brainwashing.dm"
#include "monkestation\code\modules\surgery\bodyparts\arachnid_bodyparts.dm"
Expand Down

0 comments on commit 1d86f03

Please sign in to comment.