Medical stacks(bandages etc.) now are non-instant again.

This commit is contained in:
cib
2012-10-13 05:45:15 -07:00
parent 9ae4bbfdf8
commit 5a1df1362a
2 changed files with 23 additions and 4 deletions

View File

@@ -186,10 +186,19 @@
src.update_damages()
proc/bandage()
var/rval = 0
status |= ORGAN_BANDAGED
for(var/datum/wound/W in wounds)
rval |= !W.bandaged
W.bandaged = 1
return rval
proc/salve()
var/rval = 0
for(var/datum/wound/W in wounds)
rval |= !W.salved
W.salved = 1
return rval
proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?

View File

@@ -62,11 +62,21 @@
else if(affecting.name == "l_leg")
child = H.get_organ("l_foot")
if (affecting.heal_damage(src.heal_brute, src.heal_burn) || child.heal_damage(src.heal_brute, src.heal_burn))
H.UpdateDamageIcon()
if(src.heal_brute)
if(!affecting.bandage() && !child.bandage())
user << "\red The wounds on this limb have already been bandaged."
else if(src.heal_burn)
if(!affecting.salve() && !child.salve())
user << "\red The wounds on this limb have already been salved."
else
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
H.UpdateDamageIcon()
if(src.heal_brute)
if(!affecting.bandage())
user << "\red The wounds on this limb have already been bandaged."
else if(src.heal_burn)
if(!affecting.salve())
user << "\red The wounds on this limb have already been salved."
H.UpdateDamageIcon()
M.updatehealth()
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))