|
|
|
@@ -146,13 +146,12 @@
|
|
|
|
|
return ..()
|
|
|
|
|
|
|
|
|
|
/obj/item/organ/external/examine()
|
|
|
|
|
..()
|
|
|
|
|
. = ..()
|
|
|
|
|
if(in_range(usr, src) || istype(usr, /mob/observer/dead))
|
|
|
|
|
for(var/obj/item/I in contents)
|
|
|
|
|
if(istype(I, /obj/item/organ))
|
|
|
|
|
continue
|
|
|
|
|
to_chat(usr, "<span class='danger'>There is \a [I] sticking out of it.</span>")
|
|
|
|
|
return
|
|
|
|
|
. += "<span class='danger'>There is \a [I] sticking out of it.</span>"
|
|
|
|
|
|
|
|
|
|
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
|
|
|
|
switch(stage)
|
|
|
|
@@ -269,8 +268,8 @@
|
|
|
|
|
// Damage an internal organ
|
|
|
|
|
if(internal_organs && internal_organs.len)
|
|
|
|
|
var/obj/item/organ/I = pick(internal_organs)
|
|
|
|
|
I.take_damage(brute / 2)
|
|
|
|
|
brute -= brute / 2
|
|
|
|
|
brute *= 0.5
|
|
|
|
|
I.take_damage(brute)
|
|
|
|
|
|
|
|
|
|
if(status & ORGAN_BROKEN && brute)
|
|
|
|
|
jostle_bone(brute)
|
|
|
|
@@ -354,21 +353,33 @@
|
|
|
|
|
else
|
|
|
|
|
edge_eligible = 1
|
|
|
|
|
|
|
|
|
|
if(edge_eligible && brute >= max_damage / DROPLIMB_THRESHOLD_EDGE && prob(brute))
|
|
|
|
|
//VOREStation Add
|
|
|
|
|
if(nonsolid && damage >= max_damage)
|
|
|
|
|
droplimb(TRUE, DROPLIMB_EDGE)
|
|
|
|
|
else if (robotic >= ORGAN_NANOFORM && damage >= max_damage)
|
|
|
|
|
droplimb(TRUE, DROPLIMB_BURN)
|
|
|
|
|
//VOREStation Add End
|
|
|
|
|
//VOREStation Edit - We have special droplimb handling for prom/proteans
|
|
|
|
|
else if(edge_eligible && brute >= max_damage / DROPLIMB_THRESHOLD_EDGE && prob(brute))
|
|
|
|
|
droplimb(0, DROPLIMB_EDGE)
|
|
|
|
|
else if((burn >= max_damage / DROPLIMB_THRESHOLD_DESTROY) || (nonsolid && burn >= 5 && (burn_dam + burn >= max_damage)) && prob(burn/3))
|
|
|
|
|
else if((burn >= max_damage / DROPLIMB_THRESHOLD_DESTROY) && prob(burn*0.33))
|
|
|
|
|
droplimb(0, DROPLIMB_BURN)
|
|
|
|
|
else if((brute >= max_damage / DROPLIMB_THRESHOLD_DESTROY && prob(brute)) || (nonsolid && brute >= 5 && (brute_dam + brute >= max_damage) && prob(brute/2)))
|
|
|
|
|
else if((brute >= max_damage / DROPLIMB_THRESHOLD_DESTROY && prob(brute)))
|
|
|
|
|
droplimb(0, DROPLIMB_BLUNT)
|
|
|
|
|
else if(brute >= max_damage / DROPLIMB_THRESHOLD_TEAROFF && prob(brute/3))
|
|
|
|
|
//VOREStation Edit End
|
|
|
|
|
else if(brute >= max_damage / DROPLIMB_THRESHOLD_TEAROFF && prob(brute*0.33))
|
|
|
|
|
droplimb(0, DROPLIMB_EDGE)
|
|
|
|
|
else if(spread_dam && owner && parent && (brute_overflow || burn_overflow) && (brute_overflow >= 5 || burn_overflow >= 5) && !permutation) //No infinite damage loops.
|
|
|
|
|
var/brute_third = brute_overflow * 0.33
|
|
|
|
|
var/burn_third = burn_overflow * 0.33
|
|
|
|
|
if(children && children.len)
|
|
|
|
|
var/brute_on_children = brute_third / children.len
|
|
|
|
|
var/burn_on_children = burn_third / children.len
|
|
|
|
|
spawn()
|
|
|
|
|
for(var/obj/item/organ/external/C in children)
|
|
|
|
|
if(!C.is_stump())
|
|
|
|
|
C.take_damage(brute_overflow / children.len / 3, burn_overflow / children.len / 3, 0, 0, null, forbidden_limbs, 1) //Splits the damage to each individual 'child', incase multiple exist.
|
|
|
|
|
parent.take_damage(brute_overflow / 3, burn_overflow / 3, 0, 0, null, forbidden_limbs, 1)
|
|
|
|
|
C.take_damage(brute_on_children, burn_on_children, 0, 0, null, forbidden_limbs, 1) //Splits the damage to each individual 'child', incase multiple exist.
|
|
|
|
|
parent.take_damage(brute_third, burn_third, 0, 0, null, forbidden_limbs, 1)
|
|
|
|
|
|
|
|
|
|
return update_icon()
|
|
|
|
|
|
|
|
|
@@ -470,6 +481,8 @@ This function completely restores a damaged organ to perfect condition.
|
|
|
|
|
if(!istype(implanted_object,/obj/item/weapon/implant) && !istype(implanted_object,/obj/item/device/nif)) // We don't want to remove REAL implants. Just shrapnel etc. //VOREStation Edit - NIFs pls
|
|
|
|
|
implanted_object.loc = get_turf(src)
|
|
|
|
|
implants -= implanted_object
|
|
|
|
|
if(!owner.has_embedded_objects())
|
|
|
|
|
owner.clear_alert("embeddedobject")
|
|
|
|
|
|
|
|
|
|
if(owner && !ignore_prosthetic_prefs)
|
|
|
|
|
if(owner.client && owner.client.prefs && owner.client.prefs.real_name == owner.real_name)
|
|
|
|
@@ -510,7 +523,8 @@ This function completely restores a damaged organ to perfect condition.
|
|
|
|
|
owner.custom_pain("You feel something rip in your [name]!", 50)
|
|
|
|
|
|
|
|
|
|
//Burn damage can cause fluid loss due to blistering and cook-off
|
|
|
|
|
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD) && !istype(owner.loc,/mob/living) && !istype(owner.loc,/obj/item/device/dogborg/sleeper)) // VOREStation Edit
|
|
|
|
|
|
|
|
|
|
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD))
|
|
|
|
|
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100)
|
|
|
|
|
owner.remove_blood(fluid_loss)
|
|
|
|
|
|
|
|
|
@@ -826,17 +840,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|
|
|
|
tbrute = 3
|
|
|
|
|
return "[tbrute][tburn]"
|
|
|
|
|
|
|
|
|
|
/obj/item/organ/external/take_damage()
|
|
|
|
|
..()
|
|
|
|
|
|
|
|
|
|
if(!cannot_amputate)
|
|
|
|
|
if(nonsolid && damage >= max_damage)
|
|
|
|
|
droplimb(TRUE, DROPLIMB_EDGE)
|
|
|
|
|
//VOREStation Add Start
|
|
|
|
|
if(robotic >= ORGAN_NANOFORM && damage >= max_damage)
|
|
|
|
|
droplimb(TRUE, DROPLIMB_BURN)
|
|
|
|
|
//VOREStation Add End
|
|
|
|
|
|
|
|
|
|
/****************************************************
|
|
|
|
|
DISMEMBERMENT
|
|
|
|
|
****************************************************/
|
|
|
|
@@ -1187,6 +1190,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|
|
|
|
implants += W
|
|
|
|
|
owner.embedded_flag = 1
|
|
|
|
|
owner.verbs += /mob/proc/yank_out_object
|
|
|
|
|
owner.throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
|
|
|
|
|
W.add_blood(owner)
|
|
|
|
|
if(ismob(W.loc))
|
|
|
|
|
var/mob/living/H = W.loc
|
|
|
|
@@ -1375,4 +1379,11 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|
|
|
|
if(bling.body_parts_covered & src.body_part)
|
|
|
|
|
covering_clothing |= bling
|
|
|
|
|
|
|
|
|
|
return covering_clothing
|
|
|
|
|
return covering_clothing
|
|
|
|
|
|
|
|
|
|
/mob/living/carbon/human/proc/has_embedded_objects()
|
|
|
|
|
. = 0
|
|
|
|
|
for(var/obj/item/organ/external/L in organs)
|
|
|
|
|
for(var/obj/item/I in L.implants)
|
|
|
|
|
if(!istype(I,/obj/item/weapon/implant) && !istype(I,/obj/item/device/nif))
|
|
|
|
|
return 1
|