mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge branch 'master' of github.com:Baystation12/Baystation12
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
|
||||
//General
|
||||
if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA)
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]" ,\
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : user.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
return 0
|
||||
@@ -123,12 +123,12 @@
|
||||
for(var/blood in A.blood_DNA)
|
||||
user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]"
|
||||
if(prob(80) || !A.fingerprints)
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]" ,\
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : user.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"You finish scanning \the [A].",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
return 0
|
||||
else
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]\n[user.get_gender_form("It")] seems to perk up slightly at the readout." ,\
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : user.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]\n[user.get_visible_gender() == MALE ? "He" : user.get_visible_gender() == FEMALE ? "She" : "They"] seems to perk up slightly at the readout." ,\
|
||||
"The results of the scan pique your interest.",\
|
||||
"You hear a faint hum of electrical equipment, and someone making a thoughtful noise.")
|
||||
return 0
|
||||
|
||||
@@ -49,13 +49,13 @@
|
||||
if (M.hand)
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["l_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
|
||||
@@ -100,13 +100,13 @@
|
||||
if (M.hand)
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["l_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
visible_message("\blue [src] examines [get_gender_form("itself")].", \
|
||||
visible_message("\blue [src] examines [get_visible_gender() == MALE ? "himself" : get_visible_gender() == FEMALE ? "herself" : "themselves"].", \
|
||||
"\blue You check yourself for injuries.", \
|
||||
"You hear a rustle, as someone checks about their person.")
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
status = "blugeoned"
|
||||
if(brutedamage > 40)
|
||||
status = "mangled"
|
||||
if(org.bleeding && brutedamage)
|
||||
if(org.status & BLEEDING && brutedamage)
|
||||
status += ",[burndamage ? "" : " and"] bleeding[burndamage ? "," : ""]"
|
||||
if(brutedamage > 0 && burndamage > 0)
|
||||
status += " and "
|
||||
@@ -235,7 +235,7 @@
|
||||
status += "blistered"
|
||||
else if(burndamage > 0)
|
||||
status += "numb"
|
||||
if(org.destroyed)
|
||||
if(org.status & DESTROYED)
|
||||
status = "MISSING!"
|
||||
|
||||
if(status == "")
|
||||
|
||||
@@ -27,19 +27,37 @@
|
||||
skipears = src.head.flags_inv & HIDEEARS
|
||||
|
||||
// crappy hacks because you can't do \his[src] etc. I'm sorry this proc is so unreadable, blame the text macros :<
|
||||
var/list/proper_forms = get_visible_gender()
|
||||
var/t_He = proper_forms["It"] //capitalised for use at the start of each line.
|
||||
var/t_his = proper_forms["its"]
|
||||
var/t_him = proper_forms["it"]
|
||||
var/t_has = proper_forms["has"]
|
||||
var/t_is = proper_forms["is"]
|
||||
var/t_He = "It" //capitalised for use at the start of each line.
|
||||
var/t_his = "its"
|
||||
var/t_him = "it"
|
||||
var/t_has = "has"
|
||||
var/t_is = "is"
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is "
|
||||
if(src.icon)
|
||||
msg += "\icon[src.icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
|
||||
else
|
||||
switch(get_visible_gender())
|
||||
if(MALE)
|
||||
t_He = "He"
|
||||
t_his = "his"
|
||||
t_him = "him"
|
||||
if(FEMALE)
|
||||
t_He = "She"
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
if(NEUTER)
|
||||
t_He = "They"
|
||||
t_his = "their"
|
||||
t_him = "them"
|
||||
t_has = "have"
|
||||
t_is = "are"
|
||||
|
||||
if(mutantrace == "lizard")
|
||||
examine_text = "one of those lizard-like Soghuns"
|
||||
if(mutantrace == "skrell")
|
||||
examine_text = "one of those gelatinous Skrells"
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is "
|
||||
if(icon)
|
||||
msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
|
||||
|
||||
@@ -239,17 +257,17 @@
|
||||
if (src.digitalcamo)
|
||||
msg += "[t_He] [t_is] repulsively uncanny!\n"
|
||||
|
||||
var/list/wound_descriptions = list()
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
var/list/is_bleeding = list()
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp)
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
is_destroyed["[temp.display_name]"] = 1
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n"
|
||||
continue
|
||||
if(temp.robot)
|
||||
if(temp.status & ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
|
||||
continue
|
||||
@@ -268,192 +286,52 @@
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
else if(temp.wounds)
|
||||
var/list/wounds = list(list(),list(),list(),list(),list(),list())
|
||||
for(var/datum/organ/wound/w in temp.wounds)
|
||||
switch(w.healing_state)
|
||||
if(0)
|
||||
var/list/cut = wounds[1]
|
||||
cut += w
|
||||
wounds[1] = cut
|
||||
if(1)
|
||||
var/list/cut = wounds[2]
|
||||
cut += w
|
||||
wounds[2] = cut
|
||||
if(2)
|
||||
var/list/cut = wounds[3]
|
||||
cut += w
|
||||
wounds[3] = cut
|
||||
if(3)
|
||||
var/list/cut = wounds[4]
|
||||
cut += w
|
||||
wounds[4] = cut
|
||||
if(4)
|
||||
var/list/cut = wounds[5]
|
||||
cut += w
|
||||
wounds[5] = cut
|
||||
if(5)
|
||||
var/list/cut = wounds[6]
|
||||
cut += w
|
||||
wounds[6] = cut
|
||||
wound_descriptions["[temp.display_name]"] = wounds
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
//Now that we have a big list of all the wounds, on all the limbs.
|
||||
var/list/is_bleeding = list()
|
||||
for(var/named in wound_descriptions)
|
||||
var/list/wound_states = wound_descriptions[named]
|
||||
var/list/flavor_text = list()
|
||||
for(var/i = 1, i <= 6, i++)
|
||||
var/list/wound_state = wound_states[i] //All wounds at this level of healing.
|
||||
var/list/tally = list("cut" = 0, "deep cut" = 0, "flesh wound" = 0, "gaping wound" = 0, "big gaping wound" = 0, "massive wound" = 0,\
|
||||
"tiny bruise" = 0, "small bruise" = 0, "moderate bruise" = 0, "large bruise" = 0, "huge bruise" = 0, "monumental bruise" = 0,\
|
||||
"small burn" = 0, "moderate burn" = 0, "large burn" = 0, "severe burn" = 0, "deep burn" = 0, "carbonised area" = 0) //How many wounds of what size.
|
||||
for(var/datum/organ/wound/w in wound_state)
|
||||
if(w.bleeding && !is_bleeding[named]) is_bleeding[named] = 1
|
||||
switch(w.wound_size)
|
||||
if(1)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["cut"] += 1
|
||||
if(1)
|
||||
tally["tiny bruise"] += 1
|
||||
if(2)
|
||||
tally["small burn"] += 1
|
||||
if(2)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["deep cut"] += 1
|
||||
if(1)
|
||||
tally["small bruise"] += 1
|
||||
if(2)
|
||||
tally["moderate burn"] += 1
|
||||
if(3)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["flesh wound"] += 1
|
||||
if(1)
|
||||
tally["moderate bruise"] += 1
|
||||
if(2)
|
||||
tally["large burn"] += 1
|
||||
if(4)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["gaping wound"] += 1
|
||||
if(1)
|
||||
tally["large bruise"] += 1
|
||||
if(2)
|
||||
tally["severe burn"] += 1
|
||||
if(5)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["big gaping wound"] += 1
|
||||
if(1)
|
||||
tally["huge bruise"] += 1
|
||||
if(2)
|
||||
tally["deep burn"] += 1
|
||||
if(6)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["massive wound"] += 1
|
||||
if(1)
|
||||
tally["monumental bruise"] += 1
|
||||
if(2)
|
||||
tally["carbonised area"] += 1
|
||||
for(var/tallied in tally)
|
||||
if(!tally[tallied])
|
||||
continue
|
||||
//if(flavor_text_string && tally[tallied])
|
||||
// for(
|
||||
// flavor_text_string += pick(list(", as well as", ", in addition to")) //add more later.
|
||||
var/tallied_rename = list("cut" = "cut","deep cut" = "deep cut", "flesh wound" = "flesh wound",\
|
||||
"gaping wound" = "gaping wound", "big gaping wound" = "big gaping wound", "massive wound" = "massive wound",\
|
||||
"tiny bruise" = "tiny bruise", "small bruise" = "small bruise", "moderate bruise" = "moderate bruise",\
|
||||
"large bruise" = "large bruise", "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
|
||||
"small burn" = "small burn", "moderate burn" = "moderate burn", "large burn" = "large burn",\
|
||||
"severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area")
|
||||
switch(i)
|
||||
if(2) //Healing wounds.
|
||||
if(tallied in list("cut","small burn"))
|
||||
else if(temp.wound_descs)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/time in temp.wound_descs)
|
||||
for(var/wound in temp.wound_descs[time])
|
||||
if(wound in wound_descriptors)
|
||||
wound_descriptors[wound]++
|
||||
continue
|
||||
tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\
|
||||
"gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\
|
||||
"massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\
|
||||
"moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\
|
||||
"huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
|
||||
"moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\
|
||||
"severe burn" = "severe salved burn", "deep burn" = "deep salved burn",\
|
||||
"carbonised area" = "treated carbonised area")
|
||||
if(3)
|
||||
if(tallied in list("cut","tiny bruise","small burn"))
|
||||
continue
|
||||
tallied_rename = list("deep cut" = "fading cut", "flesh wound" = "small healing wound",\
|
||||
"gaping wound" = "healing wound", "big gaping wound" = "big healing wound",\
|
||||
"massive wound" = "massive healing wound", "small bruise" = "tiny bruise",\
|
||||
"moderate bruise" = "small bruise", "large bruise" = "moderate bruise",\
|
||||
"huge bruise" = "large bruise", "monumental bruise" = "huge bruise",\
|
||||
"moderate burn" = "healing moderate burn", "large burn" = "healing large burn",\
|
||||
"severe burn" = "healing severe burn", "deep burn" = "healing deep burn",\
|
||||
"carbonised area" = "slowly healing carbonised area")
|
||||
if(4)
|
||||
if(tallied in list("cut","deep cut","tiny bruise", "small bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("flesh wound" = "small red scar", "gaping wound" = "angry straight scar",\
|
||||
"big gaping wound" = "jagged angry scar", "massive wound" = "gigantic angry scar",\
|
||||
"moderate bruise" = "tiny bruise", "large bruise" = "small bruise",\
|
||||
"huge bruise" = "moderate bruise", "monumental bruise" = "large bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area")
|
||||
if(5)
|
||||
if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\
|
||||
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
|
||||
"large bruise" = "tiny bruise",\
|
||||
"huge bruise" = "small bruise", "monumental bruise" = "moderate bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "large scarred area")
|
||||
if(6)
|
||||
if(tallied in list("cut","deep cut","flesh wound","tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("gaping wound" = "straight scar",\
|
||||
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
|
||||
"monumental bruise" = "tiny bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "large scarred area")
|
||||
wound_descriptors[wound] = 1
|
||||
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")
|
||||
switch(tally[tallied])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has several [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " several [tallied_rename[tallied]]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has a bunch of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " a ton of [tallied_rename[tallied]]s"
|
||||
if(flavor_text.len)
|
||||
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] [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
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] [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
if(temp.status & BLEEDING)
|
||||
is_bleeding["[named]"] = 1
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
|
||||
//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.
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
|
||||
var/mutantrace = null
|
||||
|
||||
var/bloodloss = 0
|
||||
var/datum/reagents/vessel
|
||||
var/pale = 0
|
||||
var/examine_text = ""
|
||||
@@ -285,7 +284,7 @@
|
||||
|
||||
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
|
||||
var/datum/organ/external/o = organs["[organ]"]
|
||||
if(o.broken)
|
||||
if(o.status & BROKEN)
|
||||
tally += 6
|
||||
|
||||
if(wear_suit)
|
||||
@@ -778,7 +777,7 @@
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
var/datum/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
|
||||
if(!affecting || affecting.destroyed) return
|
||||
if(!affecting || affecting.status & DESTROYED) return
|
||||
if (istype(O, /obj/effect/immovablerod))
|
||||
affecting.take_damage(101, 0)
|
||||
else
|
||||
@@ -948,29 +947,29 @@
|
||||
// Gloves
|
||||
var/datum/organ/external/lo = organs["l_hand"]
|
||||
var/datum/organ/external/ro = organs["r_hand"]
|
||||
if (!lo.destroyed || !ro.destroyed)
|
||||
if (!(lo.status & DESTROYED && ro.status & DESTROYED))
|
||||
if (gloves)
|
||||
var/t1 = gloves.item_state
|
||||
if (!t1)
|
||||
t1 = gloves.icon_state
|
||||
var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
|
||||
if(lo.destroyed)
|
||||
if(lo.status & DESTROYED)
|
||||
gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
if(ro.destroyed)
|
||||
if(ro.status & DESTROYED)
|
||||
gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
clothing_overlays += image(gloves_icon, "layer" = GLOVES_LAYER)
|
||||
if (gloves.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
|
||||
if(lo.destroyed)
|
||||
if(lo.status & DESTROYED)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
else if(ro.status & DESTROYED)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
clothing_overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER)
|
||||
else if (blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
|
||||
if(lo.destroyed)
|
||||
if(lo.status & DESTROYED)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
else if(ro.status & DESTROYED)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
clothing_overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER)
|
||||
|
||||
@@ -990,19 +989,19 @@
|
||||
// Shoes
|
||||
lo = organs["l_foot"]
|
||||
ro = organs["r_foot"]
|
||||
if ((!lo.destroyed || !ro.destroyed) && shoes)
|
||||
if (!(lo.status & DESTROYED && ro.status & DESTROYED) && shoes)
|
||||
var/t1 = shoes.icon_state
|
||||
var/icon/shoes_icon = new /icon("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
|
||||
if(lo.destroyed && !lying)
|
||||
if(lo.status & DESTROYED && !lying)
|
||||
shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed && !lying)
|
||||
else if(ro.status & DESTROYED && !lying)
|
||||
shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY)
|
||||
clothing_overlays += image(shoes_icon, "layer" = SHOES_LAYER)
|
||||
if (shoes.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "shoeblood[!lying ? "" : "2"]")
|
||||
if(lo.destroyed)
|
||||
if(lo.status & DESTROYED)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
else if(ro.status & DESTROYED)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
clothing_overlays += image("icon" = stain_icon, "layer" = B_SHOES_LAYER) // Radio
|
||||
|
||||
@@ -1389,7 +1388,7 @@
|
||||
lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(!head.destroyed)
|
||||
if(!(head.status & DESTROYED))
|
||||
stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
@@ -1398,12 +1397,12 @@
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !part.destroyed)
|
||||
&& !(part.status & DESTROYED))
|
||||
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
|
||||
if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('human.dmi', "[part.icon_name]_l")
|
||||
if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
@@ -1443,7 +1442,7 @@
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& part.destroyed)
|
||||
&& (part.status & DESTROYED))
|
||||
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
|
||||
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
|
||||
|
||||
@@ -1473,7 +1472,7 @@
|
||||
if(organs)
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(head)
|
||||
if(head.destroyed)
|
||||
if(head.status & DESTROYED)
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
return
|
||||
@@ -2598,7 +2597,7 @@ It can still be worn/put on as normal.
|
||||
var/amount = 0.0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.robot) amount+= O.brute_dam
|
||||
if(!(O.status & ROBOT)) amount+= O.brute_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/human/adjustBruteLoss(var/amount, var/used_weapon = null)
|
||||
@@ -2611,7 +2610,7 @@ It can still be worn/put on as normal.
|
||||
var/amount = 0.0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.robot) amount+= O.burn_dam
|
||||
if(!(O.status & ROBOT)) amount+= O.burn_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/human/adjustFireLoss(var/amount,var/used_weapon = null)
|
||||
@@ -2784,12 +2783,6 @@ It can still be worn/put on as normal.
|
||||
src.tkdisable = 0
|
||||
|
||||
/mob/living/carbon/human/get_visible_gender()
|
||||
var/skip_gender = (wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
|
||||
|
||||
if( !skip_gender ) //big suits/masks make it hard to tell their gender
|
||||
switch(gender)
|
||||
if(MALE)
|
||||
return list("It" = "He", "its" = "his", "it" = "he", "has" = "has", "is" = "is", "itself" = "himself")
|
||||
if(FEMALE)
|
||||
return list("It" = "She", "its" = "her", "it" = "she", "has" = "has", "is" = "is", "itself" = "herself")
|
||||
return list("It" = "They", "its" = "their", "it" = "them", "has" = "have", "is" = "are", "itself" = "themselves")
|
||||
if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
|
||||
return NEUTER
|
||||
return gender
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(O.destroyed) damage_appearance += "d"
|
||||
if(O.status & DESTROYED) damage_appearance += "d"
|
||||
else
|
||||
damage_appearance += O.damage_state
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.destroyed)
|
||||
if(!(O.status & DESTROYED))
|
||||
O.update_icon()
|
||||
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
|
||||
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
|
||||
@@ -68,7 +68,7 @@
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ || organ.destroyed) return 0
|
||||
if(!organ || organ.status & DESTROYED) return 0
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ emp_act
|
||||
O.emp_act(severity)
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/O = organs[named]
|
||||
if(O.destroyed) continue
|
||||
if(O.status & DESTROYED) continue
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
@@ -125,7 +125,7 @@ emp_act
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
if(!affecting.destroyed)
|
||||
if(!(affecting.status & DESTROYED))
|
||||
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
|
||||
else
|
||||
user << "What [affecting]?"
|
||||
|
||||
@@ -209,11 +209,6 @@
|
||||
adjustToxLoss(-2)
|
||||
adjustOxyLoss(-2)
|
||||
adjustFireLoss(-2)
|
||||
|
||||
for(var/datum/organ/external/org in organs)
|
||||
if(org.robot) continue
|
||||
org.brute_dam = max(org.brute_dam - 2, 0)
|
||||
org.burn_dam = max(org.burn_dam - 2, 0)
|
||||
updatehealth()
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/morph in src.verbs))
|
||||
@@ -909,7 +904,7 @@
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/E = organs[name]
|
||||
E.process()
|
||||
if(E.robot && prob(E.brute_dam + E.burn_dam))
|
||||
if(E.status & ROBOT && prob(E.brute_dam + E.burn_dam))
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
@@ -933,7 +928,7 @@
|
||||
else if(E.name == "l_leg" || E.name == "l_foot" \
|
||||
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
|
||||
leg_tally-- // let it fail even if just foot&leg
|
||||
if(E.broken || E.destroyed)
|
||||
if(E.status & BROKEN || E.status & DESTROYED)
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
@@ -970,9 +965,7 @@
|
||||
//At this point, we dun care which blood we are adding to, as long as they get more blood.
|
||||
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
|
||||
|
||||
if(!blood_volume) // what is this for? if their blood_volume is 0, they'll die anyway
|
||||
bloodloss = 0
|
||||
else if(blood_volume > 448)
|
||||
if(blood_volume > 448)
|
||||
if(pale)
|
||||
pale = 0
|
||||
update_body()
|
||||
@@ -1096,15 +1089,12 @@
|
||||
var/blood_max = 0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/temp = organs[name]
|
||||
if(!temp.bleeding || temp.robot)
|
||||
if(!(temp.status & BLEEDING) || temp.status & ROBOT)
|
||||
continue
|
||||
var/lose_blood = temp.total_wound_bleeding()
|
||||
if(lose_blood)
|
||||
drip(lose_blood)
|
||||
blood_max += lose_blood
|
||||
if(temp.destroyed && !temp.gauzed)
|
||||
blood_max += 2
|
||||
if(temp.status & DESTROYED && !(temp.status & GAUZED))
|
||||
blood_max += 10 //Yer missing a fucking limb.
|
||||
bloodloss = min(bloodloss+1,sqrt(blood_max))
|
||||
drip(blood_max)
|
||||
if (eye_blind)
|
||||
eye_blind--
|
||||
blinded = 1
|
||||
|
||||
@@ -22,200 +22,80 @@
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive, with no signs of life.</span>\n"
|
||||
else
|
||||
msg += "<span class='warning'>"
|
||||
var/list/wound_descriptions = list()
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp)
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
is_destroyed["[temp.display_name]"] = 1
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>It is missing its [temp.display_name].</b></span>\n"
|
||||
continue
|
||||
if(temp.wounds)
|
||||
var/list/wounds = list(list(),list(),list(),list(),list(),list())
|
||||
for(var/datum/organ/wound/w in temp.wounds)
|
||||
switch(w.healing_state)
|
||||
if(0)
|
||||
var/list/cut = wounds[1]
|
||||
cut += w
|
||||
wounds[1] = cut
|
||||
if(1)
|
||||
var/list/cut = wounds[2]
|
||||
cut += w
|
||||
wounds[2] = cut
|
||||
if(2)
|
||||
var/list/cut = wounds[3]
|
||||
cut += w
|
||||
wounds[3] = cut
|
||||
if(3)
|
||||
var/list/cut = wounds[4]
|
||||
cut += w
|
||||
wounds[4] = cut
|
||||
if(4)
|
||||
var/list/cut = wounds[5]
|
||||
cut += w
|
||||
wounds[5] = cut
|
||||
if(5)
|
||||
var/list/cut = wounds[6]
|
||||
cut += w
|
||||
wounds[6] = cut
|
||||
wound_descriptions["[temp.display_name]"] = wounds
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
//Now that we have a big list of all the wounds, on all the limbs.
|
||||
var/list/is_bleeding = list()
|
||||
for(var/named in wound_descriptions)
|
||||
var/list/wound_states = wound_descriptions[named]
|
||||
var/list/flavor_text = list()
|
||||
for(var/i = 1, i <= 6, i++)
|
||||
var/list/wound_state = wound_states[i] //All wounds at this level of healing.
|
||||
var/list/tally = list("cut" = 0, "deep cut" = 0, "flesh wound" = 0, "gaping wound" = 0, "big gaping wound" = 0, "massive wound" = 0,\
|
||||
"tiny bruise" = 0, "small bruise" = 0, "moderate bruise" = 0, "large bruise" = 0, "huge bruise" = 0, "monumental bruise" = 0,\
|
||||
"small burn" = 0, "moderate burn" = 0, "large burn" = 0, "severe burn" = 0, "deep burn" = 0, "carbonised area" = 0) //How many wounds of what size.
|
||||
for(var/datum/organ/wound/w in wound_state)
|
||||
if(w.bleeding && !is_bleeding[named]) is_bleeding[named] = 1
|
||||
switch(w.wound_size)
|
||||
if(1)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["cut"] += 1
|
||||
if(1)
|
||||
tally["tiny bruise"] += 1
|
||||
if(2)
|
||||
tally["small burn"] += 1
|
||||
if(2)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["deep cut"] += 1
|
||||
if(1)
|
||||
tally["small bruise"] += 1
|
||||
if(2)
|
||||
tally["moderate burn"] += 1
|
||||
if(3)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["flesh wound"] += 1
|
||||
if(1)
|
||||
tally["moderate bruise"] += 1
|
||||
if(2)
|
||||
tally["large burn"] += 1
|
||||
if(4)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["gaping wound"] += 1
|
||||
if(1)
|
||||
tally["large bruise"] += 1
|
||||
if(2)
|
||||
tally["severe burn"] += 1
|
||||
if(5)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["big gaping wound"] += 1
|
||||
if(1)
|
||||
tally["huge bruise"] += 1
|
||||
if(2)
|
||||
tally["deep burn"] += 1
|
||||
if(6)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["massive wound"] += 1
|
||||
if(1)
|
||||
tally["monumental bruise"] += 1
|
||||
if(2)
|
||||
tally["carbonised area"] += 1
|
||||
for(var/tallied in tally)
|
||||
if(!tally[tallied])
|
||||
if(temp.status & ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>It has a robot [temp.display_name]!</span>\n"
|
||||
continue
|
||||
//if(flavor_text_string && tally[tallied])
|
||||
// for(
|
||||
// flavor_text_string += pick(list(", as well as", ", in addition to")) //add more later.
|
||||
var/tallied_rename = list("cut" = "cut","deep cut" = "deep cut", "flesh wound" = "flesh wound",\
|
||||
"gaping wound" = "gaping wound", "big gaping wound" = "big gaping wound", "massive wound" = "massive wound",\
|
||||
"tiny bruise" = "tiny bruise", "small bruise" = "small bruise", "moderate bruise" = "moderate bruise",\
|
||||
"large bruise" = "large bruise", "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
|
||||
"small burn" = "small burn", "moderate burn" = "moderate burn", "large burn" = "large burn",\
|
||||
"severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area")
|
||||
switch(i)
|
||||
if(2) //Healing wounds.
|
||||
if(tallied in list("cut","small burn"))
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>It has a robot [temp.display_name], it has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.display_name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
else if(temp.wound_descs)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/time in temp.wound_descs)
|
||||
for(var/wound in temp.wound_descs[time])
|
||||
if(wound in wound_descriptors)
|
||||
wound_descriptors[wound]++
|
||||
continue
|
||||
tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\
|
||||
"gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\
|
||||
"massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\
|
||||
"moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\
|
||||
"huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
|
||||
"moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\
|
||||
"severe burn" = "severe salved burn", "deep burn" = "deep salved burn",\
|
||||
"carbonised area" = "treated carbonised area")
|
||||
if(3)
|
||||
if(tallied in list("cut","tiny bruise","small burn"))
|
||||
continue
|
||||
tallied_rename = list("deep cut" = "fading cut", "flesh wound" = "small healing wound",\
|
||||
"gaping wound" = "healing wound", "big gaping wound" = "big healing wound",\
|
||||
"massive wound" = "massive healing wound", "small bruise" = "tiny bruise",\
|
||||
"moderate bruise" = "small bruise", "large bruise" = "moderate bruise",\
|
||||
"huge bruise" = "large bruise", "monumental bruise" = "huge bruise",\
|
||||
"moderate burn" = "healing moderate burn", "large burn" = "healing large burn",\
|
||||
"severe burn" = "healing severe burn", "deep burn" = "healing deep burn",\
|
||||
"carbonised area" = "slowly healing carbonised area")
|
||||
if(4)
|
||||
if(tallied in list("cut","deep cut","tiny bruise", "small bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("flesh wound" = "small red scar", "gaping wound" = "angry straight scar",\
|
||||
"big gaping wound" = "jagged angry scar", "massive wound" = "gigantic angry scar",\
|
||||
"moderate bruise" = "tiny bruise", "large bruise" = "small bruise",\
|
||||
"huge bruise" = "moderate bruise", "monumental bruise" = "large bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area")
|
||||
if(5)
|
||||
if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\
|
||||
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
|
||||
"large bruise" = "tiny bruise",\
|
||||
"huge bruise" = "small bruise", "monumental bruise" = "moderate bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "large scarred area")
|
||||
if(6)
|
||||
if(tallied in list("cut","deep cut","flesh wound","tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("gaping wound" = "straight scar",\
|
||||
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
|
||||
"monumental bruise" = "tiny bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "large scarred area")
|
||||
wound_descriptors[wound] = 1
|
||||
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")
|
||||
switch(tally[tallied])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
else
|
||||
flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has several [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " several [tallied_rename[tallied]]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has a bunch of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " a ton of [tallied_rename[tallied]]s"
|
||||
if(flavor_text.len)
|
||||
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 its [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>It 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'>It 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'>It has several [wound]s"
|
||||
else
|
||||
flavor_text += " several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>It 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 its [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
if(wound_flavor_text["head"])
|
||||
msg += wound_flavor_text["head"]
|
||||
if(wound_flavor_text["chest"])
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/E = organs[name]
|
||||
E.process()
|
||||
if(E.broken || E.destroyed)
|
||||
if(E.status & BROKEN || E.status & DESTROYED)
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "chest_l"), ICON_OVERLAY)
|
||||
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(!head.destroyed)
|
||||
if(!(head.status & DESTROYED))
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "head_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "head_l"), ICON_OVERLAY)
|
||||
|
||||
@@ -594,12 +594,12 @@
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !part.destroyed)
|
||||
&& !(part.status & DESTROYED))
|
||||
var/icon/temp = new /icon('monkey.dmi', "[part.icon_name]_s")
|
||||
if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('monkey.dmi', "[part.icon_name]_l")
|
||||
if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "groin_s"), ICON_OVERLAY)
|
||||
@@ -915,7 +915,7 @@
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ || organ.destroyed) return 0
|
||||
if(!organ || organ.status & DESTROYED) return 0
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
@@ -1038,7 +1038,7 @@
|
||||
var/amount = 0.0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.robot) amount+= O.brute_dam
|
||||
if(!(O.status & ROBOT)) amount+= O.brute_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/monkey/adjustBruteLoss(var/amount, var/used_weapon = null)
|
||||
@@ -1051,7 +1051,7 @@
|
||||
var/amount = 0.0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.robot) amount+= O.burn_dam
|
||||
if(!(O.status & ROBOT)) amount+= O.burn_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/monkey/adjustFireLoss(var/amount,var/used_weapon = null)
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
var/mob/living/carbon/human/M = src
|
||||
for(var/name in M.organs)
|
||||
var/datum/organ/external/organ = M.organs[name]
|
||||
if(organ.destroyed)
|
||||
if(organ.status & DESTROYED)
|
||||
src.traumatic_shock += 60
|
||||
else if(organ.broken || organ.open)
|
||||
else if(organ.status & BROKEN || organ.open)
|
||||
src.traumatic_shock += 30
|
||||
|
||||
if(src.traumatic_shock < 0)
|
||||
|
||||
@@ -181,11 +181,9 @@
|
||||
affecting = H.organs[A]
|
||||
if(!istype(affecting, /datum/organ/external)) continue
|
||||
affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health
|
||||
affecting.broken = 0
|
||||
affecting.destroyed = 0
|
||||
for(var/datum/organ/wound/W in affecting.wounds)
|
||||
W.stopbleeding()
|
||||
del(W)
|
||||
affecting.status &= ~BROKEN
|
||||
affecting.status &= ~DESTROYED
|
||||
del affecting.wound_descs
|
||||
H.UpdateDamageIcon()
|
||||
H.update_body()
|
||||
//src.fireloss = 0
|
||||
@@ -210,17 +208,15 @@
|
||||
var/datum/organ/external/e = H.organs[name]
|
||||
e.brute_dam = 0.0
|
||||
e.burn_dam = 0.0
|
||||
e.bandaged = 0.0
|
||||
e.status &= ~BANDAGED
|
||||
e.max_damage = initial(e.max_damage)
|
||||
e.bleeding = 0
|
||||
e.status &= ~BLEEDING
|
||||
e.open = 0
|
||||
e.broken = 0
|
||||
e.destroyed = 0
|
||||
e.status &= ~BROKEN
|
||||
e.status &= ~DESTROYED
|
||||
e.perma_injury = 0
|
||||
e.update_icon()
|
||||
for(var/datum/organ/wound/W in e.wounds)
|
||||
if(W.bleeding || !W.is_healing)
|
||||
W.stopbleeding()
|
||||
del e.wound_descs
|
||||
del(H.vessel)
|
||||
H.vessel = new/datum/reagents(560)
|
||||
H.vessel.my_atom = H
|
||||
|
||||
+3
-10
@@ -701,12 +701,12 @@
|
||||
if(ishuman(usr))
|
||||
if(usr.hand) // if he's using his left hand.
|
||||
var/datum/organ/external/temp = usr:get_organ("l_hand")
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
usr << "\blue You look at your stump."
|
||||
return
|
||||
else
|
||||
var/datum/organ/external/temp = usr:get_organ("r_hand")
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
usr << "\blue You look at your stump."
|
||||
return
|
||||
|
||||
@@ -1115,11 +1115,4 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
..()
|
||||
|
||||
/mob/proc/get_visible_gender()
|
||||
//Returns the proper words to use based on the mob's visible gender. Used in text creation.
|
||||
return list("It" = "It", "its" = "its", "it" = "it", "has" = "has", "is" = "is", "itself" = "itself")
|
||||
|
||||
/mob/proc/get_gender_form(var/form)
|
||||
if(!istext(form))
|
||||
return
|
||||
var/list/proper_forms = get_visible_gender()
|
||||
return proper_forms[form]
|
||||
return gender
|
||||
+171
-273
@@ -1,4 +1,43 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
///////////////////////////////
|
||||
//CONTAINS: ORGANS AND WOUNDS//
|
||||
///////////////////////////////
|
||||
|
||||
var/list/wound_progressions = list(
|
||||
//cut healing path"
|
||||
"cut" = "healing cut", "healing cut" = "small scab",\
|
||||
|
||||
//deep cut healing path
|
||||
"deep cut" = "clotted cut", "clotted cut" = "scab", "scab" = "fresh skin",\
|
||||
|
||||
//flesh wound healing path
|
||||
"flesh wound" = "blood soaked clot", "blood soaked clot" = "large scab", "large scab" = "fresh skin",\
|
||||
|
||||
//gaping wound healing path
|
||||
"gaping wound" = "large blood soaked clot", "large blood soaked clot" = "large clot", "large clot" = "small angry scar",\
|
||||
"small angry scar" = "small straight scar",\
|
||||
|
||||
//big gaping wound healing path
|
||||
"big gaping wound" = "gauze wrapped wound", "gauze wrapped wound" = "blood soaked bandage", "blood soaked bandage" = "large angry scar",\
|
||||
"large angry scar" = "large straight scar",\
|
||||
|
||||
//massive wound healing path
|
||||
"massive wound" = "massive blood soaked bandage", "massive blood soaked bandage" = "huge bloody mess", "huge bloody mess" = "massive angry scar",\
|
||||
"massive angry scar" = "massive jagged scar",\
|
||||
|
||||
//bruise healing path
|
||||
"monumental bruise" = "large bruise", "huge bruise" = "large bruise", "large bruise" = "moderate bruise",\
|
||||
"moderate bruise" = "small bruise", "small bruise" = "tiny bruise",\
|
||||
|
||||
//moderate burn healing path
|
||||
"moderate burn" = "moderate salved burn", "moderate salved burn" = "fresh skin",\
|
||||
|
||||
"large burn" = "large salved burn", "large salved burn" = "moderate salved burn",\
|
||||
|
||||
"severe burn" = "severe salved burn", "severe salved burn" = "burn scar",\
|
||||
|
||||
"deep burn" = "deep salved burn", "deep salved burn" = "large burn scar",\
|
||||
|
||||
"carbonised area" = "treated carbonised area", "treated carbonised area" = "massive burn scar")
|
||||
|
||||
/datum/organ
|
||||
var/name = "organ"
|
||||
@@ -31,6 +70,10 @@
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
|
||||
#define CUT 0
|
||||
#define BRUISE 1
|
||||
#define BURN 2
|
||||
|
||||
/****************************************************
|
||||
EXTERNAL ORGANS
|
||||
****************************************************/
|
||||
@@ -42,31 +85,29 @@
|
||||
var/damage_state = "00"
|
||||
var/brute_dam = 0
|
||||
var/burn_dam = 0
|
||||
var/bandaged = 0
|
||||
var/max_damage = 0
|
||||
var/max_size = 0
|
||||
var/tmp/list/obj/item/weapon/implant/implant = list()
|
||||
var/tmp/list/obj/item/weapon/implant/implant
|
||||
|
||||
var/display_name
|
||||
var/tmp/list/wounds = list()
|
||||
var/tmp/bleeding = 0
|
||||
|
||||
var/tmp/list/wound_descs = list()
|
||||
var/tmp/next_wound_update = 0
|
||||
|
||||
var/tmp/perma_injury = 0
|
||||
var/tmp/perma_dmg = 0
|
||||
var/tmp/broken = 0
|
||||
var/tmp/destroyed = 0
|
||||
var/tmp/destspawn = 0 //Has it spawned the broken limb?
|
||||
var/tmp/gauzed = 0 //Has the missing limb been patched?
|
||||
var/tmp/robot = 0 //ROBOT ARM MAN!
|
||||
var/tmp/cutaway = 0 //First part of limb reattachment.
|
||||
var/tmp/attachable = 0 //Can limb be attached?
|
||||
var/min_broken_damage = 30
|
||||
|
||||
var/datum/organ/external/parent
|
||||
var/list/datum/organ/external/children
|
||||
|
||||
var/damage_msg = "\red You feel a intense pain"
|
||||
|
||||
var/status = 0
|
||||
var/broken_description
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/wound = 0
|
||||
|
||||
New(mob/living/carbon/H)
|
||||
..(H)
|
||||
@@ -76,59 +117,43 @@
|
||||
owner = H
|
||||
H.organs[name] = src
|
||||
|
||||
Del()
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
del(W)
|
||||
..()
|
||||
|
||||
proc/total_wound_bleeding()
|
||||
// Get the total amount and size of bleeding wounds
|
||||
var/rval = 0
|
||||
|
||||
for(var/datum/organ/wound/W in wounds) if(W.bleeding)
|
||||
rval += W.wound_size
|
||||
|
||||
// bandages reduce bleeding
|
||||
if(bandaged) return rval / 8
|
||||
|
||||
return rval
|
||||
|
||||
proc/take_damage(brute, burn, sharp, used_weapon = null, spread=0)
|
||||
proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
||||
if((brute <= 0) && (burn <= 0))
|
||||
return 0
|
||||
if(destroyed)
|
||||
if(status & DESTROYED)
|
||||
return 0
|
||||
if(robot)
|
||||
if(status & ROBOT)
|
||||
brute *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
burn *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
|
||||
if(owner && !robot)
|
||||
if(owner && !(status & ROBOT))
|
||||
owner.pain(display_name, (brute+burn)*3, 1, burn > brute)
|
||||
|
||||
if(sharp)
|
||||
var/nux = brute * rand(10,15)
|
||||
if(brute_dam >= max_damage)
|
||||
if(prob(5 * brute))
|
||||
// for(var/mob/M in viewers(owner))
|
||||
// M.show_message("\red [owner.name]'s [display_name] flies off.")
|
||||
destroyed = 1
|
||||
status |= DESTROYED
|
||||
droplimb()
|
||||
return
|
||||
|
||||
else if(prob(nux))
|
||||
createwound(max(1,min(6,round(brute/10) + rand(0,1))),0,brute)
|
||||
if(!robot) owner << "You feel something wet on your [display_name]"
|
||||
createwound( CUT, brute )
|
||||
if(!(status & ROBOT))
|
||||
owner << "You feel something wet on your [display_name]"
|
||||
|
||||
if((brute_dam + burn_dam + brute + burn) < max_damage)
|
||||
if(brute)
|
||||
brute_dam += brute
|
||||
if(prob(brute*2) && !sharp)
|
||||
createwound(rand(4,6),0,brute)
|
||||
if( (prob(brute*2) && !sharp) || sharp )
|
||||
createwound( CUT, brute )
|
||||
else if(!sharp)
|
||||
createwound(max(1,min(6,round(brute/10) + rand(1,2))),1,brute)
|
||||
createwound( BRUISE, brute )
|
||||
if(burn)
|
||||
burn_dam += burn
|
||||
createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn)
|
||||
createwound( BURN, burn )
|
||||
else
|
||||
var/can_inflict = max_damage - (brute_dam + burn_dam)
|
||||
var/can_inflict = max_damage - (brute_dam + burn_dam) //How much damage can we actually cause?
|
||||
if(can_inflict)
|
||||
if (brute > 0 && burn > 0)
|
||||
brute = can_inflict/2
|
||||
@@ -146,87 +171,52 @@
|
||||
burn = can_inflict
|
||||
burn_dam += burn
|
||||
createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn)
|
||||
else if(!robot)
|
||||
else if(!(status & ROBOT))
|
||||
var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have.
|
||||
var/list/datum/organ/external/possible_points = list()
|
||||
if(parent)
|
||||
possible_points += parent
|
||||
if(children)
|
||||
possible_points += children
|
||||
if(forbidden_limbs.len)
|
||||
possible_points -= forbidden_limbs
|
||||
if(!possible_points.len)
|
||||
message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!")
|
||||
else
|
||||
if(!spread)
|
||||
var/datum/organ/external/target = pick(possible_points)
|
||||
if(brute)
|
||||
target.take_damage(passed_dam, 0, sharp, used_weapon,1)
|
||||
else
|
||||
target.take_damage(0, passed_dam, sharp, used_weapon,1)
|
||||
var/datum/organ/external/target = pick(possible_points)
|
||||
if(brute)
|
||||
target.take_damage(passed_dam, 0, sharp, used_weapon, forbidden_limbs + src)
|
||||
else
|
||||
target.take_damage(0, passed_dam, sharp, used_weapon, forbidden_limbs + src)
|
||||
else
|
||||
droplimb(1) //Robot limbs just kinda fail at full damage.
|
||||
|
||||
|
||||
if(broken)
|
||||
if(status & BROKEN)
|
||||
owner.emote("scream")
|
||||
|
||||
if(used_weapon) add_wound(used_weapon, brute + burn)
|
||||
|
||||
owner.updatehealth()
|
||||
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
|
||||
proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
||||
if(robot && !robo_repair)
|
||||
if(status & ROBOT && !robo_repair)
|
||||
return
|
||||
var/brute_to_heal = 0
|
||||
var/brute_wounds = list()
|
||||
var/burn_to_heal = 0
|
||||
var/burn_wounds = list()
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
if(W.wound_type > 1 && W.damage)
|
||||
burn_to_heal += W.damage
|
||||
burn_wounds += W
|
||||
else if(W.damage)
|
||||
brute_to_heal += W.damage
|
||||
brute_wounds += W
|
||||
if(brute && brute <= brute_to_heal)
|
||||
for(var/datum/organ/wound/W in brute_wounds)
|
||||
if(brute >= W.damage)
|
||||
brute_dam -= W.damage
|
||||
brute -= W.damage
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding(1)
|
||||
else
|
||||
W.damage -= brute
|
||||
W.initial_dmg -= brute
|
||||
W.stopbleeding()
|
||||
else if(brute)
|
||||
for(var/datum/organ/wound/W in brute_wounds)
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding(1)
|
||||
brute_dam = 0
|
||||
if(burn && burn <= burn_to_heal)
|
||||
for(var/datum/organ/wound/W in burn_wounds)
|
||||
if(burn >= W.damage)
|
||||
burn_dam -= W.damage
|
||||
burn -= W.damage
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding()
|
||||
else
|
||||
W.damage -= burn
|
||||
W.initial_dmg -= burn
|
||||
W.stopbleeding()
|
||||
else if(burn)
|
||||
for(var/datum/organ/wound/W in burn_wounds)
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding()
|
||||
burn_dam = 0
|
||||
// var/brute_to_heal = 0
|
||||
// var/brute_wounds = list()
|
||||
// var/burn_to_heal = 0
|
||||
// var/burn_wounds = list()
|
||||
// for(var/datum/organ/wound/W in brute_wounds)
|
||||
|
||||
brute_dam = max(0, brute_dam-brute)
|
||||
burn_dam = max(0, burn_dam-burn)
|
||||
|
||||
if(internal)
|
||||
broken = 0
|
||||
status &= ~BROKEN
|
||||
perma_injury = 0
|
||||
// if all damage is healed, replace the wounds with scars
|
||||
if(brute_dam + burn_dam == 0)
|
||||
@@ -234,6 +224,7 @@
|
||||
var/datum/autopsy_data/W = autopsy_data[V]
|
||||
del W
|
||||
autopsy_data = list()
|
||||
owner.updatehealth()
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
@@ -252,35 +243,36 @@
|
||||
|
||||
|
||||
proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury,perma_injury) //could use health?
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
|
||||
proc/get_damage_brute()
|
||||
return max(brute_dam+perma_injury,perma_injury)
|
||||
return max(brute_dam+perma_injury, perma_injury)
|
||||
|
||||
proc/get_damage_fire()
|
||||
return burn_dam
|
||||
|
||||
process()
|
||||
if(destroyed)
|
||||
if(next_wound_update && world.time > next_wound_update)
|
||||
update_wounds()
|
||||
if(status & DESTROYED)
|
||||
if(!destspawn)
|
||||
droplimb()
|
||||
return
|
||||
if(broken == 0)
|
||||
if(!(status & BROKEN))
|
||||
perma_dmg = 0
|
||||
if(parent)
|
||||
if(parent.destroyed)
|
||||
destroyed = 1
|
||||
if(parent.status & DESTROYED)
|
||||
status |= DESTROYED
|
||||
owner:update_body()
|
||||
return
|
||||
if(brute_dam > min_broken_damage && !robot)
|
||||
if(broken == 0)
|
||||
if(brute_dam > min_broken_damage && !(status & ROBOT))
|
||||
if(!(status & BROKEN))
|
||||
//owner.unlock_medal("Broke Yarrr Bones!", 0, "Break a bone.", "easy")
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.emote("scream")
|
||||
broken = 1
|
||||
wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal
|
||||
status |= BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
return
|
||||
return
|
||||
|
||||
// new damage icon system
|
||||
@@ -321,15 +313,15 @@
|
||||
|
||||
proc/droplimb(var/override = 0,var/no_explode = 0)
|
||||
if(override)
|
||||
destroyed = 1
|
||||
if(destroyed)
|
||||
status |= DESTROYED
|
||||
if(status & DESTROYED)
|
||||
if(implant)
|
||||
for(var/implants in implant)
|
||||
del(implants)
|
||||
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
|
||||
|
||||
for(var/datum/organ/external/I in children)
|
||||
if(I && !I.destroyed)
|
||||
if(I && !(I.status & DESTROYED))
|
||||
I.droplimb(1,1)
|
||||
var/obj/item/weapon/organ/H
|
||||
switch(body_part)
|
||||
@@ -395,12 +387,8 @@
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destspawn = 1
|
||||
if(!robot)
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] explodes violently!",\
|
||||
if(status & ROBOT)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
if(!no_explode)
|
||||
@@ -411,51 +399,81 @@
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
W.update_health()
|
||||
del(W)
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
owner.update_body_appearance()
|
||||
owner.update_clothing()
|
||||
|
||||
proc/createwound(var/size = 1, var/type = 0, var/damage)
|
||||
var/list/datum/organ/wound/possible_wounds = list()
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
if(W.wound_type == type && W.wound_size <= 3 && size <= 3 && ((!W.is_healing && type == 1) || (!W.healing_state && type != 1)))
|
||||
possible_wounds += W
|
||||
proc/createwound(var/type = CUT, var/damage)
|
||||
if(hasorgans(owner))
|
||||
if(!possible_wounds.len || prob(20))
|
||||
var/datum/organ/wound/W = new(src)
|
||||
W.bleeding = !type || (size > 2) // large wounds always cause bleeding
|
||||
var/wound_name
|
||||
var/update_time = world.time + damage*100
|
||||
var/size = min( max( 1, damage/10 ) , 6)
|
||||
switch(type)
|
||||
if(CUT)
|
||||
var/list/size_names = list("cut", "deep cut", "flesh wound", "gaping wound", "big gaping wound", "massive wound")
|
||||
wound_name = size_names[size]
|
||||
if(wound_descs["[update_time]"])
|
||||
var/list/update_next = wound_descs["[update_time]"]
|
||||
update_next += wound_name
|
||||
else
|
||||
if (next_wound_update > update_time)
|
||||
next_wound_update = update_time
|
||||
wound_descs["[update_time]"] = list(wound_name)
|
||||
if(BRUISE)
|
||||
var/list/size_names = list("tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise", "monumental bruise")
|
||||
wound_name = size_names[size]
|
||||
if(wound_descs["[update_time]"])
|
||||
var/list/update_next = wound_descs["[update_time]"]
|
||||
update_next += wound_name
|
||||
else
|
||||
if (next_wound_update > update_time)
|
||||
next_wound_update = update_time
|
||||
wound_descs["[update_time]"] = list(wound_name)
|
||||
if(BURN)
|
||||
var/list/size_names = list("small burn", "moderate burn", "large burn", "severe burn", "deep burn", "carbonised area")
|
||||
wound_name = size_names[size]
|
||||
update_time += damage*300
|
||||
if(wound_descs["[update_time]"])
|
||||
var/list/update_next = wound_descs["[update_time]"]
|
||||
update_next += wound_name
|
||||
else
|
||||
if (next_wound_update > update_time)
|
||||
next_wound_update = update_time
|
||||
wound_descs["[update_time]"] = list(wound_name)
|
||||
|
||||
W.damage = damage
|
||||
W.initial_dmg = damage
|
||||
W.wound_type = type
|
||||
W.wound_size = size
|
||||
W.owner = owner
|
||||
W.parent = src
|
||||
if(type == 1)
|
||||
spawn W.become_scar()
|
||||
proc/update_wounds()
|
||||
var/list/wounds_to_update = wound_descs["[next_wound_update]"]
|
||||
for(var/wound in wounds_to_update)
|
||||
if(wound_progressions[wound])
|
||||
var/wound_name = wound_progressions[wound]
|
||||
var/next_update = world.time + 600*rand(5,13)
|
||||
if(wound_descs["[next_update]"])
|
||||
var/list/update_next = wound_descs["[next_update]"]
|
||||
update_next += wound_name
|
||||
else
|
||||
spawn W.start_close() //Let small cuts close themselves.
|
||||
wounds += W
|
||||
else
|
||||
var/datum/organ/wound/W = pick(possible_wounds)
|
||||
bleeding = max(!type,bleeding) //Sharp objects cause bleeding.
|
||||
W.bleeding = max(!type,W.bleeding)
|
||||
|
||||
W.damage += damage
|
||||
W.initial_dmg += damage
|
||||
W.wound_size = max(1,min(6,round(W.damage/10) + rand(0,1)))
|
||||
wound_descs["[next_update]"] = list(wound_name)
|
||||
wound_descs.Remove("[next_wound_update]")
|
||||
if(wound_descs.len)
|
||||
var/next_update = text2num(wound_descs[1])
|
||||
for(var/wound in wound_descs)
|
||||
next_update = min(next_update, text2num(wound))
|
||||
next_wound_update = next_update
|
||||
else
|
||||
next_wound_update = 0
|
||||
|
||||
proc/emp_act(severity)
|
||||
if(!robot) return
|
||||
if(!(status & ROBOT))
|
||||
return
|
||||
if(prob(30*severity))
|
||||
take_damage(4(4-severity), 0, 1, used_weapon = "EMP")
|
||||
else
|
||||
droplimb(1)
|
||||
|
||||
proc/getDisplayName()
|
||||
switch(src.name)
|
||||
switch(name)
|
||||
if("l_leg")
|
||||
return "left leg"
|
||||
if("r_leg")
|
||||
@@ -473,127 +491,7 @@
|
||||
if("r_hand")
|
||||
return "right hand"
|
||||
else
|
||||
return src.name
|
||||
|
||||
/datum/organ/wound
|
||||
name = "wound"
|
||||
var/wound_type = 0 //0 = cut, 1 = bruise, 2 = burn
|
||||
var/damage = 0 //How much damage it caused.
|
||||
var/initial_dmg = 0
|
||||
var/wound_size = 1
|
||||
var/datum/organ/external/parent
|
||||
var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it.
|
||||
var/healing_state = 0
|
||||
var/is_healing = 0
|
||||
var/slowheal = 3
|
||||
|
||||
proc/start_close()
|
||||
if(parent.robot)
|
||||
return
|
||||
spawn(rand(1800,3000)) //3-5 minutes
|
||||
if(prob(50) && wound_size == 1)
|
||||
parent.wounds.Remove(src)
|
||||
update_health(1)
|
||||
del(src)
|
||||
else if(prob(33) && wound_size < 3)
|
||||
stopbleeding()
|
||||
else
|
||||
spawn(rand(1800,3000))
|
||||
if(wound_size == 1) //Small cuts heal in 6-10 minutes.
|
||||
parent.wounds.Remove(src)
|
||||
update_health(1)
|
||||
del(src)
|
||||
else if(prob(50) && wound_size < 3 && bleeding)
|
||||
stopbleeding()
|
||||
return
|
||||
|
||||
proc/stopbleeding(var/bleed = 0)
|
||||
if(is_healing)
|
||||
return 0
|
||||
// owner:bloodloss -= 10 * src.wound_size
|
||||
parent.bleeding = min(bleed,bleeding)
|
||||
for(var/datum/organ/wound/W in parent)
|
||||
if(W.bleeding && W != src)
|
||||
parent.bleeding = 1
|
||||
break
|
||||
bleeding = min(bleed,bleeding)
|
||||
is_healing = 1
|
||||
slowheal = 1
|
||||
if(!healing_state)
|
||||
spawn become_scar() //spawn off the process of becoming a scar.
|
||||
return 1
|
||||
|
||||
proc/become_scar()
|
||||
if(parent.robot || healing_state)
|
||||
return
|
||||
healing_state = 1 //Patched
|
||||
spawn(200*slowheal) //~20-60 seconds
|
||||
update_health(5) //Heals some.
|
||||
|
||||
spawn(rand(180,300)*slowheal) //18-30 second
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(80) && wound_size < 2) //Small cuts heal.
|
||||
update_health(1)
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
|
||||
healing_state = 2 //Noticibly healing.
|
||||
update_health(2) //Heals more.
|
||||
|
||||
spawn(rand(1200,1800)*slowheal) //2-3 minutes
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(60) && wound_size < 3) //Cuts heal up
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
healing_state = 3 //Angry red scar
|
||||
update_health(1) //Heals the rest of the way.
|
||||
|
||||
|
||||
spawn(rand(6000,9000)*slowheal) //10-15 minutes
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(80) && wound_size < 4) //Minor wounds heal up fully.
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
healing_state = 4 //Scar.
|
||||
|
||||
spawn(rand(6000,9000)*slowheal) //10-15 minutes
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted.
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
healing_state = 5 //Faded scar
|
||||
return
|
||||
|
||||
proc/update_health(var/percent = 1)
|
||||
if(!owner || owner.stat == 2)
|
||||
return
|
||||
damage = max(damage - damage/percent,0) //Remove that amount of the damage
|
||||
if(wound_type > 1)
|
||||
parent.burn_dam = max(parent.burn_dam - (initial_dmg - damage),0)
|
||||
else
|
||||
parent.brute_dam = max(parent.brute_dam - (initial_dmg - damage),0)
|
||||
initial_dmg = damage //reset it for further updates.
|
||||
parent.owner.updatehealth()
|
||||
if(percent == 1 && wound_type == 1)
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
|
||||
return name
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
#define STATE_DEFAULT 1
|
||||
#define STATE_INJECTOR 2
|
||||
#define STATE_ENGINE 3
|
||||
|
||||
|
||||
/obj/machinery/computer/am_engine
|
||||
name = "Antimatter Engine Console"
|
||||
@@ -10,9 +14,6 @@
|
||||
var/obj/machinery/power/am_engine/engine/connected_E = null
|
||||
var/obj/machinery/power/am_engine/injector/connected_I = null
|
||||
var/state = STATE_DEFAULT
|
||||
var/const/STATE_DEFAULT = 1
|
||||
var/const/STATE_INJECTOR = 2
|
||||
var/const/STATE_ENGINE = 3
|
||||
|
||||
/obj/machinery/computer/am_engine/New()
|
||||
..()
|
||||
|
||||
@@ -55,9 +55,6 @@
|
||||
affecting = H.organs[A]
|
||||
if(!istype(affecting, /datum/organ/external)) continue
|
||||
affecting.heal_damage(25, 25) //fixes getting hit after ingestion, killing you when game updates organ health
|
||||
for(var/datum/organ/wound/W in affecting.wounds)
|
||||
W.stopbleeding()
|
||||
W.is_healing = 1
|
||||
//user:heal_organ_damage(25, 25)
|
||||
//
|
||||
user.adjustOxyLoss(-25)
|
||||
|
||||
Reference in New Issue
Block a user