no more errors

This commit is contained in:
Metis
2024-09-14 00:46:32 -04:00
parent 172a2be27d
commit aadccce155
14 changed files with 139 additions and 132 deletions
@@ -77,7 +77,7 @@
/datum/emote/living/burp/fart/goon // Fart but it's funny !
key = "goonfart"
key_third_person = "goonfarts"
noise_type = 'goon/sound/voice/farts/fart4.ogg'
noise_type = 'GainStation13/sound/voice/farts/fart4.ogg'
//Shhh... It's a secret! Don't tell or I'll steal your legs
/datum/emote/living/burunyu
@@ -338,117 +338,3 @@
FATNESS_LEVEL_FAT,
null,
"<span class='danger'>You suddenly feel blubbery!</span>")
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
return //hunger is for BABIES
handle_fatness(H) // GS13
// nutrition decrease and satiety
if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
// THEY HUNGER
var/hunger_rate = HUNGER_FACTOR
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
if(mood && mood.sanity > SANITY_DISTURBED)
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
// Whether we cap off our satiety or move it towards 0
if(H.satiety > MAX_SATIETY)
H.satiety = MAX_SATIETY
else if(H.satiety > 0)
H.satiety--
else if(H.satiety < -MAX_SATIETY)
H.satiety = -MAX_SATIETY
else if(H.satiety < 0)
H.satiety++
if(prob(round(-H.satiety/40)))
H.Jitter(5)
hunger_rate = 3 * HUNGER_FACTOR
hunger_rate *= H.physiology.hunger_mod
H.nutrition = max(0, H.nutrition - hunger_rate)
if (H.nutrition > NUTRITION_LEVEL_FULL)
// fatConversionRate is functionally useless. It seems under normal curcumstances, each tick only processes, at most, 1 nutrition anyway. reducing the value has no effect.
var/fatConversionRate = 100 //GS13 what percentage of the excess nutrition should go to fat (total nutrition to transfer can't be under 1)
var/nutritionThatBecomesFat = max((H.nutrition - NUTRITION_LEVEL_FULL)*(fatConversionRate / 100),1)
H.nutrition -= nutritionThatBecomesFat
H.adjust_fatness(nutritionThatBecomesFat, FATTENING_TYPE_FOOD)
if(H.fullness > FULLNESS_LEVEL_EMPTY)//GS13 stomach-emptying routine
var/ticksToEmptyStomach = 20 // GS13 how many ticks it takes to decrease the fullness by 1
if(HAS_TRAIT(H, TRAIT_VORACIOUS))
ticksToEmptyStomach = ticksToEmptyStomach * 0.5
H.fullness -= 1/ticksToEmptyStomach
if (H.fullness > FULLNESS_LEVEL_BLOATED) //GS13 overeating depends on fullness now
if(H.overeatduration < 5000) //capped so people don't take forever to unfat
H.overeatduration++
else
if(H.overeatduration > 1)
H.overeatduration -= 1 //doubled the unfat rate -- GS13 Nah, put it back
//metabolism change
if(H.nutrition > NUTRITION_LEVEL_FULL +100)
H.metabolism_efficiency = 1
else if(H.nutrition > NUTRITION_LEVEL_FED && H.satiety > 80)
if(H.metabolism_efficiency != 1.25 && !HAS_TRAIT(H, TRAIT_NOHUNGER))
to_chat(H, "<span class='notice'>You feel vigorous.</span>")
H.metabolism_efficiency = 1.25
else if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
if(H.metabolism_efficiency != 0.8)
to_chat(H, "<span class='notice'>You feel sluggish.</span>")
H.metabolism_efficiency = 0.8
else
if(H.metabolism_efficiency == 1.25)
to_chat(H, "<span class='notice'>You no longer feel vigorous.</span>")
H.metabolism_efficiency = 1
switch(H.nutrition)
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
H.clear_alert("nutrition")
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
H.throw_alert("nutrition", /atom/movable/screen/alert/hungry)
if(0 to NUTRITION_LEVEL_STARVING)
H.throw_alert("nutrition", /atom/movable/screen/alert/starving)
switch(H.fullness)
if(0 to FULLNESS_LEVEL_BLOATED)
H.clear_alert("fullness")
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG)
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/bloated)
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ)
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/stuffed)
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/beegbelly)
switch(H.fatness)
if(FATNESS_LEVEL_BLOB to INFINITY)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/blob)
if(FATNESS_LEVEL_IMMOBILE to FATNESS_LEVEL_BLOB)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/immobile)
if(FATNESS_LEVEL_BARELYMOBILE to FATNESS_LEVEL_IMMOBILE)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/barelymobile)
if(FATNESS_LEVEL_EXTREMELY_OBESE to FATNESS_LEVEL_BARELYMOBILE)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/extremelyobese)
if(FATNESS_LEVEL_MORBIDLY_OBESE to FATNESS_LEVEL_EXTREMELY_OBESE)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/morbidlyobese)
if(FATNESS_LEVEL_OBESE to FATNESS_LEVEL_MORBIDLY_OBESE)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/obese)
if(FATNESS_LEVEL_VERYFAT to FATNESS_LEVEL_OBESE)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/veryfat)
if(FATNESS_LEVEL_FATTER to FATNESS_LEVEL_VERYFAT)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/fatter)
if(FATNESS_LEVEL_FAT to FATNESS_LEVEL_FATTER)
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/fat)
if(0 to FATNESS_LEVEL_FAT)
H.clear_alert("fatness")