mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Merge pull request #7516 from VOREStation/upstream-merge-7045
[MIRROR] Removes limits on eating, centralizes nutrition changing.
This commit is contained in:
@@ -46,11 +46,11 @@
|
||||
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.
|
||||
M.nutrition += 20 * removed * volume_mod
|
||||
M.adjust_nutrition(20 * removed * volume_mod)
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
M.adjustToxLoss(removed / 2) // Still has some water in the form of plasma.
|
||||
return
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.nutrition += nutriment_factor * removed
|
||||
M.adjust_nutrition(nutriment_factor * removed)
|
||||
var/strength_mod = 1
|
||||
if(alien == IS_SKRELL)
|
||||
strength_mod *= 5
|
||||
@@ -448,7 +448,7 @@
|
||||
glass_icon = DRINK_ICON_NOISY
|
||||
|
||||
/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.nutrition += removed * 3
|
||||
M.adjust_nutrition(removed * 3)
|
||||
|
||||
var/effective_dose = dose
|
||||
if(issmall(M))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
|
||||
M.heal_organ_damage(0.5 * removed, 0)
|
||||
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) // For hunger and fatness
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
|
||||
/datum/reagent/nutriment/glucose
|
||||
@@ -388,10 +388,7 @@
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
|
||||
/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.nutrition = max(M.nutrition - 10 * removed, 0)
|
||||
M.overeatduration = 0
|
||||
if(M.nutrition < 0)
|
||||
M.nutrition = 0
|
||||
M.adjust_nutrition(-10 * removed)
|
||||
|
||||
/* Non-food stuff like condiments */
|
||||
|
||||
@@ -659,7 +656,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.nutrition += nutrition * removed
|
||||
M.adjust_nutrition(nutrition * removed)
|
||||
M.dizziness = max(0, M.dizziness + adj_dizzy)
|
||||
M.drowsyness = max(0, M.drowsyness + adj_drowsy)
|
||||
M.sleeping = max(0, M.sleeping + adj_sleepy)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -520,7 +520,7 @@
|
||||
return
|
||||
if(alien == IS_SLIME)
|
||||
if(dose >= 5) //Not effective in small doses, though it causes toxloss at higher ones, it will make the regeneration for brute and burn more 'efficient' at the cost of more nutrition.
|
||||
M.nutrition -= removed * 2
|
||||
M.adjust_nutrition(removed * 2)
|
||||
M.adjustBruteLoss(-2 * removed)
|
||||
M.adjustFireLoss(-1 * removed)
|
||||
chem_effective = 0.5
|
||||
@@ -548,7 +548,7 @@
|
||||
if(alien == IS_SLIME)
|
||||
M.make_jittery(4) //Hyperactive fluid pumping results in unstable 'skeleton', resulting in vibration.
|
||||
if(dose >= 5)
|
||||
M.nutrition = (M.nutrition - (removed * 2)) //Sadly this movement starts burning food in higher doses.
|
||||
M.adjust_nutrition(-removed * 2) // Sadly this movement starts burning food in higher doses.
|
||||
..()
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch", "blink_r", "shiver"))
|
||||
@@ -738,7 +738,7 @@
|
||||
if(prob(10))
|
||||
H.vomit(1)
|
||||
else if(H.nutrition > 30)
|
||||
H.nutrition = max(0, H.nutrition - round(30 * removed))
|
||||
M.adjust_nutrition(-removed * 30)
|
||||
else
|
||||
H.adjustToxLoss(-10 * removed) // Carthatoline based, considering cost.
|
||||
|
||||
@@ -1092,7 +1092,7 @@
|
||||
M.make_jittery(5)
|
||||
if(dose >= 20 || M.toxloss >= 60) //Core disentigration, cellular mass begins treating itself as an enemy, while maintaining regeneration. Slime-cancer.
|
||||
M.adjustBrainLoss(2 * removed)
|
||||
M.nutrition = max(H.nutrition - 20, 0)
|
||||
M.adjust_nutrition(-20)
|
||||
if(M.bruteloss >= 60 && M.toxloss >= 60 && M.brainloss >= 30) //Total Structural Failure. Limbs start splattering.
|
||||
var/obj/item/organ/external/O = pick(H.organs)
|
||||
if(prob(20) && !istype(O, /obj/item/organ/external/chest/unbreakable/slime) && !istype(O, /obj/item/organ/external/groin/unbreakable/slime))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(alien == IS_SLIME)
|
||||
removed *= 0.25 // Results in half the standard tox as normal. Prometheans are 'Small' for flaps.
|
||||
if(dose >= 10)
|
||||
M.nutrition += strength * removed //Body has to deal with the massive influx of toxins, rather than try using them to repair.
|
||||
M.adjust_nutrition(strength * removed) // Body has to deal with the massive influx of toxins, rather than try using them to repair.
|
||||
else
|
||||
M.heal_organ_damage((10/strength) * removed, (10/strength) * removed) //Doses of toxins below 10 units, and 10 strength, are capable of providing useful compounds for repair.
|
||||
M.adjustToxLoss(strength * removed)
|
||||
@@ -396,7 +396,7 @@
|
||||
|
||||
/datum/reagent/toxin/sifslurry/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_DIONA) // Symbiotic bacteria.
|
||||
M.nutrition += strength * removed
|
||||
M.adjust_nutrition(strength * removed)
|
||||
return
|
||||
else
|
||||
M.add_modifier(/datum/modifier/slow_pulse, 30 SECONDS)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user