Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organ surgeries QOL and mechanical versions #3605

Merged
merged 12 commits into from
Oct 11, 2024
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
Loading