diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 53b12ca0bb..55ed3e72ff 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -35129,9 +35129,6 @@ /turf/open/floor/plasteel/white, /area/medical/sleeper) "bDD" = ( -/obj/structure/sign/warning/nosmoking{ - pixel_x = -28 - }, /obj/structure/bed, /obj/item/bedsheet/medical, /obj/effect/turf_decal/tile/blue{ @@ -36070,6 +36067,9 @@ "bFJ" = ( /obj/structure/bed, /obj/item/bedsheet/medical, +/obj/structure/sign/warning/nosmoking{ + pixel_x = -28 + }, /turf/open/floor/plasteel/white, /area/medical/sleeper) "bFK" = ( @@ -57530,6 +57530,10 @@ }, /turf/open/floor/plating, /area/maintenance/starboard/aft) +"nWU" = ( +/obj/machinery/smartfridge/organ/preloaded, +/turf/closed/wall, +/area/medical/sleeper) "oce" = ( /obj/machinery/atmospherics/pipe/manifold/supply/hidden{ dir = 1 @@ -93288,7 +93292,7 @@ bvj bvj bvd bFu -bvj +nWU bvj bvd bKH diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index d9d46066bf..ac7d291b2f 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -103794,10 +103794,10 @@ /turf/open/floor/plasteel/white, /area/medical/medbay/central) "dsI" = ( -/obj/structure/sign/warning/nosmoking, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 }, +/obj/machinery/smartfridge/organ/preloaded, /turf/closed/wall, /area/medical/surgery) "dsJ" = ( @@ -127428,6 +127428,10 @@ /obj/item/assembly/signaler, /turf/open/floor/plating, /area/crew_quarters/abandoned_gambling_den) +"mMC" = ( +/obj/structure/sign/warning/nosmoking, +/turf/closed/wall, +/area/medical/surgery) "mQE" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 @@ -174919,7 +174923,7 @@ dkv dma dma dma -dma +mMC dsI dro dvz diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index f72a787214..0e6feb67c6 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -62776,6 +62776,9 @@ "cro" = ( /obj/structure/bed/roller, /obj/machinery/iv_drip, +/obj/structure/sign/warning/nosmoking{ + pixel_x = -28 + }, /turf/open/floor/plasteel/white, /area/medical/surgery) "crq" = ( @@ -63296,9 +63299,6 @@ dir = 1; pixel_y = -22 }, -/obj/structure/sign/warning/nosmoking{ - pixel_x = -28 - }, /obj/machinery/iv_drip, /obj/effect/turf_decal/tile/blue, /obj/effect/turf_decal/tile/blue{ @@ -83997,6 +83997,10 @@ }, /turf/open/floor/plating, /area/maintenance/port) +"qnB" = ( +/obj/machinery/smartfridge/organ/preloaded, +/turf/closed/wall, +/area/medical/surgery) "qqg" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 6 @@ -104229,7 +104233,7 @@ cia cia cpX cia -cia +qnB cia ceu dyg diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index a7ab212bd6..bd3d72dc85 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -42880,6 +42880,12 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/closed/wall/r_wall, /area/maintenance/disposal/incinerator) +"uvp" = ( +/obj/machinery/smartfridge/organ/preloaded{ + pixel_y = 2 + }, +/turf/closed/wall, +/area/medical/medbay/zone3) "uxJ" = ( /obj/machinery/door/firedoor, /obj/machinery/door/airlock/public/glass{ @@ -81595,7 +81601,7 @@ aSh bcf bcW blt -aSh +uvp aOL bfA bfX diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index d70bc0187b..9f1c1824cd 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -37749,6 +37749,9 @@ /obj/effect/turf_decal/tile/blue{ dir = 8 }, +/obj/machinery/light_switch{ + pixel_x = -22 + }, /turf/open/floor/plasteel/white, /area/medical/surgery) "bIp" = ( @@ -38828,10 +38831,6 @@ /obj/machinery/atmospherics/components/unary/vent_pump/on{ dir = 1 }, -/obj/machinery/firealarm{ - dir = 8; - pixel_x = -26 - }, /obj/effect/turf_decal/tile/blue{ dir = 1 }, @@ -39305,15 +39304,16 @@ /obj/item/clothing/gloves/color/latex, /obj/item/clothing/mask/surgical, /obj/item/clothing/suit/apron/surgical, -/obj/machinery/light_switch{ - pixel_x = -22 - }, /obj/effect/turf_decal/tile/blue{ dir = 1 }, /obj/effect/turf_decal/tile/blue{ dir = 8 }, +/obj/machinery/firealarm{ + dir = 8; + pixel_x = -26 + }, /turf/open/floor/plasteel/white, /area/medical/surgery) "bLN" = ( @@ -55674,6 +55674,10 @@ }, /turf/open/floor/plasteel, /area/hallway/primary/central) +"jdA" = ( +/obj/machinery/smartfridge/organ/preloaded, +/turf/closed/wall, +/area/medical/surgery) "jeq" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 @@ -92221,7 +92225,7 @@ bFU bFU bIn bJt -bFU +jdA bFU bFU bFU diff --git a/code/_globalvars/lists/typecache.dm b/code/_globalvars/lists/typecache.dm index 96807214f2..1ec3de0bc5 100644 --- a/code/_globalvars/lists/typecache.dm +++ b/code/_globalvars/lists/typecache.dm @@ -10,3 +10,5 @@ GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living)) GLOBAL_LIST_INIT(typecache_stack, typecacheof(/obj/item/stack)) GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure))) + +GLOBAL_LIST_INIT(freezing_objects, typecacheof(list(/obj/structure/closet/crate/freezer, /obj/structure/closet/secure_closet/freezer, /obj/structure/bodycontainer, /obj/item/autosurgeon, /obj/machinery/smartfridge/organ))) //list of all cold objects, that freeze organs when inside diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 65a7c6a954..1a57cf5051 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -189,7 +189,13 @@ if(tod) var/tdelta = round(world.time - timeofdeath) if(tdelta < (DEFIB_TIME_LIMIT * 10)) - holder.icon_state = "huddefib" + var/obj/item/organ/heart/He = getorgan(/obj/item/organ/heart) + if(He) + holder.icon_state = "huddefib" + if(He.organ_flags & ORGAN_FAILING) + holder.icon_state = "huddefibheart" + else + holder.icon_state = "huddefibheart" return holder.icon_state = "huddead" else diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index f5799e1a22..ee85005c61 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -762,5 +762,3 @@ desc = "An upgrade to the defibrillator capacitors, which let it charge faster" icon_state = "fast_disk" materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_GOLD = 26000, MAT_SILVER = 26000) - -#undef HALFWAYCRITDEATH diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 40052bcee5..d1e0f4841d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -131,232 +131,228 @@ SLIME SCANNER mob_status = "Deceased" oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.undergoing_cardiac_arrest() && H.stat != DEAD) - to_chat(user, "Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!") - if(H.undergoing_liver_failure() && H.stat != DEAD) //might be depreciated BUG_PROBABLE_CAUSE - to_chat(user, "Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!") - - var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]\n" + var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]" // Damage descriptions if(brute_loss > 10) - msg += "\t[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.\n" + msg += "\n\t[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected." if(fire_loss > 10) - msg += "\t[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.\n" + msg += "\n\t[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected." if(oxy_loss > 10) - msg += "\t[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.\n" + msg += "\n\t[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected." if(tox_loss > 10) - msg += "\t[tox_loss > 50 ? "Severe" : "Minor"] amount of toxin damage detected.\n" + msg += "\n\t[tox_loss > 50 ? "Severe" : "Minor"] amount of toxin damage detected." if(M.getStaminaLoss()) - msg += "\tSubject appears to be suffering from fatigue.\n" + msg += "\n\tSubject appears to be suffering from fatigue." if(advanced) - msg += "\tFatigue Level: [M.getStaminaLoss()]%.\n" + msg += "\n\tFatigue Level: [M.getStaminaLoss()]%." if (M.getCloneLoss()) - msg += "\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage.\n" + msg += "\n\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage." if(advanced) - msg += "\tCellular Damage Level: [M.getCloneLoss()].\n" - if (!M.getorgan(/obj/item/organ/brain)) - to_chat(user, "\tSubject lacks a brain.") //Unsure how this won't proc for 50% of the cit playerbase (This is a joke everyone on cit a cute.) - if(ishuman(M) && advanced) // Should I make this not advanced? - var/mob/living/carbon/human/H = M - var/obj/item/organ/liver/L = H.getorganslot("liver") - if(L) - if(L.swelling > 20) - msg += "\tSubject is suffering from an enlarged liver.\n" //i.e. shrink their liver or give them a transplant. - else - msg += "\tSubject's liver is missing.\n" - var/obj/item/organ/tongue/T = H.getorganslot("tongue") - if(T) - if(T.damage > 40) - msg += "\tSubject is suffering from severe burn tissue on their tongue.\n" //i.e. their tongue is shot - if(T.name == "fluffy tongue") - msg += "\tSubject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant.\n" - else - msg += "\tSubject's tongue is missing.\n" - var/obj/item/organ/lungs/Lung = H.getorganslot("lungs") - if(Lung) - if(Lung.damage > 150) - msg += "\tSubject is suffering from acute emphysema leading to trouble breathing.\n" //i.e. Their lungs are shot - else - msg += "\tSubject's lungs have collapsed from trauma!\n" - var/obj/item/organ/genital/penis/P = H.getorganslot("penis") - if(P) - if(P.length>20) - msg += "\tSubject has a sizeable gentleman's organ at [P.length] inches.\n" - var/obj/item/organ/genital/breasts/Br = H.getorganslot("breasts") - if(Br) - if(Br.cached_size>5) - msg += "\tSubject has a sizeable bosom with a [Br.size] cup.\n" - - if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200 || !M.getorgan(/obj/item/organ/brain)) - msg += "\tSubject's brain function is non-existent.\n" - else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120) - msg += "\tSevere brain damage detected. Subject likely to have mental traumas.\n" - else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45) - msg += "\tBrain damage detected.\n" - - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(LAZYLEN(C.get_traumas())) - var/list/trauma_text = list() - for(var/datum/brain_trauma/B in C.get_traumas()) - var/trauma_desc = "" - switch(B.resilience) - if(TRAUMA_RESILIENCE_SURGERY) - trauma_desc += "severe " - if(TRAUMA_RESILIENCE_LOBOTOMY) - trauma_desc += "deep-rooted " - if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE) - trauma_desc += "permanent " - trauma_desc += B.scan_desc - trauma_text += trauma_desc - msg += "\tCerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)].\n" - if(C.roundstart_quirks.len) - msg += "\tSubject has the following physiological traits: [C.get_trait_string()].\n" - if(advanced) - msg += "\tBrain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%.\n" - if(M.radiation) - msg += "\tSubject is irradiated.\n" - msg += "\tRadiation Level: [M.radiation] rad\n" - - if(advanced && M.hallucinating()) - msg += "\tSubject is hallucinating.\n" - - //MKUltra - if(advanced && M.has_status_effect(/datum/status_effect/chem/enthrall)) - msg += "\tSubject has abnormal brain fuctions.\n" - - //Astrogen shenanigans - if(advanced && M.reagents.has_reagent("astral")) - if(M.mind) - msg += "\tWarning: subject may be possesed.\n" - else - msg += "\tSubject appears to be astrally projecting.\n" - - //Eyes and ears - if(advanced) - if(iscarbon(M)) - var/mob/living/carbon/C = M - var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS) - msg += "\t==EAR STATUS==\n" - if(istype(ears)) - var/healthy = TRUE - if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION)) - healthy = FALSE - msg += "\tSubject is genetically deaf.\n" - else if(HAS_TRAIT(C, TRAIT_DEAF)) - healthy = FALSE - msg += "\tSubject is deaf.\n" - else - if(ears.damage) - to_chat(user, "\tSubject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.") - healthy = FALSE - if(ears.deaf) - to_chat(user, "\tSubject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.") - healthy = FALSE - if(healthy) - msg += "\tHealthy.\n" - else - msg += "\tSubject does not have ears.\n" - var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES) - msg += "\t==EYE STATUS==\n" - if(istype(eyes)) - var/healthy = TRUE - if(HAS_TRAIT(C, TRAIT_BLIND)) - msg += "\tSubject is blind.\n" - healthy = FALSE - if(HAS_TRAIT(C, TRAIT_NEARSIGHT)) - msg += "\tSubject is nearsighted.\n" - healthy = FALSE - if(eyes.damage > 30) - msg += "\tSubject has severe eye damage.\n" - healthy = FALSE - else if(eyes.damage > 20) - msg += "\tSubject has significant eye damage.\n" - healthy = FALSE - else if(eyes.damage) - msg += "\tSubject has minor eye damage.\n" - healthy = FALSE - if(healthy) - msg += "\tHealthy.\n" - else - msg += "\tSubject does not have eyes.\n" + msg += "\n\tCellular Damage Level: [M.getCloneLoss()]." - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/ldamage = H.return_liver_damage() - if(ldamage > 10) - msg += "\t[ldamage > 45 ? "Severe" : "Minor"] liver damage detected.\n" + to_chat(user, msg) + msg = "" // Body part damage report + var/list/dmgreport = list() if(iscarbon(M) && mode == 1) var/mob/living/carbon/C = M var/list/damaged = C.get_damaged_bodyparts(1,1) if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0) - msg += "\tDamage: Brute-Burn-Toxin-Suffocation\n\t\tSpecifics: [brute_loss]-[fire_loss]-[tox_loss]-[oxy_loss]\n" - for(var/obj/item/bodypart/org in damaged) - msg += "\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]\n" + dmgreport += "\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + " + + for(var/o in damaged) + var/obj/item/bodypart/org = o //head, left arm, right arm, etc. + dmgreport += "\ + \ + " + dmgreport += "
Damage:BruteBurnToxinSuffocation
Overall:[brute_loss][fire_loss][tox_loss][oxy_loss]
[capitalize(org.name)]:[(org.brute_dam > 0) ? "[org.brute_dam]" : "0"][(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]
" + to_chat(user, dmgreport.Join()) + //Organ damages report - if(ishuman(M)) + var/heart_ded = FALSE + if(iscarbon(M)) + var/mob/living/carbon/C = M var/mob/living/carbon/human/H = M - var/minor_damage - var/major_damage - var/max_damage - var/report_organs = FALSE + for(var/organ in C.internal_organs) + var/temp_message + var/damage_message + var/obj/item/organ/O = organ - //Piece together the lists to be reported - for(var/O in H.internal_organs) - var/obj/item/organ/organ = O - if(organ.organ_flags & ORGAN_FAILING) - report_organs = TRUE //if we report one organ, we report all organs, even if the lists are empty, just for consistency - if(max_damage) - max_damage += ", " //prelude the organ if we've already reported an organ - max_damage += organ.name //this just slaps the organ name into the string of text - else - max_damage = "\tNon-Functional Organs: " //our initial statement - max_damage += organ.name - else if(organ.damage > organ.high_threshold) - report_organs = TRUE - if(major_damage) - major_damage += ", " - major_damage += organ.name - else - major_damage = "\tSeverely Damaged Organs: " - major_damage += organ.name - else if(organ.damage > organ.low_threshold) - report_organs = TRUE - if(minor_damage) - minor_damage += ", " - minor_damage += organ.name - else - minor_damage = "\tMildly Damaged Organs: " - minor_damage += organ.name + //EYES + if(istype(O, /obj/item/organ/eyes)) + var/obj/item/organ/eyes/eyes = O + if(advanced) + if(HAS_TRAIT(C, TRAIT_BLIND)) + temp_message += " Subject is blind." + if(HAS_TRAIT(C, TRAIT_NEARSIGHT)) + temp_message += " Subject is nearsighted." + if(eyes.damage > 30) + damage_message += " Subject has severe eye damage." + else if(eyes.damage > 20) + damage_message += " Subject has significant eye damage." + else if(eyes.damage) + damage_message += " Subject has minor eye damage." + + + //EARS + else if(istype(O, /obj/item/organ/ears)) + var/obj/item/organ/ears/ears = O + if(advanced) + if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION)) + temp_message += " Subject is genetically deaf." + else if(HAS_TRAIT(C, TRAIT_DEAF)) + temp_message += " Subject is deaf." + else + if(ears.damage) + damage_message += " Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage." + if(ears.deaf) + damage_message += " Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf." + + + //BRAIN + else if(istype(O, /obj/item/organ/brain)) + if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200) + damage_message += " Subject's brain non-functional. Neurine injection recomended." + else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120) + damage_message += " Severe brain damage detected. Subject likely to have mental traumas." + else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45) + damage_message += " Brain damage detected." + if(advanced) + temp_message += " Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%." + + //TRAUMAS + if(LAZYLEN(C.get_traumas())) + var/list/trauma_text = list() + for(var/datum/brain_trauma/B in C.get_traumas()) + var/trauma_desc = "" + switch(B.resilience) + if(TRAUMA_RESILIENCE_SURGERY) + trauma_desc += "severe " + if(TRAUMA_RESILIENCE_LOBOTOMY) + trauma_desc += "deep-rooted " + if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE) + trauma_desc += "permanent " + trauma_desc += B.scan_desc + trauma_text += trauma_desc + temp_message += " Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)]." + if(C.roundstart_quirks.len) + temp_message += " Subject has the following physiological traits: [C.get_trait_string()]." + + if(ishuman(C) && advanced) + //MON PETIT CHAUFFEUR + if(H.hallucinating()) + temp_message += " Subject is hallucinating." + + //MKUltra + if(H.has_status_effect(/datum/status_effect/chem/enthrall)) + temp_message += " Subject has abnormal brain fuctions." + + //Astrogen shenanigans + if(H.reagents.has_reagent("astral")) + if(H.mind) + temp_message += " Warning: subject may be possesed." + else + temp_message += " Subject appears to be astrally projecting." + + + //LIVER + else if(istype(O, /obj/item/organ/liver)) + var/obj/item/organ/liver/L = O + if(H.undergoing_liver_failure() && H.stat != DEAD) //might be depreciated + temp_message += "Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!" + if(L.swelling > 20) + temp_message += " Subject is suffering from an enlarged liver." //i.e. shrink their liver or give them a transplant. + + //HEART + else if(ishuman(M) && (istype(O, /obj/item/organ/heart))) + var/obj/item/organ/heart/He = O + if(H.undergoing_cardiac_arrest() && H.stat != DEAD) + temp_message += " Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!" + if(He.organ_flags & ORGAN_FAILING) + heart_ded = TRUE + + //TONGUE + else if(istype(O, /obj/item/organ/tongue)) + var/obj/item/organ/tongue/T = O + if(T.name == "fluffy tongue") + temp_message += " Subject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant." + + //HECK + else if(istype(O, /obj/item/organ/genital/penis)) + var/obj/item/organ/genital/penis/P = O + if(P.length>20) + temp_message += " Subject has a sizeable gentleman's organ at [P.length] inches." + + else if(istype(O, /obj/item/organ/genital/breasts)) + var/obj/item/organ/genital/breasts/Br = O + if(Br.cached_size>5) + temp_message += " Subject has a sizeable bosom with a [Br.size] cup." + + + + //GENERAL HANDLER + if(!damage_message) + if(O.organ_flags & ORGAN_FAILING) + damage_message += " End Stage [O.name] failure detected." + else if(O.damage > O.high_threshold) + damage_message += " Chronic [O.name] failure detected." + else if(O.damage > O.low_threshold && advanced) + damage_message += " Acute [O.name] failure detected." + + if(temp_message || damage_message) + msg += "\t[uppertext(O.name)]: [damage_message] [temp_message]\n" + + + + //END; LOOK FOR MISSING ORGANS? + var/breathes = TRUE + var/blooded = TRUE + if(C.dna && C.dna.species) + if(HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT)) + breathes = FALSE + if(NOBLOOD in C.dna.species.species_traits) + blooded = FALSE + var/has_liver = (!(NOLIVER in C.dna.species.species_traits)) + var/has_stomach = (!(NOSTOMACH in C.dna.species.species_traits)) + if(!M.getorganslot(ORGAN_SLOT_EYES)) + msg += "\tSubject does not have eyes.\n" + if(!M.getorganslot(ORGAN_SLOT_EARS)) + msg += "\tSubject does not have ears.\n" + if(!M.getorganslot(ORGAN_SLOT_BRAIN)) + msg += "\tSubject's brain function is non-existent!\n" + if(has_liver && !M.getorganslot(ORGAN_SLOT_LIVER)) + msg += "\tSubject's liver is missing!\n" + if(blooded && !M.getorganslot(ORGAN_SLOT_HEART)) + msg += "\tSubject's heart is missing!\n" + if(breathes && !M.getorganslot(ORGAN_SLOT_LUNGS)) + msg += "\tSubject's lungs have collapsed from trauma!\n" + if(has_stomach && !M.getorganslot(ORGAN_SLOT_STOMACH)) + msg += "\tSubject's stomach is missing!\n" + + + if(M.radiation) + msg += "\tSubject is irradiated.\n" + msg += "\tRadiation Level: [M.radiation] rad\n" - if(report_organs) //we either finish the list, or set it to be empty if no organs were reported in that category - if(!max_damage) - max_damage = "\tNon-Functional Organs: \n" - else - max_damage += "\n" - if(!major_damage) - major_damage = "\tSeverely Damaged Organs: \n" - else - major_damage += "
\n" - if(!minor_damage) - minor_damage = "\tMildly Damaged Organs: \n" - else - minor_damage += "
\n" - msg += "[minor_damage]" - msg += "[major_damage]" - msg += "[max_damage]" // Species and body temperature + var/mob/living/carbon/human/H = M //Start to use human only stuff here if(ishuman(M)) - var/mob/living/carbon/human/H = M var/datum/species/S = H.dna.species var/mutant = FALSE if (H.dna.check_mutation(HULK)) @@ -393,7 +389,15 @@ SLIME SCANNER msg += "Time of Death: [M.tod]\n" var/tdelta = round(world.time - M.timeofdeath) if(tdelta < (DEFIB_TIME_LIMIT * 10)) - msg += "Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!\n" + if(heart_ded) + msg += "Subject died [DisplayTimeText(tdelta)] ago, heart requires surgical intervention for defibrillation." + else + msg += "Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!" + if(advanced) + if(H.get_ghost() || H.key || H.client)//Since it can last a while. + msg += " Intervention recommended.\n" + else + msg += "\n" for(var/thing in M.diseases) var/datum/disease/D = thing @@ -406,7 +410,6 @@ SLIME SCANNER var/blood_id = C.get_blood_id() if(blood_id) if(ishuman(C)) - var/mob/living/carbon/human/H = C if(H.bleed_rate) msg += "Subject is bleeding!\n" var/blood_percent = round((C.blood_volume / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) @@ -431,7 +434,7 @@ SLIME SCANNER if(cyberimp_detect) msg += "Detected cybernetic modifications:\n" msg += "[cyberimp_detect]\n" - msg += "*---------*
" + msg += "*---------*" to_chat(user, msg) SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, FALSE) diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index ceb7a01ede..893a53ede7 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -144,7 +144,7 @@ else O.forceMove(src) return TRUE - + ///Really simple proc, just moves the object "O" into the hands of mob "M" if able, done so I could modify the proc a little for the organ fridge /obj/machinery/smartfridge/proc/dispense(obj/item/O, var/mob/M) if(!M.put_in_hands(O)) @@ -388,20 +388,27 @@ /obj/machinery/smartfridge/organ name = "smart organ storage" desc = "A refrigerated storage unit for organ storage." - max_n_of_items = 20 //vastly lower to prevent processing too long + max_n_of_items = 25 //vastly lower to prevent processing too long var/repair_rate = 0 /obj/machinery/smartfridge/organ/accept_check(obj/item/O) if(istype(O, /obj/item/organ)) return TRUE + if(istype(O, /obj/item/reagent_containers/syringe)) + return TRUE + if(istype(O, /obj/item/reagent_containers/glass/bottle)) + return TRUE + if(istype(O, /obj/item/reagent_containers/medspray)) + return TRUE return FALSE /obj/machinery/smartfridge/organ/load(obj/item/O) . = ..() if(!.) //if the item loads, clear can_decompose return - var/obj/item/organ/organ = O - organ.organ_flags |= ORGAN_FROZEN + if(istype(O, /obj/item/organ)) + var/obj/item/organ/organ = O + organ.organ_flags |= ORGAN_FROZEN /obj/machinery/smartfridge/organ/RefreshParts() for(var/obj/item/stock_parts/matter_bin/B in component_parts) @@ -420,6 +427,17 @@ if(istype(AM)) AM.organ_flags &= ~ORGAN_FROZEN +/obj/machinery/smartfridge/organ/preloaded + initial_contents = list( + /obj/item/reagent_containers/medspray/synthtissue = 1, + /obj/item/reagent_containers/medspray/sterilizine = 1) + +/obj/machinery/smartfridge/organ/preloaded/Initialize() + ..() + var/list = list(/obj/item/organ/tongue, /obj/item/organ/brain, /obj/item/organ/heart, /obj/item/organ/liver, /obj/item/organ/ears, /obj/item/organ/eyes, /obj/item/organ/tail, /obj/item/organ/stomach) + var/newtype = pick(list) + load(new newtype(src.loc)) + // ----------------------------- // Chemistry Medical Smartfridge // ----------------------------- diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 6700c6c006..e3962e89c2 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -940,6 +940,21 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) description = "Reacts with neural tissue, helping reform damaged connections. Can cure minor traumas." color = "#EEFF8F" +/datum/reagent/medicine/neurine/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(!(method == INJECT)) + return + var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN) + if(!B || (!(B.organ_flags & ORGAN_FAILING))) + return + B.applyOrganDamage(-20) + if(prob(80)) + B.gain_trauma_type(BRAIN_TRAUMA_MILD) + else if(prob(50)) + B.gain_trauma_type(BRAIN_TRAUMA_SEVERE) + else + B.gain_trauma_type(BRAIN_TRAUMA_SPECIAL) + + /datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C) if(holder.has_reagent("neurotoxin")) holder.remove_reagent("neurotoxin", 5) diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 374f7715bb..607e0b5a4e 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -73,7 +73,7 @@ id = "synthtissue" results = list("synthtissue" = 5) required_reagents = list("synthflesh" = 1) - required_catalysts = list("nutriment" = 0.1) + required_catalysts = list("sugar" = 0.1) //FermiChem vars: OptimalTempMin = 305 // Lower area of bell curve for determining heat based rate reactions OptimalTempMax = 315 // Upper end for above @@ -86,13 +86,13 @@ CurveSharppH = 2.5 // How sharp the pH exponential curve is (to the power of value) ThermicConstant = 0.01 // Temperature change per 1u produced HIonRelease = 0.015 // pH change per 1u reaction (inverse for some reason) - RateUpLim = 0.05 // Optimal/max rate possible if all conditions are perfect + RateUpLim = 0.1 // Optimal/max rate possible if all conditions are perfect FermiChem = TRUE // If the chemical uses the Fermichem reaction mechanics PurityMin = 0 /datum/chemical_reaction/synthtissue/FermiCreate(datum/reagents/holder, added_volume, added_purity) var/datum/reagent/synthtissue/St = holder.has_reagent("synthtissue") - var/datum/reagent/N = holder.has_reagent("nutriment") + var/datum/reagent/N = holder.has_reagent("sugar") if(!St) return if(holder.chem_temp > 320) diff --git a/code/modules/reagents/reagent_containers/medspray.dm b/code/modules/reagents/reagent_containers/medspray.dm index df7c7af225..b445c38ad9 100644 --- a/code/modules/reagents/reagent_containers/medspray.dm +++ b/code/modules/reagents/reagent_containers/medspray.dm @@ -100,3 +100,8 @@ name = "sterilizer spray" desc = "Spray bottle loaded with non-toxic sterilizer. Useful in preparation for surgery." list_reagents = list("sterilizine" = 60) + +/obj/item/reagent_containers/medspray/synthtissue + name = "Synthtissue young culture spray" + desc = "Spray bottle loaded with synthtissue. Useful in synthtissue grafting surgeries." + list_reagents = list("synthtissue" = 60) diff --git a/code/modules/surgery/advanced/revival.dm b/code/modules/surgery/advanced/revival.dm index a2d5345ea4..fbfec404b2 100644 --- a/code/modules/surgery/advanced/revival.dm +++ b/code/modules/surgery/advanced/revival.dm @@ -65,6 +65,9 @@ target.visible_message("...[target] wakes up, alive and aware!") target.emote("gasp") target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) //MAD SCIENCE + for(var/obj/item/organ/O in target.internal_organs)//zap those buggers back to life! + if(O.organ_flags & ORGAN_FAILING) + O.applyOrganDamage(-5) return TRUE else user.visible_message("...[target.p_they()] convulses, then lies still.") diff --git a/code/modules/surgery/emergency_cardioversion_recovery.dm b/code/modules/surgery/emergency_cardioversion_recovery.dm new file mode 100644 index 0000000000..25f499fa76 --- /dev/null +++ b/code/modules/surgery/emergency_cardioversion_recovery.dm @@ -0,0 +1,125 @@ +/datum/surgery/cardioversion + name = "Emergency Cardioversion Induction" + steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise_heart, /datum/surgery_step/ventricular_electrotherapy, /datum/surgery_step/close) + possible_locs = list(BODY_ZONE_CHEST) + +/datum/surgery_step/ventricular_electrotherapy + name = "ventricular electrotherapy" + implements = list(/obj/item/twohanded/shockpaddles = 90, /obj/item/defibrillator = 75, /obj/item/inducer = 55, /obj/item/stock_parts/cell = 25) //Just because the idea of a new player using the whole magine to defib is hillarious to me + time = 50 + repeatable = TRUE //So you can retry + +/datum/surgery_step/ventricular_electrotherapy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(istype(tool, /obj/item/twohanded/shockpaddles)) + var/obj/item/twohanded/shockpaddles/pads = tool + if(!pads.wielded) + to_chat(user, "You need to wield the paddles in both hands before you can use them!") + return FALSE + display_results(user, target, "You begin to apply the [tool] onto the heart directly...", + "[user] begin to prepare the heart for contact with the [tool].", + "[user] begin to prepare the heart for contact with the [tool]. ") + target.notify_ghost_cloning("Your heart is undergoing Emergency Cardioversion Induction Surgery!") + playsound(src, 'sound/machines/defib_charge.ogg', 75, 0) + +/datum/surgery_step/ventricular_electrotherapy/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(istype(tool, /obj/item/twohanded/shockpaddles)) + var/obj/item/twohanded/shockpaddles/pads = tool + if(!pads.wielded) + return FALSE + var/mob/living/carbon/human/H = target + playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1) + playsound(src, "bodyfall", 50, 1) + if(H.stat != DEAD) + display_results(user, target, "You can't use this procedure on the living! [H]'s body flops madly like a wild fish on the table from the current, and your crazed surgical methods.", + "[user] screws up, causing [H] to flop around violently as they're zapped!", + "[user] screws up, causing [H] to flop around violently as they're zapped!") + H.emote("scream") + H.electrocute_act(25, (tool), 1, FALSE, FALSE, FALSE, TRUE) + H.adjustFireLoss(10) + H.emote("flip") + H.Jitter(100) + return FALSE + display_results(user, target, "You attach the [tool] to [target]'s heart and prepare to pulse.", + "[user] attaches the [tool] to [H]'s heart and prepares to pulse.", + "") + H.adjustBruteLoss(10) + var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart) + if(heart.organ_flags & ORGAN_FAILING) + H.adjustOrganLoss(ORGAN_SLOT_HEART, -15) + var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) + if(BR.organ_flags & ORGAN_FAILING) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5) + H.electrocute_act(0, (tool), 1, FALSE, FALSE, FALSE, TRUE) + //If we're using a defib, let the defib handle the revive. + if(istype(tool, /obj/item/twohanded/shockpaddles)) + return + //Otherwise, we're ad hocing it + if(!(do_after(user, 50, target = target))) + return FALSE + if(!ghetto_defib(user, H, tool)) + playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) + return FALSE + log_combat(user, H, "revived", "Emergency Cardioversion Induction") + return TRUE + +/datum/surgery_step/ventricular_electrotherapy/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1) + playsound(src, "bodyfall", 50, 1) + var/mob/living/carbon/human/H = target + display_results(user, target, "You screw up, sending a current through their body!", + "[user] screws up, causing [H] to flop around violently as they're zapped!", + "[user] screws up, causing [H] to flop around violently as they're zapped!") + H.electrocute_act(25, (tool), 1, FALSE, FALSE, FALSE, TRUE) + H.adjustFireLoss(10) + H.emote("flip") + H.adjustOrganLoss(ORGAN_SLOT_HEART, 10) + +/datum/surgery_step/ventricular_electrotherapy/proc/ghetto_defib(mob/user, mob/living/carbon/human/H, obj/item/tool) + H.visible_message("[H]'s body convulses a bit.") + var/total_brute = H.getBruteLoss() + var/total_burn = H.getFireLoss() + var/failed + var/tdelta = round(world.time - H.timeofdeath) + + if (H.suiciding || (HAS_TRAIT(H, TRAIT_NOCLONE))) + failed = "The heart is zapped by the [tool], but nothing happens. You feel like the spark of life has fully left [H]." + else if (H.hellbound) + failed = "The heart is zapped by the [tool], but nothing happens. You notice a small tatoo with the words \"Property of Satan\" branded just above the right ventricle." + else if(tdelta > (DEFIB_TIME_LIMIT * 10)) + failed = "The heart is zapped by the [tool], but nothing happens. It appears their body decomposed beyond repair." + else if(total_burn >= 180 || total_brute >= 180) + failed = "The [tool] zaps the heart, inducing a sudden contraction, but it appears [H]'s body is too damaged to revive presently." + else if(H.get_ghost()) + failed = "The [tool] zaps the heart, inducing several contractions before dying down, but there's no spark of life in [H]'s eyes. It may be worth it to try again, however." + else + var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) + if(BR) + if(H.suiciding || BR.brainmob?.suiciding) + failed = "The heart is zapped by the [tool], but nothing happens. You feel like the spark of life has fully left [H]." + else + failed = "The [tool] zaps the heart, restarting the heart, but without a brain the contractions quickly die out." + + + if(failed) + to_chat(user, failed) + playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) + else + //If the body has been fixed so that they would not be in crit when defibbed, give them oxyloss to put them back into crit + if (H.health > HALFWAYCRITDEATH) + H.adjustOxyLoss(H.health - HALFWAYCRITDEATH, 0) + else + var/overall_damage = total_brute + total_burn + H.getToxLoss() + H.getOxyLoss() + var/mobhealth = H.health + H.adjustOxyLoss((mobhealth - HALFWAYCRITDEATH) * (H.getOxyLoss() / overall_damage), 0) + H.adjustToxLoss((mobhealth - HALFWAYCRITDEATH) * (H.getToxLoss() / overall_damage), 0) + H.adjustFireLoss((mobhealth - HALFWAYCRITDEATH) * (total_burn / overall_damage), 0) + H.adjustBruteLoss((mobhealth - HALFWAYCRITDEATH) * (total_brute / overall_damage), 0) + H.updatehealth() // Previous "adjust" procs don't update health, so we do it manually. + H.visible_message("The [tool] zaps the heart, inducing several contractions before speeding up into a regular rhythm, [H]'s eyes snapping open with a loud gasp!") + playsound(src, 'sound/machines/defib_success.ogg', 50, 0) + H.set_heartattack(FALSE) + H.revive() + H.emote("gasp") + H.Jitter(100) + SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK) diff --git a/code/modules/surgery/graft_synthtissue.dm b/code/modules/surgery/graft_synthtissue.dm index 7540b2cd94..86b2a8e909 100644 --- a/code/modules/surgery/graft_synthtissue.dm +++ b/code/modules/surgery/graft_synthtissue.dm @@ -49,7 +49,7 @@ to_chat(user, "There's not enough synthtissue to perform the operation! There needs to be at least 10u.") return -1 - if((chosen_organ.organ_flags & ORGAN_FAILING) && !(Sf.data["grown_volume"] >= 115)) + if((chosen_organ.organ_flags & ORGAN_FAILING) && !(Sf.data["grown_volume"] >= 80)) to_chat(user, "[chosen_organ] is too damaged to graft onto!") return -1 diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 94512dc597..212605669d 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -6,7 +6,7 @@ slot = ORGAN_SLOT_HEART healing_factor = STANDARD_ORGAN_HEALING - decay_factor = 3 * STANDARD_ORGAN_DECAY //designed to fail about 5 minutes after death + decay_factor = 2.5 * STANDARD_ORGAN_DECAY //designed to fail about 5 minutes after death low_threshold_passed = "Prickles of pain appear then die out from within your chest..." high_threshold_passed = "Something inside your chest hurts, and the pain isn't subsiding. You notice yourself breathing far faster than before." diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 466f618cf3..2b823da9d5 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -95,13 +95,12 @@ //Checks to see if the organ is frozen from temperature /obj/item/organ/proc/is_cold() - var/freezing_objects = list(/obj/structure/closet/crate/freezer, /obj/structure/closet/secure_closet/freezer, /obj/structure/bodycontainer, /obj/item/autosurgeon) if(istype(loc, /obj/))//Freezer of some kind, I hope. - if(is_type_in_list(loc, freezing_objects)) + if(is_type_in_typecache(loc, GLOB.freezing_objects)) if(!(organ_flags & ORGAN_FROZEN))//Incase someone puts them in when cold, but they warm up inside of the thing. (i.e. they have the flag, the thing turns it off, this rights it.) organ_flags |= ORGAN_FROZEN return TRUE - return + return (organ_flags & ORGAN_FROZEN) //Incase something else toggles it var/local_temp if(istype(loc, /turf/))//Only concern is adding an organ to a freezer when the area around it is cold. @@ -111,7 +110,7 @@ else if(istype(loc, /mob/) && !owner) var/mob/M = loc - if(is_type_in_list(M.loc, freezing_objects)) + if(is_type_in_typecache(M.loc, GLOB.freezing_objects)) if(!(organ_flags & ORGAN_FROZEN)) organ_flags |= ORGAN_FROZEN return TRUE @@ -121,7 +120,7 @@ if(owner) //Don't interfere with bodies frozen by structures. - if(is_type_in_list(owner.loc, freezing_objects)) + if(is_type_in_typecache(owner.loc, GLOB.freezing_objects)) if(!(organ_flags & ORGAN_FROZEN)) organ_flags |= ORGAN_FROZEN return TRUE @@ -232,6 +231,8 @@ if(delta > 0) if(damage >= maxHealth) organ_flags |= ORGAN_FAILING + if(owner) + owner.med_hud_set_status() return now_failing if(damage > high_threshold && prev_damage <= high_threshold) return high_threshold_passed @@ -239,6 +240,8 @@ return low_threshold_passed else organ_flags &= ~ORGAN_FAILING + if(owner) + owner.med_hud_set_status() if(!owner)//Processing is stopped when the organ is dead and outside of someone. This hopefully should restart it if a removed organ is repaired outside of a body. START_PROCESSING(SSobj, src) if(prev_damage > low_threshold && damage <= low_threshold) @@ -273,6 +276,12 @@ var/has_liver = (!(NOLIVER in dna.species.species_traits)) var/has_stomach = (!(NOSTOMACH in dna.species.species_traits)) + for(var/obj/item/organ/O in internal_organs) + if(O.organ_flags & ORGAN_FAILING) + O.setOrganDamage(0) + if(only_one) + return TRUE + if(has_liver && !getorganslot(ORGAN_SLOT_LIVER)) var/obj/item/organ/liver/LI @@ -362,3 +371,15 @@ tail.Insert(src) if(only_one) return TRUE + + +/obj/item/organ/random + name = "Illegal organ" + desc = "Something hecked up" + +/obj/item/organ/random/Initialize() + ..() + var/list = list(/obj/item/organ/tongue, /obj/item/organ/brain, /obj/item/organ/heart, /obj/item/organ/liver, /obj/item/organ/ears, /obj/item/organ/eyes, /obj/item/organ/tail, /obj/item/organ/stomach) + var/newtype = pick(list) + new newtype(loc) + return INITIALIZE_HINT_QDEL diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 164fabe806..d2b67f4314 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm index 0672d1fba6..fa4f48172b 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm @@ -101,20 +101,39 @@ pH = 7.6 metabolization_rate = 0.05 //Give them time to graft data = list("grown_volume" = 0, "injected_vol" = 0) + var/borrowed_health + color = "#FFDADA" /datum/reagent/synthtissue/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) if(iscarbon(M)) - var/target = M.zone_selected - if (M.stat == DEAD) - show_message = 0 + var/mob/living/carbon/C = M + var/healing_factor = (((data["grown_volume"] / 100) + 1)*reac_volume) if(method in list(PATCH, TOUCH)) - M.apply_damage(reac_volume*-1.5, BRUTE, target) - M.apply_damage(reac_volume*-1.5, BURN, target) - if(show_message) - to_chat(M, "You feel your [target] heal! It stings like hell!") + if (M.stat == DEAD) + M.visible_message("The synthetic tissue rapidly grafts into [M]'s wounds, attemping to repair the damage as quickly as possible.") + borrowed_health += healing_factor + M.adjustBruteLoss(-healing_factor*2) + M.adjustFireLoss(-healing_factor*2) + M.adjustToxLoss(-healing_factor) + M.adjustCloneLoss(-healing_factor) + M.updatehealth() + if(data["grown_volume"] > 135 && ((C.health + C.oxyloss)>=80)) + if(M.revive()) + M.emote("gasp") + borrowed_health *= 2 + if(borrowed_health < 100) + borrowed_health = 100 + log_combat(M, M, "revived", src) + else + M.adjustBruteLoss(-healing_factor) + M.adjustFireLoss(-healing_factor) + to_chat(M, "You feel your flesh merge with the synthetic tissue! It stings like hell!") SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) - if(method==INJECT) - data["injected_vol"] = reac_volume + if(method==INJECT) + data["injected_vol"] = reac_volume + var/obj/item/organ/heart/H = C.getorganslot(ORGAN_SLOT_HEART) + if(data["grown_volume"] > 50 && H.organ_flags & ORGAN_FAILING) + H.applyOrganDamage(-20) ..() /datum/reagent/synthtissue/on_mob_life(mob/living/carbon/C) @@ -128,6 +147,10 @@ to_chat(C, "You feel something reform inside of you!") data["injected_vol"] -= metabolization_rate + if(borrowed_health) + C.adjustToxLoss(1) + C.adjustCloneLoss(1) + borrowed_health -= 1 ..() /datum/reagent/synthtissue/on_merge(passed_data) @@ -138,6 +161,7 @@ if(iscarbon(holder.my_atom)) data["injected_vol"] = data["injected_vol"] + passed_data["injected_vol"] passed_data["injected_vol"] = 0 + update_name() ..() /datum/reagent/synthtissue/on_new(passed_data) @@ -145,6 +169,32 @@ return ..() if(passed_data["grown_volume"] > data["grown_volume"]) data["grown_volume"] = passed_data["grown_volume"] + update_name() ..() +/datum/reagent/synthtissue/proc/update_name() //They are but babes on creation and have to grow unto godhood + switch(data["grown_volume"]) + if(-INFINITY to 50) + name = "Induced Synthtissue Colony" + if(50 to 80) + name = "Oligopotent Synthtissue Colony" + if(80 to 135) + name = "Pluripotent Synthtissue Colony" + if(135 to 175) + name = "SuperSomatic Synthtissue Colony" + if(175 to INFINITY) + name = "Omnipotent Synthtissue Colony" + +/datum/reagent/synthtissue/on_mob_delete(mob/living/M) + if(!iscarbon(M)) + return + var/mob/living/carbon/C = M + C.adjustBruteLoss(borrowed_health*1.25) + C.adjustToxLoss(borrowed_health*1.25) + C.adjustCloneLoss(borrowed_health*1.25) + C.adjustAllOrganLoss(borrowed_health*0.25) + M.updatehealth() + if(borrowed_health && C.health < -20) + M.stat = DEAD + M.visible_message("The synthetic tissue degrades off [M]'s wounds as they collapse to the floor.") //NEEDS ON_MOB_DEAD() diff --git a/tgstation.dme b/tgstation.dme index 986d46e37e..702d07b8c4 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2829,6 +2829,7 @@ #include "code\modules\surgery\coronary_bypass.dm" #include "code\modules\surgery\dental_implant.dm" #include "code\modules\surgery\embalming.dm" +#include "code\modules\surgery\emergency_cardioversion_recovery.dm" #include "code\modules\surgery\experimental_dissection.dm" #include "code\modules\surgery\eye_surgery.dm" #include "code\modules\surgery\graft_synthtissue.dm"