Merge pull request #489 from Cameron653/master

Adds weight gain/loss depending on current nutrition
This commit is contained in:
Spades
2016-08-17 19:32:29 -04:00
committed by GitHub
4 changed files with 12 additions and 3 deletions
+2 -2
View File
@@ -70,7 +70,7 @@
//Organs and blood
handle_organs()
stabilize_body_temperature() //Body temperature adjusts itself (self-regulation)
weightgain() //VORESTATION EDIT
handle_shock()
handle_pain()
@@ -1658,4 +1658,4 @@
..()
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
@@ -0,0 +1,7 @@
/mob/living/carbon/human/proc/weightgain()
if (nutrition > 0 && stat != 2)
if (nutrition > 450 && weight < 500 && weight_gain)
weight += metabolism*(0.01*weight_gain)
else if (nutrition <= 50 && stat != 2 && weight > 70 && weight_loss)
weight -= metabolism*(0.01*weight_loss) // starvation weight loss
+2 -1
View File
@@ -9,6 +9,7 @@
var/weight_loss = 0.5 // How fast you lose weight
var/egg_type = "egg" // Default egg type.
var/feral = 0 // If the mob is feral or not. Does nothing for non xenochimera at the moment.
var/metabolism = 0.0015
//
// Hook for generic creation of stuff on new creatures
@@ -374,4 +375,4 @@
"oxygen" = 21,
"nitrogen" = 79)
temperature = 293.150
total_moles = 40
total_moles = 40
+1
View File
@@ -1567,6 +1567,7 @@
#include "code\modules\mob\living\carbon\human\human_species_vr.dm"
#include "code\modules\mob\living\carbon\human\inventory.dm"
#include "code\modules\mob\living\carbon\human\life.dm"
#include "code\modules\mob\living\carbon\human\life_vr.dm"
#include "code\modules\mob\living\carbon\human\login.dm"
#include "code\modules\mob\living\carbon\human\logout.dm"
#include "code\modules\mob\living\carbon\human\MedicalSideEffects.dm"