mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
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:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user