Well it compiles
This commit is contained in:
@@ -189,7 +189,11 @@
|
||||
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 || He.organ_flags & ORGAN_FAILING)
|
||||
holder.icon_state = "huddefibheart"
|
||||
else
|
||||
holder.icon_state = "huddefib"
|
||||
return
|
||||
holder.icon_state = "huddead"
|
||||
else
|
||||
|
||||
@@ -131,13 +131,6 @@ SLIME SCANNER
|
||||
mob_status = "<span class='alert'><b>Deceased</b></span>"
|
||||
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, "<span class='danger'>Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!</span>")
|
||||
if(H.undergoing_liver_failure() && H.stat != DEAD) //might be depreciated BUG_PROBABLE_CAUSE
|
||||
to_chat(user, "<span class='danger'>Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!</span>")
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]\n"
|
||||
|
||||
// Damage descriptions
|
||||
@@ -159,199 +152,190 @@ SLIME SCANNER
|
||||
msg += "\t<span class='info'>Cellular Damage Level: [M.getCloneLoss()].</span>\n"
|
||||
if (!M.getorgan(/obj/item/organ/brain))
|
||||
to_chat(user, "\t<span class='alert'>Subject lacks a brain.</span>") //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 += "\t<span class='danger'>Subject is suffering from an enlarged liver.</span>\n" //i.e. shrink their liver or give them a transplant.
|
||||
else
|
||||
msg += "\t<span class='danger'>Subject's liver is missing.</span>\n"
|
||||
var/obj/item/organ/tongue/T = H.getorganslot("tongue")
|
||||
if(T)
|
||||
if(T.damage > 40)
|
||||
msg += "\t<span class='danger'>Subject is suffering from severe burn tissue on their tongue.</span>\n" //i.e. their tongue is shot
|
||||
if(T.name == "fluffy tongue")
|
||||
msg += "\t<span class='danger'>Subject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='danger'>Subject's tongue is missing.</span>\n"
|
||||
var/obj/item/organ/lungs/Lung = H.getorganslot("lungs")
|
||||
if(Lung)
|
||||
if(Lung.damage > 150)
|
||||
msg += "\t<span class='danger'>Subject is suffering from acute emphysema leading to trouble breathing.</span>\n" //i.e. Their lungs are shot
|
||||
else
|
||||
msg += "\t<span class='danger'>Subject's lungs have collapsed from trauma!</span>\n"
|
||||
var/obj/item/organ/genital/penis/P = H.getorganslot("penis")
|
||||
if(P)
|
||||
if(P.length>20)
|
||||
msg += "\t<span class='info'>Subject has a sizeable gentleman's organ at [P.length] inches.</span>\n"
|
||||
var/obj/item/organ/genital/breasts/Br = H.getorganslot("breasts")
|
||||
if(Br)
|
||||
if(Br.cached_size>5)
|
||||
msg += "\t<span class='info'>Subject has a sizeable bosom with a [Br.size] cup.</span>\n"
|
||||
|
||||
if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200 || !M.getorgan(/obj/item/organ/brain))
|
||||
msg += "\t<span class='alert'>Subject's brain function is non-existent.</span>\n"
|
||||
else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120)
|
||||
msg += "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental traumas.</span>\n"
|
||||
else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45)
|
||||
msg += "\t<span class='alert'>Brain damage detected.</span>\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 += "\t<span class='alert'>Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)].</span>\n"
|
||||
if(C.roundstart_quirks.len)
|
||||
msg += "\t<span class='info'>Subject has the following physiological traits: [C.get_trait_string()].</span>\n"
|
||||
if(advanced)
|
||||
msg += "\t<span class='info'>Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%.</span>\n"
|
||||
if(M.radiation)
|
||||
msg += "\t<span class='alert'>Subject is irradiated.</span>\n"
|
||||
msg += "\t<span class='info'>Radiation Level: [M.radiation] rad</span>\n"
|
||||
|
||||
if(advanced && M.hallucinating())
|
||||
msg += "\t<span class='info'>Subject is hallucinating.</span>\n"
|
||||
|
||||
//MKUltra
|
||||
if(advanced && M.has_status_effect(/datum/status_effect/chem/enthrall))
|
||||
msg += "\t<span class='info'>Subject has abnormal brain fuctions.</span>\n"
|
||||
|
||||
//Astrogen shenanigans
|
||||
if(advanced && M.reagents.has_reagent("astral"))
|
||||
if(M.mind)
|
||||
msg += "\t<span class='danger'>Warning: subject may be possesed.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='notice'>Subject appears to be astrally projecting.</span>\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<span class='info'><b>==EAR STATUS==</b></span>\n"
|
||||
if(istype(ears))
|
||||
var/healthy = TRUE
|
||||
if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION))
|
||||
healthy = FALSE
|
||||
msg += "\t<span class='alert'>Subject is genetically deaf.</span>\n"
|
||||
else if(HAS_TRAIT(C, TRAIT_DEAF))
|
||||
healthy = FALSE
|
||||
msg += "\t<span class='alert'>Subject is deaf.</span>\n"
|
||||
else
|
||||
if(ears.damage)
|
||||
to_chat(user, "\t<span class='alert'>Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.</span>")
|
||||
healthy = FALSE
|
||||
if(ears.deaf)
|
||||
to_chat(user, "\t<span class='alert'>Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.</span>")
|
||||
healthy = FALSE
|
||||
if(healthy)
|
||||
msg += "\t<span class='info'>Healthy.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='alert'>Subject does not have ears.</span>\n"
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
|
||||
msg += "\t<span class='info'><b>==EYE STATUS==</b></span>\n"
|
||||
if(istype(eyes))
|
||||
var/healthy = TRUE
|
||||
if(HAS_TRAIT(C, TRAIT_BLIND))
|
||||
msg += "\t<span class='alert'>Subject is blind.</span>\n"
|
||||
healthy = FALSE
|
||||
if(HAS_TRAIT(C, TRAIT_NEARSIGHT))
|
||||
msg += "\t<span class='alert'>Subject is nearsighted.</span>\n"
|
||||
healthy = FALSE
|
||||
if(eyes.damage > 30)
|
||||
msg += "\t<span class='alert'>Subject has severe eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
else if(eyes.damage > 20)
|
||||
msg += "\t<span class='alert'>Subject has significant eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
else if(eyes.damage)
|
||||
msg += "\t<span class='alert'>Subject has minor eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
if(healthy)
|
||||
msg += "\t<span class='info'>Healthy.</span>\n"
|
||||
else
|
||||
msg += "\t<span class='alert'>Subject does not have eyes.</span>\n"
|
||||
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/ldamage = H.return_liver_damage()
|
||||
if(ldamage > 10)
|
||||
msg += "\t<span class='alert'>[ldamage > 45 ? "Severe" : "Minor"] liver damage detected.</span>\n"
|
||||
|
||||
|
||||
// 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 += "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>\n"
|
||||
for(var/obj/item/bodypart/org in damaged)
|
||||
msg += "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]\n"
|
||||
dmgreport += "<table style='margin-left:33px'><tr><font face='Verdana'>\
|
||||
<td style='width: 90px;'><font color='#0000CC'>Damage:</font></td>\
|
||||
<td style='width: 55px;'><font color='red'><b>Brute</b></font></td>\
|
||||
<td style='width: 45px;'><font color='orange'><b>Burn</b></font></td>\
|
||||
<td style='width: 45px;'><font color='green'><b>Toxin</b></font></td>\
|
||||
<td style='width: 90px;'><font color='purple'><b>Suffocation</b></font></td></tr>\
|
||||
<tr><td><font color='#0000CC'>Overall:</font></td>\
|
||||
<td><font color='red'>[brute_loss]</font></td>\
|
||||
<td><font color='orange'>[fire_loss]</font></td>\
|
||||
<td><font color='green'>[tox_loss]</font></td>\
|
||||
<td><font color='purple'>[oxy_loss]</font></td></tr>"
|
||||
|
||||
for(var/o in damaged)
|
||||
var/obj/item/bodypart/org = o //head, left arm, right arm, etc.
|
||||
dmgreport += "<tr><td><font color='#0000CC'>[capitalize(org.name)]:</font></td>\
|
||||
<td><font color='red'>[(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]</font></td>\
|
||||
<td><font color='orange'>[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]</font></td></tr>"
|
||||
dmgreport += "</table>\n"
|
||||
msg += dmgreport
|
||||
|
||||
|
||||
//Organ damages report
|
||||
var/heart_ded = FALSE
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/minor_damage
|
||||
var/major_damage
|
||||
var/max_damage
|
||||
var/report_organs = FALSE
|
||||
var/mob/living/carbon/C = M
|
||||
|
||||
//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 = "\t<span class='alert'>Non-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 = "\t<span class='info'>Severely 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 = "\t<span class='info'>Mildly Damaged Organs: "
|
||||
minor_damage += organ.name
|
||||
for(var/organ in C.internal_organs)
|
||||
var/temp_message
|
||||
var/obj/item/organ/O = organ
|
||||
|
||||
//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 += "\t<span class='alert'>Subject is blind.</span>"
|
||||
if(HAS_TRAIT(C, TRAIT_NEARSIGHT))
|
||||
temp_message += "\t<span class='alert'>Subject is nearsighted.</span>"
|
||||
if(eyes.damage > 30)
|
||||
temp_message += "\t<span class='alert'>Subject has severe eye damage.</span>"
|
||||
else if(eyes.damage > 20)
|
||||
temp_message += "\t<span class='alert'>Subject has significant eye damage.</span>"
|
||||
else if(eyes.damage)
|
||||
temp_message += "\t<span class='alert'>Subject has minor eye damage.</span>"
|
||||
|
||||
|
||||
//EARS
|
||||
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 += "\t<span class='alert'>Subject is genetically deaf.</span>"
|
||||
else if(HAS_TRAIT(C, TRAIT_DEAF))
|
||||
temp_message += "\t<span class='alert'>Subject is deaf.</span>"
|
||||
else
|
||||
if(ears.damage)
|
||||
temp_message += "\t<span class='alert'>Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.</span>"
|
||||
if(ears.deaf)
|
||||
temp_message += "\t<span class='alert'>Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.</span>"
|
||||
|
||||
|
||||
//BRAIN
|
||||
if(istype(O, /obj/item/organ/brain))
|
||||
if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200)
|
||||
temp_message += "\t<span class='alert'>Subject's brain function is non-existent. Neurine injection recomended.</span>"
|
||||
else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120)
|
||||
temp_message += "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental traumas.</span>"
|
||||
else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45)
|
||||
temp_message += "\t<span class='alert'>Brain damage detected.</span>"
|
||||
else
|
||||
temp_message += "\t<span class='alert'>Functional Brain detected.</span>"
|
||||
if(advanced)
|
||||
temp_message += "\t<span class='info'>Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%.</span>"
|
||||
|
||||
//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 += "\t<span class='alert'>Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)].</span>"
|
||||
if(C.roundstart_quirks.len)
|
||||
temp_message += "\t<span class='info'>Subject has the following physiological traits: [C.get_trait_string()].</span>"
|
||||
|
||||
if(ishuman(C) && advanced)
|
||||
var/mob/living/carbon/human/H = M
|
||||
//MON PETIT CHAUFFEUR
|
||||
if(H.hallucinating())
|
||||
temp_message += "\t<span class='info'>Subject is hallucinating.</span>"
|
||||
|
||||
//MKUltra
|
||||
if(H.has_status_effect(/datum/status_effect/chem/enthrall))
|
||||
temp_message += "\t<span class='info'>Subject has abnormal brain fuctions.</span>"
|
||||
|
||||
//Astrogen shenanigans
|
||||
if(H.reagents.has_reagent("astral"))
|
||||
if(H.mind)
|
||||
temp_message += "\t<span class='danger'>Warning: subject may be possesed.</span>"
|
||||
else
|
||||
temp_message += "\t<span class='notice'>Subject appears to be astrally projecting.</span>"
|
||||
|
||||
|
||||
//LIVER
|
||||
if(istype(O, /obj/item/organ/liver))
|
||||
var/obj/item/organ/liver/L = O
|
||||
if(L.swelling > 20)
|
||||
msg += "\t<span class='danger'>Subject is suffering from an enlarged liver.</span>" //i.e. shrink their liver or give them a transplant.
|
||||
|
||||
//HEART
|
||||
if(ishuman(M) && (istype(O, /obj/item/organ/heart)))
|
||||
var/obj/item/organ/heart/He = O
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
msg += "\t<span class='danger'>Subject suffering from heart attack: Apply defibrillation or other electric shock <b>immediately!</b></span>"
|
||||
if(He.organ_flags & ORGAN_FAILING)
|
||||
heart_ded = TRUE
|
||||
|
||||
//TONGUE
|
||||
if(istype(O, /obj/item/organ/tongue))
|
||||
var/obj/item/organ/tongue/T = O
|
||||
if(T.name == "fluffy tongue")
|
||||
msg += "\t<span class='danger'>Subject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant.</span>"
|
||||
|
||||
//HECK
|
||||
if(istype(O, /obj/item/organ/genital/penis))
|
||||
var/obj/item/organ/genital/penis/P = O
|
||||
if(P.length>20)
|
||||
msg += "\t<span class='info'>Subject has a sizeable gentleman's organ at [P.length] inches.</span>"
|
||||
|
||||
if(istype(O, /obj/item/organ/genital/breasts))
|
||||
var/obj/item/organ/genital/breasts/Br = O
|
||||
if(Br.cached_size>5)
|
||||
msg += "\t<span class='info'>Subject has a sizeable bosom with a [Br.size] cup.</span>"
|
||||
|
||||
//GENERAL HANDLER
|
||||
var/damage_message
|
||||
if(O.organ_flags & ORGAN_FAILING)
|
||||
damage_message += "\t<span class='alert'><b>End Stage [O.name] failure detected.</b></span>"
|
||||
else if(O.damage > O.high_threshold)
|
||||
damage_message += "\t<span class='alert'><b>Chronic [O.name] failure detected.</b></span>"
|
||||
else if(O.damage > O.low_threshold && advanced)
|
||||
damage_message += "\t<font color='red'><b>Acute [O.name] failure detected.</b></span>"
|
||||
|
||||
if(temp_message || damage_message)
|
||||
msg += "[O.name]: [damage_message] [temp_message]\n"
|
||||
|
||||
|
||||
|
||||
//END; LOOK FOR MISSING ORGANS?
|
||||
if(!M.getorgan(/obj/item/organ/eyes))
|
||||
msg += "\t<span class='alert'>Subject does not have eyes.</span>\n"
|
||||
if(!M.getorgan(/obj/item/organ/ears))
|
||||
msg += "\t<span class='alert'>Subject does not have ears.</span>\n"
|
||||
if(!M.getorgan(/obj/item/organ/brain))
|
||||
msg += "\t<span class='alert'>Subject's brain function is non-existent.</span>\n"
|
||||
if(!M.getorgan(/obj/item/organ/liver))
|
||||
msg += "\t<span class='alert'>Subject's liver is missing.</span>\n"
|
||||
if(!M.getorgan(/obj/item/organ/lungs))
|
||||
msg += "\t<span class='alert'>Subject's lungs have collapsed from trauma!</span>\n"
|
||||
if(!M.getorgan(/obj/item/organ/heart))
|
||||
msg += "\t<span class='alert'>Subject's heart is missing!</span>\n"
|
||||
|
||||
if(M.radiation)
|
||||
msg += "\t<span class='alert'>Subject is irradiated.</span>\n"
|
||||
msg += "\t<span class='info'>Radiation Level: [M.radiation] rad</span>\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 = "\t<span class='alert'>Non-Functional Organs: </span>\n"
|
||||
else
|
||||
max_damage += "</span>\n"
|
||||
if(!major_damage)
|
||||
major_damage = "\t<span class='info'>Severely Damaged Organs: </span>\n"
|
||||
else
|
||||
major_damage += "</span>\n"
|
||||
if(!minor_damage)
|
||||
minor_damage = "\t<span class='info'>Mildly Damaged Organs: </span>\n"
|
||||
else
|
||||
minor_damage += "</span>\n"
|
||||
msg += "[minor_damage]"
|
||||
msg += "[major_damage]"
|
||||
msg += "[max_damage]"
|
||||
|
||||
|
||||
// Species and body temperature
|
||||
@@ -382,7 +366,7 @@ SLIME SCANNER
|
||||
else if (S.mutantstomach != initial(S.mutantstomach))
|
||||
mutant = TRUE
|
||||
|
||||
msg += "\t<span class='info'>Reported Species: [H.dna.custom_species ? H.dna.custom_species : S.name]</span>\n"
|
||||
msg += "\t<span class='info'>Reported Species: [H.dna.custom_species ? H.dna.custom_species : S.name]</span>\n"
|
||||
msg += "\t<span class='info'>Base Species: [S.name]</span>\n"
|
||||
if(mutant)
|
||||
msg += "\t<span class='info'>Subject has mutations present.</span>\n"
|
||||
@@ -393,7 +377,10 @@ SLIME SCANNER
|
||||
msg += "<span class='info'>Time of Death:</span> [M.tod]\n"
|
||||
var/tdelta = round(world.time - M.timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
msg += "<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>\n"
|
||||
if(heart_ded)
|
||||
msg += "<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, heart requires surgical intervention for defibrillation.</span>\n"
|
||||
else
|
||||
msg += "<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>\n"
|
||||
|
||||
for(var/thing in M.diseases)
|
||||
var/datum/disease/D = thing
|
||||
|
||||
@@ -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,12 +388,18 @@
|
||||
/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)
|
||||
@@ -420,6 +426,12 @@
|
||||
if(istype(AM))
|
||||
AM.organ_flags &= ~ORGAN_FROZEN
|
||||
|
||||
/obj/machinery/smartfridge/chemistry/preloaded
|
||||
initial_contents = list(
|
||||
/obj/item/organ/random = 1,
|
||||
/obj/item/reagent_containers/medspray/synthtissue = 1,
|
||||
/obj/item/reagent_containers/medspray/sterilizine = 1)
|
||||
|
||||
// -----------------------------
|
||||
// Chemistry Medical Smartfridge
|
||||
// -----------------------------
|
||||
|
||||
@@ -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/neurine/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C)
|
||||
return
|
||||
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(method == INJECT)
|
||||
if(B.organ_flags & ORGAN_FAILING)
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/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/incise_heart/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You begin apply an electrical charge directly to the heart and across the body...</span>",
|
||||
"[user] begins to make an incision in [target]'s heart.",
|
||||
"[user] begins to make an incision in [target]'s heart.")
|
||||
target.notify_ghost_cloning("Your heart is undergoing Emergency Cardioversion Induction!")
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 75, 0)
|
||||
|
||||
/datum/surgery_step/incise_heart/success(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)
|
||||
if(H.stat == DEAD)
|
||||
display_results(user, target, "<span class='warning'>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.</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
|
||||
M.emote("scream")
|
||||
H.electrocute_act(25, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.emote("flip")
|
||||
H.Jitter(100)
|
||||
return FALSE
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if (!(NOBLOOD in H.dna.species.species_traits))
|
||||
display_results(user, target, "<span class='notice'>induces a stable rythum in [H]'s heart.</span>",
|
||||
"[H]'s heart is shocked, attemping to bring them back to a stable rythum!.",
|
||||
"")
|
||||
H.bleed_rate += 10
|
||||
H.adjustBruteLoss(10)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_HEART, -10)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5)
|
||||
H.electrocute_act(0, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
if(!do_they_live(H))
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/incise_heart/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)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
display_results(user, target, "<span class='warning'>You screw up, sending current racing though their body!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
|
||||
H.electrocute_act(25, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.emote("flip")
|
||||
H.adjustOrganLoss(ORGAN_SLOT_HEART, 10)
|
||||
|
||||
/datum/surgery_step/incise_heart/do_they_live(mob/living/carbon/human/H)
|
||||
|
||||
var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart)
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
|
||||
total_brute = H.getBruteLoss()
|
||||
total_burn = H.getFireLoss()
|
||||
shock_touching(30, H)
|
||||
var/failed
|
||||
var/tdelta = round(world.time - timeofdeath)
|
||||
|
||||
|
||||
if (H.suiciding || (HAS_TRAIT(H, TRAIT_NOCLONE)))
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
|
||||
else if (H.hellbound)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile.</span>"
|
||||
else if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Body has decayed for too long. Further attempts futile.</span>"
|
||||
else if (!heart)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Patient's heart is missing.</span>"
|
||||
else if (heart.organ_flags & ORGAN_FAILING)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Patient's heart too damaged.</span>"
|
||||
else if(total_burn >= 180 || total_brute >= 180)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via surgery. Further attempts futile.</span>"
|
||||
else if(H.get_ghost())
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful.</span>"
|
||||
else
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(BR)
|
||||
if(BR.organ_flags & ORGAN_FAILING)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Patient's brain tissue is damaged making recovery of patient impossible via surgery. Further attempts futile.</span>"
|
||||
if(BR.brain_death)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Patient's brain damaged beyond point of no return. Further attempts futile.</span>"
|
||||
if(H.suiciding || BR.brainmob?.suiciding)
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - No intelligence pattern can be detected in patient's brain. Further attempts futile.</span>"
|
||||
else
|
||||
failed = "<span class='warning'>The [src] equipment buzzes: Resuscitation failed - Patient's brain is missing. Further attempts futile.</span>"
|
||||
|
||||
|
||||
if(failed)
|
||||
user.visible_message(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.
|
||||
user.visible_message("<span class='notice'>The [src] equipment pings: Resuscitation successful.</span>")
|
||||
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)
|
||||
log_combat(user, H, "revived", "Emergency Cardioversion Induction")
|
||||
@@ -49,7 +49,7 @@
|
||||
to_chat(user, "<span class='notice'>There's not enough synthtissue to perform the operation! There needs to be at least 10u.</span>")
|
||||
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, "<span class='notice'>[chosen_organ] is too damaged to graft onto!</span>")
|
||||
return -1
|
||||
|
||||
|
||||
@@ -365,3 +365,15 @@
|
||||
tail.Insert(src)
|
||||
if(only_one)
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/random
|
||||
name = "Illegal organ"
|
||||
desc = "Something fucked up"
|
||||
|
||||
/obj/item/organ/random/Initialize()
|
||||
..()
|
||||
var/list = subtypesof(/obj/item/organ)
|
||||
list -= /obj/item/organ/random
|
||||
var/newtype = pick(list)
|
||||
new newtype(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -102,20 +102,35 @@
|
||||
pH = 7.6
|
||||
metabolization_rate = 0.05 //Give them time to graft
|
||||
data = list("grown_volume" = 0, "injected_vol" = 0)
|
||||
var/borrowed_health
|
||||
|
||||
/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, "<span class='danger'>You feel your [target] heal! It stings like hell!</span>")
|
||||
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")
|
||||
log_combat(M, M, "revived", src)
|
||||
else
|
||||
M.adjustBruteLoss(-healing_factor)
|
||||
M.adjustFireLoss(-healing_factor)
|
||||
to_chat(M, "<span class='danger'>You feel your flesh merge with the synthetic tissue! It stings like hell!</span>")
|
||||
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)
|
||||
@@ -129,6 +144,10 @@
|
||||
to_chat(C, "<span class='notice'>You feel something reform inside of you!</span>")
|
||||
|
||||
data["injected_vol"] -= metabolization_rate
|
||||
if(borrowed_health)
|
||||
C.adjustToxLoss(1)
|
||||
C.adjustCloneLoss(1)
|
||||
borrowed_health -= 1
|
||||
..()
|
||||
|
||||
/datum/reagent/synthtissue/on_merge(passed_data)
|
||||
@@ -139,6 +158,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)
|
||||
@@ -146,6 +166,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()
|
||||
switch(data["grown_volume"])
|
||||
if(-INFINITY to 50)
|
||||
name = "Young Synthtissue Colony"
|
||||
if(50 to 80)
|
||||
name = "Adolescent Synthtissue Colony"
|
||||
if(80 to 135)
|
||||
name = "Adult Synthtissue Colony"
|
||||
if(135 to 175)
|
||||
name = "Master Synthtissue Colony"
|
||||
if(175 to INFINITY)
|
||||
name = "Apex 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()
|
||||
|
||||
Reference in New Issue
Block a user