Jump to content

Recommended Posts

When you create a new item/structure or change the crafting properties of an existing item/structure, it pops up at the bottom of the crafting tab that you set it in. I know there is a way to move the item/structure upwards/downwards if you wanted, but how would I go about that? Say I'm changing the crafting recipe of the shovel:

AddRecipe("shovel", {Ingredient("twigs", 2),Ingredient("flint", 2)}, RECIPETABS.TOOLS,  TECH.NONE)

How would I go about putting it back in place it was in the tools tab, instead of the shovel being the last item without having to AddRecipe for all the items that go after it by default?

--save the old sort key and give it back
local sortkey = AllRecipes["shovel"].sortkey
AddRecipe("shovel", {Ingredient("twigs", 2),Ingredient("flint", 2)}, RECIPETABS.TOOLS,  TECH.NONE)
AllRecipes["shovel"].sortkey = sortkey

 

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