mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
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:
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user