From e146fcb7a29b1f7d8f5485aba36c0dd90604a8d6 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sat, 23 Mar 2024 18:42:39 -0400 Subject: [PATCH] [MIRROR] Makes Bioware into Status Effects because they're just Status Effects but their own datum (#1597) * Makes Bioware into Status Effects because they're just Status Effects but their own datum (#81989) - Refactors `/datum/bioware` -> `/datum/status_effect/bioware`. - Literally everything bioware datum does is done by the status effect API, including handing dupes / unique keys - Tallies all blackbox surgeries done rather than just nerve splicing * Makes Bioware into Status Effects because they're just Status Effects but their own datum --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/__DEFINES/mobs.dm | 7 ---- .../status_effects/buffs/bioware/_bioware.dm | 28 +++++++++++++++ .../buffs/bioware/circulation.dm | 23 ++++++++++++ .../status_effects/buffs/bioware/cortex.dm | 20 +++++++++++ .../status_effects/buffs/bioware/ligaments.dm | 21 +++++++++++ .../status_effects/buffs/bioware/nerves.dm | 25 +++++++++++++ code/modules/mob/living/carbon/human/human.dm | 2 -- .../mob/living/carbon/human/human_defines.dm | 2 -- .../surgery/advanced/bioware/bioware.dm | 36 ------------------- .../advanced/bioware/bioware_surgery.dm | 24 ++++++++++--- .../advanced/bioware/cortex_folding.dm | 33 ++++++----------- .../advanced/bioware/cortex_imprint.dm | 29 ++++++--------- .../surgery/advanced/bioware/ligament_hook.dm | 32 ++++++----------- .../bioware/ligament_reinforcement.dm | 31 +++++----------- .../surgery/advanced/bioware/muscled_veins.dm | 31 +++++----------- .../advanced/bioware/nerve_grounding.dm | 27 ++++---------- .../advanced/bioware/nerve_splicing.dm | 36 ++++++------------- .../advanced/bioware/vein_threading.dm | 31 +++++----------- tgstation.dme | 6 +++- 19 files changed, 215 insertions(+), 229 deletions(-) create mode 100644 code/datums/status_effects/buffs/bioware/_bioware.dm create mode 100644 code/datums/status_effects/buffs/bioware/circulation.dm create mode 100644 code/datums/status_effects/buffs/bioware/cortex.dm create mode 100644 code/datums/status_effects/buffs/bioware/ligaments.dm create mode 100644 code/datums/status_effects/buffs/bioware/nerves.dm delete mode 100644 code/modules/surgery/advanced/bioware/bioware.dm diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 3b38004e946..525d1334d26 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -225,13 +225,6 @@ #define BRAIN_DAMAGE_INTEGRITY_MULTIPLIER 0.5 -//Surgery Defines -#define BIOWARE_GENERIC "generic" -#define BIOWARE_NERVES "nerves" -#define BIOWARE_CIRCULATION "circulation" -#define BIOWARE_LIGAMENTS "ligaments" -#define BIOWARE_CORTEX "cortex" - //Health hud screws for carbon mobs #define SCREWYHUD_NONE 0 #define SCREWYHUD_CRIT 1 diff --git a/code/datums/status_effects/buffs/bioware/_bioware.dm b/code/datums/status_effects/buffs/bioware/_bioware.dm new file mode 100644 index 00000000000..c2f7259f270 --- /dev/null +++ b/code/datums/status_effects/buffs/bioware/_bioware.dm @@ -0,0 +1,28 @@ +/** + * ## Bioware status effect + * + * Simple holder status effects that grants the owner mob basic buffs + */ +/datum/status_effect/bioware + id = "bioware" + alert_type = null + duration = -1 + tick_interval = -1 + +/datum/status_effect/bioware/on_apply() + if(!ishuman(owner)) + return FALSE + + bioware_gained() + return TRUE + +/datum/status_effect/bioware/on_remove() + bioware_lost() + +/// Called when applying to the mob. +/datum/status_effect/bioware/proc/bioware_gained() + return + +/// Called when removing from the mob. +/datum/status_effect/bioware/proc/bioware_lost() + return diff --git a/code/datums/status_effects/buffs/bioware/circulation.dm b/code/datums/status_effects/buffs/bioware/circulation.dm new file mode 100644 index 00000000000..c20efd3aa93 --- /dev/null +++ b/code/datums/status_effects/buffs/bioware/circulation.dm @@ -0,0 +1,23 @@ +// Bioware that affects the heart / circulatory system +/datum/status_effect/bioware/heart + id = "circulation" + +/// Muscled veins - Removes the need to have a heart +/datum/status_effect/bioware/heart/muscled_veins + +/datum/status_effect/bioware/heart/muscled_veins/bioware_gained() + ADD_TRAIT(owner, TRAIT_STABLEHEART, TRAIT_STATUS_EFFECT(id)) + +/datum/status_effect/bioware/heart/muscled_veins/bioware_lost() + REMOVE_TRAIT(owner, TRAIT_STABLEHEART, TRAIT_STATUS_EFFECT(id)) + +/// Threaded veins - Bleed way less +/datum/status_effect/bioware/heart/threaded_veins + +/datum/status_effect/bioware/heart/threaded_veins/bioware_gained() + var/mob/living/carbon/human/human_owner = owner + human_owner.physiology.bleed_mod *= 0.25 + +/datum/status_effect/bioware/heart/threaded_veins/bioware_lost() + var/mob/living/carbon/human/human_owner = owner + human_owner.physiology.bleed_mod *= 4 diff --git a/code/datums/status_effects/buffs/bioware/cortex.dm b/code/datums/status_effects/buffs/bioware/cortex.dm new file mode 100644 index 00000000000..de11dab1eac --- /dev/null +++ b/code/datums/status_effects/buffs/bioware/cortex.dm @@ -0,0 +1,20 @@ +// Bioware that affects the brain +/datum/status_effect/bioware/cortex + id = "cortex" + +// Folded brain - Grants a bonus chance to getting special traumas via lobotomy +/datum/status_effect/bioware/cortex/folded + +/datum/status_effect/bioware/cortex/folded/bioware_gained() + ADD_TRAIT(owner, TRAIT_SPECIAL_TRAUMA_BOOST, TRAIT_STATUS_EFFECT(id)) + +/datum/status_effect/bioware/cortex/folded/bioware_lost() + REMOVE_TRAIT(owner, TRAIT_SPECIAL_TRAUMA_BOOST, TRAIT_STATUS_EFFECT(id)) + +// Imprinted brain - Cures basic traumas continuously +/datum/status_effect/bioware/cortex/imprinted + tick_interval = 2 SECONDS + +/datum/status_effect/bioware/cortex/imprinted/tick(seconds_between_ticks) + var/mob/living/carbon/human/human_owner = owner + human_owner.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) diff --git a/code/datums/status_effects/buffs/bioware/ligaments.dm b/code/datums/status_effects/buffs/bioware/ligaments.dm new file mode 100644 index 00000000000..2b41ad01e7a --- /dev/null +++ b/code/datums/status_effects/buffs/bioware/ligaments.dm @@ -0,0 +1,21 @@ +// Bioware that affects the player's limbs +/datum/status_effect/bioware/ligaments + id = "ligaments" + +// Hooked ligaments - Easier to dismember, but easier to reattach +/datum/status_effect/bioware/ligaments/hooked + +/datum/status_effect/bioware/ligaments/hooked/bioware_gained() + owner.add_traits(list(TRAIT_LIMBATTACHMENT, TRAIT_EASYDISMEMBER), TRAIT_STATUS_EFFECT(id)) + +/datum/status_effect/bioware/ligaments/hooked/bioware_lost() + owner.remove_traits(list(TRAIT_LIMBATTACHMENT, TRAIT_EASYDISMEMBER), TRAIT_STATUS_EFFECT(id)) + +// Reinforced ligaments - Easier to break, but cannot be dismembered +/datum/status_effect/bioware/ligaments/reinforced + +/datum/status_effect/bioware/ligaments/reinforced/bioware_gained() + owner.add_traits(list(TRAIT_NODISMEMBER, TRAIT_EASILY_WOUNDED), TRAIT_STATUS_EFFECT(id)) + +/datum/status_effect/bioware/ligaments/reinforced/bioware_lost() + owner.remove_traits(list(TRAIT_NODISMEMBER, TRAIT_EASILY_WOUNDED), TRAIT_STATUS_EFFECT(id)) diff --git a/code/datums/status_effects/buffs/bioware/nerves.dm b/code/datums/status_effects/buffs/bioware/nerves.dm new file mode 100644 index 00000000000..36392ca6364 --- /dev/null +++ b/code/datums/status_effects/buffs/bioware/nerves.dm @@ -0,0 +1,25 @@ +// Bioware that affects the CNS +/datum/status_effect/bioware/nerves + id = "nerves" + +// Grounded Nerves - Immunity to being zapped +/datum/status_effect/bioware/nerves/grounded + +/datum/status_effect/bioware/nerves/grounded/bioware_gained() + ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, TRAIT_STATUS_EFFECT(id)) + +/datum/status_effect/bioware/nerves/grounded/bioware_lost() + REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, TRAIT_STATUS_EFFECT(id)) + +// Spliced Nerves - Reduced stun time and stamina damage taken +/datum/status_effect/bioware/nerves/spliced + +/datum/status_effect/bioware/nerves/spliced/bioware_gained() + var/mob/living/carbon/human/human_owner = owner + human_owner.physiology.stun_mod *= 0.5 + human_owner.physiology.stamina_mod *= 0.8 + +/datum/status_effect/bioware/nerves/spliced/bioware_lost() + var/mob/living/carbon/human/human_owner = owner + human_owner.physiology.stun_mod *= 2 + human_owner.physiology.stamina_mod *= 1.25 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 659d110978d..11ecbf15632 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -61,8 +61,6 @@ /mob/living/carbon/human/Destroy() QDEL_NULL(physiology) - if(biowares) - QDEL_LAZYLIST(biowares) GLOB.human_list -= src if (mob_mood) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index c9d6df04d4d..84565319446 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -72,8 +72,6 @@ var/datum/physiology/physiology - var/list/datum/bioware/biowares - /// What types of mobs are allowed to ride/buckle to this mob var/static/list/can_ride_typecache = typecacheof(list( /mob/living/basic/parrot, diff --git a/code/modules/surgery/advanced/bioware/bioware.dm b/code/modules/surgery/advanced/bioware/bioware.dm deleted file mode 100644 index 4a679e74631..00000000000 --- a/code/modules/surgery/advanced/bioware/bioware.dm +++ /dev/null @@ -1,36 +0,0 @@ -//Bioware -//Body modifications applied through surgery. They generally affect physiology. - -/datum/bioware - var/name = "Generic Bioware" - var/mob/living/carbon/human/owner - var/desc = "If you see this something's wrong, warn a coder." - var/active = FALSE - var/can_process = FALSE - var/mod_type = BIOWARE_GENERIC - -/datum/bioware/New(mob/living/carbon/human/new_owner) - owner = new_owner - for(var/datum/bioware/bioware as anything in owner.biowares) - if(bioware.mod_type == mod_type) - qdel(src) - return - LAZYADD(owner.biowares, src) - on_gain() - -/datum/bioware/Destroy() - if(owner) - LAZYREMOVE(owner.biowares, src) - owner = null - if(active) - on_lose() - return ..() - -/datum/bioware/proc/on_gain() - active = TRUE - if(can_process) - START_PROCESSING(SSobj, src) - -/datum/bioware/proc/on_lose() - STOP_PROCESSING(SSobj, src) - return diff --git a/code/modules/surgery/advanced/bioware/bioware_surgery.dm b/code/modules/surgery/advanced/bioware/bioware_surgery.dm index 4db161e5249..6145b63ca6f 100644 --- a/code/modules/surgery/advanced/bioware/bioware_surgery.dm +++ b/code/modules/surgery/advanced/bioware/bioware_surgery.dm @@ -1,13 +1,29 @@ /datum/surgery/advanced/bioware name = "Enhancement surgery" - var/bioware_target = BIOWARE_GENERIC + /// What status effect is gained when the surgery is successful? + /// Used to check against other bioware types to prevent stacking. + var/status_effect_gained = /datum/status_effect/bioware /datum/surgery/advanced/bioware/can_start(mob/user, mob/living/carbon/human/target) if(!..()) return FALSE if(!istype(target)) return FALSE - for(var/datum/bioware/bioware as anything in target.biowares) - if(bioware.mod_type == bioware_target) - return FALSE + if(target.has_status_effect(status_effect_gained)) + return FALSE return TRUE + +/datum/surgery_step/apply_bioware + accept_hand = TRUE + time = 12.5 SECONDS + +/datum/surgery_step/apply_bioware/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/advanced/bioware/surgery, default_display_results) + . = ..() + if(!.) + return + if(!istype(surgery)) + return + + target.apply_status_effect(surgery.status_effect_gained) + if(target.ckey) + SSblackbox.record_feedback("tally", "bioware", 1, surgery.type) diff --git a/code/modules/surgery/advanced/bioware/cortex_folding.dm b/code/modules/surgery/advanced/bioware/cortex_folding.dm index e3629b02b0a..73792575a7b 100644 --- a/code/modules/surgery/advanced/bioware/cortex_folding.dm +++ b/code/modules/surgery/advanced/bioware/cortex_folding.dm @@ -8,11 +8,11 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/fold_cortex, + /datum/surgery_step/apply_bioware/fold_cortex, /datum/surgery_step/close, ) - bioware_target = BIOWARE_CORTEX + status_effect_gained = /datum/status_effect/bioware/cortex/folded /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) @@ -20,12 +20,10 @@ return FALSE return ..() -/datum/surgery_step/fold_cortex +/datum/surgery_step/apply_bioware/fold_cortex name = "fold cortex (hand)" - accept_hand = TRUE - time = 125 -/datum/surgery_step/fold_cortex/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/fold_cortex/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -35,7 +33,11 @@ ) display_pain(target, "Your head throbs with gruesome pain, it's nearly too much to handle!") -/datum/surgery_step/fold_cortex/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/fold_cortex/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -44,10 +46,8 @@ span_notice("[user] completes the surgery on [target]'s brain."), ) display_pain(target, "Your brain feels stronger... more flexible!") - new /datum/bioware/cortex_fold(target) - return ..() -/datum/surgery_step/fold_cortex/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/fold_cortex/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(target.get_organ_slot(ORGAN_SLOT_BRAIN)) display_results( user, @@ -62,16 +62,3 @@ else user.visible_message(span_warning("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore."), span_warning("You suddenly notice that the brain you were working on is not there anymore.")) return FALSE - -/datum/bioware/cortex_fold - name = "Cortex Fold" - desc = "The cerebral cortex has been folded into a complex fractal pattern, and can support non-standard neural patterns." - mod_type = BIOWARE_CORTEX - -/datum/bioware/cortex_fold/on_gain() - . = ..() - ADD_TRAIT(owner, TRAIT_SPECIAL_TRAUMA_BOOST, EXPERIMENTAL_SURGERY_TRAIT) - -/datum/bioware/cortex_fold/on_lose() - REMOVE_TRAIT(owner, TRAIT_SPECIAL_TRAUMA_BOOST, EXPERIMENTAL_SURGERY_TRAIT) - return ..() diff --git a/code/modules/surgery/advanced/bioware/cortex_imprint.dm b/code/modules/surgery/advanced/bioware/cortex_imprint.dm index 542795294b0..26b43ee691f 100644 --- a/code/modules/surgery/advanced/bioware/cortex_imprint.dm +++ b/code/modules/surgery/advanced/bioware/cortex_imprint.dm @@ -8,11 +8,11 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/imprint_cortex, + /datum/surgery_step/apply_bioware/imprint_cortex, /datum/surgery_step/close, ) - bioware_target = BIOWARE_CORTEX + status_effect_gained = /datum/status_effect/bioware/cortex/imprinted /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) @@ -20,12 +20,10 @@ return FALSE return ..() -/datum/surgery_step/imprint_cortex +/datum/surgery_step/apply_bioware/imprint_cortex name = "imprint cortex (hand)" - accept_hand = TRUE - time = 125 -/datum/surgery_step/imprint_cortex/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/imprint_cortex/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -35,7 +33,11 @@ ) display_pain(target, "Your head throbs with gruesome pain, it's nearly too much to handle!") -/datum/surgery_step/imprint_cortex/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/imprint_cortex/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -44,10 +46,8 @@ span_notice("[user] completes the surgery on [target]'s brain."), ) display_pain(target, "Your brain feels stronger... more resillient!") - new /datum/bioware/cortex_imprint(target) - return ..() -/datum/surgery_step/imprint_cortex/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/imprint_cortex/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(target.get_organ_slot(ORGAN_SLOT_BRAIN)) display_results( user, @@ -62,12 +62,3 @@ else user.visible_message(span_warning("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore."), span_warning("You suddenly notice that the brain you were working on is not there anymore.")) return FALSE - -/datum/bioware/cortex_imprint - name = "Cortex Imprint" - desc = "The cerebral cortex has been reshaped into a redundant neural pattern, making the brain able to bypass impediments caused by minor brain traumas." - mod_type = BIOWARE_CORTEX - can_process = TRUE - -/datum/bioware/cortex_imprint/process() - owner.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) diff --git a/code/modules/surgery/advanced/bioware/ligament_hook.dm b/code/modules/surgery/advanced/bioware/ligament_hook.dm index 4d263641769..b4a8b168a2e 100644 --- a/code/modules/surgery/advanced/bioware/ligament_hook.dm +++ b/code/modules/surgery/advanced/bioware/ligament_hook.dm @@ -9,17 +9,16 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/reshape_ligaments, + /datum/surgery_step/apply_bioware/reshape_ligaments, /datum/surgery_step/close, ) - bioware_target = BIOWARE_LIGAMENTS -/datum/surgery_step/reshape_ligaments + status_effect_gained = /datum/status_effect/bioware/ligaments/hooked + +/datum/surgery_step/apply_bioware/reshape_ligaments name = "reshape ligaments (hand)" - 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) +/datum/surgery_step/apply_bioware/reshape_ligaments/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -29,7 +28,11 @@ ) display_pain(target, "Your limbs burn with severe pain!") -/datum/surgery_step/reshape_ligaments/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/reshape_ligaments/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -38,18 +41,3 @@ span_notice("[user] finishes manipulating [target]'s ligaments."), ) display_pain(target, "Your limbs feel... strangely loose.") - new /datum/bioware/hooked_ligaments(target) - return ..() - -/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() - ..() - owner.add_traits(list(TRAIT_LIMBATTACHMENT, TRAIT_EASYDISMEMBER), EXPERIMENTAL_SURGERY_TRAIT) - -/datum/bioware/hooked_ligaments/on_lose() - ..() - owner.remove_traits(list(TRAIT_LIMBATTACHMENT, TRAIT_EASYDISMEMBER), EXPERIMENTAL_SURGERY_TRAIT) diff --git a/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm b/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm index 1aa4d5e18fb..27f4674c7b6 100644 --- a/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm +++ b/code/modules/surgery/advanced/bioware/ligament_reinforcement.dm @@ -9,18 +9,16 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/reinforce_ligaments, + /datum/surgery_step/apply_bioware/reinforce_ligaments, /datum/surgery_step/close, ) - bioware_target = BIOWARE_LIGAMENTS + status_effect_gained = /datum/status_effect/bioware/ligaments/reinforced -/datum/surgery_step/reinforce_ligaments +/datum/surgery_step/apply_bioware/reinforce_ligaments name = "reinforce ligaments (hand)" - 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) +/datum/surgery_step/apply_bioware/reinforce_ligaments/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -30,7 +28,11 @@ ) display_pain(target, "Your limbs burn with severe pain!") -/datum/surgery_step/reinforce_ligaments/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/reinforce_ligaments/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -39,18 +41,3 @@ span_notice("[user] finishes manipulating [target]'s ligaments."), ) display_pain(target, "Your limbs feel more secure, but also more frail.") - new /datum/bioware/reinforced_ligaments(target) - return ..() - -/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 wound." - mod_type = BIOWARE_LIGAMENTS - -/datum/bioware/reinforced_ligaments/on_gain() - ..() - owner.add_traits(list(TRAIT_NODISMEMBER, TRAIT_EASILY_WOUNDED), EXPERIMENTAL_SURGERY_TRAIT) - -/datum/bioware/reinforced_ligaments/on_lose() - ..() - owner.remove_traits(list(TRAIT_NODISMEMBER, TRAIT_EASILY_WOUNDED), EXPERIMENTAL_SURGERY_TRAIT) diff --git a/code/modules/surgery/advanced/bioware/muscled_veins.dm b/code/modules/surgery/advanced/bioware/muscled_veins.dm index 80987779d66..13355a56948 100644 --- a/code/modules/surgery/advanced/bioware/muscled_veins.dm +++ b/code/modules/surgery/advanced/bioware/muscled_veins.dm @@ -8,18 +8,16 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/muscled_veins, + /datum/surgery_step/apply_bioware/muscled_veins, /datum/surgery_step/close, ) - bioware_target = BIOWARE_CIRCULATION + status_effect_gained = /datum/status_effect/bioware/heart/muscled_veins -/datum/surgery_step/muscled_veins +/datum/surgery_step/apply_bioware/muscled_veins name = "shape vein muscles (hand)" - accept_hand = TRUE - time = 125 -/datum/surgery_step/muscled_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/muscled_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -29,7 +27,11 @@ ) display_pain(target, "Your entire body burns in agony!") -/datum/surgery_step/muscled_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/muscled_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -38,18 +40,3 @@ span_notice("[user] finishes manipulating [target]'s circulatory system."), ) display_pain(target, "You can feel your heartbeat's powerful pulses ripple through your body!") - new /datum/bioware/muscled_veins(target) - return ..() - -/datum/bioware/muscled_veins - name = "Muscled Veins" - desc = "The circulatory system is affixed with a muscled membrane, allowing the veins to pump blood without the need for a heart." - mod_type = BIOWARE_CIRCULATION - -/datum/bioware/muscled_veins/on_gain() - ..() - ADD_TRAIT(owner, TRAIT_STABLEHEART, EXPERIMENTAL_SURGERY_TRAIT) - -/datum/bioware/muscled_veins/on_lose() - ..() - REMOVE_TRAIT(owner, TRAIT_STABLEHEART, EXPERIMENTAL_SURGERY_TRAIT) diff --git a/code/modules/surgery/advanced/bioware/nerve_grounding.dm b/code/modules/surgery/advanced/bioware/nerve_grounding.dm index aca9758e351..b0879bb0734 100644 --- a/code/modules/surgery/advanced/bioware/nerve_grounding.dm +++ b/code/modules/surgery/advanced/bioware/nerve_grounding.dm @@ -8,18 +8,17 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/ground_nerves, + /datum/surgery_step/apply_bioware/ground_nerves, /datum/surgery_step/close, ) - bioware_target = BIOWARE_NERVES + status_effect_gained = /datum/status_effect/bioware/nerves/grounded -/datum/surgery_step/ground_nerves +/datum/surgery_step/apply_bioware/ground_nerves name = "ground nerves (hand)" - accept_hand = TRUE - time = 155 + time = 15.5 SECONDS -/datum/surgery_step/ground_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/ground_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -29,7 +28,7 @@ ) display_pain(target, "Your entire body goes numb!") -/datum/surgery_step/ground_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/ground_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) display_results( user, target, @@ -38,18 +37,4 @@ span_notice("[user] finishes manipulating [target]'s nervous system."), ) display_pain(target, "You regain feeling in your body! You feel energzed!") - new /datum/bioware/grounded_nerves(target) return ..() - -/datum/bioware/grounded_nerves - name = "Grounded Nerves" - desc = "Nerves form a safe path for electricity to traverse, protecting the body from electric shocks." - mod_type = BIOWARE_NERVES - -/datum/bioware/grounded_nerves/on_gain() - ..() - ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, EXPERIMENTAL_SURGERY_TRAIT) - -/datum/bioware/grounded_nerves/on_lose() - ..() - REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, EXPERIMENTAL_SURGERY_TRAIT) diff --git a/code/modules/surgery/advanced/bioware/nerve_splicing.dm b/code/modules/surgery/advanced/bioware/nerve_splicing.dm index e7d0e336a5e..5962f828009 100644 --- a/code/modules/surgery/advanced/bioware/nerve_splicing.dm +++ b/code/modules/surgery/advanced/bioware/nerve_splicing.dm @@ -8,18 +8,17 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/splice_nerves, + /datum/surgery_step/apply_bioware/splice_nerves, /datum/surgery_step/close, ) - bioware_target = BIOWARE_NERVES + status_effect_gained = /datum/status_effect/bioware/nerves/spliced -/datum/surgery_step/splice_nerves +/datum/surgery_step/apply_bioware/splice_nerves name = "splice nerves (hand)" - accept_hand = TRUE - time = 155 + time = 15.5 SECONDS -/datum/surgery_step/splice_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/splice_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -29,7 +28,11 @@ ) display_pain(target, "Your entire body goes numb!") -/datum/surgery_step/splice_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/splice_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -38,22 +41,3 @@ span_notice("[user] finishes manipulating [target]'s nervous system."), ) display_pain(target, "You regain feeling in your body; It feels like everything's happening around you in slow motion!") - new /datum/bioware/spliced_nerves(target) - if(target.ckey) - SSblackbox.record_feedback("nested tally", "nerve_splicing", 1, list("[target.ckey]", "got")) - return ..() - -/datum/bioware/spliced_nerves - name = "Spliced Nerves" - desc = "Nerves are connected to each other multiple times, greatly reducing the impact of stunning effects." - mod_type = BIOWARE_NERVES - -/datum/bioware/spliced_nerves/on_gain() - ..() - owner.physiology.stun_mod *= 0.5 - owner.physiology.stamina_mod *= 0.8 - -/datum/bioware/spliced_nerves/on_lose() - ..() - owner.physiology.stun_mod *= 2 - owner.physiology.stamina_mod *= 1.25 diff --git a/code/modules/surgery/advanced/bioware/vein_threading.dm b/code/modules/surgery/advanced/bioware/vein_threading.dm index 97efbd876c9..ee83ddbba4d 100644 --- a/code/modules/surgery/advanced/bioware/vein_threading.dm +++ b/code/modules/surgery/advanced/bioware/vein_threading.dm @@ -8,18 +8,16 @@ /datum/surgery_step/clamp_bleeders, /datum/surgery_step/incise, /datum/surgery_step/incise, - /datum/surgery_step/thread_veins, + /datum/surgery_step/apply_bioware/thread_veins, /datum/surgery_step/close, ) - bioware_target = BIOWARE_CIRCULATION + status_effect_gained = /datum/status_effect/bioware/heart/threaded_veins -/datum/surgery_step/thread_veins +/datum/surgery_step/apply_bioware/thread_veins name = "thread veins (hand)" - accept_hand = TRUE - time = 125 -/datum/surgery_step/thread_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) +/datum/surgery_step/apply_bioware/thread_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) display_results( user, target, @@ -29,7 +27,11 @@ ) display_pain(target, "Your entire body burns in agony!") -/datum/surgery_step/thread_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/apply_bioware/thread_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) + . = ..() + if(!.) + return + display_results( user, target, @@ -38,18 +40,3 @@ span_notice("[user] finishes manipulating [target]'s circulatory system."), ) display_pain(target, "You can feel your blood pumping through reinforced veins!") - new /datum/bioware/threaded_veins(target) - return ..() - -/datum/bioware/threaded_veins - name = "Threaded Veins" - desc = "The circulatory system is woven into a mesh, severely reducing the amount of blood lost from wounds." - mod_type = BIOWARE_CIRCULATION - -/datum/bioware/threaded_veins/on_gain() - ..() - owner.physiology.bleed_mod *= 0.25 - -/datum/bioware/threaded_veins/on_lose() - ..() - owner.physiology.bleed_mod *= 4 diff --git a/tgstation.dme b/tgstation.dme index a6ac5251bdf..6903831686f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1882,6 +1882,11 @@ #include "code\datums\status_effects\wound_effects.dm" #include "code\datums\status_effects\buffs\stop_drop_roll.dm" #include "code\datums\status_effects\buffs\stun_absorption.dm" +#include "code\datums\status_effects\buffs\bioware\_bioware.dm" +#include "code\datums\status_effects\buffs\bioware\circulation.dm" +#include "code\datums\status_effects\buffs\bioware\cortex.dm" +#include "code\datums\status_effects\buffs\bioware\ligaments.dm" +#include "code\datums\status_effects\buffs\bioware\nerves.dm" #include "code\datums\status_effects\buffs\food\chilling.dm" #include "code\datums\status_effects\buffs\food\food_traits.dm" #include "code\datums\status_effects\buffs\food\haste.dm" @@ -5855,7 +5860,6 @@ #include "code\modules\surgery\advanced\pacification.dm" #include "code\modules\surgery\advanced\viral_bonding.dm" #include "code\modules\surgery\advanced\wingreconstruction.dm" -#include "code\modules\surgery\advanced\bioware\bioware.dm" #include "code\modules\surgery\advanced\bioware\bioware_surgery.dm" #include "code\modules\surgery\advanced\bioware\cortex_folding.dm" #include "code\modules\surgery\advanced\bioware\cortex_imprint.dm"