Updates formatting of the paper printed by Autopsies, adds some missing info (#92689)

## About The Pull Request
<details><summary>Updates the paper printed by an Autopsy</summary>

<h5>(It's actually not much longer than the old autopsies could get. It
has only a few new lines, most notably the missing organs it already
should have been listing and Temperature)
(Also it actually has fewer characters than the healthscan still because
of having no color.)</h5>

<h6>I genuinely don't know how to get the Overall to stop stacking like
that. It was suggested it looks better at the bottom as a summary-type
thing, and I think that's true and it does work, but it's hard to format
right with paper width like it is.</h6>

<img width="261" height="680" alt="image"
src="https://github.com/user-attachments/assets/76190f1b-073a-4a61-a2fe-8002aaeb9187"
/>

</details>

<details><summary>
COMPARISONS
</summary>

<details><summary>
New vs Old
</summary>
<h6>Obviously not the same info. I'm not gonna recreate two identical
deaths in seperate code. I'm not crazy!!!
Also I know I missed the virus scan, fwiw the formatting is about the
same as the chemical. About. Ish.</h6>

<img width="523" height="679" alt="image"
src="https://github.com/user-attachments/assets/59057056-5964-4902-bb32-b678333152ab"
/>

</details>

<details><summary>
New vs healthscan
</summary>
<h6>Similar, yes, not identical though. See the PR body.</h6>

<img width="528" height="677" alt="image"
src="https://github.com/user-attachments/assets/e409deee-f327-4bab-a8b3-335999677e08"
/>

</details>
</details>

Now, it's largely comparable to a printed Health Scan. 

It has all its unique features unchanged:
- Colorless advanced health scan (exact numbers of damages)
- Lists all organs/limbs present (even undamaged organs, and with exact
names)
- Shows wound sources
- Lists Chemicals/Diseases in detail

Adds some missing info/QoL to the autopsies:
- Lists Missing Organs (why weren't these listed???)
- Sorts organ/limb lists the same as healthscan
- Shows temperature, genetic stability, and blood alcohol (can inform
how someone died)
- Shows how long they've been dead in realtime (ingame time is neat, but
not at all helpful)
- Ends with a 'Coroner's Notes' section (so the coroner can write info
such as how they think they died)

Still has notable differences, of course: 
- No color (so sad)
- Doesn't list quirks (they are dead their Heirloom is irrelevant)
- No tooltips (it's paper)
- Only possible while dead
- Requires a surgery to get the printout

Hopefully this will give it more usecase outside only boosting surgery
speed. Detectives will appreciate a good coroner's autopsy now.

<h5>(It feels really copy-pastey, but with it mostly just being paper
formatting, I don't know how much CAN be made into unique procs.
Suggestions on how to improve that are welcome.)</h5>

---
Additionally:

**Creates `/mob/living/carbon/human/proc/get_missing_organs()`.** 
Just takes some code from healthscan() and makes it useable elsewhere.
Does what you'd guess. Returns a list of empty organ slots that should
have organs, where key is the ORGAN_SLOT and value is the "name".
**Adds a 'colored' variable to /obj/item/organ/proc/get_status_text()**
Decides if it returns it with color. Autopsies call this with colored
false.
<h6>(See above note about copy-paste. These were two things I could see
that I could minimize copy-paste with)</h6>

## Why It's Good For The Game
These are so fun to do, but are missing **just** enough information to
be kind of irritating without also doing a healthscan.
You shouldn't need to print a healthscan alongside the autopsy, the
autopsy is already the healthscan. _An unhealth-scan, perhaps?_

Hopefully this will make them nicer to use.
_(An autopsy? Not showing missing organs? Crazy.)_

## Changelog

🆑
qol: made Autopsy Reports follow similar formatting to Health Scans, and
adds some information previously missing such as Missing Organs.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
OrionTheFox
2025-09-10 23:10:08 +02:00
committed by GitHub
co-authored by Ghom
parent f5c2af4c89
commit a8d1925a8b
6 changed files with 202 additions and 67 deletions
@@ -20,9 +20,9 @@
if(!user.can_read(src) || user.is_blind())
return ITEM_INTERACT_BLOCKING
var/mob/living/M = interacting_with
var/mob/living/scanned = interacting_with
if(M.stat != DEAD && !HAS_TRAIT(M, TRAIT_FAKEDEATH)) // good job, you found a loophole
if(scanned.stat != DEAD && !HAS_TRAIT(scanned, TRAIT_FAKEDEATH)) // good job, you found a loophole
to_chat(user, span_deadsay("[icon2html(src, user)] ERROR! CANNOT SCAN LIVE CADAVERS. PROCURE HEALTH ANALYZER OR TERMINATE PATIENT."))
return ITEM_INTERACT_BLOCKING
@@ -38,10 +38,10 @@
\n[span_info("Body temperature: ???")]")
return
user.visible_message(span_notice("[user] scans [M]'s cadaver."))
user.visible_message(span_notice("[user] scans [scanned]'s cadaver."))
to_chat(user, span_deadsay("[icon2html(src, user)] ANALYZING CADAVER."))
healthscan(user, M, advanced = TRUE)
healthscan(user, scanned, advanced = TRUE)
add_fingerprint(user)
@@ -49,40 +49,142 @@
if(scanned.stat != DEAD)
return
var/obj/item/paper/autopsy_report = new(get_turf(src))
autopsy_report.color = "#99ccff"
autopsy_report.name = "autopsy report of [scanned] - [station_time_timestamp()])"
var/final_report_text = "<center><b>Autopsy report. Time of Autopsy: [station_time_timestamp()]</b></center>"
//A lot of this is extremely similar to /proc/healthscan() - but with different formatting, no color, and some added/removed info
//Does not list quirks/exhaustion/how to repair wounds
//DOES list wound sources/
var/list/autopsy_information = list()
autopsy_information += "[scanned.name] - Species: [scanned.dna.species.name]"
autopsy_information += "Time of Death - [scanned.station_timestamp_timeofdeath]"
autopsy_information += "Time of Autopsy - [station_time_timestamp()]"
autopsy_information += "Autopsy Coroner - [user.name]"
autopsy_information += "Autopsy Coroner - [user.name]<hr>"
autopsy_information += "Toxin damage: [CEILING(scanned.getToxLoss(), 1)]"
autopsy_information += "Oxygen damage: [CEILING(scanned.getOxyLoss(), 1)]"
autopsy_information += "Analyzing results for <b>[scanned.name]</b>:</br></br>"
autopsy_information += "Time of Death - <b>[scanned.station_timestamp_timeofdeath]</b></br>"
autopsy_information += "Subject has been dead for <b>[DisplayTimeText(round(world.time - scanned.timeofdeath))]</b>.<hr>"
autopsy_information += "<center>Bodypart Data</center><br>"
for(var/obj/item/bodypart/bodyparts as anything in scanned.bodyparts)
autopsy_information += "<b>[bodyparts.name]</b><br>"
autopsy_information += "BRUTE: [bodyparts.brute_dam] | BURN: [bodyparts.burn_dam]<br>"
if(!bodyparts.wounds)
var/oxy_loss = scanned.getOxyLoss()
var/tox_loss = scanned.getToxLoss()
var/fire_loss = scanned.getFireLoss()
var/brute_loss = scanned.getBruteLoss()
/// "Body Data" portion of the autopsy - damage, wounds, and limbs
var/dmgreport = "<u><b>Body Data:</b></u>\
<table class='ml-2'>\
<tr>\
<td style='width:7em;'><b>Damage:</b></td>\
<td style='width:5em;'><b>Brute</b></td>\
<td style='width:4em;'><b>Burn</b></td>\
<td style='width:4em;'><b>Toxin</b></td>\
<td style='width:8em;'><b>Suffocation</b></td>\
</tr>"
for(var/zone in scanned.get_all_limbs()) //Same order every time for consistency across all humans
var/obj/item/bodypart/limb = scanned.get_bodypart(zone)
if(isnull(limb))
dmgreport += "<tr>"
dmgreport += "<td><b>[capitalize(parse_zone(zone))]:</b></td>"
dmgreport += "<td>-</td>"
dmgreport += "<td>-</td>"
dmgreport += "</tr>"
dmgreport += "<tr><td colspan=6>&rdsh; Physical trauma: <u>Dismembered</u></td></tr>"
continue
autopsy_information += "Wounds found:<br>"
for(var/datum/wound/wounds as anything in bodyparts.wounds)
if(wounds.wound_source)
autopsy_information += "<b>[wounds.name]</b> - Caused by <i>[wounds.wound_source]</i><br>"
var/has_any_embeds = length(limb.embedded_objects) >= 1
var/has_any_wounds = length(limb.wounds) >= 1
dmgreport += "<tr>"
dmgreport += "<td><b>[capitalize(limb.name)]:</b></td>"
dmgreport += "<td>[limb.brute_dam > 0 ? ceil(limb.brute_dam) : "0"]</td>"
dmgreport += "<td>[limb.burn_dam > 0 ? ceil(limb.burn_dam) : "0"]</td>"
if(zone == BODY_ZONE_CHEST) // tox/oxy is stored in the chest
dmgreport += "<td>[tox_loss > 0 ? ceil(tox_loss) : "0"]</td>"
dmgreport += "<td>[oxy_loss > 0 ? ceil(oxy_loss) : "0"]</td>"
dmgreport += "</tr>"
if(has_any_embeds)
var/list/embedded_names = list()
for(var/obj/item/embed as anything in limb.embedded_objects)
embedded_names[capitalize(embed.name)] += 1
for(var/embedded_name in embedded_names)
var/displayed = embedded_name
var/embedded_amt = embedded_names[embedded_name]
if(embedded_amt > 1)
displayed = "[embedded_amt]x [embedded_name]"
dmgreport += "<tr><td colspan=6><i>&rdsh; Foreign object(s): [displayed].</i></td></tr>"
if(has_any_wounds)
for(var/datum/wound/wound as anything in limb.wounds)
dmgreport += "<tr><td colspan=6><i>&rdsh; Physical trauma: [wound.name] ([wound.severity_text()]) - Caused by <u>[wound.wound_source].</u></i></td></tr>"
autopsy_information += "<center>Organ Data</center>"
for(var/obj/item/organ/organs as anything in scanned.organs)
autopsy_information += "[organs.name]: <b>[CEILING(organs.damage, 1)] damage</b><br>"
dmgreport += "<tr>\
<td><b>Overall:</b></td>\
<td><b>[ceil(brute_loss)] Brute</b></td>\
<td><b>[ceil(fire_loss)] Burn</b></td>\
<td><b>[ceil(tox_loss)] Toxin</b></td>\
<td><b>[ceil(oxy_loss)] Suffocation</b></td>\
</tr>"
dmgreport += "</table><hr>"
autopsy_information += dmgreport
autopsy_information += "<center>Chemical Data</center>"
for(var/datum/reagent/scanned_reagents as anything in scanned.reagents.reagent_list)
if(scanned_reagents.chemical_flags & REAGENT_INVISIBLE)
continue
autopsy_information += "<b>[round(scanned_reagents.volume, 0.1)] unit\s of [scanned_reagents.name]</b><br>"
autopsy_information += "Chemical Information: <i>[scanned_reagents.description]</i><br>"
// Only humanoids list organs, implants, gene stability, species and core-temp
if(ishuman(scanned))
var/mob/living/carbon/human/humantarget = scanned
/// "Organ Data" portion of the autopsy - damage, functional status (or if it's missing), and implants
var/organreport = "<u><b>Organ Data:</b></u>\
<table class='ml-2'>\
<tr>\
<td style='width:10em;'><b>Organ:</b></td>\
<td style='width:6em;'><b>Dmg</b></td>\
<td style='width:30em;'><b>Status</b></td>\
</tr>"
autopsy_information += "<center>Blood Data</center>"
var/list/missing_organs = humantarget.get_missing_organs()
for(var/sorted_slot in GLOB.organ_process_order) //Same order every time for consistency across all humans
var/obj/item/organ/organ = humantarget.get_organ_slot(sorted_slot)
if(isnull(organ))
if(missing_organs[sorted_slot])
organreport += "<tr><td><b>[missing_organs[sorted_slot]]:</b></td>\
<td>-</td>\
<td><u>Missing</u></td></tr>"
continue
var/status = organ.get_status_text(advanced = TRUE, add_tooltips = FALSE, colored = FALSE)
var/appendix = organ.get_status_appendix(advanced = TRUE, add_tooltips = FALSE)
if(!status)
status ||= "OK" // otherwise flawless organs have no status reported by default
organreport += "<tr>\
<td><b>[capitalize(organ.name)]:</b></td>\
<td>[organ.damage > 0 ? ceil(organ.damage) : "0"]</td>\
<td>[status]</td>\
</tr>"
if(appendix)
organreport += "<tr><td colspan=4><i>&rdsh; [appendix]</i></td></tr>"
organreport += "</table>" //<hr> comes after Cybernetics below
autopsy_information += organreport
var/mutant = HAS_TRAIT(humantarget, TRAIT_HULK) //Also applied by genetics infusions
// Cybernetics
var/list/cyberimps
for(var/obj/item/organ/target_organ as anything in humantarget.organs)
if(IS_ROBOTIC_ORGAN(target_organ) && !(target_organ.organ_flags & ORGAN_HIDDEN))
LAZYADD(cyberimps, target_organ.examine_title(user))
if(target_organ.organ_flags & ORGAN_MUTANT)
mutant = TRUE
if(LAZYLEN(cyberimps))
autopsy_information += "<b>Detected cybernetic modifications:</b></br>"
autopsy_information += "[english_list(cyberimps, and_text = ", and ")]</br>"
autopsy_information += "<hr>"
// Genetic Stability, Species, and Body Temperature
if(humantarget.has_dna() && humantarget.dna.stability != initial(humantarget.dna.stability))
autopsy_information += "<b>Genetic Stability:</b> [humantarget.dna.stability]%.</br>"
var/datum/species/targetspecies = humantarget.dna.species
var/disguised = !ishumanbasic(humantarget) && istype(humantarget.head, /obj/item/clothing/head/hooded/human_head) && istype(humantarget.wear_suit, /obj/item/clothing/suit/hooded/bloated_human)
var/species_name = "[disguised ? "\"[/datum/species/human::name]\"" : targetspecies.name][mutant ? "-derived mutant" : ""]"
autopsy_information += "<b>Species:</b> [species_name]</br>"
autopsy_information += "<b>Core temperature:</b> [round(humantarget.coretemperature-T0C, 0.1)] &deg;C ([round(humantarget.coretemperature*1.8-459.67,0.1)] &deg;F)</br>"
// (End of humanoid-only information)
autopsy_information += "<b>Body temperature:</b> [round(scanned.bodytemperature-T0C, 0.1)] &deg;C ([round(scanned.bodytemperature*1.8-459.67,0.1)] &deg;F)</br>"
// Blood Info
if(HAS_TRAIT(scanned, TRAIT_HUSK))
autopsy_information += "Blood can't be found, victim is husked by: "
autopsy_information += "Blood can't be found, subject is husked by: "
if(HAS_TRAIT_FROM(scanned, TRAIT_HUSK, BURN))
autopsy_information += "Severe burns.</br>"
else if (HAS_TRAIT_FROM(scanned, TRAIT_HUSK, CHANGELING_DRAIN))
@@ -93,23 +195,46 @@
var/datum/blood_type/blood_type = scanned.get_bloodtype()
if(blood_type)
var/blood_percent = round((scanned.blood_volume / BLOOD_VOLUME_NORMAL) * 100)
if (blood_type.get_type())
autopsy_information += "[blood_type.get_blood_name()] Type: [blood_type.get_type()]<br>"
autopsy_information += "[blood_type.get_blood_name()] Volume: [scanned.blood_volume] cl ([blood_percent]%) <br>"
var/blood_type_format
var/level_format
if(scanned.blood_volume <= BLOOD_VOLUME_SAFE && scanned.blood_volume > BLOOD_VOLUME_OKAY)
level_format = "LOW [blood_percent]%, [scanned.blood_volume] cl"
else if(scanned.blood_volume <= BLOOD_VOLUME_OKAY)
level_format = "<u>CRITICAL [blood_percent]%</u>, [scanned.blood_volume] cl"
else
level_format = "[blood_percent]%, [scanned.blood_volume] cl"
if(blood_type.get_type())
blood_type_format = "type: [blood_type.get_type()]"
autopsy_information += "<b>[blood_type.get_blood_name()] level:</b> [level_format], [blood_type_format]</br>"
var/blood_alcohol_content = scanned.get_blood_alcohol_content()
if(blood_alcohol_content > 0)
autopsy_information += "&rdsh; [blood_type?.get_blood_name() || "Blood"] alcohol content: [blood_alcohol_content]%</br>"
autopsy_information += "<hr>"
autopsy_information += "<u>Chemical Data:</u></br>"
for(var/datum/reagent/scanned_reagents as anything in scanned.reagents.reagent_list)
if(scanned_reagents.chemical_flags & REAGENT_INVISIBLE)
continue
autopsy_information += "<b>[scanned_reagents.name]:</b> [round(scanned_reagents.volume, 0.1)] unit\s in bloodstream.</br>"
autopsy_information += "<i>&rdsh; [scanned_reagents.description]</i></br>"
autopsy_information += "<hr>"
autopsy_information += "<u>Disease Data:</u></br>"
for(var/datum/disease/diseases as anything in scanned.diseases)
autopsy_information += "Name: [diseases.name] | Type: [diseases.spread_text]<br>"
autopsy_information += "<b>Disease Name:</b> \"[diseases.name]\"</br>"
autopsy_information += "<b>Transmission Type:</b> [diseases.spread_text]</br>"
if(!istype(diseases, /datum/disease/advance))
continue
autopsy_information += "<b>Symptoms:</b><br>"
autopsy_information += "<b>Symptoms:</b></br>"
var/datum/disease/advance/advanced_disease = diseases
for(var/datum/symptom/symptom as anything in advanced_disease.symptoms)
autopsy_information += "[symptom.name] - [symptom.desc]<br>"
autopsy_information += "&rdsh; [symptom.name] - <i>[symptom.desc]</i></br>"
autopsy_information += "<hr>"
var/obj/item/paper/autopsy_report = new(user.drop_location())
autopsy_report.name = "autopsy report of [scanned] - [station_time_timestamp()])"
autopsy_report.add_raw_text(autopsy_information.Join("\n"))
autopsy_report.color = "#99ccff"
autopsy_information += "<b>Coroner's Notes:</b>" //Bottom of the page, anything past here is player-written
final_report_text += jointext(autopsy_information, "")
autopsy_report.add_raw_text(final_report_text)
autopsy_report.update_appearance()
user.put_in_hands(autopsy_report)
user.balloon_alert(user, "report printed")
@@ -283,24 +283,7 @@
<td style='width:30em;'><font color='#ff0000'><b>Status</b></font></td>\
</tr>"
var/list/missing_organs = list()
if(!humantarget.get_organ_slot(ORGAN_SLOT_BRAIN))
missing_organs[ORGAN_SLOT_BRAIN] = "Brain"
if(humantarget.needs_heart() && !humantarget.get_organ_slot(ORGAN_SLOT_HEART))
missing_organs[ORGAN_SLOT_HEART] = "Heart"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_NOBREATH, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantlungs) && !humantarget.get_organ_slot(ORGAN_SLOT_LUNGS))
missing_organs[ORGAN_SLOT_LUNGS] = "Lungs"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_LIVERLESS_METABOLISM, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantliver) && !humantarget.get_organ_slot(ORGAN_SLOT_LIVER))
missing_organs[ORGAN_SLOT_LIVER] = "Liver"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_NOHUNGER, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantstomach) && !humantarget.get_organ_slot(ORGAN_SLOT_STOMACH))
missing_organs[ORGAN_SLOT_STOMACH] ="Stomach"
if(!isnull(humantarget.dna.species.mutanttongue) && !humantarget.get_organ_slot(ORGAN_SLOT_TONGUE))
missing_organs[ORGAN_SLOT_TONGUE] = "Tongue"
if(!isnull(humantarget.dna.species.mutantears) && !humantarget.get_organ_slot(ORGAN_SLOT_EARS))
missing_organs[ORGAN_SLOT_EARS] = "Ears"
if(!isnull(humantarget.dna.species.mutantears) && !humantarget.get_organ_slot(ORGAN_SLOT_EYES))
missing_organs[ORGAN_SLOT_EYES] = "Eyes"
var/list/missing_organs = humantarget.get_missing_organs()
// Follow same order as in the organ_process_order so it's consistent across all humans
for(var/sorted_slot in GLOB.organ_process_order)
var/obj/item/organ/organ = humantarget.get_organ_slot(sorted_slot)
+7 -7
View File
@@ -395,28 +395,28 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
replacement.set_organ_damage(damage)
/// Called by medical scanners to get a simple summary of how healthy the organ is. Returns an empty string if things are fine.
/obj/item/organ/proc/get_status_text(advanced, add_tooltips)
/obj/item/organ/proc/get_status_text(advanced, add_tooltips, colored = TRUE)
if(advanced && (organ_flags & ORGAN_HAZARDOUS))
return conditional_tooltip("<font color='#cc3333'>Harmful Foreign Body</font>", "Remove surgically.", add_tooltips)
return conditional_tooltip("[colored ? "<font color='#cc3333'>" : ""]Harmful Foreign Body[colored ? "</font>" : ""]", "Remove surgically.", add_tooltips)
if(organ_flags & ORGAN_EMP)
return conditional_tooltip("<font color='#cc3333'>EMP-Derived Failure</font>", "Repair or replace surgically.", add_tooltips)
return conditional_tooltip("[colored ? "<font color='#cc3333'>" : ""]EMP-Derived Failure[colored ? "</font>" : ""]", "Repair or replace surgically.", add_tooltips)
var/tech_text = ""
if(owner.has_reagent(/datum/reagent/inverse/technetium))
tech_text = "[round((damage / maxHealth) * 100, 1)]% damaged"
if(organ_flags & ORGAN_FAILING)
return conditional_tooltip("<font color='#cc3333'>[tech_text || "Non-Functional"]</font>", "Repair or replace surgically.", add_tooltips)
return conditional_tooltip("[colored ? "<font color='#cc3333'>" : ""][tech_text || "Non-Functional"][colored ? "</font>" : ""]", "Repair or replace surgically.", add_tooltips)
if(damage > high_threshold)
return conditional_tooltip("<font color='#ff9933'>[tech_text || "Severely Damaged"]</font>", "[healing_factor ? "Treat with rest or use specialty medication." : "Repair surgically or use specialty medication."]", add_tooltips && owner.stat != DEAD)
return conditional_tooltip("[colored ? "<font color='#ff9933'>" : ""][tech_text || "Severely Damaged"][colored ? "</font>" : ""]", "[healing_factor ? "Treat with rest or use specialty medication." : "Repair surgically or use specialty medication."]", add_tooltips && owner.stat != DEAD)
if(damage > low_threshold)
return conditional_tooltip("<font color='#ffcc33'>[tech_text || "Mildly Damaged"] </font>", "[healing_factor ? "Treat with rest." : "Use specialty medication."]", add_tooltips && owner.stat != DEAD)
return conditional_tooltip("[colored ? "<font color='#ffcc33'>" : ""][tech_text || "Mildly Damaged"][colored ? "</font>" : ""]", "[healing_factor ? "Treat with rest." : "Use specialty medication."]", add_tooltips && owner.stat != DEAD)
if(tech_text)
return "<font color='#33cc33'>[tech_text]</font>"
return "[colored ? "<font color='#33cc33'>" : ""][tech_text][colored ? "</font>" : ""]"
return ""
+27
View File
@@ -43,3 +43,30 @@
/mob/living/carbon/get_organ_slot(slot)
. = organs_slot[slot]
/**
* Returns a list of all missing organs this species should have
*
* list [key] is the ORGAN_SLOT missing an organ, list value is the text name of the slot organ
*/
/mob/living/carbon/human/proc/get_missing_organs()
var/mob/living/carbon/human/humantarget = src
var/list/missing_organs = list()
if(!humantarget.get_organ_slot(ORGAN_SLOT_BRAIN))
missing_organs[ORGAN_SLOT_BRAIN] = "Brain"
if(humantarget.needs_heart() && !humantarget.get_organ_slot(ORGAN_SLOT_HEART))
missing_organs[ORGAN_SLOT_HEART] = "Heart"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_NOBREATH, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantlungs) && !humantarget.get_organ_slot(ORGAN_SLOT_LUNGS))
missing_organs[ORGAN_SLOT_LUNGS] = "Lungs"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_LIVERLESS_METABOLISM, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantliver) && !humantarget.get_organ_slot(ORGAN_SLOT_LIVER))
missing_organs[ORGAN_SLOT_LIVER] = "Liver"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_NOHUNGER, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantstomach) && !humantarget.get_organ_slot(ORGAN_SLOT_STOMACH))
missing_organs[ORGAN_SLOT_STOMACH] ="Stomach"
if(!isnull(humantarget.dna.species.mutanttongue) && !humantarget.get_organ_slot(ORGAN_SLOT_TONGUE))
missing_organs[ORGAN_SLOT_TONGUE] = "Tongue"
if(!isnull(humantarget.dna.species.mutantears) && !humantarget.get_organ_slot(ORGAN_SLOT_EARS))
missing_organs[ORGAN_SLOT_EARS] = "Ears"
if(!isnull(humantarget.dna.species.mutantears) && !humantarget.get_organ_slot(ORGAN_SLOT_EYES))
missing_organs[ORGAN_SLOT_EYES] = "Eyes"
return missing_organs
@@ -99,7 +99,7 @@
ADD_TRAIT(organ_owner, TRAIT_DISEASELIKE_SEVERITY_MEDIUM, type)
organ_owner.med_hud_set_status()
/obj/item/organ/appendix/get_status_text(advanced, add_tooltips)
/obj/item/organ/appendix/get_status_text(advanced, add_tooltips, colored)
if(!(organ_flags & ORGAN_FAILING) && inflamation_stage)
return conditional_tooltip("<font color='#ff9933'>Inflamed</font>", "Remove surgically.", add_tooltips)
return ..()
@@ -97,7 +97,7 @@
/obj/item/organ/heart/proc/is_beating()
return beating
/obj/item/organ/heart/get_status_text(advanced, add_tooltips)
/obj/item/organ/heart/get_status_text(advanced, add_tooltips, colored)
if(owner.has_status_effect(/datum/status_effect/heart_attack))
return conditional_tooltip("<font color='#cc3333'>Myocardial Infarction</font>", "Apply defibrillation immediately. Similar electric shocks may work in emergencies.", add_tooltips)
if((!beating && !(organ_flags & ORGAN_FAILING) && owner.needs_heart() && owner.stat != DEAD))