Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical scans will now show heartbroken status #6833

Merged
merged 4 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,10 @@

..()

/mob/living/carbon/human/proc/is_heart_broken()
VileBeggar marked this conversation as resolved.
Show resolved Hide resolved
var/datum/internal_organ/heart/heart = internal_organs_by_name["heart"]
return heart && heart.organ_status >= ORGAN_BROKEN

/mob/living/carbon/human/proc/is_lung_ruptured()
var/datum/internal_organ/lungs/L = internal_organs_by_name["lungs"]
return L && L.organ_status >= ORGAN_BRUISED
Expand All @@ -954,7 +958,6 @@
src.custom_pain("You feel a stabbing pain in your chest!", 1)
L.damage = L.min_bruised_damage


/mob/living/carbon/human/get_visible_implants(class = 0)
var/list/visible_objects = list()
for(var/obj/item/W in embedded_items)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living_healthscan.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ GLOBAL_LIST_INIT(known_implants, subtypesof(/obj/item/implant))

//snowflake :3
data["lung_ruptured"] = human_target_mob.is_lung_ruptured()
data["heart_broken"] = human_target_mob.is_heart_broken()
VileBeggar marked this conversation as resolved.
Show resolved Hide resolved

//shrapnel, limbs, limb damage, limb statflags, cyber limbs
var/core_fracture_detected = FALSE
Expand Down
7 changes: 5 additions & 2 deletions tgui/packages/tgui/interfaces/HealthScan.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const HealthScan = (props) => {
hugged,
detail_level,
permadead,
heart_broken,
advice,
species,
holocard,
Expand Down Expand Up @@ -115,9 +116,11 @@ export const HealthScan = (props) => {
<LabeledList.Item label="Condition">
<Box color={permadead ? 'red' : 'green'} bold={1}>
{permadead
? 'Permanently deceased'
? heart_broken
? 'Myocardial rupture, surgical intervention required'
: 'Permanently deceased'
: Synthetic
? 'Central power system shutdown, reboot possible.'
? 'Central power system shutdown, reboot possible'
: 'Cardiac arrest, defibrillation possible'}
</Box>
</LabeledList.Item>
Expand Down
Loading