Merge nutrition refactor for vorestation

This commit is contained in:
Aronai Sieyes
2020-04-29 18:34:22 -04:00
parent f1cabd6742
commit 893130bdff
32 changed files with 98 additions and 469 deletions
@@ -46,7 +46,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.gets_food_nutrition == 0)
H.nutrition += removed
H.adjust_nutrition(removed)
is_vampire = 1 //VOREStation Edit END
if(alien == IS_SLIME) // Treat it like nutriment for the jello, but not equivalent.
M.heal_organ_damage(0.2 * removed * volume_mod, 0) // More 'effective' blood means more usable material.
@@ -46,12 +46,8 @@
if(IS_CHIMERA) removed *= 0.25 //VOREStation Edit
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
M.heal_organ_damage(0.5 * removed, 0)
<<<<<<< HEAD
if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food.
M.nutrition += nutriment_factor * removed // For hunger and fatness
=======
M.adjust_nutrition(nutriment_factor * removed)
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
M.adjust_nutrition(nutriment_factor * removed) // For hunger and fatness
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
/datum/reagent/nutriment/glucose
@@ -29,10 +29,7 @@
color = "#fff200"
/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.nutrition = max(M.nutrition - 20 * removed, 0)
M.overeatduration = 0
if(M.nutrition < 0)
M.nutrition = 0
M.adjust_nutrition(-20 * removed)
/datum/reagent/ethanol/deathbell
name = "Deathbell"
@@ -79,13 +76,13 @@
if(IS_SKRELL)
M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
if(IS_TESHARI)
M.nutrition += (alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
M.adjust_nutrition(alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
if(IS_UNATHI)
M.nutrition += (alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
M.adjust_nutrition(alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
//Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
//Chimera don't need their own case here since their factors for nutriment and protein cancel out.
else
M.nutrition += (alt_nutriment_factor * removed)
M.adjust_nutrition(alt_nutriment_factor * removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling
@@ -101,7 +98,7 @@
M.adjustToxLoss(removed) //Equivalent to half as much protein, since it's half protein.
if(M.species.gets_food_nutrition)
if(alien == IS_SLIME || alien == IS_CHIMERA) //slimes and chimera can get nutrition from injected nutriment and protein
M.nutrition += (alt_nutriment_factor * removed)
M.adjust_nutrition(alt_nutriment_factor * removed)
@@ -7,7 +7,7 @@
if("blood")
user.show_message("<span class='warning'>You sink your fangs into \the [src] and suck the blood out of it!</span>")
user.visible_message("<font color='red'>[user] sinks their fangs into \the [src] and drains it!</font>")
user.nutrition += remove_volume*5
user.adjust_nutrition(remove_volume*5)
reagents.remove_reagent(reagent_to_remove, remove_volume)
update_icon()
return