mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge pull request #4638 from Verkister/patch-32
Fixes movement draining nutrition below negatives
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/mob/living/carbon/human/proc/weightgain()
|
/mob/living/carbon/human/proc/weightgain()
|
||||||
if (nutrition > 0 && stat != 2)
|
if (nutrition >= 0 && stat != 2)
|
||||||
if (nutrition > MIN_NUTRITION_TO_GAIN && weight < MAX_MOB_WEIGHT && weight_gain)
|
if (nutrition > MIN_NUTRITION_TO_GAIN && weight < MAX_MOB_WEIGHT && weight_gain)
|
||||||
weight += species.metabolism*(0.01*weight_gain)
|
weight += species.metabolism*(0.01*weight_gain)
|
||||||
|
|
||||||
@@ -68,6 +68,8 @@
|
|||||||
M.nutrition -= M.species.hunger_factor/10
|
M.nutrition -= M.species.hunger_factor/10
|
||||||
if(M.m_intent == "run")
|
if(M.m_intent == "run")
|
||||||
M.nutrition -= M.species.hunger_factor/10
|
M.nutrition -= M.species.hunger_factor/10
|
||||||
|
if(M.nutrition < 0)
|
||||||
|
M.nutrition = 0
|
||||||
else
|
else
|
||||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||||
if(src.m_intent == "run")
|
if(src.m_intent == "run")
|
||||||
|
|||||||
Reference in New Issue
Block a user