From 7088097eb8422a782fc2d44d6912bda2768591fa Mon Sep 17 00:00:00 2001 From: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:07:05 +1000 Subject: [PATCH] [NO SELF SURGERY] Cybernetically augmented humanoids have alternative surgeries (both standard and advanced) [NO SELF SURGERY], as well as other misc additions (#84980) ## About The Pull Request ### Cybernetic variant surgeries Many of the surgeries able to be performed on organic limbs now have a version for robotic limbs. This includes; ### NONE OF THESE ARE SELF SURGERY OPTIONS - Organ repair surgeries - Stomach Pumps - Blood filtering - Autopsies - Lobotomies - Pacification - Lipoplasty - Amputation - Brainwashing (including the Sleeper Agent protocol) - Nerve Splicing and Nerve Grounding - Vein Threading and Vein Muscle Membrane - Ligament Hook and Ligament Reinforcement - Cortex Folding and Cortex Imprint These utilize mechanical steps and unique versions of their special step that uses mechanical tools. But many of these are able to be performed using standard surgery tools. In fact, I've improved the chances for doing surgery using standard tools for mechanical steps, recognizing that medical is often going to end up with synths in medbay whether we like it or not. ### NONE OF THESE ARE SELF SURGERY OPTIONS ### Organ Repair Surgeries correct EMP Failure Cascades When you repair a synthetic organ using the organ repair surgery, it reverses the effects of organ failure from an EMP. That is, the permanent failure of an organ. This allows for an alternative method to replacing that organ wholesale, which makes treating synths a lot easier for medical and EMPs less of a RNG death knell for people with cybernetic organs. However, it still needs the surgery to correct the error, so this isn't removing the danger of being EMP'd. ### Health Scanners report EMP Failure Cascades Scanning someone with a cybernetic organ now actually tells you that the organ is failing. Wow, why wasn't this already the case? ## Why It's Good For The Game #### Surgeries With the new techweb changes, augmented crew are becoming a lot, lot more common place, as are the implantation of cybernetics. These are required for research to be able to progress both medical and robotics technology. Therefore, those using these items are becoming a lot more common place. However, our medical system is quite blind to these people as of the moment. A lot of surgeries that are critical to recovering the injured/dead do not work on them outright, and medical can't resolve the problems that come with cybernetic organs entirely. This change hopefully modernizes our surgeries to account for these synthetic/cybernetically-altered crew members that neither forces people to choose between taking them to medical or robotics (they're often going to end up in medical regardless), and letting either department to function as a place for these crew to obtain medical services. Also gives them some cooler flavour to their surgeries, which I think is the most important part of this change. It actually feels like you're more than human without getting too much in the way of gameplay loops and over complicating things. Edit: To provide a bit of extra clarity on 'Why allow the advanced surgeries?' You can actually have the benefits of the advanced surgeries as an augmented humanoid. The problem is that it has to take place before you are augmented. They're not mutually exclusive, just slow to apply. There isn't much reason for there not to be a method to apply them to robotic people, particularly since augmentations are expected earlier in the round than advanced surgeries. #### EMP Failure and Detection This mechanic is probably what people hate the most about cybernetics. It is largely invisible, and forces you to have to go through a tedious process of organ replacement on what could be any one of your organs, since it wasn't being broadcast to the user which one is failing until you are possibly already doubling over. Now, it is easier for medical staff to identify if they have a cybernetically enhanced patient in the midst of a failure cascade, and have the means to resolve the problem. Robotics and cyborgs can too, since sometimes they'll have the means usually to do the same operations and detection. ## Changelog :cl: add: Robotic variants of many of the standard and advanced humanoid surgeries. You cannot perform self surgery with these surgeries. balance: It is easier to do robotic surgeries with normal surgery tools. qol: It is now possible to detect EMP organ failure cascades via health scanners. qol: EMP organ failure cascades can be reversed by doing organ repair surgeries targeting the failing organ. /:cl: --------- Co-authored-by: Jacquerel --- .../pirate/pirate_shuttle_equipment.dm | 5 +- code/modules/mod/modules/modules_medical.dm | 9 +++ .../research/designs/medical_designs.dm | 71 ++++++++++++++++++- .../research/techweb/nodes/alien_nodes.dm | 1 + .../research/techweb/nodes/surgery_nodes.dm | 10 +++ .../advanced/bioware/cortex_folding.dm | 15 ++++ .../advanced/bioware/cortex_imprint.dm | 16 +++++ .../surgery/advanced/bioware/ligament_hook.dm | 16 +++++ .../bioware/ligament_reinforcement.dm | 16 +++++ .../surgery/advanced/bioware/muscled_veins.dm | 15 ++++ .../advanced/bioware/nerve_grounding.dm | 15 ++++ .../advanced/bioware/nerve_splicing.dm | 15 ++++ .../advanced/bioware/vein_threading.dm | 15 ++++ code/modules/surgery/advanced/brainwashing.dm | 29 +++++++- code/modules/surgery/advanced/lobotomy.dm | 26 ++++++- code/modules/surgery/advanced/pacification.dm | 28 +++++++- code/modules/surgery/amputation.dm | 26 ++++++- code/modules/surgery/autopsy.dm | 10 +++ code/modules/surgery/blood_filter.dm | 13 ++++ code/modules/surgery/brain_surgery.dm | 24 ++++++- code/modules/surgery/coronary_bypass.dm | 37 ++++++++++ code/modules/surgery/gastrectomy.dm | 25 +++++++ code/modules/surgery/hepatectomy.dm | 25 +++++++ code/modules/surgery/lipoplasty.dm | 43 ++++++++++- code/modules/surgery/lobectomy.dm | 29 +++++++- code/modules/surgery/mechanic_steps.dm | 16 ++--- code/modules/surgery/organ_manipulation.dm | 4 +- code/modules/surgery/organs/_organ.dm | 3 + code/modules/surgery/revival.dm | 14 +++- code/modules/surgery/sleeper_protocol.dm | 30 +++++++- code/modules/surgery/stomachpump.dm | 12 ++++ 31 files changed, 588 insertions(+), 25 deletions(-) diff --git a/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm b/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm index 16cad321853..c2c8d872cf3 100644 --- a/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm +++ b/code/modules/antagonists/pirate/pirate_shuttle_equipment.dm @@ -161,11 +161,14 @@ desc = "A disk that contains advanced surgery procedures, must be loaded into an Operating Console." surgeries = list( /datum/surgery/advanced/lobotomy, + /datum/surgery/advanced/lobotomy/mechanic, /datum/surgery/advanced/bioware/vein_threading, + /datum/surgery/advanced/bioware/vein_threading/mechanic, /datum/surgery/advanced/bioware/nerve_splicing, + /datum/surgery/advanced/bioware/nerve_splicing/mechanic, /datum/surgery_step/heal/combo/upgraded, /datum/surgery_step/pacify, - /datum/surgery_step/revive, + /datum/surgery_step/pacify/mechanic, ) //Pad & Pad Terminal diff --git a/code/modules/mod/modules/modules_medical.dm b/code/modules/mod/modules/modules_medical.dm index b828169e3bf..7a802cf0f6c 100644 --- a/code/modules/mod/modules/modules_medical.dm +++ b/code/modules/mod/modules/modules_medical.dm @@ -411,12 +411,21 @@ /datum/surgery/advanced/pacify, /datum/surgery/healing/combo/upgraded/femto, /datum/surgery/advanced/brainwashing, + /datum/surgery/advanced/brainwashing/mechanic, /datum/surgery/advanced/bioware/nerve_splicing, + /datum/surgery/advanced/bioware/nerve_splicing/mechanic, /datum/surgery/advanced/bioware/nerve_grounding, + /datum/surgery/advanced/bioware/nerve_grounding/mechanic, /datum/surgery/advanced/bioware/vein_threading, + /datum/surgery/advanced/bioware/vein_threading/mechanic, /datum/surgery/advanced/bioware/muscled_veins, + /datum/surgery/advanced/bioware/muscled_veins/mechanic, /datum/surgery/advanced/bioware/ligament_hook, + /datum/surgery/advanced/bioware/ligament_hook/mechanic, /datum/surgery/advanced/bioware/ligament_reinforcement, + /datum/surgery/advanced/bioware/ligament_reinforcement/mechanic, /datum/surgery/advanced/bioware/cortex_imprint, + /datum/surgery/advanced/bioware/cortex_imprint/mechanic, /datum/surgery/advanced/bioware/cortex_folding, + /datum/surgery/advanced/bioware/cortex_folding/mechanic, ) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 27dbbca1d17..23a41da63ec 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -1070,6 +1070,12 @@ surgery = /datum/surgery/advanced/lobotomy research_icon_state = "surgery_head" +/datum/design/surgery/lobotomy/mechanic + name = "Wetware OS Destructive Defragmentation" + desc = "A destructive robotic defragmentation method which guarantees removal of almost all brain traumas, but might cause another permanent trauma in return." + id = "surgery_lobotomy_mechanic" + surgery = /datum/surgery/advanced/lobotomy/mechanic + /datum/design/surgery/pacify name = "Pacification" desc = "A surgical procedure which permanently inhibits the aggression center of the brain, making the patient unwilling to cause direct harm." @@ -1077,6 +1083,12 @@ surgery = /datum/surgery/advanced/pacify research_icon_state = "surgery_head" +/datum/design/surgery/pacify/mechanic + name = "Aggression Suppression Programming" + desc = "Malware which permanently inhibits the aggression programming of the patient's neural network, making the patient unwilling to cause direct harm." + id = "surgery_pacify_mechanic" + surgery = /datum/surgery/advanced/pacify/mechanic + /datum/design/surgery/viral_bonding name = "Viral Bonding" desc = "A surgical procedure that forces a symbiotic relationship between a virus and its host. The patient must be dosed with spaceacillin, virus food, and formaldehyde." @@ -1135,6 +1147,12 @@ surgery = /datum/surgery/advanced/brainwashing research_icon_state = "surgery_head" +/datum/design/surgery/brainwashing/mechanic + name = "Reprogramming" + desc = "Malware which directly implants a directive into the robotic patient's operating system, making it their absolute priority. It can be cleared using a mindshield implant." + id = "surgery_brainwashing_mechanic" + surgery = /datum/surgery/advanced/brainwashing/mechanic + /datum/design/surgery/nerve_splicing name = "Nerve Splicing" desc = "A surgical procedure which splices the patient's nerves, making them more resistant to stuns." @@ -1142,6 +1160,12 @@ surgery = /datum/surgery/advanced/bioware/nerve_splicing research_icon_state = "surgery_chest" +/datum/design/surgery/nerve_splicing/mechanic + name = "System Automatic Reset Subroutine" + desc = "A robotic upgrade which upgrades a robotic patient's automatic systems, making them more resistant to stuns." + id = "surgery_nerve_splice_mechanic" + surgery = /datum/surgery/advanced/bioware/nerve_splicing/mechanic + /datum/design/surgery/nerve_grounding name = "Nerve Grounding" desc = "A surgical procedure which makes the patient's nerves act as grounding rods, protecting them from electrical shocks." @@ -1149,6 +1173,12 @@ surgery = /datum/surgery/advanced/bioware/nerve_grounding research_icon_state = "surgery_chest" +/datum/design/surgery/nerve_grounding/mechanic + name = "System Shock Dampening" + desc = "A robotic upgrade which installs grounding rods into the robotic patient's system, protecting them from electrical shocks." + id = "surgery_nerve_ground_mechanic" + surgery = /datum/surgery/advanced/bioware/nerve_grounding/mechanic + /datum/design/surgery/vein_threading name = "Vein Threading" desc = "A surgical procedure which severely reduces the amount of blood lost in case of injury." @@ -1156,13 +1186,25 @@ surgery = /datum/surgery/advanced/bioware/vein_threading research_icon_state = "surgery_chest" +/datum/design/surgery/vein_threading/mechanic + name = "Hydraulics Routing Optimization" + desc = "A robotic upgrade which severely reduces the amount of hydraulic fluid lost in case of injury." + id = "surgery_vein_thread_mechanic" + surgery = /datum/surgery/advanced/bioware/vein_threading/mechanic + /datum/design/surgery/muscled_veins name = "Vein Muscle Membrane" - desc = "A surgical procedure which adds a muscled membrane to blood vessels, allowing them to pump blood without a heart." + desc = "A surgical procedure which adds a muscled membrane to blood vessels, allowing a patient to pump blood without a heart." id = "surgery_muscled_veins" surgery = /datum/surgery/advanced/bioware/muscled_veins research_icon_state = "surgery_chest" +/datum/design/surgery/muscled_veins/mechanic + name = "Hydraulics Redundancy Subroutine" + desc = "A robotic upgrade which adds sophisticated hydraulics redundancies, allowing a patient to pump hydraulic fluid without an engine." + id = "surgery_muscled_veins_mechanic" + surgery = /datum/surgery/advanced/bioware/muscled_veins/mechanic + /datum/design/surgery/ligament_hook name = "Ligament Hook" desc = "A surgical procedure which reshapes the connections between torso and limbs, making it so limbs can be attached manually if severed. \ @@ -1171,6 +1213,13 @@ surgery = /datum/surgery/advanced/bioware/ligament_hook research_icon_state = "surgery_chest" +/datum/design/surgery/ligament_hook/mechanic + name = "Anchor Point Snaplocks" + desc = "A robotic upgrade which installs rapid detachment anchor points, making it so limbs can be attached manually if detached. \ + However this weakens the connection, making them easier to detach as well." + id = "surgery_ligament_hook_mechanic" + surgery = /datum/surgery/advanced/bioware/ligament_hook/mechanic + /datum/design/surgery/ligament_reinforcement name = "Ligament Reinforcement" desc = "A surgical procedure which adds a protective tissue and bone cage around the connections between the torso and limbs, preventing dismemberment. \ @@ -1179,6 +1228,13 @@ surgery = /datum/surgery/advanced/bioware/ligament_reinforcement research_icon_state = "surgery_chest" +/datum/design/surgery/ligament_reinforcement/mechanic + name = "Anchor Point Reinforcement" + desc = "A surgical procedure which adds reinforced limb anchor points to the patient's chassis, preventing dismemberment. \ + However, the nerve connections as a result are more easily interrupted, making it easier to disable limbs with damage." + id = "surgery_ligament_reinforcement_mechanic" + surgery = /datum/surgery/advanced/bioware/ligament_reinforcement/mechanic + /datum/design/surgery/cortex_imprint name = "Cortex Imprint" desc = "A surgical procedure which modifies the cerebral cortex into a redundant neural pattern, making the brain able to bypass damage caused by minor brain traumas." @@ -1186,6 +1242,13 @@ surgery = /datum/surgery/advanced/bioware/cortex_imprint research_icon_state = "surgery_head" +/datum/design/surgery/cortex_imprint/mechanic + name = "Wetware OS Ver 2.0" + desc = "A surgical procedure which updates the patient's operating system to the 'latest version', whatever that means, making the brain able to bypass damage caused by minor brain traumas. \ + Shame about all the adware." + id = "surgery_cortex_imprint_mechanic" + surgery = /datum/surgery/advanced/bioware/cortex_imprint/mechanic + /datum/design/surgery/cortex_folding name = "Cortex Folding" desc = "A surgical procedure which modifies the cerebral cortex into a complex fold, giving space to non-standard neural patterns." @@ -1193,6 +1256,12 @@ surgery = /datum/surgery/advanced/bioware/cortex_folding research_icon_state = "surgery_head" +/datum/design/surgery/cortex_folding/mechanic + name = "Wetware OS Labyrinthian Programming" + desc = "A robotic upgrade which reprograms the patient's neural network in a downright eldritch programming language, giving space to non-standard neural patterns." + id = "surgery_cortex_folding_mechanic" + surgery = /datum/surgery/advanced/bioware/cortex_folding/mechanic + /datum/design/surgery/necrotic_revival name = "Necrotic Revival" desc = "An experimental surgical procedure that stimulates the growth of a Romerol tumor inside the patient's brain. Requires zombie powder or rezadone." diff --git a/code/modules/research/techweb/nodes/alien_nodes.dm b/code/modules/research/techweb/nodes/alien_nodes.dm index c5d21c255cf..58e8dbfc68f 100644 --- a/code/modules/research/techweb/nodes/alien_nodes.dm +++ b/code/modules/research/techweb/nodes/alien_nodes.dm @@ -73,6 +73,7 @@ "alien_saw", "alien_scalpel", "surgery_brainwashing", + "surgery_brainwashing_mechanic", "surgery_heal_combo_upgrade_femto", "surgery_zombie", ) diff --git a/code/modules/research/techweb/nodes/surgery_nodes.dm b/code/modules/research/techweb/nodes/surgery_nodes.dm index 0b8812191e2..4be7a3256ac 100644 --- a/code/modules/research/techweb/nodes/surgery_nodes.dm +++ b/code/modules/research/techweb/nodes/surgery_nodes.dm @@ -32,6 +32,7 @@ "surgery_heal_burn_upgrade_femto", "surgery_heal_combo", "surgery_lobotomy", + "surgery_lobotomy_mechanic", "surgery_wing_reconstruction", ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_2_POINTS) @@ -44,15 +45,24 @@ prereq_ids = list(TECHWEB_NODE_SURGERY_ADV) design_ids = list( "surgery_cortex_folding", + "surgery_cortex_folding_mechanic", "surgery_cortex_imprint", + "surgery_cortex_imprint_mechanic", "surgery_heal_combo_upgrade", "surgery_ligament_hook", + "surgery_ligament_hook_mechanic", "surgery_ligament_reinforcement", + "surgery_ligament_reinforcement_mechanic", "surgery_muscled_veins", + "surgery_muscled_veins_mechanic", "surgery_nerve_ground", + "surgery_nerve_ground_mechanic", "surgery_nerve_splice", + "surgery_nerve_splice_mechanic", "surgery_pacify", + "surgery_pacify_mechanic", "surgery_vein_thread", + "surgery_vein_thread_mechanic", "surgery_viral_bond", ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS) diff --git a/code/modules/surgery/advanced/bioware/cortex_folding.dm b/code/modules/surgery/advanced/bioware/cortex_folding.dm index 73792575a7b..2e20f0906ac 100644 --- a/code/modules/surgery/advanced/bioware/cortex_folding.dm +++ b/code/modules/surgery/advanced/bioware/cortex_folding.dm @@ -14,6 +14,21 @@ status_effect_gained = /datum/status_effect/bioware/cortex/folded +/datum/surgery/advanced/bioware/cortex_folding/mechanic + name = "Wetware OS Labyrinthian Programming" + desc = "A robotic upgrade which reprograms the patient's neural network in a downright eldritch programming language, giving space to non-standard neural patterns." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/fold_cortex, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/advanced/bioware/cortex_folding/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/brain/target_brain = target.get_organ_slot(ORGAN_SLOT_BRAIN) if(!target_brain) diff --git a/code/modules/surgery/advanced/bioware/cortex_imprint.dm b/code/modules/surgery/advanced/bioware/cortex_imprint.dm index 26b43ee691f..27a75a26167 100644 --- a/code/modules/surgery/advanced/bioware/cortex_imprint.dm +++ b/code/modules/surgery/advanced/bioware/cortex_imprint.dm @@ -14,6 +14,22 @@ status_effect_gained = /datum/status_effect/bioware/cortex/imprinted +/datum/surgery/advanced/bioware/cortex_imprint/mechanic + name = "Wetware OS Ver 2.0" + desc = "A robotic upgrade which updates the patient's operating system to the 'latest version', whatever that means, making the brain able to bypass damage caused by minor brain traumas. \ + Shame about all the adware." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/imprint_cortex, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/advanced/bioware/cortex_imprint/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/brain/target_brain = target.get_organ_slot(ORGAN_SLOT_BRAIN) if(!target_brain) diff --git a/code/modules/surgery/advanced/bioware/ligament_hook.dm b/code/modules/surgery/advanced/bioware/ligament_hook.dm index b4a8b168a2e..8cae41a9602 100644 --- a/code/modules/surgery/advanced/bioware/ligament_hook.dm +++ b/code/modules/surgery/advanced/bioware/ligament_hook.dm @@ -15,6 +15,22 @@ status_effect_gained = /datum/status_effect/bioware/ligaments/hooked +/datum/surgery/advanced/bioware/ligament_hook/mechanic + name = "Anchor Point Snaplocks" + desc = "A robotic upgrade which installs rapid detachment anchor points, making it so limbs can be attached manually if detached. \ + However this weakens the connection, making them easier to detach as well." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/reshape_ligaments, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/apply_bioware/reshape_ligaments name = "reshape ligaments (hand)" diff --git a/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm b/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm index 27f4674c7b6..02a9eb15e81 100644 --- a/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm +++ b/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm @@ -15,6 +15,22 @@ status_effect_gained = /datum/status_effect/bioware/ligaments/reinforced +/datum/surgery/advanced/bioware/ligament_reinforcement/mechanic + name = "Anchor Point Reinforcement" + desc = "A surgical procedure which adds reinforced limb anchor points to the patient's chassis, preventing dismemberment. \ + However, the nerve connections as a result are more easily interrupted, making it easier to disable limbs with damage." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/reinforce_ligaments, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/apply_bioware/reinforce_ligaments name = "reinforce ligaments (hand)" diff --git a/code/modules/surgery/advanced/bioware/muscled_veins.dm b/code/modules/surgery/advanced/bioware/muscled_veins.dm index 13355a56948..05fb341d06c 100644 --- a/code/modules/surgery/advanced/bioware/muscled_veins.dm +++ b/code/modules/surgery/advanced/bioware/muscled_veins.dm @@ -14,6 +14,21 @@ status_effect_gained = /datum/status_effect/bioware/heart/muscled_veins +/datum/surgery/advanced/bioware/muscled_veins/mechanic + name = "Hydraulics Redundancy Subroutine" + desc = "A robotic upgrade which adds sophisticated hydraulics redundancies, allowing a patient to pump hydraulic fluid without an engine." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/muscled_veins, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/apply_bioware/muscled_veins name = "shape vein muscles (hand)" diff --git a/code/modules/surgery/advanced/bioware/nerve_grounding.dm b/code/modules/surgery/advanced/bioware/nerve_grounding.dm index b0879bb0734..611c4bbab78 100644 --- a/code/modules/surgery/advanced/bioware/nerve_grounding.dm +++ b/code/modules/surgery/advanced/bioware/nerve_grounding.dm @@ -14,6 +14,21 @@ status_effect_gained = /datum/status_effect/bioware/nerves/grounded +/datum/surgery/advanced/bioware/nerve_grounding/mechanic + name = "System Shock Dampening" + desc = "A robotic upgrade which installs grounding rods into the robotic patient's system, protecting them from electrical shocks." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/ground_nerves, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/apply_bioware/ground_nerves name = "ground nerves (hand)" time = 15.5 SECONDS diff --git a/code/modules/surgery/advanced/bioware/nerve_splicing.dm b/code/modules/surgery/advanced/bioware/nerve_splicing.dm index 5962f828009..3481e6e08a3 100644 --- a/code/modules/surgery/advanced/bioware/nerve_splicing.dm +++ b/code/modules/surgery/advanced/bioware/nerve_splicing.dm @@ -14,6 +14,21 @@ status_effect_gained = /datum/status_effect/bioware/nerves/spliced +/datum/surgery/advanced/bioware/nerve_splicing/mechanic + name = "System Automatic Reset Subroutine" + desc = "A robotic upgrade which upgrades a robotic patient's automatic systems, making them more resistant to stuns." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/splice_nerves, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/apply_bioware/splice_nerves name = "splice nerves (hand)" time = 15.5 SECONDS diff --git a/code/modules/surgery/advanced/bioware/vein_threading.dm b/code/modules/surgery/advanced/bioware/vein_threading.dm index ee83ddbba4d..9eced408beb 100644 --- a/code/modules/surgery/advanced/bioware/vein_threading.dm +++ b/code/modules/surgery/advanced/bioware/vein_threading.dm @@ -14,6 +14,21 @@ status_effect_gained = /datum/status_effect/bioware/heart/threaded_veins +/datum/surgery/advanced/bioware/vein_threading/mechanic + name = "Hydraulics Routing Optimization" + desc = "A robotic upgrade which severely reduces the amount of hydraulic fluid lost in case of injury." + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/prepare_electronics, + /datum/surgery_step/apply_bioware/thread_veins, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/apply_bioware/thread_veins name = "thread veins (hand)" diff --git a/code/modules/surgery/advanced/brainwashing.dm b/code/modules/surgery/advanced/brainwashing.dm index 69b2a3d83c7..0e80f89b6dc 100644 --- a/code/modules/surgery/advanced/brainwashing.dm +++ b/code/modules/surgery/advanced/brainwashing.dm @@ -1,7 +1,10 @@ /obj/item/disk/surgery/brainwashing name = "Brainwashing Surgery Disk" desc = "The disk provides instructions on how to impress an order on a brain, making it the primary objective of the patient." - surgeries = list(/datum/surgery/advanced/brainwashing) + surgeries = list( + /datum/surgery/advanced/brainwashing, + /datum/surgery/advanced/brainwashing/mechanic, + ) /datum/surgery/advanced/brainwashing name = "Brainwashing" @@ -16,6 +19,19 @@ /datum/surgery_step/close, ) +/datum/surgery/advanced/brainwashing/mechanic + name = "Reprogramming" + desc = "Malware which directly implants a directive into the robotic patient's operating system, making it their absolute priority. It can be cleared using a mindshield implant." + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/brainwash/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/advanced/brainwashing/can_start(mob/user, mob/living/carbon/target) if(!..()) return FALSE @@ -37,6 +53,17 @@ failure_sound = 'sound/surgery/organ2.ogg' var/objective +/datum/surgery_step/brainwash/mechanic + name = "reprogram (multitool)" + implements = list( + TOOL_MULTITOOL = 85, + TOOL_HEMOSTAT = 50, + TOOL_WIRECUTTER = 50, + /obj/item/stack/package_wrap = 35, + /obj/item/stack/cable_coil = 15) + preop_sound = 'sound/items/taperecorder/tape_flip.ogg' + success_sound = 'sound/items/taperecorder/taperecorder_close.ogg' + /datum/surgery_step/brainwash/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) objective = tgui_input_text(user, "Choose the objective to imprint on your victim's brain", "Brainwashing") if(!objective) diff --git a/code/modules/surgery/advanced/lobotomy.dm b/code/modules/surgery/advanced/lobotomy.dm index b36bcee140a..1c82052fe98 100644 --- a/code/modules/surgery/advanced/lobotomy.dm +++ b/code/modules/surgery/advanced/lobotomy.dm @@ -2,7 +2,6 @@ name = "Lobotomy" desc = "An invasive surgical procedure which guarantees removal of almost all brain traumas, but might cause another permanent trauma in return." possible_locs = list(BODY_ZONE_HEAD) - requires_bodypart_type = NONE steps = list( /datum/surgery_step/incise, /datum/surgery_step/retract_skin, @@ -12,6 +11,19 @@ /datum/surgery_step/close, ) +/datum/surgery/advanced/lobotomy/mechanic + name = "Wetware OS Destructive Defragmentation" + desc = "A destructive robotic defragmentation method which guarantees removal of almost all brain traumas, but might cause another permanent trauma in return." + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/lobotomize/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/advanced/lobotomy/can_start(mob/user, mob/living/carbon/target) . = ..() if(!.) @@ -36,6 +48,18 @@ failure_sound = 'sound/surgery/organ2.ogg' surgery_effects_mood = TRUE +/datum/surgery_step/lobotomize/mechanic + name = "execute neural defragging (multitool)" + implements = list( + TOOL_MULTITOOL = 85, + /obj/item/melee/energy/sword = 55, + /obj/item/knife = 35, + /obj/item/shard = 25, + /obj/item = 20, + ) + preop_sound = 'sound/items/taperecorder/tape_flip.ogg' + success_sound = 'sound/items/taperecorder/taperecorder_close.ogg' + /datum/surgery_step/lobotomize/tool_check(mob/user, obj/item/tool) if(implement_type == /obj/item && !tool.get_sharpness()) return FALSE diff --git a/code/modules/surgery/advanced/pacification.dm b/code/modules/surgery/advanced/pacification.dm index 48a2d1c88e6..6db290e1df7 100644 --- a/code/modules/surgery/advanced/pacification.dm +++ b/code/modules/surgery/advanced/pacification.dm @@ -2,7 +2,6 @@ name = "Pacification" desc = "A surgical procedure which permanently inhibits the aggression center of the brain, making the patient unwilling to cause direct harm." possible_locs = list(BODY_ZONE_HEAD) - requires_bodypart_type = NONE steps = list( /datum/surgery_step/incise, /datum/surgery_step/retract_skin, @@ -12,6 +11,19 @@ /datum/surgery_step/close, ) +/datum/surgery/advanced/pacify/mechanic + name = "Aggression Suppression Programming" + desc = "Malware which permanently inhibits the aggression programming of the patient's neural network, making the patient unwilling to cause direct harm." + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/pacify/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/advanced/pacify/can_start(mob/user, mob/living/carbon/target) . = ..() var/obj/item/organ/internal/brain/target_brain = target.get_organ_slot(ORGAN_SLOT_BRAIN) @@ -23,12 +35,24 @@ implements = list( TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 35, - /obj/item/pen = 15) + /obj/item/pen = 15, + ) time = 40 preop_sound = 'sound/surgery/hemostat1.ogg' success_sound = 'sound/surgery/hemostat1.ogg' failure_sound = 'sound/surgery/organ2.ogg' +/datum/surgery_step/pacify/mechanic + name = "delete aggression programming (multitool)" + implements = list( + TOOL_MULTITOOL = 100, + TOOL_HEMOSTAT = 35, + TOOL_SCREWDRIVER = 35, + /obj/item/pen = 15, + ) + preop_sound = 'sound/items/taperecorder/tape_flip.ogg' + success_sound = 'sound/items/taperecorder/taperecorder_close.ogg' + /datum/surgery_step/pacify/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, diff --git a/code/modules/surgery/amputation.dm b/code/modules/surgery/amputation.dm index cd2910f4d11..49793c1ad2d 100644 --- a/code/modules/surgery/amputation.dm +++ b/code/modules/surgery/amputation.dm @@ -1,7 +1,6 @@ /datum/surgery/amputation name = "Amputation" - requires_bodypart_type = NONE surgery_flags = SURGERY_REQUIRE_RESTING | SURGERY_REQUIRE_LIMB | SURGERY_MORBID_CURIOSITY possible_locs = list( BODY_ZONE_R_ARM, @@ -19,6 +18,15 @@ /datum/surgery_step/sever_limb, ) +/datum/surgery/amputation/mechanic + name = "Disassemble" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/sever_limb/mechanic, //The benefit of being robotic; people can pull you apart in an instant! Wait, that's not a benefit... + ) + /datum/surgery/amputation/can_start(mob/user, mob/living/patient) if(HAS_TRAIT(patient, TRAIT_NODISMEMBER)) return FALSE @@ -34,12 +42,26 @@ /obj/item/melee/arm_blade = 80, /obj/item/fireaxe = 50, /obj/item/hatchet = 40, - /obj/item/knife/butcher = 25) + /obj/item/knife/butcher = 25, + ) time = 64 preop_sound = 'sound/surgery/scalpel1.ogg' success_sound = 'sound/surgery/organ2.ogg' surgery_effects_mood = TRUE +/datum/surgery_step/sever_limb/mechanic + name = "detach limb (wrench or crowbar)" + implements = list( + /obj/item/shovel/giant_wrench = 300, + TOOL_WRENCH = 100, + TOOL_CROWBAR = 100, + TOOL_SCALPEL = 50, + TOOL_SAW = 50, + ) + time = 20 //WAIT I NEED THAT!! + preop_sound = 'sound/items/ratchet.ogg' + preop_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/sever_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, diff --git a/code/modules/surgery/autopsy.dm b/code/modules/surgery/autopsy.dm index 6ff32f8b465..d0ada2dce55 100644 --- a/code/modules/surgery/autopsy.dm +++ b/code/modules/surgery/autopsy.dm @@ -9,6 +9,16 @@ /datum/surgery_step/close, ) +/datum/surgery/autopsy/mechanic + name = "System Failure Analysis" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/autopsy, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/autopsy/can_start(mob/user, mob/living/patient) if(!..()) return FALSE diff --git a/code/modules/surgery/blood_filter.dm b/code/modules/surgery/blood_filter.dm index 577e23cee1c..81af19c9621 100644 --- a/code/modules/surgery/blood_filter.dm +++ b/code/modules/surgery/blood_filter.dm @@ -9,6 +9,19 @@ /datum/surgery_step/close, ) + +/datum/surgery/blood_filter/mechanic + name = "Hydraulics Purge" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/filter_blood, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/blood_filter/can_start(mob/user, mob/living/carbon/target) if(HAS_TRAIT(target, TRAIT_HUSK)) //You can filter the blood of a dead person just not husked return FALSE diff --git a/code/modules/surgery/brain_surgery.dm b/code/modules/surgery/brain_surgery.dm index f9de1e01514..879cbdf7bf5 100644 --- a/code/modules/surgery/brain_surgery.dm +++ b/code/modules/surgery/brain_surgery.dm @@ -1,7 +1,6 @@ /datum/surgery/brain_surgery name = "Brain surgery" possible_locs = list(BODY_ZONE_HEAD) - requires_bodypart_type = NONE steps = list( /datum/surgery_step/incise, /datum/surgery_step/retract_skin, @@ -11,6 +10,19 @@ /datum/surgery_step/close, ) +/datum/surgery/brain_surgery/mechanic + name = "Wetware OS Diagnostics" + requires_bodypart_type = BODYTYPE_ROBOTIC + possible_locs = list(BODY_ZONE_HEAD) + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/fix_brain/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery_step/fix_brain name = "fix brain (hemostat)" implements = list( @@ -23,6 +35,16 @@ success_sound = 'sound/surgery/hemostat1.ogg' failure_sound = 'sound/surgery/organ2.ogg' +/datum/surgery_step/fix_brain/mechanic + name = "perform neural debugging (hemostat or multitool)" + implements = list( + TOOL_HEMOSTAT = 85, + TOOL_MULTITOOL = 85, + TOOL_SCREWDRIVER = 35, + /obj/item/pen = 15) + preop_sound = 'sound/items/taperecorder/tape_flip.ogg' + success_sound = 'sound/items/taperecorder/taperecorder_close.ogg' + /datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target) return target.get_organ_slot(ORGAN_SLOT_BRAIN) && ..() diff --git a/code/modules/surgery/coronary_bypass.dm b/code/modules/surgery/coronary_bypass.dm index bf79df82ad3..e9c136574b2 100644 --- a/code/modules/surgery/coronary_bypass.dm +++ b/code/modules/surgery/coronary_bypass.dm @@ -12,6 +12,19 @@ /datum/surgery_step/close, ) +/datum/surgery/gastrectomy/mechanic + name = "Engine Diagnostic" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/incise_heart/mechanic, + /datum/surgery_step/coronary_bypass/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/coronary_bypass/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/heart/target_heart = target.get_organ_slot(ORGAN_SLOT_HEART) if(isnull(target_heart) || target_heart.damage < 60 || target_heart.operated) @@ -33,6 +46,17 @@ failure_sound = 'sound/surgery/organ2.ogg' surgery_effects_mood = TRUE +/datum/surgery_step/incise_heart/mechanic + name = "access engine internals (scalpel or crowbar)" + implements = list( + TOOL_SCALPEL = 95, + TOOL_CROWBAR = 95, + /obj/item/melee/energy/sword = 65, + /obj/item/knife = 45, + /obj/item/shard = 35) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/incise_heart/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, @@ -87,6 +111,17 @@ success_sound = 'sound/surgery/hemostat1.ogg' failure_sound = 'sound/surgery/organ2.ogg' +/datum/surgery_step/coronary_bypass/mechanic + name = "perform maintenance (hemostat or wrench)" + implements = list( + TOOL_HEMOSTAT = 90, + TOOL_WRENCH = 90, + TOOL_WIRECUTTER = 35, + /obj/item/stack/package_wrap = 15, + /obj/item/stack/cable_coil = 5) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/coronary_bypass/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, @@ -102,6 +137,8 @@ var/obj/item/organ/internal/heart/target_heart = target.get_organ_slot(ORGAN_SLOT_HEART) if(target_heart) //slightly worrying if we lost our heart mid-operation, but that's life target_heart.operated = TRUE + if(target_heart.organ_flags & ORGAN_EMP) //If our organ is failing due to an EMP, fix that + target_heart.organ_flags &= ~ORGAN_EMP display_results( user, target, diff --git a/code/modules/surgery/gastrectomy.dm b/code/modules/surgery/gastrectomy.dm index 7ed006a5079..f498d220d2f 100644 --- a/code/modules/surgery/gastrectomy.dm +++ b/code/modules/surgery/gastrectomy.dm @@ -14,6 +14,18 @@ /datum/surgery_step/close, ) +/datum/surgery/gastrectomy/mechanic + name = "Nutrient Processing System Diagnostic" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/gastrectomy/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/gastrectomy/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/stomach/target_stomach = target.get_organ_slot(ORGAN_SLOT_STOMACH) if(isnull(target_stomach) || target_stomach.damage < 50 || target_stomach.operated) @@ -35,6 +47,17 @@ failure_sound = 'sound/surgery/organ2.ogg' surgery_effects_mood = TRUE +/datum/surgery_step/gastrectomy/mechanic + name = "perform maintenance (scalpel or wrench)" + implements = list( + TOOL_SCALPEL = 95, + TOOL_WRENCH = 95, + /obj/item/melee/energy/sword = 65, + /obj/item/knife = 45, + /obj/item/shard = 35) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/gastrectomy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, @@ -51,6 +74,8 @@ target_human.setOrganLoss(ORGAN_SLOT_STOMACH, 20) // Stomachs have a threshold for being able to even digest food, so I might tweak this number if(target_stomach) target_stomach.operated = TRUE + if(target_stomach.organ_flags & ORGAN_EMP) //If our organ is failing due to an EMP, fix that + target_stomach.organ_flags &= ~ORGAN_EMP display_results( user, target, diff --git a/code/modules/surgery/hepatectomy.dm b/code/modules/surgery/hepatectomy.dm index 27e74512c1f..2216ac7ad69 100644 --- a/code/modules/surgery/hepatectomy.dm +++ b/code/modules/surgery/hepatectomy.dm @@ -13,6 +13,18 @@ /datum/surgery_step/close, ) +/datum/surgery/hepatectomy/mechanic + name = "Impurity Management System Diagnostic" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/hepatectomy/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/hepatectomy/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/liver/target_liver = target.get_organ_slot(ORGAN_SLOT_LIVER) if(isnull(target_liver) || target_liver.damage < 50 || target_liver.operated) @@ -34,6 +46,17 @@ failure_sound = 'sound/surgery/organ2.ogg' surgery_effects_mood = TRUE +/datum/surgery_step/hepatectomy/mechanic + name = "perform maintenance (scalpel or wirecutter)" + implements = list( + TOOL_SCALPEL = 95, + TOOL_WRENCH = 95, + /obj/item/melee/energy/sword = 65, + /obj/item/knife = 45, + /obj/item/shard = 35) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/hepatectomy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, @@ -50,6 +73,8 @@ human_target.setOrganLoss(ORGAN_SLOT_LIVER, 10) //not bad, not great if(target_liver) target_liver.operated = TRUE + if(target_liver.organ_flags & ORGAN_EMP) //If our organ is failing due to an EMP, fix that + target_liver.organ_flags &= ~ORGAN_EMP display_results( user, target, diff --git a/code/modules/surgery/lipoplasty.dm b/code/modules/surgery/lipoplasty.dm index 71ad77b2370..6cb3dc8f757 100644 --- a/code/modules/surgery/lipoplasty.dm +++ b/code/modules/surgery/lipoplasty.dm @@ -9,6 +9,19 @@ /datum/surgery_step/close, ) +/datum/surgery/lipoplasty/mechanic + name = "Nutrient Reserve Expulsion" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/cut_fat/mechanic, + /datum/surgery_step/remove_fat/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target) if(!HAS_TRAIT_FROM(target, TRAIT_FAT, OBESITY) || target.nutrition < NUTRITION_LEVEL_WELL_FED) return FALSE @@ -22,7 +35,8 @@ TOOL_SAW = 100, /obj/item/shovel/serrated = 75, /obj/item/hatchet = 35, - /obj/item/knife/butcher = 25) + /obj/item/knife/butcher = 25, + ) time = 64 surgery_effects_mood = TRUE preop_sound = list( @@ -30,6 +44,19 @@ /obj/item = 'sound/surgery/scalpel1.ogg', ) +/datum/surgery_step/cut_fat/mechanic + name = "open fat containers (wrench or crowbar)" + implements = list( + TOOL_WRENCH = 95, + TOOL_CROWBAR = 95, + TOOL_SAW = 65, + /obj/item/melee/energy/sword = 65, + /obj/item/knife = 45, + /obj/item/shard = 35, + ) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/cut_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) user.visible_message(span_notice("[user] begins to cut away [target]'s excess fat."), span_notice("You begin to cut away [target]'s excess fat...")) display_results( @@ -58,11 +85,23 @@ implements = list( TOOL_RETRACTOR = 100, TOOL_SCREWDRIVER = 45, - TOOL_WIRECUTTER = 35) + TOOL_WIRECUTTER = 35, + ) time = 32 preop_sound = 'sound/surgery/retractor1.ogg' success_sound = 'sound/surgery/retractor2.ogg' +/datum/surgery_step/remove_fat/mechanic + name = "engage expulsion valve (screwdriver or wrench)" //gross + implements = list( + TOOL_SCREWDRIVER = 100, + TOOL_WRENCH = 100, + TOOL_WIRECUTTER = 35, + TOOL_RETRACTOR = 35, + ) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/surgery/organ2.ogg' + /datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, diff --git a/code/modules/surgery/lobectomy.dm b/code/modules/surgery/lobectomy.dm index 4ed1bad1c0b..a31af5f69cc 100644 --- a/code/modules/surgery/lobectomy.dm +++ b/code/modules/surgery/lobectomy.dm @@ -11,13 +11,24 @@ /datum/surgery_step/close, ) +/datum/surgery/lobectomy/mechanic + name = "Air Filtration Diagnostic" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/lobectomy/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/lobectomy/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/lungs/target_lungs = target.get_organ_slot(ORGAN_SLOT_LUNGS) if(isnull(target_lungs) || target_lungs.damage < 60 || target_lungs.operated) return FALSE return ..() - //lobectomy, removes the most damaged lung lobe with a 95% base success chance /datum/surgery_step/lobectomy name = "excise damaged lung node (scalpel)" @@ -32,6 +43,17 @@ failure_sound = 'sound/surgery/organ2.ogg' surgery_effects_mood = TRUE +/datum/surgery_step/lobectomy/mechanic + name = "Perform maintenance (scalpel or wrench)" + implements = list( + TOOL_SCALPEL = 95, + TOOL_WRENCH = 95, + /obj/item/melee/energy/sword = 65, + /obj/item/knife = 45, + /obj/item/shard = 35) + preop_sound = 'sound/items/ratchet.ogg' + success_sound = 'sound/machines/doorclick.ogg' + /datum/surgery_step/lobectomy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, @@ -46,8 +68,11 @@ if(ishuman(target)) var/mob/living/carbon/human/human_target = target var/obj/item/organ/internal/lungs/target_lungs = human_target.get_organ_slot(ORGAN_SLOT_LUNGS) - target_lungs.operated = TRUE human_target.setOrganLoss(ORGAN_SLOT_LUNGS, 60) + if(target_lungs) + target_lungs.operated = TRUE + if(target_lungs.organ_flags & ORGAN_EMP) //If our organ is failing due to an EMP, fix that + target_lungs.organ_flags &= ~ORGAN_EMP display_results( user, target, diff --git a/code/modules/surgery/mechanic_steps.dm b/code/modules/surgery/mechanic_steps.dm index 309090a03ca..e9bfcbe9490 100644 --- a/code/modules/surgery/mechanic_steps.dm +++ b/code/modules/surgery/mechanic_steps.dm @@ -1,6 +1,6 @@ //open shell /datum/surgery_step/mechanic_open - name = "unscrew shell (screwdriver)" + name = "unscrew shell (screwdriver or scalpel)" implements = list( TOOL_SCREWDRIVER = 100, TOOL_SCALPEL = 75, // med borgs could try to unscrew shell with scalpel @@ -30,7 +30,7 @@ //close shell /datum/surgery_step/mechanic_close - name = "screw shell (screwdriver)" + name = "screw shell (screwdriver or scalpel)" implements = list( TOOL_SCREWDRIVER = 100, TOOL_SCALPEL = 75, @@ -60,10 +60,10 @@ //prepare electronics /datum/surgery_step/prepare_electronics - name = "prepare electronics (multitool)" + name = "prepare electronics (multitool or hemostat)" implements = list( TOOL_MULTITOOL = 100, - TOOL_HEMOSTAT = 10) // try to reboot internal controllers via short circuit with some conductor + TOOL_HEMOSTAT = 75) time = 24 preop_sound = 'sound/items/taperecorder/tape_flip.ogg' success_sound = 'sound/items/taperecorder/taperecorder_close.ogg' @@ -80,10 +80,10 @@ //unwrench /datum/surgery_step/mechanic_unwrench - name = "unwrench bolts (wrench)" + name = "unwrench bolts (wrench or retractor)" implements = list( TOOL_WRENCH = 100, - TOOL_RETRACTOR = 10) + TOOL_RETRACTOR = 75) time = 24 preop_sound = 'sound/items/ratchet.ogg' @@ -105,10 +105,10 @@ //wrench /datum/surgery_step/mechanic_wrench - name = "wrench bolts (wrench)" + name = "wrench bolts (wrench or retractor)" implements = list( TOOL_WRENCH = 100, - TOOL_RETRACTOR = 10) + TOOL_RETRACTOR = 75) time = 24 preop_sound = 'sound/items/ratchet.ogg' diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm index ab99265c476..d96d558863b 100644 --- a/code/modules/surgery/organ_manipulation.dm +++ b/code/modules/surgery/organ_manipulation.dm @@ -55,7 +55,7 @@ ) /datum/surgery/organ_manipulation/mechanic - name = "Prosthesis organ manipulation" + name = "Hardware Manipulation" requires_bodypart_type = BODYTYPE_ROBOTIC surgery_flags = SURGERY_SELF_OPERABLE | SURGERY_REQUIRE_LIMB possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD) @@ -110,7 +110,7 @@ ) /datum/surgery/organ_manipulation/mechanic/external - name = "Prosthetic feature manipulation" + name = "Chassis Manipulation" possible_locs = list( BODY_ZONE_CHEST, BODY_ZONE_HEAD, diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm index e4bb7dfe769..98d947793ef 100644 --- a/code/modules/surgery/organs/_organ.dm +++ b/code/modules/surgery/organs/_organ.dm @@ -322,6 +322,9 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) if(advanced && (organ_flags & ORGAN_PROMINENT)) return "Harmful Foreign Body" + if(organ_flags & ORGAN_EMP) + return "EMP-Derived Failure Cascade in Progress" + if(owner.has_reagent(/datum/reagent/inverse/technetium)) return "[round((damage/maxHealth)*100, 1)]% damaged." diff --git a/code/modules/surgery/revival.dm b/code/modules/surgery/revival.dm index 405b693178f..bda1aaaafef 100644 --- a/code/modules/surgery/revival.dm +++ b/code/modules/surgery/revival.dm @@ -2,7 +2,6 @@ name = "Revival" desc = "An experimental surgical procedure which involves reconstruction and reactivation of the patient's brain even long after death. \ The body must still be able to sustain life." - requires_bodypart_type = NONE possible_locs = list(BODY_ZONE_CHEST) target_mobtypes = list(/mob/living) surgery_flags = SURGERY_REQUIRE_RESTING | SURGERY_MORBID_CURIOSITY @@ -16,6 +15,19 @@ /datum/surgery_step/close, ) +/datum/surgery/revival/mechanic + name = "Full System Reboot" + requires_bodypart_type = BODYTYPE_ROBOTIC + 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/revive, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/revival/can_start(mob/user, mob/living/target) if(!..()) return FALSE diff --git a/code/modules/surgery/sleeper_protocol.dm b/code/modules/surgery/sleeper_protocol.dm index 693b0fbfb5c..277a8c170d6 100644 --- a/code/modules/surgery/sleeper_protocol.dm +++ b/code/modules/surgery/sleeper_protocol.dm @@ -1,11 +1,15 @@ /obj/item/disk/surgery/sleeper_protocol name = "Suspicious Surgery Disk" desc = "The disk provides instructions on how to turn someone into a sleeper agent for the Syndicate." - surgeries = list(/datum/surgery/advanced/brainwashing_sleeper) + surgeries = list( + /datum/surgery/advanced/brainwashing_sleeper, + /datum/surgery/advanced/brainwashing_sleeper/mechanic, + ) /datum/surgery/advanced/brainwashing_sleeper name = "Sleeper Agent Surgery" desc = "A surgical procedure which implants the sleeper protocol into the patient's brain, making it their absolute priority. It can be cleared using a mindshield implant." + requires_bodypart_type = NONE possible_locs = list(BODY_ZONE_HEAD) steps = list( /datum/surgery_step/incise, @@ -16,6 +20,19 @@ /datum/surgery_step/close, ) +/datum/surgery/advanced/brainwashing_sleeper/mechanic + name = "Sleeper Agent Reprogramming" + desc = "Malware which directly implants the sleeper protocol directive into the robotic patient's operating system, making it their absolute priority. It can be cleared using a mindshield implant." + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/brainwash/sleeper_agent/mechanic, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/advanced/brainwashing_sleeper/can_start(mob/user, mob/living/carbon/target) . = ..() if(!.) @@ -42,6 +59,17 @@ "The cyborgs and the AI are stalking you. What are they planning?", ) +/datum/surgery_step/brainwash/sleeper_agent/mechanic + name = "reprogram (multitool)" + implements = list( + TOOL_MULTITOOL = 85, + TOOL_HEMOSTAT = 50, + TOOL_WIRECUTTER = 50, + /obj/item/stack/package_wrap = 35, + /obj/item/stack/cable_coil = 15) + preop_sound = 'sound/surgery/hemostat1.ogg' + success_sound = 'sound/surgery/hemostat1.ogg' + /datum/surgery_step/brainwash/sleeper_agent/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) objective = pick(possible_objectives) display_results( diff --git a/code/modules/surgery/stomachpump.dm b/code/modules/surgery/stomachpump.dm index 25f067aef65..4d6dca105da 100644 --- a/code/modules/surgery/stomachpump.dm +++ b/code/modules/surgery/stomachpump.dm @@ -10,6 +10,18 @@ /datum/surgery_step/close, ) +/datum/surgery/stomach_pump/mechanic + name = "Nutrient Processing Purge" + requires_bodypart_type = BODYTYPE_ROBOTIC + steps = list( + /datum/surgery_step/mechanic_open, + /datum/surgery_step/open_hatch, + /datum/surgery_step/mechanic_unwrench, + /datum/surgery_step/stomach_pump, + /datum/surgery_step/mechanic_wrench, + /datum/surgery_step/mechanic_close, + ) + /datum/surgery/stomach_pump/can_start(mob/user, mob/living/carbon/target) var/obj/item/organ/internal/stomach/target_stomach = target.get_organ_slot(ORGAN_SLOT_STOMACH) if(HAS_TRAIT(target, TRAIT_HUSK))