Jump to content

Where Do I Find LUA Code For How To Cause Rotton Food?


vonVile

Recommended Posts

I'm working on a simple mod called Greatest Invention, where you can slice the bread. Before I release it I want to have the slice to be able to become rotten. What I need to know is what LUA file has the code for causing food items to become rotten to use as an example.

 

Thanx!

Link to comment
Share on other sites

You can add the change the daystotallyrotten = 3 for example to your bread slice script (it will get rotten in 3 days, unless in a fridge then longer). I don't know if it is handled in lua at the moment... you can see this used in other food items in the items.txt and newitems.txt. also there's something like daysfresh = x

 

EDIT: sneaky ninja RJ :???:

Link to comment
Share on other sites

Okay, then how does the graphic for food change to rotten? I don't see anything in the item or recipes about rotten food. Is this just something the game does automatically?

 

How can I make the mod switch the food graphic to the rotten version, like I see happen in the game?

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