Jump to content

How to mahe someone a vegetarian


Recommended Posts

	if inst.components.eater ~= nil and TUNING.AISHA_IS_VEGETARIAN then
        inst.components.eater:SetDiet({ FOODGROUP.VEGETARIAN }, { FOODGROUP.VEGETARIAN })
    end

Trying to make a chracter vegetarian, u know like wurt, but doing it as its done in the wurt prefab just crashs the game, i stole this code from the Ceres Fauna mod, it runs, but dosnt work i can still eat meat

Link to comment
Share on other sites

2 hours ago, imjustglue said:

snip

The Ceres Fauna mod has config options for player customization, one of them being her diet. If you made no config option for your character then what @TemporarySolutn said is correct: TUNING.AISHA_IS_VEGETARIAN is simply nil, therefore your if-statement is always false. The default, no frills way to simply change your character's diet to being vegetarian is:

    if inst.components.eater ~= nil then
        inst.components.eater:SetDiet({ FOODGROUP.VEGETARIAN }, { FOODGROUP.VEGETARIAN })
    end

Taken straight from wurt.lua

Edited by Mikrell
  • Thanks 1
Link to comment
Share on other sites

16 hours ago, Mikrell said:

The Ceres Fauna mod has config options for player customization, one of them being her diet. If you made no config option for your character then what @TemporarySolutn said is correct: TUNING.AISHA_IS_VEGETARIAN is simply nil, therefore your if-statement is always false. The default, no frills way to simply change your character's diet to being vegetarian is:

    if inst.components.eater ~= nil then
        inst.components.eater:SetDiet({ FOODGROUP.VEGETARIAN }, { FOODGROUP.VEGETARIAN })
    end

Taken straight from wurt.lua

are u kidding me? i am not angry at you, but like, i tried just using wurt's code one or 2 months ago and it crashed my server, the same Ctrl + C, Ctrl + V code. It worked now, so thanks mate

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
 Share

×
  • Create New...