sorting thirst code + not-water replenishes hydration

This commit is contained in:
DragonTrance
2021-02-23 17:19:06 -07:00
parent 300b8bfc08
commit cd3ca2b8d1
11 changed files with 32 additions and 20 deletions
+2 -2
View File
@@ -44,7 +44,7 @@
//Blood regeneration if there is some space
if(blood_volume < (BLOOD_VOLUME_NORMAL * blood_ratio) && !HAS_TRAIT(src, TRAIT_NOHUNGER))
var/nutrition_ratio = 0
var/thirst_ratio = 1
//thirst_ratio = 1 //Uncomment if something fancy gets added
switch(nutrition)
if(0 to NUTRITION_LEVEL_STARVING)
nutrition_ratio = 0.2
@@ -61,7 +61,7 @@
if(satiety > 80)
nutrition_ratio *= 1.25
nutrition = max(0, nutrition - nutrition_ratio * HUNGER_FACTOR)
thirst = max(0, thirst - thirst_ratio * THIRST_FACTOR)
thirst = max(0, thirst - 0.8 * THIRST_FACTOR)
blood_volume = min((BLOOD_VOLUME_NORMAL * blood_ratio), blood_volume + 0.5 * nutrition_ratio)
//Effects of bloodloss