mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 23:14:18 +01:00
The last of the hydration/hunger fixes. (#5396)
* Added * more changes * oops
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
if(.)
|
||||
if(src.stat != 2)
|
||||
if(src.nutrition)
|
||||
adjustNutritionLoss(nutrition_loss*0.1)
|
||||
|
||||
@@ -1685,7 +1685,7 @@
|
||||
var/regen = stamina_recovery * (1 - min(((oxyloss) / exhaust_threshold) + ((halloss) / exhaust_threshold), 1))
|
||||
if (regen > 0)
|
||||
stamina = min(max_stamina, stamina+regen)
|
||||
adjustNutritionLoss(stamina_recovery*0.9)
|
||||
adjustNutritionLoss(stamina_recovery*0.09)
|
||||
adjustHydrationLoss(stamina_recovery*0.18)
|
||||
if (client)
|
||||
hud_used.move_intent.update_move_icon(src)
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
equip_slots |= slot_legcuffed
|
||||
|
||||
/datum/hud_data/diona
|
||||
has_hydration = 0
|
||||
has_internals = 0
|
||||
gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1),
|
||||
|
||||
@@ -335,6 +335,8 @@
|
||||
sprint_cost_factor = 0.8
|
||||
climb_coeff = 1.3
|
||||
|
||||
max_hydration_factor = -1
|
||||
|
||||
/datum/species/diona/handle_sprint_cost(var/mob/living/carbon/H, var/cost)
|
||||
var/datum/dionastats/DS = H.get_dionastats()
|
||||
|
||||
|
||||
@@ -1237,7 +1237,8 @@ proc/is_blind(A)
|
||||
return TRUE
|
||||
|
||||
/mob/proc/adjustHydrationLoss(var/amount)
|
||||
if(max_nutrition <= 0)
|
||||
|
||||
if(max_hydration <= 0)
|
||||
return FALSE
|
||||
hydration = max(0,min(max_hydration,hydration - amount))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user