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(