Merge pull request #12200 from Ghommie/Ghommie-cit738

nutrition adjustment wrapper procs from tg.
This commit is contained in:
kevinz000
2020-05-12 12:28:02 -07:00
committed by GitHub
40 changed files with 94 additions and 95 deletions
@@ -117,7 +117,7 @@
if(food <= 0)
dat += "<br>You ran out of food and starved."
if(obj_flags & EMAGGED)
user.nutrition = 0 //yeah you pretty hongry
user.set_nutrition(0) //yeah you pretty hongry
to_chat(user, "<span class='userdanger'>Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.</span>")
if(fuel <= 0)
dat += "<br>You ran out of fuel, and drift, slowly, into a star."
@@ -133,7 +133,7 @@
if(reagents)
for(var/datum/reagent/consumable/R in reagents.reagent_list)
if(R.nutriment_factor > 0)
H.nutrition += R.nutriment_factor * R.volume
H.adjust_nutrition(R.nutriment_factor * R.volume)
reagents.del_reagent(R.type)
reagents.trans_to(H, reagents.total_volume)
qdel(src)
+2 -4
View File
@@ -249,10 +249,8 @@
/obj/item/book/granter/spell/smoke/recoil(mob/user)
..()
to_chat(user,"<span class='caution'>Your stomach rumbles...</span>")
if(user.nutrition)
user.nutrition = 200
if(user.nutrition <= 0)
user.nutrition = 0
if(user.nutrition > NUTRITION_LEVEL_STARVING + 50)
user.set_nutrition(NUTRITION_LEVEL_STARVING + 50)
/obj/item/book/granter/spell/blind
spell = /obj/effect/proc_holder/spell/targeted/trigger/blind