Self-Diagnostics Verb (#6098)

This commit is contained in:
ParadoxSpace
2019-03-04 14:54:50 -07:00
committed by Werner
parent 48bbd0d6da
commit d6e35a171a
5 changed files with 85 additions and 2 deletions
@@ -983,3 +983,39 @@
visible_message("<span class='notice'>\The [src] attaches \the [O] to \his body!</span>",
"<span class='notice'>You attach \the [O] to your body!</span>")
/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, "<span class='notice'>Performing self-diagnostic, please wait...</span>")
if (do_after(src, 10))
var/output = "<span class='notice'>Self-Diagnostic Results:\n</span>"
output += "Internal Temperature: [convert_k2c(bodytemperature)] Degrees Celsius\n"
output += "Current Charge Level: [nutrition]\n"
var/toxDam = getToxLoss()
if(toxDam)
output += "Blood Toxicity: <span class='warning'>[toxDam > 25 ? "Severe" : "Moderate"]</span>. Seek medical facilities for cleanup.\n"
else
output += "Blood Toxicity: <span style='color:green;'>OK</span>\n"
for(var/obj/item/organ/external/EO in organs)
if(EO.brute_dam || EO.burn_dam)
output += "[EO.name] - <span class='warning'>[EO.burn_dam + EO.brute_dam > ROBOLIMB_SELF_REPAIR_CAP ? "Heavy Damage" : "Light Damage"]</span>\n"
else
output += "[EO.name] - <span style='color:green;'>OK</span>\n"
for(var/obj/item/organ/IO in internal_organs)
if(IO.damage)
output += "[IO.name] - <span class='warning'>[IO.damage > 10 ? "Heavy Damage" : "Light Damage"]</span>\n"
else
output += "[IO.name] - <span style='color:green;'>OK</span>\n"
to_chat(src, output)
@@ -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(
@@ -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
@@ -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(
@@ -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."