Jump to content

Spiced foods do not give the favorite food hunger bonus


QuartzBeam
  • Fixed

Characters who have a crock pot dish as their favorite food only get the extra 15 hunger from the unspiced version.

For example, Wilson gets 90 Hunger from Bacon n Eggs, but only 75 Hunger for Spicy Bacon n Eggs.


Steps to Reproduce

Um, use both and compare?

  • Like 3



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

Just wanted say that lol

Spoiler

Working as Intended warning

 

Edited by Legend_Master

Share this comment


Link to comment
Share on other sites

Maybe this? It also supports mod foods if they used GenerateSpicedFoods.

function FoodAffinity:HasAffinity(food)

    if self:HasPrefabAffinity(food) then
        return true
    end

    if food.components.edible and self.foodtype_affinities[food.components.edible.foodtype] then
        return true
    end

    for tag,bonus in pairs(self.tag_affinities) do
        if food:HasTag(tag) then
            return true
        end
    end
end

function FoodAffinity:HasPrefabAffinity(food)
    return self.prefab_affinites[food.nameoverride or food.prefab] ~= nil
end

function FoodAffinity:GetAffinity(food)
    local found_affinities = {}

    if self:HasPrefabAffinity(food) then
        table.insert(found_affinities, self.prefab_affinites[food.nameoverride or food.prefab])
    end

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...