mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Merge pull request #7516 from VOREStation/upstream-merge-7045
[MIRROR] Removes limits on eating, centralizes nutrition changing.
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/crayon/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the crayon and swallow it.")
|
||||
user.nutrition += 1
|
||||
@@ -195,7 +195,7 @@
|
||||
shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/crayon/marker/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/marker/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the marker and swallow it.")
|
||||
user.nutrition += 1
|
||||
|
||||
@@ -492,7 +492,7 @@ HALOGEN COUNTER - Radcount on mobs
|
||||
for(var/potential_color in S.slime_mutation)
|
||||
var/mob/living/simple_mob/slime/xenobio/slime = potential_color
|
||||
mutations.Add(initial(slime.slime_color))
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.<br>Extract potential: [S.cores]<br>Nutrition: [S.nutrition]/[S.get_max_nutrition()]")
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.<br>Extract potential: [S.cores]<br>Nutrition: [S.nutrition]/[S.max_nutrition]")
|
||||
|
||||
if (S.nutrition < S.get_starve_nutrition())
|
||||
user.show_message("<span class='alert'>Warning: Subject is starving!</span>")
|
||||
|
||||
@@ -38,11 +38,12 @@
|
||||
|
||||
/obj/item/weapon/implant/reagent_generator/process()
|
||||
var/before_gen
|
||||
if(imp_in && generated_reagents)
|
||||
if(isliving(imp_in) && generated_reagents)
|
||||
before_gen = reagents.total_volume
|
||||
var/mob/living/L = imp_in
|
||||
if(reagents.total_volume < reagents.maximum_volume)
|
||||
if(imp_in.nutrition >= gen_cost)
|
||||
do_generation()
|
||||
if(L.nutrition >= gen_cost)
|
||||
do_generation(L)
|
||||
else
|
||||
return
|
||||
else
|
||||
@@ -55,8 +56,8 @@
|
||||
else if(reagents.total_volume == reagents.maximum_volume && before_gen < reagents.maximum_volume)
|
||||
to_chat(imp_in, "<span class='warning'>[pick(full_message)]</span>")
|
||||
|
||||
/obj/item/weapon/implant/reagent_generator/proc/do_generation()
|
||||
imp_in.nutrition -= gen_cost
|
||||
/obj/item/weapon/implant/reagent_generator/proc/do_generation(var/mob/living/L)
|
||||
L.adjust_nutrition(-gen_cost)
|
||||
for(var/reagent in generated_reagents)
|
||||
reagents.add_reagent(reagent, generated_reagents[reagent])
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
/obj/item/weapon/cell/standin/give(var/amount)
|
||||
. = ..(amount * NUTRITION_COEFF) //Shrink amount to store
|
||||
hume.nutrition += . //Add the amount we really stored
|
||||
hume.adjust_nutrition(.) //Add the amount we really stored
|
||||
. /= NUTRITION_COEFF //Inflate amount to take from the giver
|
||||
|
||||
#undef NUTRITION_COEFF
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
flick("[icon_state]_[weight]", src)
|
||||
if(do_after(user, 20 + (weight * 10)))
|
||||
playsound(src.loc, 'sound/effects/weightdrop.ogg', 25, 1)
|
||||
user.nutrition -= weight * 10
|
||||
user.adjust_nutrition(weight * -10)
|
||||
to_chat(user, "<span class='notice'>You lift the weights [qualifiers[weight]].</span>")
|
||||
being_used = 0
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user