mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +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:
@@ -293,7 +293,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
H.vessel.remove_reagent("blood",25)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/V = src
|
||||
V.nutrition += blood
|
||||
V.nutrition = min(450,V.nutrition+(blood/2))
|
||||
|
||||
src.mind.vampire.draining = null
|
||||
src << "\blue You stop draining [H.name] of blood."
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1486,9 +1486,9 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
if(!(M.mind in ticker.mode.vampires))
|
||||
M.nutrition += nutriment_factor // For hunger and fatness
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user