vonVile Posted August 9, 2013 Share Posted August 9, 2013 I'm trying to streamline the mod code, so that there isn't so many repeat recipes appearing in the menu when constructing the same item using different items. My keep line looks like this: keep ButterKnife,Fork,KitchenKnife,Nails,Scissors,Screwdriver, If I can't put more than 4. I'll have to cut back on the items used. Link to comment Share on other sites More sharing options...
Aricane Posted August 9, 2013 Share Posted August 9, 2013 Can't you just cut them over? keep ButterKnife,Fork,KitchenKnife,Nails,keep Scissors,Screwdriver, It should work? Link to comment Share on other sites More sharing options...
vonVile Posted August 9, 2013 Author Share Posted August 9, 2013 I forgot to mention that if you list too make items in the keep command that game will crash when creating/loading a game. What I wanted the game to do is something that it can't at the moment where you design recipes to have variations of it using other items that will accomplish the same task. That's too complex. Link to comment Share on other sites More sharing options...
RoboMat Posted August 10, 2013 Share Posted August 10, 2013 I forgot to mention that if you list too make items in the keep command that game will crash when creating/loading a game. What I wanted the game to do is something that it can't at the moment where you design recipes to have variations of it using other items that will accomplish the same task. That's too complex.Well I'd say streamlining (or shortening) the code is only reasonable when it improves readability. I think a longer code (= more recipes) with lesser items on one line looks better than one recipe with tons of items cramped in one line. Code should be written in a way that others who read it, can easily understand it. "Overoptimisation" is really a bad thing ... it's the same for overcommenting. Tons of comments in a code will only make it worse to read. Instead the coder should use proper variable and function names and break up long tasks. If you follow those guidelines most of the time you only need very few comments to get the point across Link to comment Share on other sites More sharing options...
vonVile Posted August 10, 2013 Author Share Posted August 10, 2013 I just figured out where I went wrong. I looked at the recipes.txt file looking for something else and saw that the code should look like this: keep ButterKnife/Fork/KitchenKnife/Nails/Scissors/Screwdriver, 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