More work on severing, improvements to yank-out-object.

This commit is contained in:
Zuhayr
2015-03-27 17:51:10 +10:30
parent aa6439096c
commit c5d42f3a4b
9 changed files with 27 additions and 103 deletions

View File

@@ -5,11 +5,11 @@
health = maxHealth
stat = CONSCIOUS
return
var/total_burn = 0
var/total_brute = 0
var/total_burn = 0
var/total_brute = 0
for(var/obj/item/organ/external/O in organs) //hardcoded to streamline things a bit
total_brute += O.brute_dam
total_burn += O.burn_dam
total_brute += O.brute_dam
total_burn += O.burn_dam
var/oxy_l = ((species.flags & NO_BREATHE) ? 0 : getOxyLoss())
var/tox_l = ((species.flags & NO_POISON) ? 0 : getToxLoss())

View File

@@ -254,16 +254,9 @@ var/global/list/damage_icon_parts = list()
var/icon/base_icon
if(human_icon_cache[icon_key])
//Icon is cached, use existing icon.
base_icon = human_icon_cache[icon_key]
//log_debug("Retrieved cached mob icon ([icon_key] \icon[human_icon_cache[icon_key]]) for [src].")
else
//BEGIN CACHED ICON GENERATION.
//Robotic limbs are handled in get_icon() so all we worry about are missing or dead limbs.
//No icon stored, so we need to start with a basic one.
var/obj/item/organ/external/chest = get_organ("chest")
base_icon = chest.get_icon()
@@ -296,7 +289,7 @@ var/global/list/damage_icon_parts = list()
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
//Handle husk overlay.
if(husk && ("overlay_husk" in icon_states(race_icon)))
if(husk && ("overlay_husk" in icon_states(species.icobase)))
var/icon/mask = new(base_icon)
var/icon/husk_over = new(species.icobase,"overlay_husk")
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)

View File

@@ -1140,6 +1140,8 @@ mob/proc/yank_out_object()
human_user.bloody_hands(H)
selection.loc = get_turf(src)
if(!(U.l_hand && U.r_hand))
U.put_in_hands(selection)
for(var/obj/item/weapon/O in pinned)
if(O == selection)

View File

@@ -627,14 +627,27 @@ Note that amputating the affected organ does in fact remove the infection from t
src.removed(null, ignore_children)
wounds.Cut()
if(parent)
var/datum/wound/W
if(max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage)
else
W = new/datum/wound/lost_limb(max_damage)
parent.children -= src
if(!clean)
new /obj/item/organ/external/stump(owner, 0, src)
if(clean)
parent.wounds |= W
parent.update_damages()
else
var/obj/item/organ/external/stump/stump = new (owner, 0, src)
stump.wounds |= W
owner.organs |= stump
stump.update_damages()
parent = null
update_health()
owner.update_body()
dir = SOUTH
switch(disintegrate)
if(0)

View File

@@ -16,20 +16,6 @@
if(istype(limb))
max_damage = limb.max_damage
/obj/item/organ/external/stump/process()
damage = max_damage
/obj/item/organ/external/stump/handle_rejection()
return
/obj/item/organ/external/stump/rejuvenate()
return
/obj/item/organ/external/stump/is_damaged()
return 1
/obj/item/organ/external/stump/is_bruised()
return 1
/obj/item/organ/external/stump/is_broken()
return 1
/obj/item/organ/external/stump/removed()
..()
del(src)

View File

@@ -89,7 +89,6 @@ mob/living/carbon/human/proc/handle_pain()
var/maxdam = 0
var/obj/item/organ/external/damaged_organ = null
for(var/obj/item/organ/external/E in organs)
// amputated limbs don't cause pain
if(E.status & ORGAN_DEAD) continue
var/dam = E.get_damage()
// make the choice of the organ depend on damage,