milo: item rewrite + ability to remove nbts from recipes

This commit is contained in:
kepler155c@gmail.com
2018-12-31 11:39:24 -05:00
parent b726e5011f
commit 9cd480f188
5 changed files with 209 additions and 211 deletions

View File

@@ -234,6 +234,17 @@ function Milo:eject(item, count)
return count
end
function Milo:updateRecipe(result, recipe)
-- save the recipe
if recipe then
recipe = Util.shallowCopy(recipe)
recipe.result = nil
end
self.context.userRecipes[result] = recipe
Util.writeTable(Craft.USER_RECIPES, self.context.userRecipes)
Craft.loadRecipes()
end
function Milo:saveMachineRecipe(recipe, result, machine)
local key = Milo:uniqueKey(result)