diff --git a/.github/workflows/autochangelog.yml b/.github/workflows/autochangelog.yml index c9c628fa29a1..b3f02e955a7d 100644 --- a/.github/workflows/autochangelog.yml +++ b/.github/workflows/autochangelog.yml @@ -36,7 +36,7 @@ jobs: python tools/GenerateChangelog/ss13_genchangelog.py \ html/changelog.html \ html/changelogs - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Automatic changelog generation for ${{ github.events.pull_request.number }} branch: ${{ github.events.pull_request.base }} diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index b8457de50bdd..f78ed6c7bd40 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -441,7 +441,7 @@ #define EXAMINE_SKIPLEGS 0x0080 #define EXAMINE_SKIPFEET 0x0100 -#define MAX_NUTRITION 6000 //VOREStation Edit +#define MAX_NUTRITION 50000 //VOREStation Edit #define FAKE_INVIS_ALPHA_THRESHOLD 127 // If something's alpha var is at or below this number, certain things will pretend it is invisible. diff --git a/code/modules/food/drinkingglass/shaker.dm b/code/modules/food/drinkingglass/shaker.dm index 4a2fae13b7ce..1fe09c077851 100644 --- a/code/modules/food/drinkingglass/shaker.dm +++ b/code/modules/food/drinkingglass/shaker.dm @@ -32,10 +32,10 @@ /obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake/Initialize() . = ..() cut_overlays() - reagents.add_reagent("nutriment", 30) + reagents.add_reagent("nutriment", 5) reagents.add_reagent("iron", 10) - reagents.add_reagent("protein", 35) - reagents.add_reagent("water", 25) + reagents.add_reagent("protein", 12) + reagents.add_reagent("water", 73) /obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake/update_icon() - return \ No newline at end of file + return diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index ab9c8f0b7ff7..b126f66d3f95 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -53,7 +53,7 @@ /obj/item/weapon/reagent_containers/food/snacks/Initialize() . = ..() if(nutriment_amt) - reagents.add_reagent("nutriment",(nutriment_amt*2),nutriment_desc) + reagents.add_reagent("nutriment",nutriment_amt,nutriment_desc) //Placeholder for effect that trigger on eating that aren't tied to reagents. /obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/living/M) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 3904656a995a..4fc6f7abddb3 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -548,3 +548,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) + + if(allergen_type in species.food_preference) + return species.food_preference_bonus + return 0 diff --git a/code/modules/mob/living/carbon/human/species/species_vr.dm b/code/modules/mob/living/carbon/human/species/species_vr.dm index 4199dba6f323..b2cf28c31cd4 100644 --- a/code/modules/mob/living/carbon/human/species/species_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_vr.dm @@ -41,6 +41,8 @@ var/can_climb = FALSE var/climbing_delay = 1.5 // We climb with a quarter delay + var/list/food_preference = list() + 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() diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index 4dc7fe262b89..b72c5214122f 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -269,3 +269,229 @@ /datum/trait/positive/wall_climber_pro/apply(var/datum/species/S,var/mob/living/carbon/human/H) ..() S.can_climb = TRUE + +/datum/trait/positive/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" = 20) + excludes = list( + /datum/trait/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + var/list/our_allergens = list(ALLERGEN_MEAT) + +/datum/trait/positive/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/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_VEGETABLE,ALLERGEN_FRUIT) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_BEANS) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_VEGETABLE,ALLERGEN_MEAT) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_FUNGI) + +/datum/trait/positive/food_pref/piscivore + name = "Food Preference - Piscivore" + desc = "You prefer to eat fish, and gain extra nutrition for doing so!" + excludes = list( + /datum/trait/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_FISH) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_GRAINS,ALLERGEN_SEEDS) + +/datum/trait/positive/food_pref/cocoavore + name = "Food Preference - Cocoavore" + desc = "You prefer to eat chocolate, and gain extra nutrition for doing so!" + excludes = list( + /datum/trait/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_CHOCOLATE) + +/datum/trait/positive/food_pref/glycovore + name = "Food Preference - Glycovore" + desc = "You prefer to eat sugar, and gain extra nutrition for doing so!" + excludes = list( + /datum/trait/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_SUGARS) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/coffee, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_SUGARS) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/stimulant + ) + our_allergens = list(ALLERGEN_COFFEE) + +/datum/trait/positive/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/positive/food_pref, + /datum/trait/positive/food_pref/herbivore, + /datum/trait/positive/food_pref/beanivore, + /datum/trait/positive/food_pref/omnivore, + /datum/trait/positive/food_pref/fungivore, + /datum/trait/positive/food_pref/piscivore, + /datum/trait/positive/food_pref/granivore, + /datum/trait/positive/food_pref/cocoavore, + /datum/trait/positive/food_pref/glycovore, + /datum/trait/positive/food_pref/lactovore, + /datum/trait/positive/food_pref/coffee + ) + our_allergens = list(ALLERGEN_STIMULANT) diff --git a/code/modules/reagents/reagents/food_drinks.dm b/code/modules/reagents/reagents/food_drinks.dm index 5397168fd40a..306620891243 100644 --- a/code/modules/reagents/reagents/food_drinks.dm +++ b/code/modules/reagents/reagents/food_drinks.dm @@ -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) 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) //VOREStation Edits Stop @@ -957,7 +957,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) M.dizziness = max(0, M.dizziness + adj_dizzy) M.drowsyness = max(0, M.drowsyness + adj_drowsy) M.AdjustSleeping(adj_sleepy) @@ -2585,6 +2586,9 @@ if(M.species.robo_ethanol_drunk || !(M.isSynthetic())) if(alien == IS_DIONA) return + + M.adjust_nutrition((M.food_preference(allergen_type) / 2) * removed) + M.jitteriness = max(M.jitteriness - 3, 0) /datum/reagent/ethanol/beer/lite diff --git a/code/modules/reagents/reagents/food_drinks_vr.dm b/code/modules/reagents/reagents/food_drinks_vr.dm index 6a5d19262aea..dbb079d0dbf5 100644 --- a/code/modules/reagents/reagents/food_drinks_vr.dm +++ b/code/modules/reagents/reagents/food_drinks_vr.dm @@ -1,6 +1,3 @@ -/datum/reagent/nutriment - nutriment_factor = 10 - /datum/reagent/toxin/meatcolony name = "A colony of meat cells" id = "meatcolony"