mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Hunger Rework
This commit is contained in:
@@ -77,8 +77,8 @@
|
||||
if(prob(15/D.permeability_mod))
|
||||
return
|
||||
|
||||
/* if(satiety>0 && prob(satiety/10)) // positive satiety makes it harder to contract the disease.
|
||||
return*/
|
||||
if(satiety > 0 && prob(satiety/10)) // positive satiety makes it harder to contract the disease.
|
||||
return
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ var/list/diseases = subtypesof(/datum/disease)
|
||||
return
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin") || (affected_mob.satiety > 0 && prob(affected_mob.satiety/10)))
|
||||
return
|
||||
|
||||
var/spread_range = 1
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
if(!changeling.has_dna(target.dna))
|
||||
changeling.absorb_dna(target, user)
|
||||
|
||||
if(user.nutrition < 450) // Nutrition level before overeat_duration starts ticking for you to become obese.
|
||||
user.nutrition = min((user.nutrition + target.nutrition), 450)
|
||||
if(user.nutrition < NUTRITION_LEVEL_WELL_FED)
|
||||
user.nutrition = min((user.nutrition + target.nutrition), NUTRITION_LEVEL_WELL_FED)
|
||||
|
||||
if(target.mind)//if the victim has got a mind
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ Made by Xhuis
|
||||
if(!H.weakeyes)
|
||||
H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs
|
||||
var/light_amount = 0
|
||||
H.nutrition = 450 //i aint never get hongry
|
||||
H.nutrition = NUTRITION_LEVEL_WELL_FED //i aint never get hongry
|
||||
if(isturf(H.loc))
|
||||
var/turf/T = H.loc
|
||||
light_amount = T.get_lumcount() * 10
|
||||
@@ -346,7 +346,7 @@ Made by Xhuis
|
||||
if(!H.weakeyes)
|
||||
H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs
|
||||
var/light_amount = 0
|
||||
H.nutrition = 450 //i aint never get hongry
|
||||
H.nutrition = NUTRITION_LEVEL_WELL_FED //i aint never get hongry
|
||||
if(isturf(H.loc))
|
||||
var/turf/T = H.loc
|
||||
light_amount = T.get_lumcount() * 10
|
||||
|
||||
@@ -300,7 +300,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
H.vessel.remove_reagent("blood", 25)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/V = owner
|
||||
V.nutrition = min(450, V.nutrition + (blood / 2))
|
||||
V.nutrition = min(NUTRITION_LEVEL_WELL_FED, V.nutrition + (blood / 2))
|
||||
|
||||
draining = null
|
||||
to_chat(owner, "<span class='notice'>You stop draining [H.name] of blood.</span>")
|
||||
@@ -325,8 +325,8 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
else if(istype(p, /datum/vampire_passive))
|
||||
var/datum/vampire_passive/power = p
|
||||
to_chat(owner, "<span class='notice'>[power.gain_desc]</span>")
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/game_mode/proc/remove_vampire(datum/mind/vampire_mind)
|
||||
if(vampire_mind in vampires)
|
||||
ticker.mode.vampires -= vampire_mind
|
||||
@@ -335,12 +335,12 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
if(vampire_mind.vampire)
|
||||
vampire_mind.vampire.remove_vampire_powers()
|
||||
qdel(vampire_mind.vampire)
|
||||
vampire_mind.vampire = null
|
||||
vampire_mind.vampire = null
|
||||
if(issilicon(vampire_mind.current))
|
||||
to_chat(vampire_mind.current, "<span class='userdanger'>You have been turned into a robot! You can feel your powers fading away...</span>")
|
||||
else
|
||||
to_chat(vampire_mind.current, "<span class='userdanger'>You have been brainwashed! You are no longer a vampire.</span>")
|
||||
ticker.mode.update_vampire_icons_removed(vampire_mind)
|
||||
ticker.mode.update_vampire_icons_removed(vampire_mind)
|
||||
|
||||
//prepare for copypaste
|
||||
/datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind)
|
||||
|
||||
@@ -795,8 +795,8 @@
|
||||
desc = "A self-serving Chinese food machine, for all your Chinese food needs."
|
||||
product_slogans = "Taste 5000 years of culture!"
|
||||
icon_state = "snack"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein = 5, /obj/item/weapon/reagent_containers/food/snacks/chinese/tao = 5, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles = 5,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/rice = 5, /obj/item/weapon/reagent_containers/food/snacks/wingfangchu = 5)
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein = 6, /obj/item/weapon/reagent_containers/food/snacks/chinese/tao = 6, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles = 6,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/rice = 6)
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein = 50, /obj/item/weapon/reagent_containers/food/snacks/chinese/tao = 50, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles = 50,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/rice = 50, /obj/item/weapon/reagent_containers/food/snacks/wingfangchu = 50)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
possible_transfer_amounts = null
|
||||
volume = 50 //Sets the default container amount for all food items.
|
||||
var/filling_color = "#FFFFFF" //Used by sandwiches.
|
||||
var/junkiness = 0 //for junk food. used to lower human satiety.
|
||||
var/bitesize = 1
|
||||
var/consume_sound = 'sound/items/eatfood.ogg'
|
||||
var/apply_type = INGEST
|
||||
@@ -15,5 +16,5 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/New()
|
||||
..()
|
||||
pixel_x = rand(-10, 10) //Randomizes postion
|
||||
pixel_y = rand(-10, 10)
|
||||
pixel_x = rand(-5, 5) //Randomizes postion
|
||||
pixel_y = rand(-5, 5)
|
||||
@@ -134,7 +134,9 @@
|
||||
trash = /obj/item/trash/candy
|
||||
filling_color = "#7D5F46"
|
||||
bitesize = 3
|
||||
list_reagents = list("nutriment" = 2, "chocolate" = 5)
|
||||
junkiness = 25
|
||||
list_reagents = list("nutriment" = 1, "chocolate" = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/candy/candycane
|
||||
name = "candy cane"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.eat(src, user))
|
||||
bitecount++
|
||||
@@ -263,6 +263,7 @@
|
||||
icon_state = "chips"
|
||||
trash = /obj/item/trash/chips
|
||||
filling_color = "#E8C31E"
|
||||
junkiness = 20
|
||||
list_reagents = list("nutriment" = 3, "sodiumchloride" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cornchips
|
||||
@@ -913,7 +914,8 @@
|
||||
trash = /obj/item/trash/sosjerky
|
||||
filling_color = "#631212"
|
||||
bitesize = 2
|
||||
list_reagents = list("protein" = 4)
|
||||
junkiness = 25
|
||||
list_reagents = list("protein" = 1, "sugar" = 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/pistachios
|
||||
name = "Pistachios"
|
||||
@@ -921,7 +923,8 @@
|
||||
desc = "A snack of deliciously salted pistachios. A perfectly valid choice..."
|
||||
trash = /obj/item/trash/pistachios
|
||||
filling_color = "#BAD145"
|
||||
list_reagents = list("plantmatter" = 6, "sodiumchloride" = 1)
|
||||
junkiness = 20
|
||||
list_reagents = list("plantmatter" = 2, "sodiumchloride" = 1, "sugar" = 4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/no_raisin
|
||||
name = "4no Raisins"
|
||||
@@ -929,7 +932,8 @@
|
||||
desc = "Best raisins in the universe. Not sure why."
|
||||
trash = /obj/item/trash/raisins
|
||||
filling_color = "#343834"
|
||||
list_reagents = list("plantmatter" = 6)
|
||||
junkiness = 25
|
||||
list_reagents = list("plantmatter" = 2, "sugar" = 4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie
|
||||
name = "Space Twinkie"
|
||||
@@ -937,6 +941,7 @@
|
||||
desc = "Guaranteed to survive longer then you will."
|
||||
filling_color = "#FFE591"
|
||||
bitesize = 2
|
||||
junkiness = 25
|
||||
list_reagents = list("sugar" = 4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers
|
||||
@@ -946,35 +951,40 @@
|
||||
trash = /obj/item/trash/cheesie
|
||||
filling_color = "#FFA305"
|
||||
bitesize = 2
|
||||
list_reagents = list("nutriment" = 4, "fake_cheese" = 2)
|
||||
junkiness = 25
|
||||
list_reagents = list("nutriment" = 1, "fake_cheese" = 2, "sugar" = 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein
|
||||
name = "chow mein"
|
||||
desc = "What is in this anyways?"
|
||||
icon_state = "chinese1"
|
||||
bitesize = 2
|
||||
list_reagents = list("nutriment" = 6, "beans" = 3, "msg" = 4)
|
||||
junkiness = 25
|
||||
list_reagents = list("nutriment" = 1, "beans" = 3, "msg" = 4, "sugar" = 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/tao
|
||||
name = "Admiral Yamamoto carp"
|
||||
desc = "Tastes like chicken."
|
||||
icon_state = "chinese2"
|
||||
bitesize = 2
|
||||
list_reagents = list("nutriment" = 4, "protein" = 2, "msg" = 4)
|
||||
junkiness = 25
|
||||
list_reagents = list("nutriment" = 1, "protein" = 1, "msg" = 4, "sugar" = 4)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/newdles
|
||||
name = "chinese newdles"
|
||||
desc = "Made fresh, weekly!"
|
||||
icon_state = "chinese3"
|
||||
bitesize = 2
|
||||
list_reagents = list("nutriment" = 6, "msg" = 4)
|
||||
junkiness = 25
|
||||
list_reagents = list("nutriment" = 1, "msg" = 4, "sugar" = 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/rice
|
||||
name = "fried rice"
|
||||
desc = "A timeless classic."
|
||||
icon_state = "chinese4"
|
||||
bitesize = 2
|
||||
list_reagents = list("nutriment" = 3, "rice" = 3, "msg" = 4)
|
||||
junkiness = 20
|
||||
list_reagents = list("nutriment" = 1, "rice" = 3, "msg" = 4, "sugar" = 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/syndicake
|
||||
name = "Syndi-Cakes"
|
||||
@@ -2659,4 +2669,5 @@
|
||||
trash = /obj/item/trash/tastybread
|
||||
filling_color = "#A66829"
|
||||
bitesize = 2
|
||||
junkiness = 20
|
||||
list_reagents = list("nutriment" = 6)
|
||||
@@ -34,12 +34,12 @@
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(src.nutrition && src.stat != 2)
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
if(nutrition && stat != DEAD)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
if(m_intent == "run")
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
if((FAT in mutations) && m_intent == "run" && bodytemperature <= 360)
|
||||
bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
@@ -939,9 +939,10 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
/mob/living/carbon/proc/eat(var/obj/item/weapon/reagent_containers/food/toEat, mob/user)
|
||||
if(!istype(toEat))
|
||||
return 0
|
||||
var/fullness = 0
|
||||
var/fullness = nutrition + 10
|
||||
if(istype(toEat, /obj/item/weapon/reagent_containers/food/snacks))
|
||||
fullness = nutrition + (reagents.get_reagent_amount("nutriment") * 20) + (reagents.get_reagent_amount("protein") * 25) + (reagents.get_reagent_amount("plantmatter") * 25)
|
||||
for(var/datum/reagent/consumable/C in reagents.reagent_list) //we add the nutrition value of what we're currently digesting
|
||||
fullness += C.nutriment_factor * C.volume / C.metabolization_rate
|
||||
if(user == src)
|
||||
if(istype(toEat, /obj/item/weapon/reagent_containers/food/drinks))
|
||||
if(!selfDrink(toEat))
|
||||
@@ -960,15 +961,18 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
if(istype(toEat, /obj/item/weapon/reagent_containers/food/pill))
|
||||
to_chat(src, "<span class='notify'>You [toEat.apply_method] [toEat].</span>")
|
||||
else
|
||||
if(toEat.junkiness && satiety < -150 && nutrition > NUTRITION_LEVEL_STARVING + 50 )
|
||||
to_chat(src, "<span class='notice'>You don't feel like eating any more junk food at the moment.</span>")
|
||||
return 0
|
||||
if(fullness <= 50)
|
||||
to_chat(src, "<span class='warning'>You hungrily chew out a piece of [toEat] and gobble it!</span>")
|
||||
else if(fullness > 50 && fullness <= 150)
|
||||
else if(fullness > 50 && fullness < 150)
|
||||
to_chat(src, "<span class='notice'>You hungrily begin to eat [toEat].</span>")
|
||||
else if(fullness > 150 && fullness <= 350)
|
||||
else if(fullness > 150 && fullness < 500)
|
||||
to_chat(src, "<span class='notice'>You take a bite of [toEat].</span>")
|
||||
else if(fullness > 350 && fullness <= 550)
|
||||
else if(fullness > 500 && fullness < 600)
|
||||
to_chat(src, "<span class='notice'>You unwillingly chew a bit of [toEat].</span>")
|
||||
else if(fullness > (550 * (1 + overeatduration / 2000))) // The more you eat - the more you can eat
|
||||
else if(fullness > (600 * (1 + overeatduration / 2000))) // The more you eat - the more you can eat
|
||||
to_chat(src, "<span class='warning'>You cannot force any more of [toEat] to go down your throat.</span>")
|
||||
return 0
|
||||
return 1
|
||||
@@ -977,7 +981,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/forceFed(var/obj/item/weapon/reagent_containers/food/toEat, mob/user, fullness)
|
||||
if(fullness <= (550 * (1 + overeatduration / 1000)))
|
||||
if(fullness <= (600 * (1 + overeatduration / 1000)))
|
||||
if(!toEat.instant_application)
|
||||
visible_message("<span class='warning'>[user] attempts to force [src] to [toEat.apply_method] [toEat].</span>")
|
||||
else
|
||||
@@ -1005,15 +1009,14 @@ so that different stomachs can handle things in different ways VB*/
|
||||
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat)
|
||||
if(!toEat.reagents)
|
||||
return
|
||||
if(satiety > -200)
|
||||
satiety -= toEat.junkiness
|
||||
if(toEat.consume_sound)
|
||||
playsound(loc, toEat.consume_sound, rand(10,50), 1)
|
||||
if(toEat.reagents.total_volume)
|
||||
toEat.reagents.reaction(src, toEat.apply_type)
|
||||
spawn(0)
|
||||
if(toEat.reagents.total_volume > toEat.bitesize)
|
||||
toEat.reagents.trans_to(src, toEat.bitesize*toEat.transfer_efficiency)
|
||||
else
|
||||
toEat.reagents.trans_to(src, toEat.reagents.total_volume*toEat.transfer_efficiency)
|
||||
var/fraction = min(toEat.bitesize/reagents.total_volume, 1)
|
||||
toEat.reagents.reaction(src, toEat.apply_type, fraction)
|
||||
toEat.reagents.trans_to(src, toEat.bitesize*toEat.transfer_efficiency)
|
||||
|
||||
/mob/living/carbon/get_access()
|
||||
. = ..()
|
||||
|
||||
@@ -253,10 +253,10 @@
|
||||
if(5)
|
||||
msg += "[t_He] looks absolutely soaked.\n"
|
||||
|
||||
if(nutrition < 100)
|
||||
if(nutrition < NUTRITION_LEVEL_STARVING - 50)
|
||||
msg += "[t_He] [t_is] severely malnourished.\n"
|
||||
else if(nutrition >= 500)
|
||||
if(user.nutrition < 100)
|
||||
else if(nutrition >= NUTRITION_LEVEL_FAT)
|
||||
if(user.nutrition < NUTRITION_LEVEL_STARVING - 50)
|
||||
msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] quite chubby.\n"
|
||||
|
||||
@@ -511,17 +511,14 @@
|
||||
//END FIRE CODE
|
||||
|
||||
/mob/living/carbon/human/proc/stabilize_temperature_from_calories()
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
|
||||
if(bodytemperature <= species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
|
||||
nutrition -= 2
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
bodytemperature += max((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
bodytemperature += max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
if(bodytemperature >= species.cold_level_1 && bodytemperature <= species.heat_level_1)
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
bodytemperature += body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR
|
||||
bodytemperature += body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR
|
||||
if(bodytemperature >= species.heat_level_1) //360.15 is 310.15 + 50, the temperature where you start to feel effects.
|
||||
//We totally need a sweat system cause it totally makes sense...~
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
|
||||
|
||||
@@ -681,11 +678,20 @@
|
||||
becomeFat()
|
||||
|
||||
// nutrition decrease
|
||||
if(nutrition > 0 && stat != 2)
|
||||
nutrition = max (0, nutrition - HUNGER_FACTOR)
|
||||
if(nutrition > 0 && stat != DEAD)
|
||||
// THEY HUNGER
|
||||
var/hunger_rate = HUNGER_FACTOR
|
||||
if(satiety > 0)
|
||||
satiety--
|
||||
if(satiety < 0)
|
||||
satiety++
|
||||
if(prob(round(-satiety/40)))
|
||||
Jitter(5)
|
||||
hunger_rate = 3 * HUNGER_FACTOR
|
||||
nutrition = max(0, nutrition - hunger_rate)
|
||||
|
||||
if(nutrition > 450)
|
||||
if(overeatduration < 800) //capped so people don't take forever to unfat
|
||||
if(nutrition > NUTRITION_LEVEL_FULL)
|
||||
if(overeatduration < 600) //capped so people don't take forever to unfat
|
||||
overeatduration++
|
||||
|
||||
else
|
||||
@@ -695,6 +701,22 @@
|
||||
else
|
||||
overeatduration -= 2
|
||||
|
||||
//metabolism change
|
||||
if(nutrition > NUTRITION_LEVEL_FAT)
|
||||
metabolism_efficiency = 1
|
||||
else if(nutrition > NUTRITION_LEVEL_FED && satiety > 80)
|
||||
if(metabolism_efficiency != 1.25)
|
||||
to_chat(src, "<span class='notice'>You feel vigorous.</span>")
|
||||
metabolism_efficiency = 1.25
|
||||
else if(nutrition < NUTRITION_LEVEL_STARVING + 50)
|
||||
if(metabolism_efficiency != 0.8)
|
||||
to_chat(src, "<span class='notice'>You feel sluggish.</span>")
|
||||
metabolism_efficiency = 0.8
|
||||
else
|
||||
if(metabolism_efficiency == 1.25)
|
||||
to_chat(src, "<span class='notice'>You no longer feel vigorous.</span>")
|
||||
metabolism_efficiency = 1
|
||||
|
||||
if(drowsyness)
|
||||
AdjustDrowsy(-1)
|
||||
EyeBlurry(2)
|
||||
@@ -937,20 +959,8 @@
|
||||
if(getToxLoss() >= 45 && nutrition > 20)
|
||||
lastpuke ++
|
||||
if(lastpuke >= 25) // about 25 second delay I guess
|
||||
Stun(5)
|
||||
|
||||
visible_message("<span class='danger'>[src] throws up!</span>", \
|
||||
"<span class='userdanger'>[src] throws up!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/turf/location = loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(src, 1)
|
||||
|
||||
nutrition -= 20
|
||||
vomit(20, 0, 1, 0, 1)
|
||||
adjustToxLoss(-3)
|
||||
|
||||
// make it so you can only puke so fast
|
||||
lastpuke = 0
|
||||
|
||||
//0.1% chance of playing a scary sound to someone who's in complete darkness
|
||||
|
||||
@@ -817,8 +817,8 @@
|
||||
H.nutrition += light_amount
|
||||
H.traumatic_shock -= light_amount
|
||||
|
||||
if(H.nutrition > 450)
|
||||
H.nutrition = 450
|
||||
if(H.nutrition > NUTRITION_LEVEL_WELL_FED)
|
||||
H.nutrition = NUTRITION_LEVEL_WELL_FED
|
||||
|
||||
if((light_amount >= 5) && !H.suiciding) //if there's enough light, heal
|
||||
H.adjustBruteLoss(-(light_amount/2))
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
SetDruggy(0)
|
||||
SetHallucinate(0)
|
||||
blinded = 0
|
||||
nutrition = 400
|
||||
nutrition = NUTRITION_LEVEL_FED + 50
|
||||
bodytemperature = 310
|
||||
CureBlind()
|
||||
CureNearsighted()
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
var/implanting = 0 //Used for the mind-slave implant
|
||||
var/floating = 0
|
||||
var/mob_size = MOB_SIZE_HUMAN
|
||||
var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
|
||||
var/nightvision = 0
|
||||
|
||||
var/bloodcrawl = 0 //0 No blood crawling, 1 blood crawling, 2 blood crawling+mob devour
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
var/bodytemperature = 310.055 //98.7 F
|
||||
var/flying = 0
|
||||
var/charges = 0.0
|
||||
var/nutrition = 400.0//Carbon
|
||||
var/nutrition = NUTRITION_LEVEL_FED + 50 //Carbon
|
||||
var/satiety = 0 //Carbon
|
||||
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/intent = null//Living
|
||||
|
||||
@@ -678,7 +678,7 @@
|
||||
to_chat(H, "<span class='warning'>The APC power currents surge erratically, damaging your chassis!</span>")
|
||||
H.adjustFireLoss(10,0)
|
||||
else if(src.cell && src.cell.charge > 0)
|
||||
if(H.nutrition < 450)
|
||||
if(H.nutrition < NUTRITION_LEVEL_WELL_FED)
|
||||
if(src.cell.charge >= 500)
|
||||
H.nutrition += 50
|
||||
src.cell.charge -= 500
|
||||
@@ -689,8 +689,8 @@
|
||||
to_chat(user, "<span class='notice'>You slot your fingers into the APC interface and siphon off some of the stored charge for your own use.</span>")
|
||||
if(src.cell.charge < 0)
|
||||
src.cell.charge = 0
|
||||
if(H.nutrition > 500)
|
||||
H.nutrition = 500
|
||||
if(H.nutrition > NUTRITION_LEVEL_WELL_FED + 50)
|
||||
H.nutrition = NUTRITION_LEVEL_WELL_FED + 50
|
||||
src.charging = 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You are already fully charged.</span>")
|
||||
|
||||
@@ -136,12 +136,11 @@
|
||||
var/mob/living/M = target
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
|
||||
if(H.species.flags & IS_PLANT)
|
||||
if(prob(15))
|
||||
M.apply_effect((rand(30,80)),IRRADIATE)
|
||||
M.Weaken(5)
|
||||
for(var/mob/V in viewers(src))
|
||||
V.show_message("<span class='warning'>[M] writhes in pain as \his vacuoles boil.</span>", 3, "<span class='warning'>You hear the crunching of leaves.</span>", 2)
|
||||
M.visible_message("<span class='warning'>[M] writhes in pain as \his vacuoles boil.</span>", "<span class='userdanger'>You writhe in pain as your vacuoles boil!</span>", "<span class='italics'>You hear the crunching of leaves.</span>")
|
||||
if(prob(35))
|
||||
if(prob(80))
|
||||
randmutb(M)
|
||||
@@ -152,7 +151,7 @@
|
||||
else
|
||||
M.adjustFireLoss(rand(5,15))
|
||||
M.show_message("<span class='warning'>The radiation beam singes you!</span>")
|
||||
else if(istype(target, /mob/living/carbon/))
|
||||
else if(iscarbon(target))
|
||||
M.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
else
|
||||
return 1
|
||||
@@ -170,9 +169,9 @@
|
||||
var/mob/M = target
|
||||
if(ishuman(target)) //These rays make plantmen fat.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
|
||||
M.nutrition += 30
|
||||
else if(istype(target, /mob/living/carbon/))
|
||||
if(H.species.flags & IS_PLANT)
|
||||
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
|
||||
else if(iscarbon(target))
|
||||
M.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
else
|
||||
return 1
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/datum/reagent/proc/on_mob_life(mob/living/M)
|
||||
current_cycle++
|
||||
holder.remove_reagent(id, metabolization_rate) //By default it slowly disappears.
|
||||
holder.remove_reagent(id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
|
||||
/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
id = "nutriment"
|
||||
description = "A questionable mixture of various pure nutrients commonly found in processed foods."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 12 * REAGENTS_METABOLISM
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
|
||||
/datum/reagent/consumable/nutriment/on_mob_life(mob/living/M)
|
||||
@@ -42,14 +42,12 @@
|
||||
name = "Protein"
|
||||
id = "protein"
|
||||
description = "Various essential proteins and fats commonly found in animal flesh and blood."
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
diet_flags = DIET_CARN | DIET_OMNI
|
||||
|
||||
/datum/reagent/consumable/nutriment/plantmatter // Plant-based biomatter, digestable by herbivores and omnivores, worthless to carnivores
|
||||
name = "Plant-matter"
|
||||
id = "plantmatter"
|
||||
description = "Vitamin-rich fibers and natural sugars commonly found in fresh produce."
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
diet_flags = DIET_HERB | DIET_OMNI
|
||||
|
||||
/datum/reagent/consumable/vitamin
|
||||
@@ -63,6 +61,8 @@
|
||||
if(prob(50))
|
||||
M.adjustBruteLoss(-1)
|
||||
M.adjustFireLoss(-1)
|
||||
if(M.satiety < 600)
|
||||
M.satiety += 30
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.exotic_blood)
|
||||
@@ -72,6 +72,38 @@
|
||||
H.vessel.add_reagent("blood", 0.5)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sugar
|
||||
name = "Sugar"
|
||||
id = "sugar"
|
||||
description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste."
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF" // rgb: 255, 255, 255
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 200 // Hyperglycaemic shock
|
||||
|
||||
/datum/reagent/consumable/sugar/on_mob_life(mob/living/M)
|
||||
M.AdjustDrowsy(-5)
|
||||
if(current_cycle >= 90)
|
||||
M.AdjustJitter(2)
|
||||
if(prob(50))
|
||||
M.AdjustParalysis(-1)
|
||||
M.AdjustStunned(-1)
|
||||
M.AdjustWeakened(-1)
|
||||
if(prob(4))
|
||||
M.reagents.add_reagent("epinephrine", 1.2)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sugar/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='danger'>You pass out from hyperglycemic shock!</span>")
|
||||
M.emote("collapse")
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sugar/overdose_process(mob/living/M, severity)
|
||||
M.Paralyse(3 * severity)
|
||||
M.Weaken(4 * severity)
|
||||
if(prob(8))
|
||||
M.adjustToxLoss(severity)
|
||||
|
||||
/datum/reagent/consumable/soysauce
|
||||
name = "Soysauce"
|
||||
id = "soysauce"
|
||||
@@ -671,37 +703,6 @@
|
||||
|
||||
///Food Related, but non-nutritious
|
||||
|
||||
/datum/reagent/sugar
|
||||
name = "Sugar"
|
||||
id = "sugar"
|
||||
description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste."
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF" // rgb: 255, 255, 255
|
||||
overdose_threshold = 200 // Hyperglycaemic shock
|
||||
|
||||
/datum/reagent/sugar/on_mob_life(mob/living/M)
|
||||
M.AdjustDrowsy(-5)
|
||||
if(current_cycle >= 90)
|
||||
M.AdjustJitter(2)
|
||||
if(prob(50))
|
||||
M.AdjustParalysis(-1)
|
||||
M.AdjustStunned(-1)
|
||||
M.AdjustWeakened(-1)
|
||||
if(prob(4))
|
||||
M.reagents.add_reagent("epinephrine", 1.2)
|
||||
..()
|
||||
|
||||
/datum/reagent/sugar/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='danger'>You pass out from hyperglycemic shock!</span>")
|
||||
M.emote("collapse")
|
||||
..()
|
||||
|
||||
/datum/reagent/sugar/overdose_process(mob/living/M, severity)
|
||||
M.Paralyse(3 * severity)
|
||||
M.Weaken(4 * severity)
|
||||
if(prob(8))
|
||||
M.adjustToxLoss(severity)
|
||||
|
||||
/datum/reagent/questionmark // food poisoning
|
||||
name = "????"
|
||||
id = "????"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
name = "Medicine"
|
||||
id = "medicine"
|
||||
|
||||
/datum/reagent/medicine/on_mob_life(mob/living/M)
|
||||
current_cycle++
|
||||
holder.remove_reagent(id, metabolization_rate / M.metabolism_efficiency) //medicine reagents stay longer if you have a better metabolism
|
||||
|
||||
/datum/reagent/medicine/hydrocodone
|
||||
name = "Hydrocodone"
|
||||
id = "hydrocodone"
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
desc = "This implant with synthesize and pump into your bloodstream a small amount of nutriment when you are starving."
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#00AA00"
|
||||
var/hunger_threshold = 150
|
||||
var/hunger_threshold = NUTRITION_LEVEL_STARVING
|
||||
var/synthesizing = 0
|
||||
var/poison_amount = 5
|
||||
slot = "stomach"
|
||||
@@ -195,7 +195,7 @@
|
||||
desc = "This implant will synthesize and pump into your bloodstream a small amount of nutriment when you are hungry."
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#006607"
|
||||
hunger_threshold = 300
|
||||
hunger_threshold = NUTRITION_LEVEL_HUNGRY
|
||||
poison_amount = 10
|
||||
origin_tech = "materials=5;programming=3;biotech=5"
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(mind) //Handles vampires "eating" blood that isn't their own.
|
||||
if(mind in ticker.mode.vampires)
|
||||
for(var/datum/reagent/blood/BL in vessel.reagent_list)
|
||||
if(nutrition >= 450)
|
||||
if(nutrition >= NUTRITION_LEVEL_WELL_FED)
|
||||
break //We don't want blood tranfusions making vampires fat.
|
||||
if(BL.data["donor"] != src)
|
||||
nutrition += (15 * REAGENTS_METABOLISM)
|
||||
|
||||
Reference in New Issue
Block a user