Revert and replace #4127 -- Funk jood, round deux (#4481)

Reverts the new chemicals and their effects as implemented in #4127 due to their unnecessary severity.

Replaces the reverted mechanics with new mechanics which seek to accomplish a similar thing. Mobs now have an nutrition_attrition_rate factor, which is a multiplier describing how fast they grow hungry. By default, the multiplier is 1. Only eating healthy/chef food will see to it that said multiplier remains at 1.
This commit is contained in:
Erki
2018-04-07 01:41:43 +03:00
committed by Werner
parent d9d9131755
commit 4f0dbb2690
5 changed files with 207 additions and 452 deletions

View File

@@ -933,7 +933,7 @@
// nutrition decrease
if (nutrition > 0 && stat != 2)
nutrition = max (0, nutrition - nutrition_loss)
nutrition = max(0, nutrition - (nutrition_loss * nutrition_attrition_rate))
if (nutrition > max_nutrition)
if(overeatduration < 600) //capped so people don't take forever to unfat

View File

@@ -112,6 +112,7 @@
var/charges = 0.0
var/nutrition = 400.0//Carbon
var/nutrition_loss = HUNGER_FACTOR //How much hunger is lost per tick. This is modified by species
var/nutrition_attrition_rate = 1 // A multiplier for how much this specific mob loses per tick.
var/max_nutrition = 400
var/overeatduration = 0 // How long this guy is overeating //Carbon

View File

@@ -58,13 +58,20 @@
taste_mult = 4
reagent_state = SOLID
metabolism = REM * 4
var/nutriment_factor = 12 // Per unit
var/nutriment_factor = -(REM * 4)/BASE_MAX_NUTRITION // Per removed in digest.
var/blood_factor = 6
var/regen_factor = 0.8
var/injectable = 0
var/attrition_factor = -0.1 // Decreases attrition rate.
color = "#664330"
unaffected_species = IS_MACHINE
/datum/reagent/nutriment/synthetic
name = "Synthetic Nutriment"
id = "synnutriment"
description = "A cheaper alternative to actual nutriment."
attrition_factor = (REM * 4)/BASE_MAX_NUTRITION // Increases attrition rate.
/datum/reagent/nutriment/mix_data(var/list/newdata, var/newamount)
if(!islist(newdata) || !newdata.len)
return
@@ -101,6 +108,7 @@
/datum/reagent/nutriment/proc/digest(var/mob/living/carbon/M, var/removed)
M.heal_organ_damage(regen_factor * removed, 0)
M.nutrition += nutriment_factor * removed // For hunger and fatness
M.nutrition_attrition_rate = Clamp(M.nutrition_attrition_rate + attrition_factor, 1, 2)
M.add_chemical_effect(CE_BLOODRESTORE, blood_factor * removed)
@@ -3545,58 +3553,3 @@
glass_icon_state = "crocodile_glass"
glass_name = "glass of Crocodile Guwan"
glass_desc = "The smell says no, but the pretty colors say yes."
//Preservatives
/datum/reagent/nutriment/badfood //This is just a base. It shouldn't exist or be used anywhere but just in case, I added names.
name = "Experimental Preservative"
id = "badfood"
description = "Some... strange chemical. You can swear it's moving."
nutriment_factor = 50
color = "#000000"
taste_description = "liquid heart attack"
metabolism = REM * 1 //Metabolises slower
var/damagemul = 0.5 //How much damage to deal to the heart per unit digested
/datum/reagent/nutriment/badfood/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed)
if(istype(M))
var/obj/item/organ/F = M.internal_organs_by_name["heart"]
if(istype(F))
F.take_damage(removed * damagemul,1)
..()
/datum/reagent/nutriment/badfood/palmoil
name = "Palm Oil"
id = "palmoil"
description = "Palm oil is a common preservative used in packaged food, and is seriously unhealthy for you much like everything on this station."
nutriment_factor = 30
color = "#f4ce42"
taste_description = "oily fat"
damagemul = 0.15
/datum/reagent/nutriment/badfood/shortening
name = "Shortening"
id = "shortening"
description = "Shortening, also known as hydrogenated vegetable oil, is a preservative commonly used in packaged food. Usually made from vegetables."
nutriment_factor = 20
color = "#e2d4c9"
taste_description = "greasy fat"
damagemul = 0.05
/datum/reagent/nutriment/badfood/hfcs
name = "High Fructose Corn Syrup"
id = "hfcs"
description = "A cheap, easy to produce, unhealthy alternative to real sugar."
nutriment_factor = 20
color = "#c66119"
taste_description = "sweetness"
damagemul = 0.1
/datum/reagent/nutriment/badfood/msg
name = "Monosodium Glutamate"
id = "msg"
description = "Monosodium glutamate, also known as MSG, is a cheap flavor enhancer similiar to sodium. Causes chinese restaurant syndrome."
nutriment_factor = 5
color = "#eaf1fc"
taste_description = "flavoring"
damagemul = 0.05

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
author: Skull132
delete-after: True
changes:
- rscdel: "Junk food no longer causes heart/organ damage. That PR has been reverted effectively."
- rscadd: "Junk food now causes nutrition to last less. You'll go hungry roughly twice as fast when eating only junk food."