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

* Fixes necrosis steps setting bone

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

* Update other.dm

* Crowbar Augment

* descriptors

* Update carbon.dm

* no typecasting

* removes unused proc

* Limb status

* Makes butchering take time

Gives a warning as well when starting it.

* Update organ.dm

* Update organ.dm

* Closing surgical stages and desc.

Opened organs have descriptions that they're opened.

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

Allows fixing amputated organs

A BUNCH of stuff

* Update organ.dm

* Keep the washing

* Update external_repair.dm

* Update other.dm

* Organizes surgeries

* fix a typo

* Update surgery.dm

* More surgery

* Nerve Surgery

Adds template for nerve surgery

* Prevents pain from limbs that feel no pain

* Update external_repair.dm
This commit is contained in:
Cameron Lennox
2026-02-27 19:16:27 +01:00
committed by GitHub
parent 091c23739d
commit fb81ffbe83
31 changed files with 807 additions and 536 deletions
+86 -5
View File
@@ -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)