Part one of damage system fixing enacted: all reagent-based methods of healing brute/burn damage now actually heal the physical injuries instead of just modifying the vars used to update the health meter.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1229 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2011-03-22 01:56:40 +00:00
parent c1a76d63d1
commit 5229371ee4
3 changed files with 37 additions and 33 deletions
@@ -2695,3 +2695,18 @@
var/obj/item/clothing/gloves/G = src.gloves
siemens_coeff = G.siemens_coefficient
return ..(shock_damage,source,siemens_coeff)
/mob/living/carbon/human/proc/heal_organ_damage(var/brute, var/burn)
var/list/parts = list()
for(var/A in src.organs)
if(!src.organs[A]) continue
var/datum/organ/external/affecting = src.organs[A]
if(!istype(affecting)) continue
if((brute && affecting.brute_dam) || (burn && affecting.burn_dam))
parts += affecting
if(!parts.len) return
var/datum/organ/external/picked = pick(parts)
picked.heal_damage(brute,burn)
src.UpdateDamageIcon()
src.updatehealth()
+2 -9
View File
@@ -144,15 +144,8 @@
handle_mutations_and_radiation()
if(src.fireloss)
for(var/A in src.organs)
if(!src.organs[A]) continue
var/datum/organ/external/affecting = src.organs[A]
if(!istype(affecting)) continue
if(src.mutations & 2 || (prob(1) && prob(75)))
affecting.heal_damage(0,1)
src.UpdateDamageIcon()
src.updatehealth()
if(src.mutations & 2 || (prob(1) && prob(75)))
src.heal_organ_damage(0,1)
if (src.mutations & 8 && src.health <= 25)
src.mutations &= ~8