Jump to content

Foodtype Explaination in need


Recommended Posts

So after stumbling into the code and wanting to set up some special items into a characters diet I set up myself a new Foodtype thing and started to add it to some of those things,
Then I started to wonder, "Hmm wouldn't it override the previous Foodtype tho?" and thats what I'm asking to you, and if its so, how could I set up the diet differently?

Link to comment
Share on other sites

FOODTYPE is a global table, to define a new food type, simply:

FOODTYPE["NEWFOODTYPE"] = "NEWFOODTYPE"

and it will add the new one without touching the old ones

don't forget the GLOBAL. thing if you are adding it in modmain

Link to comment
Share on other sites

23 hours ago, ptr said:

FOODTYPE is a global table, to define a new food type, simply:

FOODTYPE["NEWFOODTYPE"] = "NEWFOODTYPE"

and it will add the new one without touching the old ones

don't forget the GLOBAL. thing if you are adding it in modmain

Phew I thought I'd have to find another way, thanks a lot

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