Jump to content

Something wrong with secondary foodtype


Trololarion
  • Pending

Berries should have secondary foodtype, but when i check it using conslole, it returns nil. 


Steps to Reproduce
Try to check secondaryfoodtype in edible component of berries.



User Feedback


@TrololarionMaybe it's something with the command? I did "c_announce(c_select(inst.components.edible.foodtype))" and secondaryfoodtype and it returned nil, regardless of which food I chose.

Bearger seems to be eating berries fine though, since it's uses foodtype.berry as part of it's foodgroup in constants.lua. Maybe make it so that players can only eat foodtype berry as another check?

Share this comment


Link to comment
Share on other sites

3 hours ago, lakhnish said:

@TrololarionMaybe it's something with the command? I did "c_announce(c_select(inst.components.edible.foodtype))" and secondaryfoodtype and it returned nil, regardless of which food I chose.

Bearger seems to be eating berries fine though, since it's uses foodtype.berry as part of it's foodgroup in constants.lua. Maybe make it so that players can only eat foodtype berry as another check?

Bearger eat berries because main foodtype of berries its FOODTYPE.VEGGIE.

FOODGROUP =
{
    OMNI =
    {
        name = "OMNI",
        types =
        {
            FOODTYPE.MEAT,
            FOODTYPE.VEGGIE,
            FOODTYPE.INSECT,
            FOODTYPE.SEEDS,
            FOODTYPE.GENERIC,
            FOODTYPE.GOODIES,
        },
    },
    BERRIES_AND_SEEDS =
    {
        name = "BERRIES_AND_SEEDS",
        types =
        {
            FOODTYPE.SEEDS,
            FOODTYPE.BERRY,
        },
    },
    BEARGER =
    {
        name = "BEARGER",
        types =
        {
            FOODTYPE.MEAT,
            FOODTYPE.VEGGIE, -- <------ here
            FOODTYPE.BERRY,
            FOODTYPE.GENERIC,
        },
    },
    MOOSE =
    {
        name = "MOOSE",
        types =
        {
            FOODTYPE.MEAT,
            FOODTYPE.VEGGIE,
            FOODTYPE.SEEDS,
        },
    },
}

And small bird don't eat berries. I also tryed set secondary foodtype manualy and small bird dont eat it too. I think the problem is that the code generally does not take into account the secondary foodtype.

  • Like 1

Share this comment


Link to comment
Share on other sites

Are you running the beta or main build?
The change to support secondaryfoodtype was done in the beta and will make its way back to the main branch soon.

  • Thanks 1

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...