Amputation Repair, Surgery adjustments, and amputation vision. (#19199)

* Fixes necrosis steps setting bone

Makes it so you the 'cut away' step doesn't set bones to open. This is entirely a non-internal fix (you're working on the flesh, not the organs inside) so you don't need the bone retracted.

* Update other.dm

* Crowbar Augment

* descriptors

* Update carbon.dm

* no typecasting

* removes unused proc

* Limb status

* Makes butchering take time

Gives a warning as well when starting it.

* Update organ.dm

* Update organ.dm

* Closing surgical stages and desc.

Opened organs have descriptions that they're opened.

Organs inform you that they have SPECIAL MECHANICS THAT'VE BEEN IN FOR 10 YEARS that you can do to them.

Allows fixing amputated organs

A BUNCH of stuff

* Update organ.dm

* Keep the washing

* Update external_repair.dm

* Update other.dm

* Organizes surgeries

* fix a typo

* Update surgery.dm

* More surgery

* Nerve Surgery

Adds template for nerve surgery

* Prevents pain from limbs that feel no pain

* Update external_repair.dm
This commit is contained in:
Cameron Lennox
2026-02-27 19:16:27 +01:00
committed by GitHub
parent 091c23739d
commit fb81ffbe83
31 changed files with 807 additions and 536 deletions
+141
View File
@@ -0,0 +1,141 @@
///////////////////////////////////////////
// De-Husking Surgery //
/////////////////////////////////////////
/datum/surgery_status
var/dehusk = 0
/datum/surgery_step/dehusk
surgery_name = "Dehusk"
priority = 1
can_infect = 0
blood_level = 1
/datum/surgery_step/dehusk/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!ishuman(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected || (affected.robotic >= ORGAN_ROBOT))
return 0
if(coverage_check(user,target,affected,tool))
return 0
return target_zone == BP_TORSO && (HUSK in target.mutations)
/datum/surgery_step/dehusk/structinitial
surgery_name = "Create Structure"
allowed_tools = list(
/obj/item/surgical/bioregen = 100,
/obj/item/tape_roll = 25
)
min_duration = 90
max_duration = 120
/datum/surgery_step/dehusk/structinitial/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.dehusk == 0
/datum/surgery_step/dehusk/structinitial/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to create a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."), \
span_notice("You begin to create a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins to create a fleshy mesh over gaps in [target]'s flesh.", "creating a flesh mesh over gaps")
..()
/datum/surgery_step/dehusk/structinitial/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] creates a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."), \
span_notice("You create a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("creates a fleshy mesh over gaps in [target]'s flesh", "created a fleshy mesh over gaps in the flesh")
target.op_stage.dehusk = 1
..()
/datum/surgery_step/dehusk/structinitial/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, and the mesh falls, with \the [tool] scraping [target]'s body."), \
span_danger("Your hand slips, and the mesh falls, with \the [tool] scraping [target]'s body."))
user.balloon_alert_visible("slips, the mesh falls and scrapes [target]'s body", "your hand slips, the mesh falls and scrapes the body")
affected.createwound(CUT, 15)
affected.createwound(BRUISE, 10)
..()
/datum/surgery_step/dehusk/relocateflesh
surgery_name = "Relocate Flesh"
allowed_tools = list(
/obj/item/surgical/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/assembly/mousetrap = 20
)
min_duration = 90
max_duration = 120
/datum/surgery_step/dehusk/relocateflesh/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.dehusk == 1
/datum/surgery_step/dehusk/relocateflesh/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to relocate some of [target]'s flesh with \the [tool], using it to fill in gaps."), \
span_notice("You begin to relocate some of [target]'s flesh with \the [tool], using it to fill in gaps."))
user.balloon_alert_visible("begins relocating [target]'s flesh", "relocating the flesh")
..()
/datum/surgery_step/dehusk/relocateflesh/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] relocates some of [target]'s flesh with \the [tool], using it to fill in gaps."), \
span_notice("You relocate some of [target]'s flesh with \the [tool], using it to fill in gaps."))
user.balloon_alert_visible("relocates [target]'s flesh", "relocated the flesh")
target.op_stage.dehusk = 2
..()
/datum/surgery_step/dehusk/relocateflesh/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user] accidentally rips a massive chunk out of [target]'s flesh with \the [tool], causing massive damage."), \
span_danger("You accidentally rip a massive chunk out of [target]'s flesh with \the [tool], causing massive damage."))
user.balloon_alert_visible("accidentally rips a massive chunk out of [target]'s flesh, causing massive damage",
"you accidentally rip a massive chunk out of the flesh, causing massive damage")
affected.createwound(CUT, 25)
affected.createwound(BRUISE, 10)
..()
/datum/surgery_step/dehusk/structfinish
surgery_name = "Finish Structure"
allowed_tools = list(
/obj/item/surgical/bioregen = 100, \
/obj/item/surgical/FixOVein = 100, \
/obj/item/stack/cable_coil = 75
)
min_duration = 90
max_duration = 120
/datum/surgery_step/dehusk/structfinish/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.dehusk == 2
/datum/surgery_step/dehusk/structfinish/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(istype(tool,/obj/item/surgical/bioregen))
user.visible_message(span_notice("[user] begins to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."), \
span_notice("You begin to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins recreating blood vessels and filing gaps in [target]'s flesh", "recreating blood vessels and filling gaps in the flesh")
else if(istype(tool,/obj/item/surgical/FixOVein))
user.visible_message(span_notice("[user] attempts to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."), \
span_notice("You attempt to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("attempts to recreate blood vessesl and fill the gaps in [target]'s flesh", "attempting to recreate blood vessels and fill gaps in the flesh")
..()
/datum/surgery_step/dehusk/structfinish/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] finishes recreating the missing biological structures and filling in gaps in [target]'s flesh with \the [tool]."), \
span_notice("You finish recreating the missing biological structures and filling in gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("recreates the missing biological structures and gaps in [target]'s flesh", "recreated the missing bological structures and gaps in the flesh")
target.op_stage.dehusk = 0
target.mutations.Remove(HUSK)
target.status_flags &= ~DISFIGURED
target.update_icons_body()
..()
/datum/surgery_step/dehusk/structfinish/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(istype(tool,/obj/item/surgical/bioregen))
user.visible_message(span_danger("[user]'s hand slips, causing \the [tool] to scrape [target]'s body."), \
span_danger("Your hand slips, causing \the [tool] to scrape [target]'s body."))
user.balloon_alert_visible("slips, scraping [target]'s body", "you slip, scraping the body.")
else if(istype(tool,/obj/item/surgical/FixOVein))
user.visible_message(span_danger("[user] fails to finish the structure over the gaps in [target]'s flesh, doing more damage than good."), \
span_danger("You fail to finish the structure over the gaps in [target]'s flesh, doing more damage than good."))
user.balloon_alert_visible("fails to finish the structure in [target]'s flesh, doing more damage", "you fail to finish the structur, doing more damage")
affected.createwound(CUT, 15)
affected.createwound(BRUISE, 10)
..()
+19 -13
View File
@@ -89,7 +89,7 @@
surgery_name = "Repair Burns"
allowed_tools = list(
/obj/item/stack/medical/advanced/ointment = 100,
/obj/item/stack/medical/ointment = 50,
/obj/item/stack/medical/ointment = 100,
/obj/item/tape_roll = 30,
/obj/item/taperoll = 10
)
@@ -131,7 +131,10 @@
span_notice("You finish taping up [target]'s [affected] with \the [tool]."))
user.balloon_alert_visible("tapes up \the [affected]", "taped up \the [affected]")
affected.createwound(BRUISE, 10)
affected.heal_damage(0, 25, 0, 0)
var/heal_efficiency = 25
if(istype(tool, /obj/item/stack/medical/advanced/ointment))
heal_efficiency = 50
affected.heal_damage(0, heal_efficiency, 0, 0)
if(!(affected.burn_dam))
affected.burn_stage = 0
if(istype(tool, /obj/item/stack))
@@ -158,7 +161,7 @@
surgery_name = "Repair Brute"
allowed_tools = list(
/obj/item/stack/medical/advanced/bruise_pack = 100,
/obj/item/stack/medical/bruise_pack = 50,
/obj/item/stack/medical/bruise_pack = 100,
/obj/item/tape_roll = 40,
/obj/item/taperoll = 10
)
@@ -179,28 +182,31 @@
/datum/surgery_step/repairflesh/repair_brute/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(istype(tool, /obj/item/tape_roll) || istype(tool, /obj/item/taperoll))
user.visible_message(span_warning("[user] begins taping up [target]'s [affected] with \the [tool]."), \
user.visible_message(span_warning("[user] begins taping up [target]'s \the [affected] with \the [tool]."), \
span_notice("You begin taping up [target]'s [affected] with \the [tool]."))
user.balloon_alert_visible("begins to tape up \the [affected].", "taping up \the [affected].")
affected.jostle_bone(10)
else if(istype(tool, /obj/item/surgical/FixOVein) || istype(tool, /obj/item/surgical/bonesetter))
user.visible_message(span_notice("[user] begins mending the torn tissue in [target]'s [affected] with \the [tool]."), \
span_notice("You begin mending the torn tissue in [target]'s [affected] with \the [tool]."))
user.visible_message(span_notice("[user] begins mending the torn tissue in [target]'s \the [affected] with \the [tool]."), \
span_notice("You begin mending the torn tissue in [target]'s \the [affected] with \the [tool]."))
user.balloon_alert_visible("begins mending torn tissue in \the [affected]", "mending torn issue in \the [affected]")
else
user.visible_message(span_notice("[user] begins coating the tissue in [target]'s [affected] with \the [tool]."), \
span_notice("You begin coating the tissue in [target]'s [affected] with \the [tool]."))
user.visible_message(span_notice("[user] begins coating the tissue in [target]'s \the [affected] with \the [tool]."), \
span_notice("You begin coating the tissue in [target]'s \the [affected] with \the [tool]."))
user.balloon_alert_visible("begins coating tissue in \the [affected]", "coating tissue in \the [affected]")
..()
/datum/surgery_step/repairflesh/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(istype(tool, /obj/item/tape_roll) || istype(tool, /obj/item/taperoll))
user.visible_message(span_notice("[user] finishes taping up [target]'s [affected] with \the [tool]."), \
span_notice("You finish taping up [target]'s [affected] with \the [tool]."))
user.visible_message(span_notice("[user] finishes taping up [target]'s \the [affected] with \the [tool]."), \
span_notice("You finish taping up [target]'s \the [affected] with \the [tool]."))
user.balloon_alert_visible("tapes up \the [affected]", "taped up \the [affected]")
affected.createwound(BRUISE, 10)
affected.heal_damage(25, 0, 0, 0)
var/heal_efficiency = 25
if(istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
heal_efficiency = 50
affected.heal_damage(heal_efficiency, 0, 0, 0)
if(!(affected.brute_dam))
affected.brute_stage = 0
if(istype(tool, /obj/item/stack))
@@ -210,8 +216,8 @@
/datum/surgery_step/repairflesh/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, tearing up [target]'s [affected] with \the [tool]."), \
span_danger("Your hand slips, tearing up [target]'s [affected] with \the [tool]."))
user.visible_message(span_danger("[user]'s hand slips, tearing up [target]'s \the [affected] with \the [tool]."), \
span_danger("Your hand slips, tearing up [target]'s \the [affected] with \the [tool]."))
user.balloon_alert_visible("slips, tearing up \the [affected]", "your hand slips, tearing up \the [affected]")
affected.createwound(BRUISE, 5)
if(istype(tool, /obj/item/stack) && prob(30))
+1 -1
View File
@@ -398,7 +398,7 @@
user.visible_message(span_notice("[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool]."), \
span_notice("You amputate [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("amputates [target]'s [affected.name] at the [affected.amputation_point]", "amputated \the [affected.name]")
affected.droplimb(1,DROPLIMB_EDGE)
affected.droplimb(TRUE,DROPLIMB_EDGE)
/datum/surgery_step/generic/amputate/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
+54
View File
@@ -0,0 +1,54 @@
///////////////////////////////////////////////////////////////
// Hardsuit Removal Surgery
///////////////////////////////////////////////////////////////
/datum/surgery_step/hardsuit
surgery_name = "Remove Hardsuit"
allowed_tools = list(
/obj/item/pickaxe/plasmacutter = 100,
/obj/item/weldingtool = 80,
/obj/item/surgical/circular_saw = 60,
)
req_open = 0
can_infect = 0
blood_level = 0
min_duration = 120
max_duration = 180
/datum/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!istype(target))
return 0
if(istype(tool,/obj/item/weldingtool))
var/obj/item/weldingtool/welder = tool
if(!welder.isOn() || !welder.remove_fuel(1,user))
return 0
return (target_zone == BP_TORSO) && ((istype(target.back, /obj/item/rig) && !(target.back.canremove)) || (istype(target.belt, /obj/item/rig) && !(target.belt.canremove)))
/datum/surgery_step/hardsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/rig/rig = target.back
if(!istype(rig))
rig = target.belt
if(!istype(rig))
return
user.visible_message(span_filter_notice("[user] starts cutting through the support systems of \the [rig] on [target] with \the [tool].") , \
span_filter_notice("You start cutting through the support systems of \the [rig] on [target] with \the [tool]."))
user.balloon_alert_visible("starts cutting through the support systems of \the [rig] on [target]", "cutting through the support systems of \the [rig] on [target]")
..()
/datum/surgery_step/hardsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/rig/rig = target.back
if(!istype(rig))
rig = target.belt
if(!istype(rig))
return
rig.cut_suit()
user.visible_message(span_notice("[user] has cut through the support systems of \the [rig] on [target] with \the [tool]."), \
span_notice("You have cut through the support systems of \the [rig] on [target] with \the [tool]."))
user.balloon_alert_visible("cuts through the support systems of \the [rig] on [target]", "cut through the support systems of \the [rig]")
/datum/surgery_step/hardsuit/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_danger("[user]'s [tool] can't quite seem to get through the metal..."), \
span_danger("\The [tool] can't quite seem to get through the metal. It's weakening, though - try again."))
user.balloon_alert_visible("[tool] can't quite seem to get through the metal", "\the [tool] can't quite seem to get through the metal.")
+1
View File
@@ -274,6 +274,7 @@
target.brainloss = 0 //The cycle begins anew.
for(var/obj/item/organ/internal/brain/sponge in target.internal_organs) //in case they have multiple brains. weirdo.
sponge.status = 0
sponge.damage = 0
/datum/surgery_step/brainstem/realign_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+259
View File
@@ -0,0 +1,259 @@
///Has multiple stages. At or past stage 1, peridaxon can immediately treat it.
///0 = Not started
///1 = Dead tissue removed (Can use bioregen)
///2 = Flesh Rejuvenated (Can use hemostat)
///3 = Flesh Rearranged (Can use bioregen)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 1
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic
surgery_name = "Necrosis"
priority = 1
can_infect = 0 //It's already fully infected.
blood_level = 0 //Already gone.
/datum/surgery_step/necrotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!ishuman(target))
return 0
if (target_zone == O_MOUTH || target_zone == O_EYES)
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(coverage_check(user, target, affected, tool))
return 0
return affected && affected.open >= FLESH_RETRACTED && (affected.status & ORGAN_DEAD)
/datum/surgery_step/necrotic/fix_dead_tissue //Debridement
surgery_name = "Remove Dead Tissue"
allowed_tools = list(
/obj/item/surgical/scalpel = 100, \
/obj/item/material/knife = 75, \
/obj/item/material/shard = 50, \
)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open >= 1 && (affected.status & ORGAN_DEAD) && !affected.remove_necrosis
/datum/surgery_step/necrotic/fix_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts cutting away necrotic tissue in [target]'s [affected.name]", "cutting away necrotic issue in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("cuts away necrotic tissue in [target]'s [affected.name]", "cut away necrotic tissue in \the [affected.name]")
affected.remove_necrosis = 1
/datum/surgery_step/necrotic/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, slicing an artery inside [target]'s [affected.name]", "your hand slips, slicing an artery inside \the [affected.name]")
affected.createwound(CUT, 20, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 2
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/treat_necrosis
surgery_name = "Treat Necrosis"
priority = 2
allowed_tools = list(
/obj/item/reagent_containers/dropper = 100,
/obj/item/reagent_containers/glass/bottle = 75,
/obj/item/reagent_containers/glass/beaker = 75,
/obj/item/reagent_containers/spray = 50,
/obj/item/reagent_containers/glass/bucket = 50,
)
can_infect = 0
blood_level = 0
min_duration = 50
max_duration = 60
/datum/surgery_step/necrotic/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/reagent_containers/container = tool
if(!istype(container))
return FALSE
if(!container.reagents.has_reagent(REAGENT_ID_PERIDAXON))
return FALSE
return ..() && affected.remove_necrosis >= 1
/datum/surgery_step/necrotic/treat_necrosis/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts applying medication to the affected tissue in [target]'s [affected.name]", "applying medication to the affected tissue in \the [affected.name]")
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
..()
/datum/surgery_step/necrotic/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!istype(tool, /obj/item/reagent_containers))
return
var/obj/item/reagent_containers/container = tool
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue
if (trans > 0)
affected.germ_level = 0 //CURE THE INFECTION
affected.status &= ~ORGAN_DEAD
affected.owner.update_icons_body()
user.visible_message(span_notice("[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]."), \
span_notice("You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", "applied [trans] units of the solution to afected tissue in [affected.name]")
affected.remove_necrosis = 0
/datum/surgery_step/necrotic/treat_necrosis/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!istype(tool, /obj/item/reagent_containers))
return
var/obj/item/reagent_containers/container = tool
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD)
user.visible_message(span_danger("[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!") , \
span_danger("Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!"))
user.balloon_alert_visible("slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name]",
"your hand slips, applying [trans] units of the solution to the wrong place in \the [affected.name]")
//no damage or anything, just wastes medicine
///////////////////////////////////////////////////////////////
// Necrosis Surgery Alternative Step 2
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/rejuvenate_dead_tissue
surgery_name = "Rejuvenate Dead Tissue"
allowed_tools = list(/obj/item/surgical/bioregen = 100)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.remove_necrosis == 1
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts rejuvenating necrotic tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start rejuvenating necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts rejuvenating necrotic tissue in [target]'s [affected.name]", "rejuvenating necrotic tissue in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has rejuvenated necrotic tissue in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have rejuvenated necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("rejuvenated necrotic tissue in [target]'s [affected.name]", "rejuvenated necrotic tissue in \the [affected.name]")
affected.remove_necrosis = 2
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, bruising the muscle inside of [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, bruising the muscle inside of [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, bruising the muscle inside of [target]'s [affected.name]", "your hand slips, bruising the muscle inside of \the [affected.name]")
affected.createwound(BRUISE, 20, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 3
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/rearrange_dead_tissue
surgery_name = "Rearrange Tissue"
allowed_tools = list(
/obj/item/surgical/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/assembly/mousetrap = 20
)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/rearrange_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.remove_necrosis == 2
/datum/surgery_step/necrotic/rearrange_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts rearranging rejuvinated tissue in [target]'s [affected.name]", "rearranging rejuvinated tissue in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/rearrange_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("rearranging rejuvinated tissue in [target]'s [affected.name]", "rearranging rejuvinated tissue in \the [affected.name]")
affected.remove_necrosis = 3
/datum/surgery_step/necrotic/rearrange_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, slicing the fresh tissue on [target]'s [affected.name]", "your hand slips, slicing the fresh tissue on \the [affected.name]")
affected.createwound(CUT, 10, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 4
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/fix_necrotic_vessel
surgery_name = "Reroute Blood Vessels"
allowed_tools = list(
/obj/item/surgical/bioregen = 100, \
/obj/item/surgical/FixOVein = 100, \
/obj/item/stack/cable_coil = 75
)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/fix_necrotic_vessel/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.remove_necrosis == 3
/datum/surgery_step/necrotic/fix_necrotic_vessel/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts rerouting the vessels in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start rerouting the vessels in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts rerouting the vessels in [target]'s [affected.name]", "rerouting vessels in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/fix_necrotic_vessel/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has rerouted the vessels in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have rerouted the vessels in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("rerouted the vessels in [target]'s [affected.name]", "rerouted the vessels in \the [affected.name]")
//the actual heal stuffs
affected.germ_level = 0
affected.status &= ~ORGAN_DEAD
affected.owner.update_icons_body()
affected.remove_necrosis = 0
/datum/surgery_step/necrotic/fix_necrotic_vessel/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, slicing the fresh tissue on [target]'s [affected.name]", "your hand slips, slicing the fresh tissue on \the [affected.name]")
affected.createwound(CUT, 10, 1)
+129
View File
@@ -0,0 +1,129 @@
//Surgery that allows you to 'staple the nerves' of limbs, rendering them immune to pain.
//Bioregen is used as a placeholder tool. Don't enable this file until we have an actual tool.
/obj/item/organ/external
var/rewire_nerves = 0 //Surgical stage for nerve stapling surgery.
/datum/surgery_step/stapled_nerves
surgery_name = "Staple Nerves"
can_infect = TRUE
blood_level = 1
req_open = TRUE
/datum/surgery_step/stapled_nerves/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!ishuman(target))
return FALSE
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!affected || (affected.robotic >= ORGAN_ROBOT))
return FALSE
if(coverage_check(user,target,affected,tool))
return FALSE
return affected.open >= FLESH_RETRACTED //You can do this at any time as long as the flesh is retracted.
/datum/surgery_step/stapled_nerves/step_one
surgery_name = "Rearrange nerves"
allowed_tools = list(
/obj/item/surgical/bioregen = 100
)
min_duration = 300
max_duration = 300
/datum/surgery_step/stapled_nerves/step_one/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.rewire_nerves == 0
/datum/surgery_step/stapled_nerves/step_one/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to rearrange the nerves in [target]'s flesh with \the [tool]."), \
span_notice("You begin to rearrange the nerves in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins to rearrange the nerves in [target]'s flesh.", "rearranging nerves")
..()
/datum/surgery_step/stapled_nerves/step_one/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] rearranges the nerves in [target]'s flesh with \the [tool]."), \
span_notice("You rearrange the nerves in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("rearranges the nerves in [target]'s flesh", "rearranged nerves")
affected.rewire_nerves = 1
..()
/datum/surgery_step/stapled_nerves/step_one/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, and the misaligns the nerves with \the [tool]!"), \
span_danger("Your hand slips, and you misalign the nerves with \the [tool]!"))
user.balloon_alert_visible("slips, nerves being misaligned!", "your hand slips, misaligning nerves!")
affected.createwound(CUT, 15)
target.shock_stage += 100 //OUCH
target.halloss += 200
..()
/datum/surgery_step/stapled_nerves/step_two
surgery_name = "Splice nerves"
allowed_tools = list(
/obj/item/surgical/bioregen = 100
)
min_duration = 300
max_duration = 300
/datum/surgery_step/stapled_nerves/step_two/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.rewire_nerves == 1
/datum/surgery_step/stapled_nerves/step_two/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to splice the nerves in [target]'s flesh with \the [tool]."), \
span_notice("You begin to splice the nerves in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins to splice the nerves in [target]'s flesh.", "rearranging nerves")
..()
/datum/surgery_step/stapled_nerves/step_two/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] splices the nerves in [target]'s flesh with \the [tool]."), \
span_notice("You splice the nerves in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("splices the nerves in [target]'s flesh", "spliced nerves")
affected.rewire_nerves = 2
..()
/datum/surgery_step/stapled_nerves/step_two/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, and the butchers the nerves with \the [tool]!"), \
span_danger("Your hand slips, and you butcher the nerves with \the [tool]!"))
user.balloon_alert_visible("slips, nerves being butchered!", "your hand slips, butchering nerves!")
affected.createwound(CUT, 20)
target.shock_stage += 50 //OUCH
target.halloss += 200
..()
/datum/surgery_step/stapled_nerves/step_three
surgery_name = "Rewire nerves"
allowed_tools = list(
/obj/item/surgical/bioregen = 100
)
min_duration = 300
max_duration = 300
/datum/surgery_step/stapled_nerves/step_three/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.rewire_nerves == 2
/datum/surgery_step/stapled_nerves/step_three/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to rewire the nerves in [target]'s flesh with \the [tool]."), \
span_notice("You begin to rewire the nerves in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins to rewire the nerves in [target]'s flesh.", "rearranging nerves")
..()
/datum/surgery_step/stapled_nerves/step_three/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] rewires the nerves in [target]'s flesh with \the [tool]."), \
span_notice("You rewire the nerves in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("rewires the nerves in [target]'s flesh", "rewired nerves")
affected.rewire_nerves = 0
affected.stapled_nerves = TRUE
..()
/datum/surgery_step/stapled_nerves/step_three/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, and the improperly reroutes the nerves with \the [tool]!"), \
span_danger("Your hand slips, and you improperly reroute the nerves with \the [tool]!"))
user.balloon_alert_visible("slips, nerves being misaligned!", "your hand slips, misaligning nerves!")
target.halloss += 50
affected.rewire_nerves = 0 //Insult to injury. Go back to stage 1.
..()
+2 -463
View File
@@ -1,4 +1,3 @@
//Procedures in this file: Inernal wound patching, Implant removal.
//////////////////////////////////////////////////////////////////
// INTERNAL WOUND PATCHING //
//////////////////////////////////////////////////////////////////
@@ -61,467 +60,6 @@
user.balloon_alert_visible("slips, smearing [tool] in the incision in [target]'s [affected.name]", "your hand slips, smearing [tool] in the incisiom in [affected.name]")
affected.take_damage(5, 0)
///Has multiple stages. At or past stage 1, peridaxon can immediately treat it.
///0 = Not started
///1 = Dead tissue removed (Can use bioregen)
///2 = Flesh Rejuvenated (Can use hemostat)
///3 = Flesh Rearranged (Can use bioregen)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 1
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic
surgery_name = "Dehusk"
priority = 1
can_infect = 0 //It's already fully infected.
blood_level = 0 //Already gone.
/datum/surgery_step/necrotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!ishuman(target))
return 0
if (target_zone == O_MOUTH || target_zone == O_EYES)
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(coverage_check(user, target, affected, tool))
return 0
return affected && affected.open >= FLESH_RETRACTED && (affected.status & ORGAN_DEAD)
/datum/surgery_step/necrotic/fix_dead_tissue //Debridement
surgery_name = "Remove Dead Tissue"
allowed_tools = list(
/obj/item/surgical/scalpel = 100, \
/obj/item/material/knife = 75, \
/obj/item/material/shard = 50, \
)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open >= 1 && (affected.status & ORGAN_DEAD) && !affected.remove_necrosis
/datum/surgery_step/necrotic/fix_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts cutting away necrotic tissue in [target]'s [affected.name]", "cutting away necrotic issue in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("cuts away necrotic tissue in [target]'s [affected.name]", "cut away necrotic tissue in \the [affected.name]")
affected.open = 3
affected.remove_necrosis = 1
/datum/surgery_step/necrotic/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, slicing an artery inside [target]'s [affected.name]", "your hand slips, slicing an artery inside \the [affected.name]")
affected.createwound(CUT, 20, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 2
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/treat_necrosis
surgery_name = "Treat Necrosis"
priority = 2
allowed_tools = list(
/obj/item/reagent_containers/dropper = 100,
/obj/item/reagent_containers/glass/bottle = 75,
/obj/item/reagent_containers/glass/beaker = 75,
/obj/item/reagent_containers/spray = 50,
/obj/item/reagent_containers/glass/bucket = 50,
)
can_infect = 0
blood_level = 0
min_duration = 50
max_duration = 60
/datum/surgery_step/necrotic/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/reagent_containers/container = tool
if(!istype(container))
return FALSE
if(!container.reagents.has_reagent(REAGENT_ID_PERIDAXON))
return FALSE
return ..() && affected.open >= BONE_RETRACTED && affected.remove_necrosis >= 1
/datum/surgery_step/necrotic/treat_necrosis/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts applying medication to the affected tissue in [target]'s [affected.name]", "applying medication to the affected tissue in \the [affected.name]")
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
..()
/datum/surgery_step/necrotic/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!istype(tool, /obj/item/reagent_containers))
return
var/obj/item/reagent_containers/container = tool
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue
if (trans > 0)
affected.germ_level = 0 //CURE THE INFECTION
affected.status &= ~ORGAN_DEAD
affected.owner.update_icons_body()
user.visible_message(span_notice("[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]."), \
span_notice("You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", "applied [trans] units of the solution to afected tissue in [affected.name]")
affected.remove_necrosis = 0
/datum/surgery_step/necrotic/treat_necrosis/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!istype(tool, /obj/item/reagent_containers))
return
var/obj/item/reagent_containers/container = tool
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD)
user.visible_message(span_danger("[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!") , \
span_danger("Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!"))
user.balloon_alert_visible("slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name]",
"your hand slips, applying [trans] units of the solution to the wrong place in \the [affected.name]")
//no damage or anything, just wastes medicine
///////////////////////////////////////////////////////////////
// Necrosis Surgery Alternative Step 2
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/rejuvenate_dead_tissue
surgery_name = "Rejuvenate Dead Tissue"
allowed_tools = list(/obj/item/surgical/bioregen = 100)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open >= BONE_RETRACTED && affected.remove_necrosis == 1
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts rejuvenating necrotic tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start rejuvenating necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts rejuvenating necrotic tissue in [target]'s [affected.name]", "rejuvenating necrotic tissue in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has rejuvenated necrotic tissue in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have rejuvenated necrotic tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("rejuvenated necrotic tissue in [target]'s [affected.name]", "rejuvenated necrotic tissue in \the [affected.name]")
affected.open = 3
affected.remove_necrosis = 2
/datum/surgery_step/necrotic/rejuvenate_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, bruising the muscle inside of [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, bruising the muscle inside of [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, bruising the muscle inside of [target]'s [affected.name]", "your hand slips, bruising the muscle inside of \the [affected.name]")
affected.createwound(BRUISE, 20, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 3
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/rearrange_dead_tissue
surgery_name = "Rearrange Tissue"
allowed_tools = list(
/obj/item/surgical/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/assembly/mousetrap = 20
)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/rearrange_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open >= BONE_RETRACTED && affected.remove_necrosis == 2
/datum/surgery_step/necrotic/rearrange_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts rearranging rejuvinated tissue in [target]'s [affected.name]", "rearranging rejuvinated tissue in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/rearrange_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have rearranging rejuvinated tissue in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("rearranging rejuvinated tissue in [target]'s [affected.name]", "rearranging rejuvinated tissue in \the [affected.name]")
affected.open = 3
affected.remove_necrosis = 3
/datum/surgery_step/necrotic/rearrange_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, slicing the fresh tissue on [target]'s [affected.name]", "your hand slips, slicing the fresh tissue on \the [affected.name]")
affected.createwound(CUT, 10, 1)
///////////////////////////////////////////////////////////////
// Necrosis Surgery Step 4
///////////////////////////////////////////////////////////////
/datum/surgery_step/necrotic/fix_necrotic_vessel
surgery_name = "Reroute Blood Vessels"
allowed_tools = list(
/obj/item/surgical/bioregen = 100, \
/obj/item/surgical/FixOVein = 100, \
/obj/item/stack/cable_coil = 75
)
min_duration = 110
max_duration = 160
/datum/surgery_step/necrotic/fix_necrotic_vessel/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open >= BONE_RETRACTED && affected.remove_necrosis == 3
/datum/surgery_step/necrotic/fix_necrotic_vessel/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts rerouting the vessels in [target]'s [affected.name] with \the [tool].") , \
span_filter_notice("You start rerouting the vessels in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("starts rerouting the vessels in [target]'s [affected.name]", "rerouting vessels in \the [affected.name]")
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
..()
/datum/surgery_step/necrotic/fix_necrotic_vessel/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] has rerouted the vessels in [target]'s [affected.name] with \the [tool]."), \
span_notice("You have rerouted the vessels in [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("rerouted the vessels in [target]'s [affected.name]", "rerouted the vessels in \the [affected.name]")
//the actual heal stuffs
affected.germ_level = 0
affected.status &= ~ORGAN_DEAD
affected.owner.update_icons_body()
affected.remove_necrosis = 0
/datum/surgery_step/necrotic/fix_necrotic_vessel/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"), \
span_danger("Your hand slips, slicing the fresh tissue on [target]'s [affected.name] with \the [tool]!"))
user.balloon_alert_visible("slips, slicing the fresh tissue on [target]'s [affected.name]", "your hand slips, slicing the fresh tissue on \the [affected.name]")
affected.createwound(CUT, 10, 1)
///////////////////////////////////////////////////////////////
// Hardsuit Removal Surgery
///////////////////////////////////////////////////////////////
/datum/surgery_step/hardsuit
surgery_name = "Remove Hardsuit"
allowed_tools = list(
/obj/item/pickaxe/plasmacutter = 100,
/obj/item/weldingtool = 80,
/obj/item/surgical/circular_saw = 60,
)
req_open = 0
can_infect = 0
blood_level = 0
min_duration = 120
max_duration = 180
/datum/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!istype(target))
return 0
if(istype(tool,/obj/item/weldingtool))
var/obj/item/weldingtool/welder = tool
if(!welder.isOn() || !welder.remove_fuel(1,user))
return 0
return (target_zone == BP_TORSO) && ((istype(target.back, /obj/item/rig) && !(target.back.canremove)) || (istype(target.belt, /obj/item/rig) && !(target.belt.canremove)))
/datum/surgery_step/hardsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/rig/rig = target.back
if(!istype(rig))
rig = target.belt
if(!istype(rig))
return
user.visible_message(span_filter_notice("[user] starts cutting through the support systems of \the [rig] on [target] with \the [tool].") , \
span_filter_notice("You start cutting through the support systems of \the [rig] on [target] with \the [tool]."))
user.balloon_alert_visible("starts cutting through the support systems of \the [rig] on [target]", "cutting through the support systems of \the [rig] on [target]")
..()
/datum/surgery_step/hardsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/rig/rig = target.back
if(!istype(rig))
rig = target.belt
if(!istype(rig))
return
rig.cut_suit()
user.visible_message(span_notice("[user] has cut through the support systems of \the [rig] on [target] with \the [tool]."), \
span_notice("You have cut through the support systems of \the [rig] on [target] with \the [tool]."))
user.balloon_alert_visible("cuts through the support systems of \the [rig] on [target]", "cut through the support systems of \the [rig]")
/datum/surgery_step/hardsuit/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_danger("[user]'s [tool] can't quite seem to get through the metal..."), \
span_danger("\The [tool] can't quite seem to get through the metal. It's weakening, though - try again."))
user.balloon_alert_visible("[tool] can't quite seem to get through the metal", "\the [tool] can't quite seem to get through the metal.")
///////////////////////////////////////////
// De-Husking Surgery //
/////////////////////////////////////////
/datum/surgery_status
var/dehusk = 0
/datum/surgery_step/dehusk
surgery_name = "Dehusk"
priority = 1
can_infect = 0
blood_level = 1
/datum/surgery_step/dehusk/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!ishuman(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected || (affected.robotic >= ORGAN_ROBOT))
return 0
if(coverage_check(user,target,affected,tool))
return 0
return target_zone == BP_TORSO && (HUSK in target.mutations)
/datum/surgery_step/dehusk/structinitial
surgery_name = "Create Structure"
allowed_tools = list(
/obj/item/surgical/bioregen = 100,
/obj/item/tape_roll = 25
)
min_duration = 90
max_duration = 120
/datum/surgery_step/dehusk/structinitial/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.dehusk == 0
/datum/surgery_step/dehusk/structinitial/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to create a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."), \
span_notice("You begin to create a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins to create a fleshy mesh over gaps in [target]'s flesh.", "creating a flesh mesh over gaps")
..()
/datum/surgery_step/dehusk/structinitial/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] creates a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."), \
span_notice("You create a fleshy but rigid looking mesh over gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("creates a fleshy mesh over gaps in [target]'s flesh", "created a fleshy mesh over gaps in the flesh")
target.op_stage.dehusk = 1
..()
/datum/surgery_step/dehusk/structinitial/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user]'s hand slips, and the mesh falls, with \the [tool] scraping [target]'s body."), \
span_danger("Your hand slips, and the mesh falls, with \the [tool] scraping [target]'s body."))
user.balloon_alert_visible("slips, the mesh falls and scrapes [target]'s body", "your hand slips, the mesh falls and scrapes the body")
affected.createwound(CUT, 15)
affected.createwound(BRUISE, 10)
..()
/datum/surgery_step/dehusk/relocateflesh
surgery_name = "Relocate Flesh"
allowed_tools = list(
/obj/item/surgical/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/assembly/mousetrap = 20
)
min_duration = 90
max_duration = 120
/datum/surgery_step/dehusk/relocateflesh/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.dehusk == 1
/datum/surgery_step/dehusk/relocateflesh/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to relocate some of [target]'s flesh with \the [tool], using it to fill in gaps."), \
span_notice("You begin to relocate some of [target]'s flesh with \the [tool], using it to fill in gaps."))
user.balloon_alert_visible("begins relocating [target]'s flesh", "relocating the flesh")
..()
/datum/surgery_step/dehusk/relocateflesh/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] relocates some of [target]'s flesh with \the [tool], using it to fill in gaps."), \
span_notice("You relocate some of [target]'s flesh with \the [tool], using it to fill in gaps."))
user.balloon_alert_visible("relocates [target]'s flesh", "relocated the flesh")
target.op_stage.dehusk = 2
..()
/datum/surgery_step/dehusk/relocateflesh/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_danger("[user] accidentally rips a massive chunk out of [target]'s flesh with \the [tool], causing massive damage."), \
span_danger("You accidentally rip a massive chunk out of [target]'s flesh with \the [tool], causing massive damage."))
user.balloon_alert_visible("accidentally rips a massive chunk out of [target]'s flesh, causing massive damage",
"you accidentally rip a massive chunk out of the flesh, causing massive damage")
affected.createwound(CUT, 25)
affected.createwound(BRUISE, 10)
..()
/datum/surgery_step/dehusk/structfinish
surgery_name = "Finish Structure"
allowed_tools = list(
/obj/item/surgical/bioregen = 100, \
/obj/item/surgical/FixOVein = 100, \
/obj/item/stack/cable_coil = 75
)
min_duration = 90
max_duration = 120
/datum/surgery_step/dehusk/structfinish/can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.dehusk == 2
/datum/surgery_step/dehusk/structfinish/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(istype(tool,/obj/item/surgical/bioregen))
user.visible_message(span_notice("[user] begins to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."), \
span_notice("You begin to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("begins recreating blood vessels and filing gaps in [target]'s flesh", "recreating blood vessels and filling gaps in the flesh")
else if(istype(tool,/obj/item/surgical/FixOVein))
user.visible_message(span_notice("[user] attempts to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."), \
span_notice("You attempt to recreate blood vessels and fill in the gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("attempts to recreate blood vessesl and fill the gaps in [target]'s flesh", "attempting to recreate blood vessels and fill gaps in the flesh")
..()
/datum/surgery_step/dehusk/structfinish/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] finishes recreating the missing biological structures and filling in gaps in [target]'s flesh with \the [tool]."), \
span_notice("You finish recreating the missing biological structures and filling in gaps in [target]'s flesh with \the [tool]."))
user.balloon_alert_visible("recreates the missing biological structures and gaps in [target]'s flesh", "recreated the missing bological structures and gaps in the flesh")
target.op_stage.dehusk = 0
target.mutations.Remove(HUSK)
target.status_flags &= ~DISFIGURED
target.update_icons_body()
..()
/datum/surgery_step/dehusk/structfinish/fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(istype(tool,/obj/item/surgical/bioregen))
user.visible_message(span_danger("[user]'s hand slips, causing \the [tool] to scrape [target]'s body."), \
span_danger("Your hand slips, causing \the [tool] to scrape [target]'s body."))
user.balloon_alert_visible("slips, scraping [target]'s body", "you slip, scraping the body.")
else if(istype(tool,/obj/item/surgical/FixOVein))
user.visible_message(span_danger("[user] fails to finish the structure over the gaps in [target]'s flesh, doing more damage than good."), \
span_danger("You fail to finish the structure over the gaps in [target]'s flesh, doing more damage than good."))
user.balloon_alert_visible("fails to finish the structure in [target]'s flesh, doing more damage", "you fail to finish the structur, doing more damage")
affected.createwound(CUT, 15)
affected.createwound(BRUISE, 10)
..()
/datum/surgery_step/internal/detoxify
surgery_name = "Detoxify"
blood_level = 1
@@ -530,7 +68,7 @@
max_duration = 120
/datum/surgery_step/internal/detoxify/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target_zone == BP_TORSO && (target.toxloss || target.oxyloss)
return ..() && target_zone == BP_TORSO && (target.toxloss || target.oxyloss || target.cloneloss)
/datum/surgery_step/internal/detoxify/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(span_notice("[user] begins to pull toxins from, and restore oxygen to [target]'s musculature and organs with \the [tool]."), \
@@ -544,6 +82,7 @@
user.balloon_alert_visible("finishes pulling toxins and restoring oxygen to [target]'s organs", "pulled toxins from and restored oxygen to the organs")
target.adjustToxLoss(-20)
target.adjustOxyLoss(-20)
target.adjustCloneLoss(-20)
..()
/datum/surgery_step/internal/detoxify/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+13 -13
View File
@@ -75,9 +75,9 @@
///////////////////////////////////////////////////////////////
/datum/surgery_step/robotics/insertion_preparation
surgery_name = "Rewire Internals"
surgery_name = "Open Augment Port"
allowed_tools = list(
/obj/item/multitool = 100
/obj/item/tool/crowbar = 100
)
min_duration = 30
@@ -86,24 +86,24 @@
/datum/surgery_step/robotics/insertion_preparation/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 1
return affected && affected.open == FLESH_RETRACTED
/datum/surgery_step/robotics/insertion_preparation/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_filter_notice("[user] starts to modify the wiring in [target]'s [affected.name] with \the [tool]."),
span_filter_notice("You start to modify the wiring in [target]'s [affected.name] with \the [tool]."))
user.visible_message(span_filter_notice("[user] starts to open the augment port on [target]'s [affected.name] with \the [tool]."),
span_filter_notice("You start to open the augment port on [target]'s [affected.name] with \the [tool]."))
..()
/datum/surgery_step/robotics/insertion_preparation/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_notice("[user] modifies the wiring in [target]'s [affected.name] with \the [tool]."), \
span_notice("You modify the wiring in [target]'s [affected.name] with \the [tool]."))
affected.open = 2
user.visible_message(span_notice("[user] opens the augment port on [target]'s [affected.name] with \the [tool]."), \
span_notice("You open the augment port on [target]'s [affected.name] with \the [tool]."))
affected.open = FLESH_RETRACTED
/datum/surgery_step/robotics/insertion_preparation/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(span_warning("[user]'s [tool.name] slips, failing to modify the wiring in [target]'s [affected.name]."),
span_warning("Your [tool] slips, failing to modify the wiring in [target]'s [affected.name]."))
user.visible_message(span_warning("[user]'s [tool.name] slips, failing to open the augment port on [target]'s [affected.name]."),
span_warning("Your [tool] slips, failing to open the augment port on [target]'s [affected.name]."))
///////////////////////////////////////////////////////////////
// Open Hatch Surgery
@@ -124,7 +124,7 @@
/datum/surgery_step/robotics/open_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 1
return affected && (affected.open == INCISION_MADE || affected.open == FLESH_RETRACTED)
/datum/surgery_step/robotics/open_hatch/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
@@ -138,7 +138,7 @@
user.visible_message(span_notice("[user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool]."), \
span_notice("You open the maintenance hatch on [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("opens the maintenance hatch on [target]'s [affected.name]", "maintenance hatch on \the [affected.name] open")
affected.open = 3
affected.open = BONE_CUT
/datum/surgery_step/robotics/open_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
@@ -179,7 +179,7 @@
user.visible_message(span_notice("[user] closes and secures the hatch on [target]'s [affected.name] with \the [tool]."), \
span_notice("You close and secure the hatch on [target]'s [affected.name] with \the [tool]."))
user.balloon_alert_visible("closes and secures the hatch on [target]'s [affected.name]", "closed and secured the hatch on \the [affected.name]")
affected.open = 0
affected.open = FALSE
affected.germ_level = 0
/datum/surgery_step/robotics/close_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+3 -3
View File
@@ -251,9 +251,9 @@
GLOB.surgery_steps.Swap(i, gap + i)
swapped = 1
/datum/surgery_status/
var/eyes = 0
var/face = 0
/datum/surgery_status
var/eyes = 0
var/face = 0
var/brainstem = 0
var/head_reattach = 0
var/current_organ = "organ"