mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 01:22:24 +00:00
Ghetto diagnostics!
Grab + click with help intent to inspect the bodypart. You'll learn what injuries there are without stripping the guy. After delay, you also learn if there's a fracture here. Also surgical incisions are now visible on examine because goddamnit.
This commit is contained in:
@@ -274,76 +274,17 @@
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
|
||||
if(wound_flavor_text["[temp.name]"])
|
||||
wound_flavor_text["[temp.name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len > 0)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.internal && !temp.open) continue // can't see internal wounds
|
||||
var/this_wound_desc = W.desc
|
||||
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
|
||||
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
|
||||
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
|
||||
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
|
||||
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
|
||||
if(this_wound_desc in wound_descriptors)
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
continue
|
||||
wound_descriptors[this_wound_desc] = W.amount
|
||||
if(wound_descriptors.len)
|
||||
var/list/flavor_text = list()
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has several [wound]s"
|
||||
else
|
||||
flavor_text += " several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has a bunch of [wound]s"
|
||||
else
|
||||
flavor_text += " a ton of [wound]\s"
|
||||
var/flavor_text_string = ""
|
||||
for(var/text = 1, text <= flavor_text.len, text++)
|
||||
if(text == flavor_text.len && flavor_text.len > 1)
|
||||
flavor_text_string += ", and"
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on [t_his] [temp.name].</span><br>"
|
||||
wound_flavor_text["[temp.name]"] = flavor_text_string
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
|
||||
else if(temp.wounds.len > 0 || temp.open)
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
|
||||
if(temp.status & ORGAN_BLEEDING)
|
||||
is_bleeding["[temp.name]"] = 1
|
||||
else
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
if(temp.dislocated == 2)
|
||||
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.joint] is dislocated!</span><br>"
|
||||
if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
|
||||
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.name] is dented and swollen!</span><br>"
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
|
||||
@@ -354,9 +295,9 @@
|
||||
msg += wound_flavor_text["head"]
|
||||
else if(is_bleeding["head"])
|
||||
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
|
||||
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["chest"]
|
||||
else if(is_bleeding["chest"])
|
||||
if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["upper body"]
|
||||
else if(is_bleeding["upper body"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left arm"]
|
||||
@@ -374,9 +315,9 @@
|
||||
msg += wound_flavor_text["right hand"]
|
||||
else if(is_bleeding["right hand"])
|
||||
display_gloves = 1
|
||||
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["groin"]
|
||||
else if(is_bleeding["groin"])
|
||||
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["lower body"]
|
||||
else if(is_bleeding["lower body"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left leg"]
|
||||
|
||||
@@ -297,6 +297,22 @@
|
||||
assailant << "<span class='warning'>You are no longer pinning [affecting] to the ground.</span>"
|
||||
force_down = 0
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/E = H.get_organ(hit_zone)
|
||||
if(E && !(E.status & ORGAN_DESTROYED))
|
||||
assailant.visible_message("<span class='notice'>[assailant] starts inspecting [affecting]'s [E.name] carefully.</span>")
|
||||
if(do_after(assailant, 10) && affecting && E)
|
||||
if(E.wounds.len)
|
||||
assailant << "<span class='warning'>You find [E.get_wounds_desc()]</span>"
|
||||
else
|
||||
assailant << "<span class='notice'>You find no visible wounds.</span>"
|
||||
assailant << "<span class='notice'>Checking bones now...</span>"
|
||||
if(do_after(assailant, 15) && affecting && E)
|
||||
if(E.status & ORGAN_BROKEN)
|
||||
assailant << "<span class='warning'>The [E.encased ? E.encased : "bone in the [E.name]"] is fractured!</span>"
|
||||
H.custom_pain("Your [E.name] hurts where it's poked.")
|
||||
else
|
||||
assailant << "<span class='notice'>The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine.</span>"
|
||||
if(I_GRAB)
|
||||
if(state < GRAB_AGGRESSIVE)
|
||||
assailant << "<span class='warning'>You require a better grab to do this.</span>"
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
var/can_cut = (prob(brute*2) || sharp) && !(status & ORGAN_ROBOT)
|
||||
|
||||
// If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking
|
||||
// Non-vital organs are limited to max_damage. You can't kill someone by bludeonging their arm all the way to 200 -- you can
|
||||
// Non-vital organs are limited to max_damage. You can't kill someone by bludeonging their arm all the way to 200 -- you can
|
||||
// push them faster into paincrit though, as the additional damage is converted into shock.
|
||||
if(vital || (brute_dam + burn_dam + brute + burn) < max_damage || !config.limbs_can_break)
|
||||
if(brute)
|
||||
@@ -931,6 +931,58 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
"\red You hear a sickening sizzle.")
|
||||
disfigured = 1
|
||||
|
||||
/obj/item/organ/external/proc/get_wounds_desc()
|
||||
. = ""
|
||||
if(status & ORGAN_ROBOT)
|
||||
if(brute_dam)
|
||||
switch(brute_dam)
|
||||
if(0 to 20)
|
||||
. += " some dents"
|
||||
if(21 to INFINITY)
|
||||
. += pick(" a lot of dents"," severe denting")
|
||||
if(brute_dam && burn_dam)
|
||||
. += " and"
|
||||
if(burn_dam)
|
||||
switch(burn_dam)
|
||||
if(0 to 20)
|
||||
. += " some burns"
|
||||
if(21 to INFINITY)
|
||||
. += pick(" a lot of burns"," severe melting")
|
||||
return
|
||||
|
||||
var/list/wound_descriptors = list()
|
||||
if(open > 1)
|
||||
wound_descriptors["an open incision"] = 1
|
||||
else if (open)
|
||||
wound_descriptors["an incision"] = 1
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.internal && !open) continue // can't see internal wounds
|
||||
var/this_wound_desc = W.desc
|
||||
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
|
||||
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
|
||||
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
|
||||
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
|
||||
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
|
||||
if(wound_descriptors[this_wound_desc])
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
else
|
||||
wound_descriptors[this_wound_desc] = W.amount
|
||||
|
||||
if(wound_descriptors.len)
|
||||
var/list/flavor_text = list()
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? "what might be " : ""]a [wound]"
|
||||
if(2)
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? "what might be " : ""]a pair of [wound]s"
|
||||
if(3 to 5)
|
||||
flavor_text += "several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
flavor_text += "a ton of [wound]\s"
|
||||
return english_list(flavor_text)
|
||||
/****************************************************
|
||||
ORGAN DEFINES
|
||||
****************************************************/
|
||||
|
||||
Reference in New Issue
Block a user