From fb81ffbe832754f88a2bed73faa96fedfbd92367 Mon Sep 17 00:00:00 2001 From: Cameron Lennox Date: Fri, 27 Feb 2026 13:16:27 -0500 Subject: [PATCH] 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 --- code/_helpers/mobs.dm | 10 - code/game/atom/_atom.dm | 1 - code/game/objects/items/toys/toys_vr.dm | 2 +- code/game/objects/structures/gargoyle.dm | 2 +- code/modules/blob2/blobs/base_blob.dm | 2 +- code/modules/examine/descriptions/armor.dm | 2 +- code/modules/examine/descriptions/guns.dm | 2 +- code/modules/examine/descriptions/items.dm | 5 +- code/modules/examine/descriptions/turfs.dm | 2 +- code/modules/examine/examine.dm | 4 +- code/modules/mob/living/carbon/carbon.dm | 13 +- .../mob/living/carbon/human/human_damage.dm | 4 + .../human/species/station/prommie_blob.dm | 2 +- code/modules/mob/living/carbon/shock.dm | 2 + .../subtypes/slime/xenobio/xenobio.dm | 2 +- code/modules/organs/internal/augment.dm | 2 +- code/modules/organs/organ.dm | 73 ++- code/modules/organs/organ_external.dm | 91 +++- code/modules/organs/wound.dm | 2 +- code/modules/reagents/reagents/medicine_vr.dm | 2 +- code/modules/surgery/dehusk.dm | 141 ++++++ code/modules/surgery/external_repair.dm | 32 +- code/modules/surgery/generic.dm | 2 +- code/modules/surgery/hardsuit.dm | 54 ++ code/modules/surgery/neck.dm | 1 + code/modules/surgery/necrotic.dm | 259 ++++++++++ code/modules/surgery/nerves.dm | 129 +++++ code/modules/surgery/other.dm | 465 +----------------- code/modules/surgery/robotics.dm | 26 +- code/modules/surgery/surgery.dm | 6 +- vorestation.dme | 3 + 31 files changed, 807 insertions(+), 536 deletions(-) create mode 100644 code/modules/surgery/dehusk.dm create mode 100644 code/modules/surgery/hardsuit.dm create mode 100644 code/modules/surgery/necrotic.dm create mode 100644 code/modules/surgery/nerves.dm diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 8f32c413f1..e58f432e08 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -103,16 +103,6 @@ else return current_species.get_random_name(gender) -/proc/random_skin_tone() - switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino")) - if("caucasian") . = -10 - if("afroamerican") . = -115 - if("african") . = -165 - if("latino") . = -55 - if("albino") . = 34 - else . = rand(-185,34) - return min(max( .+rand(-25, 25), -185),34) - /proc/skintone2racedescription(tone) switch (tone) if(30 to INFINITY) return "albino" diff --git a/code/game/atom/_atom.dm b/code/game/atom/_atom.dm index ef726f8872..d109605e4e 100644 --- a/code/game/atom/_atom.dm +++ b/code/game/atom/_atom.dm @@ -635,7 +635,6 @@ GLOBAL_LIST_EMPTY(icon_dimensions) // Basically "if has washable coloration" if(length(atom_colours) >= WASHABLE_COLOUR_PRIORITY && atom_colours[WASHABLE_COLOUR_PRIORITY]) remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - return TRUE forensic_data?.wash(clean_types) blood_color = null diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm index 35368ce36e..5942bc567d 100644 --- a/code/game/objects/items/toys/toys_vr.dm +++ b/code/game/objects/items/toys/toys_vr.dm @@ -115,7 +115,7 @@ if (lights_glowing) add_overlay(emissive_appearance(icon, "[icon_state]-lights")) -/obj/item/toy/plushie/borgplushie/drake/get_description_info() +/obj/item/toy/plushie/borgplushie/drake/get_description_info(list/additional_information) return "The lights on the plushie can be toggled [lights_glowing ? "off" : "on"] by alt-clicking on it." /obj/item/toy/plushie/borgplushie/drake/sec diff --git a/code/game/objects/structures/gargoyle.dm b/code/game/objects/structures/gargoyle.dm index 8314d8f58c..1ad6080fbb 100644 --- a/code/game/objects/structures/gargoyle.dm +++ b/code/game/objects/structures/gargoyle.dm @@ -167,7 +167,7 @@ examine_icon.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) return examine_icon -/obj/structure/gargoyle/get_description_info() +/obj/structure/gargoyle/get_description_info(list/additional_information) var/mob/living/carbon/human/gargoyle = WR_gargoyle.resolve() if(gargoyle) if(isspace(loc) || isopenspace(loc)) diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 2394d31485..a19c58d645 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(all_blobs) else . += overmind.blob_type.desc -/obj/structure/blob/get_description_info() +/obj/structure/blob/get_description_info(list/additional_information) if(overmind) return overmind.blob_type.effect_desc return ..() diff --git a/code/modules/examine/descriptions/armor.dm b/code/modules/examine/descriptions/armor.dm index ba27a49136..3d4c8a2890 100644 --- a/code/modules/examine/descriptions/armor.dm +++ b/code/modules/examine/descriptions/armor.dm @@ -43,7 +43,7 @@ else return "It's difficult to tell how much it'll influence your speed." -/obj/item/clothing/get_description_info() +/obj/item/clothing/get_description_info(list/additional_information) var/armor_stats = description_info + "\
" diff --git a/code/modules/examine/descriptions/guns.dm b/code/modules/examine/descriptions/guns.dm index c289c43803..538d9b02be 100644 --- a/code/modules/examine/descriptions/guns.dm +++ b/code/modules/examine/descriptions/guns.dm @@ -105,7 +105,7 @@ if(51 to 100) return "an extremely long delay" -/obj/item/gun/get_description_info() +/obj/item/gun/get_description_info(list/additional_information) var/is_loaded var/non_lethal var/non_lethal_list = list(/obj/item/gun/energy/medigun,/obj/item/gun/energy/mouseray,/obj/item/gun/energy/temperature,/obj/item/gun/energy/sizegun,/obj/item/gun/projectile/shotgun/pump/toy,/obj/item/gun/projectile/revolver/toy,/obj/item/gun/projectile/pistol/toy,/obj/item/gun/projectile/automatic/toy) diff --git a/code/modules/examine/descriptions/items.dm b/code/modules/examine/descriptions/items.dm index 0ed0581118..ba4410af1f 100644 --- a/code/modules/examine/descriptions/items.dm +++ b/code/modules/examine/descriptions/items.dm @@ -75,9 +75,12 @@ else return "an average attack speed" -/obj/item/get_description_info() +/obj/item/get_description_info(list/additional_information) var/list/weapon_stats = list() + if(LAZYLEN(additional_information)) + weapon_stats += additional_information + if(description_info) weapon_stats += description_info diff --git a/code/modules/examine/descriptions/turfs.dm b/code/modules/examine/descriptions/turfs.dm index cb938504c8..5ce23070e6 100644 --- a/code/modules/examine/descriptions/turfs.dm +++ b/code/modules/examine/descriptions/turfs.dm @@ -32,7 +32,7 @@ results += "[desc_panel_image("crowbar")]to finish deconstruction." return results -/turf/simulated/floor/get_description_info() +/turf/simulated/floor/get_description_info(list/additional_information) . = ..() if(broken || burnt) . += "It is broken." diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index 9c37ac3ba3..eebd75695d 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -12,7 +12,9 @@ var/description_antag = null //Malicious red text, for the antags. //Override these if you need special behaviour for a specific type. -/atom/proc/get_description_info() +///What is shown to the user when something is examined. This can be overridden for specific uses. +///The 'additional_information' list var requires creation in the proc itself. It should check to seee if(additional_information) before trying to do additional_information = list() and adding to it. +/atom/proc/get_description_info(list/additional_information) if(description_info) return description_info return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 090ea08fb0..5bc85285c3 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -195,6 +195,8 @@ if(prob(30)) burndamage += halloss */ + //For reference, these will show up in game as: + //"My X is: [DESCRIPTOR]" switch(brutedamage) if(1 to 20) status += "bruised" @@ -218,18 +220,18 @@ if(org.dislocated == 1) status += "dislocated" if(org.status & ORGAN_BROKEN) - status += "hurts when touched" + status += "[can_feel_pain(org) ? "hurting and " : ""]abnormally bent" //infection stuff if(org.status & ORGAN_DEAD) status += "necrotic" else if(org.germ_level > INFECTION_LEVEL_TWO) - status += "feels like it's on fire!" + status += "burning and feels like it's on fire" else if(org.germ_level > INFECTION_LEVEL_TWO-INFECTION_LEVEL_ONE) //Early warning status += "warm to the touch" if(LAZYLEN(org.wounds)) for(var/datum/wound/W in org.wounds) if(W.internal) - status += "hurting with a slowly growing bruise" + status += "[can_feel_pain(org) ? "hurting and " : ""]showing a slowly growing bruise" if(!org.is_usable() || org.is_dislocated()) status += "dangling uselessly" if(status.len) @@ -262,9 +264,10 @@ span_warning("You successfully pat out [src]'s flames.")) src.extinguish_mob() else - if (ishuman(src) && src:w_uniform) + if (ishuman(src)) var/mob/living/carbon/human/H = src - H.w_uniform.add_fingerprint(M) + if(H.w_uniform) + H.w_uniform.add_fingerprint(M) var/show_ssd var/mob/living/carbon/human/H = src diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 6a67a026ca..dfec991111 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -85,6 +85,8 @@ for(var/obj/item/organ/external/O in organs) if(O.robotic >= ORGAN_ROBOT) continue //robot limbs don't count towards shock and crit + if(!O.organ_can_feel_pain()) + continue //Limbs that can't feel pain don't count towards shock. amount += O.brute_dam return amount @@ -107,6 +109,8 @@ for(var/obj/item/organ/external/O in organs) if(O.robotic >= ORGAN_ROBOT) continue //robot limbs don't count towards shock and crit + if(!O.organ_can_feel_pain()) + continue //Limbs that can't feel pain don't count towards shock. amount += O.burn_dam return amount diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index ba186c134d..ffc4dff4e2 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -307,7 +307,7 @@ return -/mob/living/simple_mob/slime/promethean/get_description_info() +/mob/living/simple_mob/slime/promethean/get_description_info(list/additional_information) return /mob/living/simple_mob/slime/promethean/init_vore(force) diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index 7f57be7c7c..a7f3b4866b 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -22,6 +22,8 @@ if(ishuman(src)) var/mob/living/carbon/human/M = src for(var/obj/item/organ/external/organ in M.organs) + if(!organ.organ_can_feel_pain()) + continue if(organ.is_broken() || organ.open) src.traumatic_shock += 30 else if(organ.is_dislocated()) diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm index ca381fd923..6483e17282 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm @@ -320,7 +320,7 @@ return results -/mob/living/simple_mob/slime/xenobio/get_description_info() +/mob/living/simple_mob/slime/xenobio/get_description_info(list/additional_information) var/list/lines = list() var/intro_line = "Slimes are generally the test subjects of Xenobiology, with different colors having different properties. \ They can be extremely dangerous if not handled properly." diff --git a/code/modules/organs/internal/augment.dm b/code/modules/organs/internal/augment.dm index 218f858acd..efc34dc92f 100644 --- a/code/modules/organs/internal/augment.dm +++ b/code/modules/organs/internal/augment.dm @@ -30,7 +30,7 @@ var/aug_cooldown = 30 SECONDS var/cooldown = null - description_fluff = "If attempting to implant a compatible augment into a synthetic limb, the limb must be screwdrivered open and then modified with a multitool before insertion can begin." + description_fluff = "If attempting to implant a compatible augment into a synthetic limb, the limb must be screwdrivered open and then the augment port opened with a crowbar before insertion can begin." /obj/item/organ/internal/augment/Initialize(mapload) . = ..() diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index a39c0ab242..75084ad7ec 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -185,9 +185,7 @@ var/list/organ_cache = list() if(CONFIG_GET(flag/organs_decay) && decays) damage += rand(1,3) if(damage >= max_damage) damage = max_damage - adjust_germ_level(rand(2,6)) - if(germ_level >= INFECTION_LEVEL_TWO) - adjust_germ_level(rand(2,6)) + adjust_germ_level(1) //If something knocked a limb off, usually it'll have 100ish germs. This means you have ~30 minutes to get it back on before it becomes necrotic. if(germ_level >= INFECTION_LEVEL_THREE) die() @@ -199,8 +197,43 @@ var/list/organ_cache = list() /obj/item/organ/examine(mob/user) . = ..() + + //Descriptors for 'status of the limb' + if(status & ORGAN_DEAD) //Can happen for other reasons than infection. + . += span_bolddanger("The [name] is dead.") + if(status & ORGAN_MUTATED) + . += span_danger("The [name] is mutated and deformed.") + if(status & ORGAN_BROKEN) + . += span_danger("The [name] is broken.") + + //Descriptors for 'how infected is this organ' + if(germ_level < INFECTION_LEVEL_ONE) + return + switch(germ_level) + if(INFECTION_LEVEL_ONE to INFECTION_LEVEL_TWO - 1) + . += span_warning("Signs of a minor infection are apparent.") + if(INFECTION_LEVEL_TWO to INFECTION_LEVEL_THREE - 1) + . += span_boldwarning("Signs of a moderate infection are apparent.") + if(INFECTION_LEVEL_THREE to INFINITY) + . += span_bolddanger("Necrosis has set in.") + +/obj/item/organ/get_description_info(list/additional_information) + if(!additional_information) + additional_information = list() + if(butcherable && meat_type) + additional_information += "Can be butchered with use of any sharp and edged object." + if(germ_level) + additional_information += "Can be washed in a sink, shower, or sprayed with space cleaner to clean infection. This will not bring it back from death, however." if(status & ORGAN_DEAD) - . += span_notice("Decay appears to have set in.") + additional_information += "Can have five units of peridaxon applied to bring the organ back from death. This will not cure any infection, however." + . = ..(additional_information) + return . + +/obj/item/organ/get_description_antag() + . = ..() + if(butcherable && meat_type) + . += "Can be butchered with use of any sharp and edged object, allowing for quick disposal of evidence." + return . //A little wonky: internal organs stop calling this (they return early in process) when dead, but external ones cause further damage when dead /obj/item/organ/proc/handle_germ_effects() @@ -498,11 +531,20 @@ var/list/organ_cache = list() bitten(user) return -/obj/item/organ/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/organ/attackby(obj/item/W, mob/user) if(can_butcher(W, user)) butcher(W, user) return + var/obj/item/reagent_containers/container = W + if(istype(container)) + if(container.reagents.has_reagent(REAGENT_ID_PERIDAXON, 5)) + status &= ~ORGAN_DEAD + damage-- //Fix JUST enough damage so it doesn't immediately die again. For full repair, use denec removal surgery. + START_PROCESSING(SSobj, src) //When an organ dies, it stops processing. This restarts it. + container.reagents.remove_reagent(REAGENT_ID_PERIDAXON, 5) + to_chat(user, "You use the [container] to revive \the [src]") + return return ..() /obj/item/organ/proc/can_butcher(var/obj/item/O, var/mob/living/user) @@ -522,11 +564,20 @@ var/list/organ_cache = list() return FALSE /obj/item/organ/proc/butcher(var/obj/item/O, var/mob/living/user, var/atom/newtarget) - if(robotic >= ORGAN_ROBOT) - user?.visible_message(span_notice("[user] disassembles \the [src].")) - else - user?.visible_message(span_notice("[user] butchers \the [src].")) + if(user) + to_chat(user, span_danger("You are preparing to butcher \the [src]!")) + user.visible_message(span_danger("[user] prepares to butcher \the [src]!")) + if(!do_after(user, 10 SECONDS * O.toolspeed, target = src)) //They can queue this up on multiple organs. + to_chat(user, span_notice("You reconsider butchering \the [src]...")) + user.visible_message(span_notice("[user] reconsiders butchering \the [src]!")) + return FALSE + + if(robotic >= ORGAN_ROBOT) + user?.visible_message(span_warning("[user] disassembles \the [src].")) + + else + user?.visible_message(span_warning("[user] butchers \the [src].")) if(!newtarget) newtarget = get_turf(src) @@ -536,6 +587,10 @@ var/list/organ_cache = list() if(istype(newmeat, /obj/item/reagent_containers/food/snacks/meat)) newmeat.name = "[src.name] [newmeat.name]" // "liver meat" "heart meat", etc. + if(LAZYLEN(contents)) //You can't shove the nuke disk into a leg and then butcher the leg to delete the nuke disk. + for(var/obj/contained_object in contents) + contained_object.forceMove(newtarget) + qdel(src) /obj/item/organ/proc/organ_can_feel_pain() diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 321074704b..ff2b698500 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -172,15 +172,67 @@ return //no eating the limb until everything's been removed return ..(user, TRUE) +/obj/item/organ/external/get_description_info(list/additional_information) + if(!additional_information) + additional_information = list() + switch(stage) + if(0) + additional_information += "Can be cut open via a scalpel to perform procedures on it." + if(1) + additional_information += "The [name] is cut open and can be opened further with a retractor or closed with a cautery." + if(2) + additional_information += "The [name] is fully open, allowing for removal of anything within or attached via a hemostat. It can also be partially closed with fix-o-vein." + if(status & ORGAN_DEAD) + additional_information += "Can have necrosis partially removed by use of a scalpel." + if(3) //Status only happens if we used a scalpel on stage 2. + additional_information += "The [name] is fully open with some necrotic tissue removed. The use of a bioregenerator can fully remove infection and necrosis from the limb." + if(status & ORGAN_DEAD) + additional_information += "Can have necrosis and infection surgically removed." + . = ..(additional_information) + return . + /obj/item/organ/external/examine(mob/user) . = ..() if(in_range(user, src) || isobserver(user)) for(var/obj/item/I in contents) - if(istype(I, /obj/item/organ)) + + //Handling attached limbs, like the foot on a leg. + if(istype(I, /obj/item/organ/external)) + var/obj/item/organ/external/child_organ = I + . += span_notice("There is [child_organ.name] attached to it.") + + //Handling status on attached limbs. + if(child_organ.status & ORGAN_DEAD) //Can happen for other reasons than infection. + . += span_bolddanger("The attached [child_organ.name] is dead.") + if(child_organ.status & ORGAN_MUTATED) + . += span_danger("The attached [child_organ.name] is mutated and deformed.") + if(child_organ.status & ORGAN_BROKEN) + . += span_danger("The attached [child_organ.name] is broken.") + + //Handling infections on attached limbs. + if(child_organ.germ_level < INFECTION_LEVEL_ONE) + continue + + switch(child_organ.germ_level) + if(INFECTION_LEVEL_ONE to INFECTION_LEVEL_TWO - 1) + . += span_warning("The attached [child_organ.name] has signs of a minor infection.") + if(INFECTION_LEVEL_TWO to INFECTION_LEVEL_THREE - 1) + . += span_boldwarning("The attached [child_organ.name] has signs of a moderate infection.") + if(INFECTION_LEVEL_THREE to INFINITY) + . += span_bolddanger("The attached [child_organ.name] is necrotic.") + continue + + if(istype(I, /obj/item/organ)) //We can't see inside the organ if it has an organ in it. continue . += span_danger("There is \a [I] sticking out of it.") + if(stage) + switch(stage) + if(1) + . += span_danger("The [name] is surgically cut open.") + if(2) + . += span_danger("The [name] is cut open and the skin retracted.") -/obj/item/organ/external/attackby(obj/item/W as obj, mob/living/user as mob) +/obj/item/organ/external/attackby(obj/item/W, mob/living/user) switch(stage) if(0) if(istype(W,/obj/item/surgical/scalpel)) @@ -192,16 +244,44 @@ user.visible_message(span_danger(span_bold("[user]") + " cracks [src] open like an egg with [W]!")) stage++ return + if(istype(W,/obj/item/surgical/cautery)) + user.visible_message(span_danger(span_bold("[user]") + " closes [src] with [W]!")) + stage-- + return if(2) if(istype(W,/obj/item/surgical/hemostat)) - if(contents.len) - var/obj/item/removing = pick(contents) + if(LAZYLEN(contents)) + var/obj/item/removing = tgui_input_list(user, "What would you like to remove?", "Extraction", contents, timeout = 20 SECONDS) + if(!removing || removing.loc != src || !Adjacent(user)) //Didn't select anything or selected something that was already removed OR we walked away. + user.visible_message(span_danger(span_bold("[user]") + " decides against removing anything from [src]")) + return removing.loc = get_turf(user.loc) user.put_in_hands(removing) user.visible_message(span_danger(span_bold("[user]") + " extracts [removing] from [src] with [W]!")) else user.visible_message(span_danger(span_bold("[user]") + " fishes around fruitlessly in [src] with [W].")) return + if(istype(W,/obj/item/surgical/FixOVein)) + user.visible_message(span_danger(span_bold("[user]") + " partially closes [src] with [W]!")) + stage-- + return + //Begin necrosis surgery + if(istype(W,/obj/item/surgical/scalpel)) + if(!(status & ORGAN_DEAD)) + to_chat(user, span_notice("The limb isn't necrotic, there's no need to fix it!")) + return + user.visible_message(span_danger(span_bold("[user]") + " cuts necrotic tissue off [src] with [W]!")) + stage++ + return + if(3) + if(istype(W,/obj/item/surgical/bioregen)) + user.visible_message(span_danger(span_bold("[user]") + " rejuvinates formerly necrotic tissue on [src] with [W]!")) + germ_level = 0 + status &= ~ORGAN_DEAD + damage = 0 //Fix the damage on it as well. + START_PROCESSING(SSobj, src) //Dead limbs stop processing, so we restart the process. + stage-- //Go back to stage 2 + return ..() /obj/item/organ/external/proc/is_dislocated() @@ -242,7 +322,8 @@ dislocated = 0 if(istype(owner)) - owner.shock_stage += 20 + if(!organ_can_feel_pain()) + owner.shock_stage += 20 //check to see if we still need the verb for(var/obj/item/organ/external/limb in owner.organs) diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index 8693a9d78d..1cd6b41eff 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -375,7 +375,7 @@ /datum/wound/lost_limb/New(var/obj/item/organ/external/lost_limb, var/losstype, var/clean) var/damage_amt = lost_limb.max_damage - if(clean) damage_amt /= 2 + if(clean) damage_amt *= 0.25 switch(losstype) if(DROPLIMB_EDGE, DROPLIMB_BLUNT) diff --git a/code/modules/reagents/reagents/medicine_vr.dm b/code/modules/reagents/reagents/medicine_vr.dm index b00da7c8ab..890d9b148d 100644 --- a/code/modules/reagents/reagents/medicine_vr.dm +++ b/code/modules/reagents/reagents/medicine_vr.dm @@ -54,7 +54,7 @@ H.losebreath = 10 H.adjustOxyLoss(5) if(prob(2)) - to_chat(H,span_warning("You feel a dull pain behind your eyes and at thee back of your head...")) + to_chat(H,span_warning("You feel a dull pain behind your eyes and at the back of your head...")) H.hallucination += 20 //It messes with your mind for some reason. H.eye_blurry += 20 //Groggy vision for a small bit. if(prob(3)) diff --git a/code/modules/surgery/dehusk.dm b/code/modules/surgery/dehusk.dm new file mode 100644 index 0000000000..b9f1eced18 --- /dev/null +++ b/code/modules/surgery/dehusk.dm @@ -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) + ..() diff --git a/code/modules/surgery/external_repair.dm b/code/modules/surgery/external_repair.dm index e586cf7810..f8347151b3 100644 --- a/code/modules/surgery/external_repair.dm +++ b/code/modules/surgery/external_repair.dm @@ -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)) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index ff6d3bb901..ca933b788f 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -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) diff --git a/code/modules/surgery/hardsuit.dm b/code/modules/surgery/hardsuit.dm new file mode 100644 index 0000000000..c5adfe906f --- /dev/null +++ b/code/modules/surgery/hardsuit.dm @@ -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.") diff --git a/code/modules/surgery/neck.dm b/code/modules/surgery/neck.dm index 8d4d718dd9..ca7dc6bc46 100644 --- a/code/modules/surgery/neck.dm +++ b/code/modules/surgery/neck.dm @@ -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) diff --git a/code/modules/surgery/necrotic.dm b/code/modules/surgery/necrotic.dm new file mode 100644 index 0000000000..cacc2a0917 --- /dev/null +++ b/code/modules/surgery/necrotic.dm @@ -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) diff --git a/code/modules/surgery/nerves.dm b/code/modules/surgery/nerves.dm new file mode 100644 index 0000000000..eb59e8f725 --- /dev/null +++ b/code/modules/surgery/nerves.dm @@ -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. + ..() diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 23a490c063..b42a1c350e 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -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) diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 8b5d648319..0199151308 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -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) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index f6e9ec2b7c..17613e6279 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -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" diff --git a/vorestation.dme b/vorestation.dme index 350e4fd9f5..495d9a0161 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -4678,14 +4678,17 @@ #include "code\modules\surgery\_defines.dm" #include "code\modules\surgery\_helpers.dm" #include "code\modules\surgery\bones.dm" +#include "code\modules\surgery\dehusk.dm" #include "code\modules\surgery\dismemberment.dm" #include "code\modules\surgery\encased.dm" #include "code\modules\surgery\external_repair.dm" #include "code\modules\surgery\face.dm" #include "code\modules\surgery\generic.dm" +#include "code\modules\surgery\hardsuit.dm" #include "code\modules\surgery\implant.dm" #include "code\modules\surgery\limb_reattach.dm" #include "code\modules\surgery\neck.dm" +#include "code\modules\surgery\necrotic.dm" #include "code\modules\surgery\organ_ripper.dm" #include "code\modules\surgery\organs_internal.dm" #include "code\modules\surgery\other.dm"