From 8d8985d70e4e0e4b987170b9a86281e5fbd17e75 Mon Sep 17 00:00:00 2001 From: Heroman Date: Wed, 5 Jul 2023 16:48:48 +1000 Subject: [PATCH] Health Analyzer post-guidance improvements --- .../objects/items/devices/scanners/guide.dm | 54 +++++++++++-------- .../objects/items/devices/scanners/health.dm | 20 +++++++ maps/submaps/pois_vr/aerostat/Boombase.dmm | 4 +- 3 files changed, 55 insertions(+), 23 deletions(-) diff --git a/code/game/objects/items/devices/scanners/guide.dm b/code/game/objects/items/devices/scanners/guide.dm index d41116754a8..a0611653f23 100644 --- a/code/game/objects/items/devices/scanners/guide.dm +++ b/code/game/objects/items/devices/scanners/guide.dm @@ -1,8 +1,9 @@ /obj/item/device/healthanalyzer/verb/toggle_guide() - name = "Toggle Guidance" - desc = "Toggles whether or not \the [src] will provide guidance and instruction in addition to scanning." + set name = "Toggle Guidance" + set desc = "Toggles whether or not \the [src] will provide guidance and instruction in addition to scanning." + set category = "Object" guide = !guide - to_chat(usr, "You toggle \the [src]'s guidance system.") + to_chat(usr, "You toggle \the [src]'s guidance system [guide ? "on" : "off"].") /obj/item/device/healthanalyzer/guide @@ -37,48 +38,59 @@ var/bloodloss = FALSE var/robotparts = FALSE - for(var/obj/item/organ/org in M.organs) + for(var/obj/item/organ/external/org in M.organs) + if(!istype(org)) //how? + continue if(org.robotic >= ORGAN_ROBOT) robotparts = TRUE continue - if(istype(org,/obj/item/organ/external)) - var/obj/item/organ/external/e = org - if(e.status & ORGAN_BLEEDING) - bleeding_external = TRUE - if(e.status & ORGAN_BROKEN && (!e.splinted)) - bone = TRUE - if(istype(org,/obj/item/organ/internal)) - if(org.status & ORGAN_BLEEDING) + for(var/datum/wound/W in org.wounds) + if(W.internal) bleeding_internal = TRUE - if(org.damage) - organ = TRUE - if(org.germ_level > INFECTION_LEVEL_ONE) + break + if(org.status & ORGAN_BLEEDING) + bleeding_external = TRUE + if(org.status & ORGAN_BROKEN && (!org.splinted)) + bone = TRUE + if(org.has_infected_wound()) infection = TRUE + + for(var/obj/item/organ/org in M.internal_organs) + if(!istype(org)) //how? + continue + if(org.robotic >= ORGAN_ROBOT) + robotparts = TRUE + continue + if(org.status & ORGAN_BLEEDING) + bleeding_internal = TRUE + if(org.damage >= 1 && !istype(org, /obj/item/organ/internal/brain)) + organ = TRUE + var/blood_volume = M.vessel.get_reagent_amount("blood") if(blood_volume <= M.species.blood_volume*M.species.blood_level_safe) bloodloss = TRUE if(bleeding_external) dat += "Surface bleeding - Bandage immediately or apply brute-damage fixing chemicals (i.e. Bicaridine) if no bandages available.
" - if(bleeding_internal && (advscan >= 1 && showadvscan == 1)) + if(bleeding_internal) dat += "Internal bleeding - Commence internal vein repair surgery or apply clotting chemicals (i.e. Myelamine).
" if(M.getOxyLoss()) dat += "Suffociation - Give Dexalin or Dexaline Plus. Check for heart or lung damage.
" if(infection) dat += "Infection - Give Spaceacilin. If severe, overdose on Spaceacilin and monitor until well.
" - if((M.getBrainLoss() >= 1 && advscan >= 2 && showadvscan == 1) || M.getBrainLoss() >= 10) - dat += "Brain damage - Commence brain repair surgery, apply Alkysine, or universal organ-repair chemicals. (i.e. Peridaxon)
" + if(M.getBrainLoss() >= 1) + dat += "Brain damage - Commence brain repair surgery, apply Alkysine, or universal organ-repair chemicals. (i.e. Peridaxon).
" if(M.radiation || M.accumulated_rads) dat += "Radiation - Give Hyroanlin or Arithazine. Monitor for genetic damage.
" - if(organ && (advscan >= 1 && showadvscan == 1)) + if(organ) dat += "Organ damage - Give Peridaxon. Perform full body scan for targetted organ repair surgery.
" if(bloodloss) dat += "Low blood volume - Commence blood transfusion via IV drip or provide blood-restorative chemicals (i.e. Iron)." if(M.getToxLoss()) dat += "Toxins - Give Dylovene or Cartholine. Vomitting is normal and helpful. Tends to be a symptom of larger issues, such as infection.
" if(M.getBruteLoss()) - dat += "Brute Trauma - Bandage wounded body part. Give Bicaridine or Vermicetol.
" + dat += "Brute trauma - Bandage wounded body part. Give Bicaridine or Vermicetol.
" if(M.getFireLoss()) dat += "Surface burn - Salve wounded body part in ointment. Give Kelotane or Dermaline. Check for infections.
" if(M.getCloneLoss()) @@ -86,7 +98,7 @@ if(bone) dat += "Bone fracture - Splint damaged area. Treat with bone repair surgery or Osteodaxon after treating brute damage.
" if(M.virus2.len) - dat += "Viral infection - Proceed with virology pathogen curing procedures or apply antiviral chemicals (i.e. Corophizine)
" + dat += "Viral infection - Proceed with virology pathogen curing procedures or apply antiviral chemicals (i.e. Corophizine).
" if(robotparts) dat += "Robotic body parts - Should not be repaired by medical personnel, refer to robotics if damaged." diff --git a/code/game/objects/items/devices/scanners/health.dm b/code/game/objects/items/devices/scanners/health.dm index 18c23fe0cb6..25efb57e61e 100644 --- a/code/game/objects/items/devices/scanners/health.dm +++ b/code/game/objects/items/devices/scanners/health.dm @@ -250,6 +250,26 @@ var/fracture_dat = "" // All the fractures var/infection_dat = "" // All the infections var/ib_dat = "" // All the IB + var/int_damage_acc = 0 // For internal organs + for(var/obj/item/organ/internal/i in H.internal_organs) + if(!i || i.robotic >= ORGAN_ROBOT || istype(i, /obj/item/organ/internal/brain)) + continue // not there or robotic or brain which is handled separately + if(i.damage || i.status & ORGAN_DEAD) + int_damage_acc += (i.damage + ((i.status & ORGAN_DEAD) ? 30 : 0)) + if(advscan >= 2 && showadvscan == 1) + if(advscan >= 3) + var/dam_adj + if(i.damage >= i.min_broken_damage || i.status & ORGAN_DEAD) + dam_adj = "Severe" + else if(i.damage >= i.min_bruised_damage) + dam_adj = "Moderate" + else + dam_adj = "Mild" + dat += "[dam_adj] damage detected to subject's [i.name].
" + else + dat += "Damage detected to subject's [i.name].
" + if(int_damage_acc >= 1 && (advscan < 2 || !showadvscan)) + dat += "Damage detected to subject's internal organs.
" for(var/obj/item/organ/external/e in H.organs) if(!e) continue diff --git a/maps/submaps/pois_vr/aerostat/Boombase.dmm b/maps/submaps/pois_vr/aerostat/Boombase.dmm index 180d292b4fd..bcc411e86a9 100644 --- a/maps/submaps/pois_vr/aerostat/Boombase.dmm +++ b/maps/submaps/pois_vr/aerostat/Boombase.dmm @@ -57,7 +57,7 @@ /turf/simulated/floor/tiled/techfloor/virgo2, /area/submap/virgo2/BoomBase) "ao" = ( -/mob/living/simple_mob/animal/space/jelly, +/mob/living/simple_mob/vore/jelly, /turf/simulated/floor/tiled/techfloor/virgo2, /area/submap/virgo2/BoomBase) "ap" = ( @@ -96,7 +96,7 @@ /area/submap/virgo2/BoomBase) "ax" = ( /obj/effect/decal/cleanable/dirt, -/mob/living/simple_mob/animal/space/jelly, +/mob/living/simple_mob/vore/jelly, /turf/simulated/floor/tiled/techfloor/virgo2, /area/submap/virgo2/BoomBase) "ay" = (