mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 20:57:23 +01:00
[MIRROR] Food Preferences (#8031)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
co-authored by
SatinIsle
CHOMPStation2
parent
577ac8c4ec
commit
a3638291fe
@@ -554,3 +554,9 @@
|
||||
if(src.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
|
||||
if(src.wear_mask.clean_blood())
|
||||
src.update_inv_wear_mask(0)
|
||||
|
||||
/mob/living/carbon/proc/food_preference(var/allergen_type) //RS edit
|
||||
|
||||
if(allergen_type in species.food_preference)
|
||||
return species.food_preference_bonus
|
||||
return 0
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
var/can_climb = FALSE
|
||||
var/climbing_delay = 1.5 // We climb with a quarter delay
|
||||
|
||||
var/list/food_preference = list() //RS edit
|
||||
var/food_preference_bonus = 0
|
||||
|
||||
/datum/species/proc/give_numbing_bite() //Holy SHIT this is hacky, but it works. Updating a mob's attacks mid game is insane.
|
||||
unarmed_attacks = list()
|
||||
|
||||
@@ -785,3 +785,231 @@
|
||||
/datum/trait/neutral/synth_cosmetic_pain/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null)
|
||||
..()
|
||||
H.verbs |= /mob/living/carbon/human/proc/toggle_pain_module
|
||||
|
||||
//Food preferences ported from RogueStar
|
||||
|
||||
/datum/trait/neutral/food_pref
|
||||
name = "Food Preference - Carnivore"
|
||||
desc = "You prefer to eat meat, and gain extra nutrition for doing so!"
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
can_take = ORGANICS
|
||||
var_changes = list("food_preference_bonus" = 5)
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
var/list/our_allergens = list(ALLERGEN_MEAT)
|
||||
|
||||
/datum/trait/neutral/food_pref/apply(datum/species/S, mob/living/carbon/human/H, trait_prefs)
|
||||
. = ..()
|
||||
for(var/a in our_allergens)
|
||||
S.food_preference |= a
|
||||
|
||||
/datum/trait/neutral/food_pref/herbivore
|
||||
name = "Food Preference - Herbivore"
|
||||
desc = "You prefer to eat fruits and vegitables, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_VEGETABLE,ALLERGEN_FRUIT)
|
||||
|
||||
/datum/trait/neutral/food_pref/beanivore
|
||||
name = "Food Preference - Legumovore"
|
||||
desc = "You prefer to eat bean related foods, such as tofu, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_BEANS)
|
||||
|
||||
/datum/trait/neutral/food_pref/omnivore
|
||||
name = "Food Preference - Omnivore"
|
||||
desc = "You prefer to eat meat and vegitables, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_VEGETABLE,ALLERGEN_MEAT)
|
||||
|
||||
/datum/trait/neutral/food_pref/fungivore
|
||||
name = "Food Preference - Fungivore"
|
||||
desc = "You prefer to eat mushrooms and fungus, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_FUNGI)
|
||||
|
||||
/datum/trait/neutral/food_pref/piscivore
|
||||
name = "Food Preference - Piscivore"
|
||||
desc = "You prefer to eat fish, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_FISH)
|
||||
|
||||
/datum/trait/neutral/food_pref/granivore
|
||||
name = "Food Preference - Granivore"
|
||||
desc = "You prefer to eat grains and seeds, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_GRAINS,ALLERGEN_SEEDS)
|
||||
|
||||
/datum/trait/neutral/food_pref/cocoavore
|
||||
name = "Food Preference - Cocoavore"
|
||||
desc = "You prefer to eat chocolate, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_CHOCOLATE)
|
||||
|
||||
/datum/trait/neutral/food_pref/glycovore
|
||||
name = "Food Preference - Glycovore"
|
||||
desc = "You prefer to eat sugar, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_SUGARS)
|
||||
|
||||
/datum/trait/neutral/food_pref/lactovore
|
||||
name = "Food Preference - Lactovore"
|
||||
desc = "You prefer to eat and drink things with milk in them, and gain extra nutrition for doing so!"
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/coffee,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_DAIRY)
|
||||
|
||||
/datum/trait/neutral/food_pref/coffee
|
||||
name = "Food Preference - Coffee Dependant"
|
||||
desc = "You can get by on coffee alone if you have to, and you like it that way."
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
)
|
||||
our_allergens = list(ALLERGEN_COFFEE)
|
||||
|
||||
/datum/trait/neutral/food_pref/stimulant
|
||||
name = "Food Preference - Stimulant Dependant"
|
||||
desc = "You can get by on caffine alone if you have to, and you like it that way."
|
||||
excludes = list(
|
||||
/datum/trait/neutral/food_pref,
|
||||
/datum/trait/neutral/food_pref/herbivore,
|
||||
/datum/trait/neutral/food_pref/beanivore,
|
||||
/datum/trait/neutral/food_pref/omnivore,
|
||||
/datum/trait/neutral/food_pref/fungivore,
|
||||
/datum/trait/neutral/food_pref/piscivore,
|
||||
/datum/trait/neutral/food_pref/granivore,
|
||||
/datum/trait/neutral/food_pref/cocoavore,
|
||||
/datum/trait/neutral/food_pref/glycovore,
|
||||
/datum/trait/neutral/food_pref/lactovore,
|
||||
/datum/trait/neutral/food_pref/coffee
|
||||
)
|
||||
our_allergens = list(ALLERGEN_STIMULANT)
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
if(!M.isSynthetic())
|
||||
if(!(M.species.allergens & allergen_type)) //assuming it doesn't cause a horrible reaction, we'll be ok!
|
||||
M.heal_organ_damage(0.5 * removed, 0)
|
||||
M.adjust_nutrition((nutriment_factor * removed) * M.species.organic_food_coeff)
|
||||
M.adjust_nutrition(((nutriment_factor + M.food_preference(allergen_type)) * removed) * M.species.organic_food_coeff) //RS edit
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
else
|
||||
M.adjust_nutrition((nutriment_factor * removed) * M.species.synthetic_food_coeff)
|
||||
M.adjust_nutrition(((nutriment_factor + M.food_preference(allergen_type)) * removed) * M.species.synthetic_food_coeff) //RS edit
|
||||
|
||||
//VOREStation Edits Stop
|
||||
|
||||
@@ -958,7 +958,8 @@
|
||||
|
||||
/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(!(M.species.allergens & allergen_type))
|
||||
M.adjust_nutrition(nutrition * removed)
|
||||
var/bonus = M.food_preference(allergen_type)
|
||||
M.adjust_nutrition((nutrition + bonus) * removed) //RS edit
|
||||
M.dizziness = max(0, M.dizziness + adj_dizzy)
|
||||
M.drowsyness = max(0, M.drowsyness + adj_drowsy)
|
||||
M.AdjustSleeping(adj_sleepy)
|
||||
@@ -2615,6 +2616,7 @@
|
||||
if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
|
||||
if(alien == IS_DIONA)
|
||||
return
|
||||
M.adjust_nutrition((M.food_preference(allergen_type) / 2) * removed) //RS edit
|
||||
M.jitteriness = max(M.jitteriness - 3, 0)
|
||||
|
||||
/datum/reagent/ethanol/beer/lite
|
||||
|
||||
Reference in New Issue
Block a user