dangalong Posted April 15, 2016 Share Posted April 15, 2016 How can I make a custom recipe detect if a required food ingredient is rotten before using it, and if so then not allow the desired result to be created? I'm guessing this has to be done in lua? Or can it be done at all? If so, can someone post an example of simple code that would be needed to make X recipe check for freshness on Y item, and if Y is not rotten then Z item is given, and if Y is rotten then Z item is not given to player? So that only fresh or halfway fresh items can be used by the recipe, is what I'm aiming for. Either that or just eliminate the context option to perform the recipe altogether if the required ingredient in player inventory is fully rotten? I don't know which would be easier. Help would be appreciated, I've been looking at other food mods to get ideas, and have yet to find one where this sort of thing was done. Link to comment Share on other sites More sharing options...
dangalong Posted April 16, 2016 Author Share Posted April 16, 2016 Never mind, I figured out how to do what I wanted. Cheers Link to comment Share on other sites More sharing options...
Berdryn Posted October 16, 2016 Share Posted October 16, 2016 Did you figure out how to tell if an item is fresh or rotten in a recipe? What I really need is how to remove a rotten item from the inventory once itbecomes rotten. Link to comment Share on other sites More sharing options...
tommysticks Posted October 17, 2016 Share Posted October 17, 2016 On 4/16/2016 at 9:58 AM, dangalong said: Never mind, I figured out how to do what I wanted. Cheers Please share! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now