Merge pull request #827 from TheDZD/minor-fixes

Organ/Surgery Fixes
This commit is contained in:
Fox-McCloud
2015-04-20 22:16:44 -04:00
4 changed files with 14 additions and 9 deletions
-2
View File
@@ -16,7 +16,6 @@ var/list/organ_cache = list()
var/parent_organ = "chest"
var/robotic = 0 //For being a robot
var/rejecting // Is this organ already being rejected?
var/list/datum/autopsy_data/autopsy_data = list()
var/list/trace_chemicals = list() // traces of chemicals in the organ,
@@ -222,7 +221,6 @@ var/list/organ_cache = list()
loc = get_turf(owner)
processing_objects |= src
rejecting = null
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
if(!organ_blood || !organ_blood.data["blood_DNA"])
owner.vessel.trans_to(src, 5, 1, 1)
+8 -4
View File
@@ -75,7 +75,11 @@
if(contents.len)
var/obj/item/removing = pick(contents)
removing.loc = get_turf(user.loc)
if(!(user.l_hand && user.r_hand))
var/obj/item/organ/O = removing
if(istype(O))
O.status |= ORGAN_CUT_AWAY
O.removed(user)
else if(!(user.l_hand && user.r_hand))
user.put_in_hands(removing)
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!")
else
@@ -201,7 +205,7 @@
// sync the organ's damage with its wounds
src.update_damages()
var/mob/living/carbon/owner_old = owner //Need to update health, but need a reference in case the below check cuts off a limb.
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner)
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
@@ -216,7 +220,7 @@
else
droplimb(0,DROPLIMB_BLUNT)
owner.updatehealth()
owner_old.updatehealth()
return update_icon()
/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
@@ -661,7 +665,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(DROPLIMB_BURN)
new /obj/effect/decal/cleanable/ash(get_turf(victim))
if(DROPLIMB_BLUNT)
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(victim))
var/obj/effect/decal/cleanable/blood/gibs/gore = new victim.species.single_gib_type(get_turf(victim))
if(victim.species.flesh_color)
gore.fleshcolor = victim.species.flesh_color
if(victim.species.blood_color)