diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index ef9e6a044f..8dc7464230 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -50,7 +50,7 @@ #define isgolem(A) (is_species(A, /datum/species/golem)) #define islizard(A) (is_species(A, /datum/species/lizard)) #define isplasmaman(A) (is_species(A, /datum/species/plasmaman)) -#define ispodperson(A) (is_species(A, /datum/species/podperson)) +#define ispodperson(A) (is_species(A, /datum/species/pod)) #define isflyperson(A) (is_species(A, /datum/species/fly)) #define isjellyperson(A) (is_species(A, /datum/species/jelly)) #define isslimeperson(A) (is_species(A, /datum/species/jelly/slime)) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 1d1dda6d99..6143047275 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -116,6 +116,8 @@ #define BIOWARE_GENERIC "generic" #define BIOWARE_NERVES "nerves" #define BIOWARE_CIRCULATION "circulation" +#define BIOWARE_LIGAMENTS "ligaments" +#define BIOWARE_DISSECTION "dissected" //Health hud screws for carbon mobs #define SCREWYHUD_NONE 0 diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index a4bca2f2c8..e198041c6e 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -95,6 +95,8 @@ #define TRAIT_NOHUNGER "no_hunger" #define TRAIT_EASYDISMEMBER "easy_dismember" #define TRAIT_LIMBATTACHMENT "limb_attach" +#define TRAIT_NOLIMBDISABLE "no_limb_disable" +#define TRAIT_EASYLIMBDISABLE "easy_limb_disable" #define TRAIT_TOXINLOVER "toxinlover" #define TRAIT_NOBREATH "no_breath" #define TRAIT_ANTIMAGIC "anti_magic" diff --git a/code/modules/antagonists/abductor/equipment/abduction_surgery.dm b/code/modules/antagonists/abductor/equipment/abduction_surgery.dm index 819dbafd6a..98164de099 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_surgery.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_surgery.dm @@ -1,5 +1,5 @@ /datum/surgery/organ_extraction - name = "experimental dissection" + name = "experimental organ replacement" steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/extract_organ, /datum/surgery_step/gland_insert) possible_locs = list(BODY_ZONE_CHEST) ignore_clothes = 1 diff --git a/code/modules/mob/living/carbon/human/species_types/corporate.dm b/code/modules/mob/living/carbon/human/species_types/corporate.dm index 620f0b2543..146090b366 100644 --- a/code/modules/mob/living/carbon/human/species_types/corporate.dm +++ b/code/modules/mob/living/carbon/human/species_types/corporate.dm @@ -16,5 +16,5 @@ blacklisted = 1 use_skintones = 0 species_traits = list(NOBLOOD,EYECOLOR,NOGENITALS) - inherent_traits = list(TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER) + inherent_traits = list(TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOLIMBDISABLE,TRAIT_NOHUNGER) sexes = 0 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species_types/synths.dm b/code/modules/mob/living/carbon/human/species_types/synths.dm index e325cbb4f4..ac18580e9b 100644 --- a/code/modules/mob/living/carbon/human/species_types/synths.dm +++ b/code/modules/mob/living/carbon/human/species_types/synths.dm @@ -4,7 +4,7 @@ say_mod = "beep boops" //inherited from a user's real species sexes = 0 species_traits = list(NOTRANSSTING,NOGENITALS,NOAROUSAL) //all of these + whatever we inherit from the real species - inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER,TRAIT_NOBREATH) + inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOLIMBDISABLE,TRAIT_NOHUNGER,TRAIT_NOBREATH) inherent_biotypes = list(MOB_ROBOTIC, MOB_HUMANOID) dangerous_existence = 1 blacklisted = 1 @@ -12,7 +12,7 @@ damage_overlay_type = "synth" limbs_id = "synth" var/list/initial_species_traits = list(NOTRANSSTING) //for getting these values back for assume_disguise() - var/list/initial_inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER,TRAIT_NOBREATH) + var/list/initial_inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOLIMBDISABLE,TRAIT_NOHUNGER,TRAIT_NOBREATH) var/disguise_fail_health = 75 //When their health gets to this level their synthflesh partially falls off var/datum/species/fake_species = null //a species to do most of our work for us, unless we're damaged diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index d3db4f75b3..f1ec26d699 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -713,6 +713,13 @@ research_icon = 'icons/obj/surgery.dmi' research_icon_state = "surgery_any" var/surgery + +/datum/design/surgery/experimental_dissection + name = "Experimental Dissection" + desc = "A surgical procedure which deeply analyzes the biology of a corpse, and automatically adds new findings to the research database." + id = "surgery_exp_dissection" + surgery = /datum/surgery/advanced/bioware/experimental_dissection + research_icon_state = "surgery_chest" /datum/design/surgery/lobotomy name = "Lobotomy" @@ -784,6 +791,22 @@ surgery = /datum/surgery/advanced/bioware/vein_threading research_icon_state = "surgery_chest" +/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. \ + However this weakens the connection, making them easier to detach as well." + id = "surgery_ligament_hook" + surgery = /datum/surgery/advanced/bioware/ligament_hook + research_icon_state = "surgery_chest" + +/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. \ + However, the nerve connections as a result are more easily interrupted, making it easier to disable limbs with damage." + id = "surgery_ligament_reinforcement" + surgery = /datum/surgery/advanced/bioware/ligament_reinforcement + research_icon_state = "surgery_chest" + /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/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 3721e7943e..b8cec29255 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -115,7 +115,7 @@ display_name = "Advanced Surgery" description = "When simple medicine doesn't cut it." prereq_ids = list("adv_biotech") - design_ids = list("surgery_lobotomy", "surgery_reconstruction", "surgery_toxinhealing", "organbox") + design_ids = list("surgery_lobotomy", "surgery_reconstruction", "surgery_toxinhealing", "organbox", "surgery_exp_dissection") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 @@ -124,7 +124,7 @@ display_name = "Experimental Surgery" description = "When evolution isn't fast enough." prereq_ids = list("adv_surgery") - design_ids = list("surgery_revival","surgery_pacify","surgery_vein_thread","surgery_nerve_splice","surgery_nerve_ground","surgery_viral_bond") + design_ids = list("surgery_revival","surgery_pacify","surgery_vein_thread","surgery_nerve_splice","surgery_nerve_ground","surgery_ligament_hook","surgery_ligament_reinforcement","surgery_viral_bond") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) export_price = 5000 @@ -1088,4 +1088,4 @@ for(var/i in processing) var/datum/techweb_node/TN = i TW.add_point_list(TN.research_costs) - return TW.printout_points() + return TW.printout_points() \ No newline at end of file diff --git a/code/modules/surgery/advanced/bioware/experimental_dissection.dm b/code/modules/surgery/advanced/bioware/experimental_dissection.dm new file mode 100644 index 0000000000..6266480baf --- /dev/null +++ b/code/modules/surgery/advanced/bioware/experimental_dissection.dm @@ -0,0 +1,72 @@ +/datum/surgery/advanced/bioware/experimental_dissection + name = "Experimental Dissection" + desc = "A surgical procedure which deeply analyzes the biology of a corpse, and automatically adds new findings to the research database." + steps = list(/datum/surgery_step/incise, + /datum/surgery_step/retract_skin, + /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise, + /datum/surgery_step/dissection, + /datum/surgery_step/close) + possible_locs = list(BODY_ZONE_CHEST) + bioware_target = BIOWARE_DISSECTION + +/datum/surgery/advanced/bioware/experimental_dissection/can_start(mob/user, mob/living/carbon/target) + . = ..() + if(iscyborg(user)) + return FALSE //robots cannot be creative + //(also this surgery shouldn't be consistently successful, and cyborgs have a 100% success rate on surgery) + if(target.stat != DEAD) + return FALSE + +/datum/surgery_step/dissection + name = "dissection" + implements = list(/obj/item/scalpel = 60, /obj/item/kitchen/knife = 30, /obj/item/shard = 15) + time = 125 + +/datum/surgery_step/dissection/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You start dissecting [target].", + "[user] starts dissecting [target].", + "[user] starts dissecting [target].") + +/datum/surgery_step/dissection/proc/check_value(mob/living/carbon/target) + if(isalienroyal(target)) + return 10000 + else if(isalienadult(target)) + return 5000 + else if(ismonkey(target)) + return 1000 + else if(ishuman(target)) + var/mob/living/carbon/human/H = target + if(H.dna && H.dna.species) + if(isabductor(H)) + return 8000 + if(isgolem(H) || iszombie(H)) + return 4000 + if(isjellyperson(H) || ispodperson(H)) + return 3000 + return 2000 + +/datum/surgery_step/dissection/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You dissect [target], and add your discoveries to the research database!", + "[user] dissects [target], adding [user.p_their()] discoveries to the research database!", + "[user] dissects [target]!") + SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = check_value(target))) + var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST) + target.apply_damage(80, BRUTE, L) + new /datum/bioware/dissected(target) + return TRUE + +/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You dissect [target], but do not find anything particularly interesting.", + "[user] dissects [target], however it seems [user.p_they()] didn't find anything useful.", + "[user] dissects [target], but looks a little dissapointed.") + SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = (check_value(target) * 0.2))) + var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST) + target.apply_damage(80, BRUTE, L) + new /datum/bioware/dissected(target) + return TRUE + +/datum/bioware/dissected + name = "Dissected" + desc = "This body has been dissected and analyzed. It is no longer worth experimenting on." + mod_type = BIOWARE_DISSECTION \ No newline at end of file diff --git a/code/modules/surgery/advanced/bioware/ligament_hook.dm b/code/modules/surgery/advanced/bioware/ligament_hook.dm new file mode 100644 index 0000000000..2c154436e6 --- /dev/null +++ b/code/modules/surgery/advanced/bioware/ligament_hook.dm @@ -0,0 +1,45 @@ +/datum/surgery/advanced/bioware/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. \ + However this weakens the connection, making them easier to detach as well." + steps = list(/datum/surgery_step/incise, + /datum/surgery_step/retract_skin, + /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise, + /datum/surgery_step/incise, + /datum/surgery_step/reshape_ligaments, + /datum/surgery_step/close) + possible_locs = list(BODY_ZONE_CHEST) + bioware_target = BIOWARE_LIGAMENTS + +/datum/surgery_step/reshape_ligaments + name = "reshape ligaments" + accept_hand = TRUE + time = 125 + +/datum/surgery_step/reshape_ligaments/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You start reshaping [target]'s ligaments into a hook-like shape.", + "[user] starts reshaping [target]'s ligaments into a hook-like shape.", + "[user] starts manipulating [target]'s ligaments.") + +/datum/surgery_step/reshape_ligaments/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You finish reshaping [target]'s ligaments into a connective hook!", + "[user] finishes reshaping [target]'s ligaments into a connective hook!", + "[user] finishes manipulating [target]'s ligaments!") + new /datum/bioware/hooked_ligaments(target) + return TRUE + +/datum/bioware/hooked_ligaments + name = "Hooked Ligaments" + desc = "The ligaments and nerve endings that connect the torso to the limbs are formed into a hook-like shape, so limbs can be attached without requiring surgery, but are easier to sever." + mod_type = BIOWARE_LIGAMENTS + +/datum/bioware/hooked_ligaments/on_gain() + ..() + ADD_TRAIT(owner, TRAIT_LIMBATTACHMENT, "ligament_hook") + ADD_TRAIT(owner, TRAIT_EASYDISMEMBER, "ligament_hook") + +/datum/bioware/hooked_ligaments/on_lose() + ..() + REMOVE_TRAIT(owner, TRAIT_LIMBATTACHMENT, "ligament_hook") + REMOVE_TRAIT(owner, TRAIT_EASYDISMEMBER, "ligament_hook") \ No newline at end of file diff --git a/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm b/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm new file mode 100644 index 0000000000..ac034fcea7 --- /dev/null +++ b/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm @@ -0,0 +1,45 @@ +/datum/surgery/advanced/bioware/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. \ + However, the nerve connections as a result are more easily interrupted, making it easier to disable limbs with damage." + steps = list(/datum/surgery_step/incise, + /datum/surgery_step/retract_skin, + /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise, + /datum/surgery_step/incise, + /datum/surgery_step/reinforce_ligaments, + /datum/surgery_step/close) + possible_locs = list(BODY_ZONE_CHEST) + bioware_target = BIOWARE_LIGAMENTS + +/datum/surgery_step/reinforce_ligaments + name = "reinforce ligaments" + accept_hand = TRUE + time = 125 + +/datum/surgery_step/reinforce_ligaments/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You start reinforcing [target]'s ligaments.", + "[user] starts reinforcing [target]'s ligaments.", + "[user] starts manipulating [target]'s ligaments.") + +/datum/surgery_step/reinforce_ligaments/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You finish reinforcing [target]'s ligaments!", + "[user] finishes reinforcing [target]'s ligaments!", + "[user] finishes manipulating [target]'s ligaments!") + new /datum/bioware/reinforced_ligaments(target) + return TRUE + +/datum/bioware/reinforced_ligaments + name = "Reinforced Ligaments" + desc = "The ligaments and nerve endings that connect the torso to the limbs are protected by a mix of bone and tissues, and are much harder to separate from the body, but are also easier to disable." + mod_type = BIOWARE_LIGAMENTS + +/datum/bioware/reinforced_ligaments/on_gain() + ..() + ADD_TRAIT(owner, TRAIT_NODISMEMBER, "reinforced_ligaments") + ADD_TRAIT(owner, TRAIT_EASYLIMBDISABLE, "reinforced_ligaments") + +/datum/bioware/reinforced_ligaments/on_lose() + ..() + REMOVE_TRAIT(owner, TRAIT_NODISMEMBER, "reinforced_ligaments") + REMOVE_TRAIT(owner, TRAIT_EASYLIMBDISABLE, "reinforced_ligaments") \ No newline at end of file diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 40c22189d9..dffb7bf355 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -231,7 +231,7 @@ return BODYPART_DISABLED_PARALYSIS if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER)) . = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled - if((get_damage(TRUE) >= max_damage)) + if((get_damage(TRUE) >= max_damage) || (HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE) && (get_damage(TRUE) >= (max_damage * 0.6)))) //Easy limb disable disables the limb at 40% health instead of 0% return BODYPART_DISABLED_DAMAGE if(disabled && (get_damage(TRUE) <= (max_damage * 0.5))) return BODYPART_NOT_DISABLED diff --git a/tgstation.dme b/tgstation.dme index afe619593e..f1430cebf2 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2774,6 +2774,9 @@ #include "code\modules\surgery\advanced\viral_bonding.dm" #include "code\modules\surgery\advanced\bioware\bioware.dm" #include "code\modules\surgery\advanced\bioware\bioware_surgery.dm" +#include "code\modules\surgery\advanced\bioware\experimental_dissection.dm" +#include "code\modules\surgery\advanced\bioware\ligament_hook.dm" +#include "code\modules\surgery\advanced\bioware\ligament_reinforcement.dm" #include "code\modules\surgery\advanced\bioware\nerve_grounding.dm" #include "code\modules\surgery\advanced\bioware\nerve_splicing.dm" #include "code\modules\surgery\advanced\bioware\vein_threading.dm"