mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Various Surgery & Medical fixes, QoL, and adjustments (#18718)
* bunch of medical adjustments * or so i thought * De-death surgery * Update carbon.dm * Update mob_grab_specials.dm * yeh * Palpation * internal bleeding * Update life.dm * duration increase * adjust these * Fixes a bug with defibs that I caused When I reworked get_crit_point, it caused defibs to DEAL oxyloss instead of HEALING it, like it has been doing for the past 8 years. This fixes it. * fixcees this * fixes syringe stabbing * Converts these to managed global lists * gets rid of disabilities * Change injury check to use do_after with delay * lungfix * actually remove the necrosis * Fixes brain surgery * fix language bug * Update brain.dm * ghetto surgery adjustments Buffs some ghetto surgery Makes some injuries sustained less gnarly if you fail with a ghetto tool. Some mild typo fixes.
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
/obj/item/surgical/bonegel = 100
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_SCREWDRIVER = 75)
|
||||
allowed_procs = list(IS_SCREWDRIVER = 90) //this is what we actually use irl!
|
||||
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
@@ -216,7 +216,7 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
||||
return affected && (affected.status & ORGAN_BROKEN) && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
||||
|
||||
/datum/surgery_step/clamp_bone/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)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
/obj/item/material/knife/machete/hatchet = 75
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_CROWBAR = 50)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// LIMB REPAIR SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/repairflesh/
|
||||
/datum/surgery_step/repairflesh
|
||||
surgery_name = "Repair Flesh"
|
||||
priority = 1
|
||||
can_infect = 1
|
||||
@@ -10,10 +10,6 @@
|
||||
req_open = 1
|
||||
|
||||
/datum/surgery_step/repairflesh/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/* VOREStation Removal for Mlem Reasons(TM)
|
||||
if (target.stat == DEAD) // Sorry defibs, your subjects need to have pumping fluids for these to work.
|
||||
return 0
|
||||
*/
|
||||
if (isslime(target))
|
||||
return 0
|
||||
if (target_zone == O_EYES || target_zone == O_MOUTH)
|
||||
@@ -40,7 +36,7 @@
|
||||
surgery_name = "Scan Injury"
|
||||
allowed_tools = list(
|
||||
/obj/item/autopsy_scanner = 100,
|
||||
/obj/item/analyzer = 10
|
||||
/obj/item/analyzer = 25
|
||||
)
|
||||
|
||||
priority = 2
|
||||
@@ -84,7 +80,6 @@
|
||||
user.visible_message(span_warning("[user]'s hand slips, dropping \the [tool] onto [target]'s [affected]!") , \
|
||||
span_warning("Your hand slips, dropping \the [tool] onto [target]'s [affected]!") )
|
||||
user.balloon_alert_visible("slips, dropping \the [tool].", "your hand slips, dropping \the [tool] onto \the [affected].")
|
||||
affected.createwound(BRUISE, 10)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BURN STEP //
|
||||
@@ -149,8 +144,7 @@
|
||||
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.balloon_alert_visible("slips, tearing up \the [affected]", "you slip, tearing up \the [affected]")
|
||||
affected.createwound(BRUISE, 10)
|
||||
affected.createwound(CUT, 5)
|
||||
affected.createwound(BRUISE, 5)
|
||||
if(istype(tool, /obj/item/stack) && prob(30))
|
||||
var/obj/item/stack/T = tool
|
||||
T.use(1)
|
||||
@@ -219,8 +213,7 @@
|
||||
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.balloon_alert_visible("slips, tearing up \the [affected]", "your hand slips, tearing up \the [affected]")
|
||||
affected.createwound(BRUISE, 10)
|
||||
affected.createwound(CUT, 5)
|
||||
affected.createwound(BRUISE, 5)
|
||||
if(istype(tool, /obj/item/stack) && prob(30))
|
||||
var/obj/item/stack/T = tool
|
||||
T.use(1)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
user.visible_message(span_danger("[user]'s hand slips, slicing [target]'s throat with \the [tool]!") , \
|
||||
span_danger("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
|
||||
user.balloon_alert_visible("slips, slicing [target]'s throat.", "your hand slips, slicing [target]'s throat.")
|
||||
affected.createwound(CUT, 60)
|
||||
affected.createwound(CUT, 10)
|
||||
target.AdjustLosebreath(10)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
@@ -66,7 +66,7 @@
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
|
||||
/obj/item/assembly/mousetrap = 25 //I don't know. Don't ask me. But I'm leaving it because hilarity.
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
@@ -129,7 +129,7 @@
|
||||
user.visible_message(span_danger("[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!"), \
|
||||
span_danger("Your hand slips, tearing skin on [target]'s face with \the [tool]!"))
|
||||
user.balloon_alert_visible("slips, tearing skin on [target]'s face.", "your hand slips, tearing skin on the face.")
|
||||
target.apply_damage(10, BRUTE, affected, sharp = TRUE, sharp = TRUE)
|
||||
target.apply_damage(10, BRUTE, affected, sharp = TRUE)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Face Cauterizing Surgery
|
||||
@@ -139,6 +139,7 @@
|
||||
surgery_name = "Cauterize Face"
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/cautery = 100, \
|
||||
/obj/item/clothing/mask/smokable/cigarette/cigar = 90, \
|
||||
/obj/item/clothing/mask/smokable/cigarette = 75, \
|
||||
/obj/item/flame/lighter = 50, \
|
||||
/obj/item/weldingtool = 25
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
/obj/item/surgical/scalpel/laser3 = 100, \
|
||||
/obj/item/surgical/scalpel/laser2 = 100, \
|
||||
/obj/item/surgical/scalpel/laser1 = 100, \
|
||||
/obj/item/melee/energy/sword = 5
|
||||
/obj/item/melee/energy/sword = 75
|
||||
)
|
||||
priority = 2
|
||||
req_open = 0
|
||||
@@ -131,7 +131,7 @@
|
||||
span_danger("Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!"))
|
||||
user.balloon_alert_visible("slips, searing a long gash on \the [affected.name]", "your hand slips, searing a long gash on [affected.name].")
|
||||
affected.createwound(CUT, 7.5)
|
||||
affected.createwound(BURN, 12.5)
|
||||
affected.createwound(BURN, 7.5)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Incision Management Surgery
|
||||
@@ -192,8 +192,9 @@
|
||||
surgery_name = "Clamp Bleeders"
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100, \
|
||||
/obj/item/material/twohanded/fireaxe = 99, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/assembly/mousetrap = 20
|
||||
/obj/item/assembly/mousetrap = 25
|
||||
)
|
||||
|
||||
min_duration = 40
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
surgery_name = "Remove Implant"
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100, \
|
||||
/obj/item/material/kitchen/utensil/fork = 20
|
||||
/obj/item/material/kitchen/utensil/fork = 50
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_WIRECUTTER = 75)
|
||||
@@ -264,7 +264,7 @@
|
||||
worm.detatch()
|
||||
worm.leave_host()
|
||||
else
|
||||
obj.loc = get_turf(target)
|
||||
obj.forceMove(get_turf(target))
|
||||
obj.add_blood(target)
|
||||
obj.update_icon()
|
||||
if(istype(obj,/obj/item/implant))
|
||||
@@ -282,11 +282,13 @@
|
||||
/datum/surgery_step/cavity/implant_removal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
..()
|
||||
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
if (affected.implants.len)
|
||||
if(LAZYLEN(affected.implants))
|
||||
var/fail_prob = 10
|
||||
fail_prob += 100 - tool_quality(tool)
|
||||
if (prob(fail_prob))
|
||||
if(prob(fail_prob))
|
||||
var/obj/item/implant/imp = affected.implants[1]
|
||||
if(!istype(imp))
|
||||
return
|
||||
user.visible_message(span_danger(" Something beeps inside [target]'s [affected.name]!"))
|
||||
playsound(imp, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
spawn(25)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/assembly/mousetrap = 20
|
||||
/obj/item/assembly/mousetrap = 25
|
||||
)
|
||||
can_infect = 1
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
priority = 1
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/FixOVein = 100,
|
||||
/obj/item/stack/cable_coil = 40,
|
||||
/obj/item/assembly/mousetrap = 5)
|
||||
/obj/item/stack/cable_coil = 50,
|
||||
/obj/item/assembly/mousetrap = 25)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
@@ -66,8 +66,8 @@
|
||||
priority = 3 //Do this instead of expanding the skull cavity
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/surgicaldrill = 100,
|
||||
/obj/item/melee/changeling/arm_blade = 15,
|
||||
/obj/item/pickaxe = 5
|
||||
/obj/item/melee/changeling/arm_blade = 90,
|
||||
/obj/item/pickaxe = 15
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_SCREWDRIVER = 75)
|
||||
@@ -113,7 +113,7 @@
|
||||
priority = 3 //Do this instead of picking around for implants.
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100,
|
||||
/obj/item/melee/changeling/claw = 40) //Surprisingly, claws are kind of okay at picking things out.
|
||||
/obj/item/melee/changeling/claw = 90) //Surprisingly, claws are kind of okay at picking things out.
|
||||
|
||||
allowed_procs = list(IS_WIRECUTTER = 60)
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
priority = 1 //Do this after IB.
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/FixOVein = 100,
|
||||
/obj/item/stack/nanopaste = 50,
|
||||
/obj/item/stack/cable_coil = 40,
|
||||
/obj/item/assembly/mousetrap = 5)
|
||||
/obj/item/stack/nanopaste = 99,
|
||||
/obj/item/stack/cable_coil = 75,
|
||||
/obj/item/assembly/mousetrap = 25)
|
||||
|
||||
min_duration = 100
|
||||
max_duration = 200
|
||||
@@ -200,8 +200,8 @@
|
||||
priority = 3 //Do this instead of fixing bones.
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/bonegel = 100,
|
||||
/obj/item/stack/nanopaste = 50,
|
||||
/obj/item/tape_roll = 5)
|
||||
/obj/item/stack/nanopaste = 99,
|
||||
/obj/item/tape_roll = 50)
|
||||
|
||||
min_duration = 100
|
||||
max_duration = 160
|
||||
@@ -242,7 +242,7 @@
|
||||
priority = 3 //Do this instead of searching for objects in the skull.
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100,
|
||||
/obj/item/melee/changeling/claw = 20) //Claws. Good for digging, not so much for moving.
|
||||
/obj/item/melee/changeling/claw = 99) //Technically this step isn't even NEEDED.
|
||||
|
||||
allowed_procs = list(IS_WIRECUTTER = 60)
|
||||
|
||||
|
||||
@@ -171,8 +171,6 @@
|
||||
|
||||
priority = 3
|
||||
|
||||
blood_level = 3
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
excludes_steps = list(/datum/surgery_step/generic/cut_open)
|
||||
|
||||
@@ -97,9 +97,9 @@
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
user.visible_message(span_warning("[user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!"))
|
||||
user.balloon_alert_visible("slips, gettng mess and tearing the inside of [target]'s [affected.name]", "your hand slips, getting mess and tearng the [affected.name]'s insides")
|
||||
user.visible_message(span_warning("[user]'s hand slips, getting messy and tearing the inside of [target]'s [affected.name] with \the [tool]!"), \
|
||||
span_warning("Your hand slips, getting messy and tearing the inside of [target]'s [affected.name] with \the [tool]!"))
|
||||
user.balloon_alert_visible("slips, getting messy and tearing the inside of [target]'s [affected.name]", "your hand slips, getting mess and tearing the [affected.name]'s insides")
|
||||
var/dam_amt = 2
|
||||
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/hemostat = 100, \
|
||||
/obj/item/material/kitchen/utensil/fork = 20
|
||||
/obj/item/material/kitchen/utensil/fork = 50
|
||||
)
|
||||
|
||||
allowed_procs = list(IS_WIRECUTTER = 100) //FBP code also uses this, so let's be nice. Roboticists won't know to use hemostats.
|
||||
@@ -419,7 +419,7 @@
|
||||
var/obj/item/organ/O = tool
|
||||
if(istype(O))
|
||||
user.remove_from_mob(O)
|
||||
O.replaced(target,affected)
|
||||
O.replaced(target, affected)
|
||||
|
||||
/datum/surgery_step/internal/replace_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message(span_warning("[user]'s hand slips, damaging \the [tool]!"), \
|
||||
|
||||
+173
-48
@@ -61,25 +61,24 @@
|
||||
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/fix_dead_tissue //Debridement
|
||||
surgery_name = "Remove Dead Tissue"
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/scalpel = 100, \
|
||||
/obj/item/material/knife = 75, \
|
||||
/obj/item/material/shard = 50, \
|
||||
)
|
||||
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
/datum/surgery_step/necrotic
|
||||
surgery_name = "Dehusk"
|
||||
priority = 1
|
||||
can_infect = 0 //It's already fully infected.
|
||||
blood_level = 0 //Already gone.
|
||||
|
||||
min_duration = 110
|
||||
max_duration = 160
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/datum/surgery_step/necrotic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
|
||||
@@ -92,7 +91,22 @@
|
||||
|
||||
return affected && affected.open >= 2 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/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)
|
||||
|
||||
/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]."))
|
||||
@@ -100,14 +114,15 @@
|
||||
target.custom_pain("The pain in [affected.name] is unbearable!", 100)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/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/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/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]!"))
|
||||
@@ -117,7 +132,7 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Necrosis Surgery Step 2
|
||||
///////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/treat_necrosis
|
||||
/datum/surgery_step/necrotic/treat_necrosis
|
||||
surgery_name = "Treat Necrosis"
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
@@ -134,26 +149,11 @@
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
/datum/surgery_step/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!istype(tool, /obj/item/reagent_containers))
|
||||
return 0
|
||||
|
||||
var/obj/item/reagent_containers/container = tool
|
||||
if(!container.reagents.has_reagent(REAGENT_ID_PERIDAXON))
|
||||
return 0
|
||||
|
||||
if(!ishuman(target))
|
||||
return 0
|
||||
|
||||
if (target_zone == O_MOUTH || target_zone == O_EYES)
|
||||
return 0
|
||||
|
||||
/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)
|
||||
if(coverage_check(user, target, affected, tool))
|
||||
return 0
|
||||
return affected && affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
return ..() && affected.open >= 3 && affected.remove_necrosis >= 1
|
||||
|
||||
/datum/surgery_step/treat_necrosis/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/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]."))
|
||||
@@ -161,7 +161,7 @@
|
||||
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/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))
|
||||
@@ -171,14 +171,16 @@
|
||||
|
||||
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/treat_necrosis/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
/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))
|
||||
@@ -195,6 +197,129 @@
|
||||
|
||||
//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 >= 3 && 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 >= 3 && 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]", "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 >= 3 && 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
|
||||
///////////////////////////////////////////////////////////////
|
||||
@@ -202,9 +327,9 @@
|
||||
/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,
|
||||
/obj/item/pickaxe/plasmacutter = 100
|
||||
)
|
||||
req_open = 0
|
||||
|
||||
@@ -254,10 +379,10 @@
|
||||
// De-Husking Surgery //
|
||||
/////////////////////////////////////////
|
||||
|
||||
/datum/surgery_status/
|
||||
/datum/surgery_status
|
||||
var/dehusk = 0
|
||||
|
||||
/datum/surgery_step/dehusk/
|
||||
/datum/surgery_step/dehusk
|
||||
surgery_name = "Dehusk"
|
||||
priority = 1
|
||||
can_infect = 0
|
||||
@@ -276,7 +401,8 @@
|
||||
/datum/surgery_step/dehusk/structinitial
|
||||
surgery_name = "Create Structure"
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/bioregen = 100
|
||||
/obj/item/surgical/bioregen = 100,
|
||||
/obj/item/tape_roll = 25
|
||||
)
|
||||
min_duration = 90
|
||||
max_duration = 120
|
||||
@@ -346,7 +472,8 @@
|
||||
surgery_name = "Finish Structure"
|
||||
allowed_tools = list(
|
||||
/obj/item/surgical/bioregen = 100, \
|
||||
/obj/item/surgical/FixOVein = 30
|
||||
/obj/item/surgical/FixOVein = 100, \
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
min_duration = 90
|
||||
max_duration = 120
|
||||
@@ -398,7 +525,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 > 25 || target.oxyloss > 25)
|
||||
return ..() && target_zone == BP_TORSO && (target.toxloss || target.oxyloss)
|
||||
|
||||
/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]."), \
|
||||
@@ -410,10 +537,8 @@
|
||||
user.visible_message(span_notice("[user] finishes pulling toxins from, and restoring oxygen to [target]'s musculature and organs with \the [tool]."), \
|
||||
span_notice("You finish pulling toxins from, and restoring oxygen to [target]'s musculature and organs with \the [tool]."))
|
||||
user.balloon_alert_visible("finishes pulling toxins and restoring oxygen to [target]'s organs", "pulled toxins from and restored oxygen to the organs")
|
||||
if(target.toxloss>25)
|
||||
target.adjustToxLoss(-20)
|
||||
if(target.oxyloss>25)
|
||||
target.adjustOxyLoss(-20)
|
||||
target.adjustToxLoss(-20)
|
||||
target.adjustOxyLoss(-20)
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/detoxify/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
|
||||
/datum/surgery_step/robotics/unscrew_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)
|
||||
if(istype(tool, /obj/item/coin))
|
||||
user.drop_item()
|
||||
user.visible_message(span_warning("[user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name]."), \
|
||||
span_warning("Your [tool] slips, failing to unscrew [target]'s [affected.name]."))
|
||||
user.balloon_alert_visible("slips, failing to unscrew [target]'s [affected.name]", "your [tool] slips, failing to unscrew \the [affected.name]")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/* SURGERY STEPS */
|
||||
|
||||
/obj/
|
||||
var/surgery_odds = 0 // Used for tables/etc which can have surgery done of them.
|
||||
///How clean an object is for surgery purposes. Cleaner = less chance of infection.
|
||||
var/surgery_cleanliness = 0 // Used for tables/etc which can have surgery done of them.
|
||||
|
||||
/datum/surgery_step
|
||||
var/priority = 0 //steps with higher priority would be attempted first
|
||||
@@ -135,19 +136,21 @@
|
||||
|
||||
/obj/item/proc/do_surgery(mob/living/carbon/M, mob/living/user)
|
||||
if(!can_do_surgery(M, user))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!istype(M))
|
||||
return 0
|
||||
return FALSE
|
||||
if (user.a_intent == I_HURT) //check for Hippocratic Oath
|
||||
//Insert intentional hurt medical code here.
|
||||
return 0
|
||||
return FALSE
|
||||
var/zone = user.zone_sel.selecting
|
||||
if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly.
|
||||
to_chat(user, span_warning("You can't operate on this area while surgery is already in progress."))
|
||||
return 1
|
||||
var/obj/surface = M.get_surgery_surface(user)
|
||||
if(!surface || !surface.surgery_odds) // If the surface has a chance of 0% surgery odds (ground), don't even bother trying to do surgery.
|
||||
return 0 // This is meant to prevent the 'glass shard mouth 60 damage click' exploit. Also saves CPU by doing it here!
|
||||
return TRUE
|
||||
///How 'clean' the surace we're doing surgery on is.
|
||||
///100 = fully clean, 0 = filthy
|
||||
var/cleanliness = M.get_surgery_cleanliness(user)
|
||||
if(isnull(cleanliness)) //They're standing upright.
|
||||
return FALSE
|
||||
|
||||
var/list/datum/surgery_step/available_surgeries = list()
|
||||
for(var/datum/surgery_step/S in GLOB.surgery_steps)
|
||||
@@ -181,7 +184,7 @@
|
||||
if(M == user) // Once we determine if we can actually do a step at all, give a slight delay to self-surgery to confirm attempts.
|
||||
to_chat(user, span_critical("You focus on attempting to perform surgery upon yourself."))
|
||||
if(!do_after(user, 3 SECONDS, target = M))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/datum/surgery_step/selected_surgery
|
||||
if(available_surgeries.len > 1) //More than one possible? Ask them which one.
|
||||
@@ -190,16 +193,14 @@
|
||||
selected_surgery = pick(available_surgeries)
|
||||
|
||||
if(isnull(selected_surgery)) //They clicked 'cancel'
|
||||
return 1
|
||||
return TRUE
|
||||
var/obj/item/organ/external/affected = M.get_organ(zone)
|
||||
selected_surgery = available_surgeries[selected_surgery] //Sets the name they selected to be the datum.
|
||||
// VOREstation edit start
|
||||
if(istype(selected_surgery,/datum/surgery_step/generic/amputate))
|
||||
var/obj/item/organ/external/affected = M.get_organ(zone)
|
||||
to_chat(user, span_danger("You are preparing to amputate \the [M]'s [affected.name]!"))
|
||||
if(!do_after(user, 3 SECONDS, target = M))
|
||||
to_chat(user, span_warning("You reconsider performing an amputation..."))
|
||||
return 0
|
||||
// VOREstation edit end
|
||||
return FALSE
|
||||
M.op_stage.in_progress += zone
|
||||
selected_surgery.begin_step(user, M, zone, src) //start on it
|
||||
var/success = TRUE
|
||||
@@ -208,13 +209,10 @@
|
||||
if(!prob(selected_surgery.tool_quality(src)))
|
||||
success = FALSE
|
||||
|
||||
// Bad surface may mean failure as well.
|
||||
if(!prob(surface.surgery_odds))
|
||||
success = FALSE
|
||||
|
||||
// Not staying still fails you too.
|
||||
if(success)
|
||||
var/calc_duration = rand(selected_surgery.min_duration, selected_surgery.max_duration)
|
||||
calc_duration *= CLAMP((100-cleanliness)/10 + 1, 1, 10)
|
||||
if(!do_after(user, calc_duration * toolspeed, M, target_zone = zone, max_distance = reach))
|
||||
success = FALSE
|
||||
to_chat(user, span_warning("You must remain close to and keep focused on your patient to conduct surgery."))
|
||||
@@ -222,6 +220,8 @@
|
||||
|
||||
if(success)
|
||||
selected_surgery.end_step(user, M, zone, src)
|
||||
if(prob(100-cleanliness)) //Infection chance based on cleanliness.
|
||||
affected.adjust_germ_level(rand(10,20))
|
||||
else
|
||||
selected_surgery.fail_step(user, M, zone, src)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //Gets rid of instakill mechanics.
|
||||
@@ -230,7 +230,7 @@
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.update_surgery()
|
||||
return 1 //don't want to do weapony things after surgery
|
||||
return TRUE //don't want to do weapony things after surgery
|
||||
|
||||
/proc/sort_surgeries()
|
||||
var/gap = GLOB.surgery_steps.len
|
||||
|
||||
Reference in New Issue
Block a user