From d6e35a171a67b0ea711b0ef66027fa5e7a67d133 Mon Sep 17 00:00:00 2001 From: ParadoxSpace Date: Mon, 4 Mar 2019 14:54:50 -0700 Subject: [PATCH] Self-Diagnostics Verb (#6098) --- .../mob/living/carbon/human/human_powers.dm | 36 ++++++++++++++++ .../species/station/machine_subspecies.dm | 3 +- .../carbon/human/species/station/station.dm | 4 ++ .../species/station/unathi_subspecies.dm | 3 +- html/changelogs/paradoxspace-statusreport.yml | 41 +++++++++++++++++++ 5 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/paradoxspace-statusreport.yml diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 0cdd9af418a..d9169a256f4 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -983,3 +983,39 @@ visible_message("\The [src] attaches \the [O] to \his body!", "You attach \the [O] to your body!") + +/mob/living/carbon/human/proc/self_diagnostics() + set name = "Self-Diagnostics" + set desc = "Run an internal self-diagnostic to check for damage." + set category = "IC" + + if(stat == DEAD) return + + to_chat(src, "Performing self-diagnostic, please wait...") + if (do_after(src, 10)) + var/output = "Self-Diagnostic Results:\n" + + output += "Internal Temperature: [convert_k2c(bodytemperature)] Degrees Celsius\n" + + output += "Current Charge Level: [nutrition]\n" + + var/toxDam = getToxLoss() + if(toxDam) + output += "Blood Toxicity: [toxDam > 25 ? "Severe" : "Moderate"]. Seek medical facilities for cleanup.\n" + else + output += "Blood Toxicity: OK\n" + + for(var/obj/item/organ/external/EO in organs) + if(EO.brute_dam || EO.burn_dam) + output += "[EO.name] - [EO.burn_dam + EO.brute_dam > ROBOLIMB_SELF_REPAIR_CAP ? "Heavy Damage" : "Light Damage"]\n" + else + output += "[EO.name] - OK\n" + + for(var/obj/item/organ/IO in internal_organs) + if(IO.damage) + output += "[IO.name] - [IO.damage > 10 ? "Heavy Damage" : "Light Damage"]\n" + else + output += "[IO.name] - OK\n" + + to_chat(src, output) + diff --git a/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm index ef134f5aa5b..f86e6de05e4 100644 --- a/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm @@ -179,7 +179,8 @@ inherent_verbs = list( /mob/living/carbon/human/proc/self_destruct, /mob/living/carbon/human/proc/detonate_flechettes, - /mob/living/carbon/human/proc/state_laws + /mob/living/carbon/human/proc/state_laws, + /mob/living/carbon/human/proc/self_diagnostics ) has_organ = list( diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index b06193e408b..d5283d15b02 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -469,6 +469,10 @@ body_temperature = null passive_temp_gain = 10 // This should cause IPCs to stabilize at ~80 C in a 20 C environment. + inherent_verbs = list( + /mob/living/carbon/human/proc/self_diagnostics + ) + flags = IS_IPC appearance_flags = HAS_SKIN_COLOR | HAS_HAIR_COLOR spawn_flags = CAN_JOIN | IS_WHITELISTED diff --git a/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm index e86e46a1174..fc6c9ccf2f4 100644 --- a/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm @@ -53,7 +53,8 @@ /mob/living/proc/devour, /mob/living/carbon/human/proc/regurgitate, /mob/living/carbon/human/proc/detach_limb, - /mob/living/carbon/human/proc/attach_limb + /mob/living/carbon/human/proc/attach_limb, + /mob/living/carbon/human/proc/self_diagnostics ) has_organ = list( diff --git a/html/changelogs/paradoxspace-statusreport.yml b/html/changelogs/paradoxspace-statusreport.yml new file mode 100644 index 00000000000..964b097b821 --- /dev/null +++ b/html/changelogs/paradoxspace-statusreport.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: ParadoxSpace + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Synthetic bipeds on the station can now use the Self-Diagnostics verb to check their health more accurately."