Added the necessary check to blood regeneration.

This commit is contained in:
cib
2012-05-23 19:44:37 +02:00
parent e1355be043
commit 6c8ed5c0bc
+9 -9
View File
@@ -928,17 +928,17 @@
var/blood_volume = round(vessel.get_reagent_amount("blood"))
if(bloodloss)
drip(bloodloss)
/* //Causing too many runtimes, sorry Sky.
else if(blood_volume < 560 && blood_volume)
var/datum/reagent/blood/B = locate() in vessel //Grab some blood
if(!B.data["donor"] == src) //If it's not theirs, then we look for theirs
for(var/datum/reagent/blood/D in vessel)
if(D.data["donor"] == src)
B = D
break
//At this point, we dun care which blood we are adding to, as long as they get more blood.
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
*/
if(B) // Make sure there's some blood at all
if(!B.data["donor"] == src) //If it's not theirs, then we look for theirs
for(var/datum/reagent/blood/D in vessel)
if(D.data["donor"] == src)
B = D
break
//At this point, we dun care which blood we are adding to, as long as they get more blood.
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
if(!blood_volume)
bloodloss = 0
else if(blood_volume > 448)