mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Hydration/Nutrition Tweaks (#5439)
This commit is contained in:
@@ -939,7 +939,7 @@
|
||||
else //heal in the dark
|
||||
heal_overall_damage(5,5)
|
||||
|
||||
// nutrition decrease
|
||||
// nutrition decrease over time
|
||||
if(max_nutrition > 0)
|
||||
if (nutrition > 0 && stat != 2)
|
||||
adjustNutritionLoss(nutrition_loss * nutrition_attrition_rate)
|
||||
@@ -952,13 +952,13 @@
|
||||
if(overeatduration > 1)
|
||||
overeatduration -= 2 //doubled the unfat rate
|
||||
|
||||
// hydration decrease
|
||||
// hydration decrease over time
|
||||
if(max_hydration > 0)
|
||||
if (hydration > 0 && stat != 2)
|
||||
adjustHydrationLoss(hydration_loss * hydration_attrition_rate)
|
||||
|
||||
if (hydration / max_hydration > CREW_HYDRATION_OVERHYDRATED)
|
||||
adjustHydrationLoss(1)
|
||||
adjustHydrationLoss(2)
|
||||
if(overdrinkduration < 600) //capped so people don't take forever to undrink
|
||||
overdrinkduration++
|
||||
else
|
||||
@@ -1686,7 +1686,7 @@
|
||||
if (regen > 0)
|
||||
stamina = min(max_stamina, stamina+regen)
|
||||
adjustNutritionLoss(stamina_recovery*0.09)
|
||||
adjustHydrationLoss(stamina_recovery*0.18)
|
||||
adjustHydrationLoss(stamina_recovery*0.32)
|
||||
if (client)
|
||||
hud_used.move_intent.update_move_icon(src)
|
||||
|
||||
|
||||
@@ -111,19 +111,19 @@
|
||||
var/old_y = 0
|
||||
var/drowsyness = 0.0//Carbon
|
||||
var/charges = 0.0
|
||||
var/nutrition = 400.0//Carbon
|
||||
var/nutrition = BASE_MAX_NUTRITION * CREW_NUTRITION_SLIGHTLYHUNGRY //carbon
|
||||
var/nutrition_loss = HUNGER_FACTOR //How much hunger is lost per tick. This is modified by species
|
||||
var/nutrition_attrition_rate = 1 // A multiplier for how much nutrition this specific mob loses per tick.
|
||||
var/max_nutrition = 400
|
||||
|
||||
var/hydration = 400.0//Carbon
|
||||
var/max_nutrition = BASE_MAX_NUTRITION
|
||||
|
||||
var/hydration = BASE_MAX_HYDRATION * CREW_HYDRATION_SLIGHTLYTHIRSTY //carbon
|
||||
var/hydration_loss = THIRST_FACTOR //How much hunger is lost per tick. This is modified by species
|
||||
var/hydration_attrition_rate = 1 // A multiplier for how much hydration this specific mob loses per tick.
|
||||
var/max_hydration = 400
|
||||
var/max_hydration = BASE_MAX_NUTRITION
|
||||
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/overdrinkduration = 0 // How long this guy is overdrinking //Carbon
|
||||
|
||||
|
||||
var/paralysis = 0.0
|
||||
var/stunned = 0.0
|
||||
var/weakened = 0.0
|
||||
|
||||
@@ -120,8 +120,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
// Without enough blood you slowly go hungry and thirsty
|
||||
if(blood_volume <= BLOOD_VOLUME_SAFE)
|
||||
adjustNutritionLoss(get_nutrition_mul(1,5))
|
||||
adjustHydrationLoss(get_hydration_mul(1,13))
|
||||
adjustNutritionLoss(7)
|
||||
adjustHydrationLoss(3)
|
||||
|
||||
//Bleeding out
|
||||
var/blood_max = 0
|
||||
|
||||
@@ -103,14 +103,17 @@
|
||||
|
||||
var/expected_fullness = user.max_nutrition > 0 ? (user.nutrition + (user.reagents.get_reagent_amount("nutriment") * 25)) / user.max_nutrition : CREW_NUTRITION_OVEREATEN + 0.01
|
||||
expected_fullness += (user.overeatduration/600)*0.5
|
||||
var/is_full = (expected_fullness > CREW_NUTRITION_OVEREATEN)
|
||||
var/is_full = (expected_fullness >= 1)
|
||||
|
||||
if(user == target)
|
||||
if(!user.can_eat(src))
|
||||
return
|
||||
|
||||
var/feedback_message
|
||||
if(expected_fullness <= CREW_NUTRITION_VERYHUNGRY)
|
||||
|
||||
if(is_full)
|
||||
feedback_message = "You cannot force any more of \the [src] to go down your throat!"
|
||||
else if(expected_fullness <= CREW_NUTRITION_VERYHUNGRY)
|
||||
feedback_message = "You hungrily chew out a piece of \the [src] and gobble it!"
|
||||
else if(expected_fullness <= CREW_NUTRITION_HUNGRY)
|
||||
feedback_message = "You hungrily begin to eat \the [src]."
|
||||
@@ -120,8 +123,7 @@
|
||||
feedback_message = "You take a bite of \the [src]."
|
||||
else if(expected_fullness <= CREW_NUTRITION_OVEREATEN)
|
||||
feedback_message = "You unwillingly chew a bit of \the [src]."
|
||||
else
|
||||
feedback_message = "You cannot force any more of \the [src] to go down your throat!"
|
||||
|
||||
|
||||
if(is_full)
|
||||
to_chat(user,span("danger",feedback_message))
|
||||
|
||||
Reference in New Issue
Block a user