Fixes #881 and lets vampires gain nutrition from consuming blood reagent.

Fixes #881, vampires should no longer get fat from drinking too much blood. Handle_blood now checks for blood that isn't their own and "eats" it.
This commit is contained in:
veganzombeh
2015-04-26 11:33:05 +01:00
parent 0f3b349f1c
commit cf1ac2f602
3 changed files with 15 additions and 2 deletions
+13
View File
@@ -61,6 +61,19 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
if(blood_volume < 560 && blood_volume)
var/datum/reagent/blood/B = locate() in vessel.reagent_list //Grab some blood
if(B) // Make sure there's some blood at all
if(src.mind) //Handles vampires "eating" blood that isn't their own.
if(src.mind in ticker.mode.vampires)
for(var/datum/reagent/blood/BL in vessel.reagent_list)
if(src.nutrition >= 450)
break //We don't want blood tranfusions making vampires fat.
if(BL.data["donor"] != src)
src.nutrition += (15 * REAGENTS_METABOLISM)
BL.volume -= REAGENTS_METABOLISM
if(BL.volume <= 0)
del(BL)
break //Only process one blood per tick, to maintain the same metabolism as nutriment for non-vampires.
if(B.data["donor"] != src) //If it's not theirs, then we look for theirs
for(var/datum/reagent/blood/D in vessel.reagent_list)
if(D.data["donor"] == src)