mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user