mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 23:54:14 +01:00
a8d1925a8b
## 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>
73 lines
2.7 KiB
Plaintext
73 lines
2.7 KiB
Plaintext
/**
|
|
* Get the organ object from the mob matching the passed in typepath
|
|
*
|
|
* Arguments:
|
|
* * typepath The typepath of the organ to get
|
|
*/
|
|
/mob/proc/get_organ_by_type(typepath)
|
|
RETURN_TYPE(/obj/item/organ)
|
|
return
|
|
|
|
/**
|
|
* Get organ objects by zone
|
|
*
|
|
* This will return a list of all the organs that are relevant to the zone that is passedin
|
|
*
|
|
* Arguments:
|
|
* * zone [a BODY_ZONE_X define](https://github.com/tgstation/tgstation/blob/master/code/__DEFINES/combat.dm#L187-L200)
|
|
*/
|
|
/mob/proc/get_organs_for_zone(zone)
|
|
return
|
|
|
|
/**
|
|
* Returns a list of all organs in specified slot
|
|
*
|
|
* Arguments:
|
|
* * slot Slot to get the organs from
|
|
*/
|
|
/mob/proc/get_organ_slot(slot)
|
|
return
|
|
|
|
/mob/living/carbon/get_organ_by_type(typepath)
|
|
return (locate(typepath) in organs)
|
|
|
|
/mob/living/carbon/get_organs_for_zone(zone, include_children = FALSE)
|
|
var/valid_organs = list()
|
|
for(var/obj/item/organ/organ as anything in organs)
|
|
if(zone == organ.zone)
|
|
valid_organs += organ
|
|
else if(include_children && zone == deprecise_zone(organ.zone))
|
|
valid_organs += organ
|
|
return valid_organs
|
|
|
|
/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
|