From 21e044478e259efa202dce2c2e82afc342f07b90 Mon Sep 17 00:00:00 2001 From: SmallJoker <mk939@ymail.com> Date: Sat, 26 Nov 2022 23:25:33 +0100 Subject: [PATCH] Fix battery box charging issues caused by out of sync functions --- technic/machines/register/extractor_recipes.lua | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/technic/machines/register/extractor_recipes.lua b/technic/machines/register/extractor_recipes.lua index dffabb1..ba43df5 100644 --- a/technic/machines/register/extractor_recipes.lua +++ b/technic/machines/register/extractor_recipes.lua @@ -8,17 +8,6 @@ technic.register_recipe("extracting", data) end -local recipes = { - -- Rubber - {"technic:raw_latex", "technic:rubber 3"}, - {"moretrees:rubber_tree_trunk_empty", "technic:rubber"}, - {"moretrees:rubber_tree_trunk", "technic:rubber"}, -} - -for _, data in pairs(recipes) do - technic.register_extractor_recipe({input = {data[1]}, output = data[2]}) -end - if minetest.get_modpath("dye") then -- check if we are using dye or unifieddyes local unifieddyes = minetest.get_modpath("unifieddyes") @@ -26,6 +15,7 @@ -- register recipes with the same crafting ratios as `dye` provides local dye_recipes = { {"technic:coal_dust", "dye:black 2"}, + {"default:blueberries", "dye:violet 2"}, {"default:grass_1", "dye:green 1"}, {"default:dry_shrub", "dye:brown 1"}, {"default:junglegrass", "dye:green 2"}, @@ -38,8 +28,6 @@ {"flowers:viola", "dye:violet 4"}, {"bushes:blackberry", unifieddyes and "unifieddyes:magenta_s50 4" or "dye:violet 4"}, {"bushes:blueberry", unifieddyes and "unifieddyes:magenta_s50 4" or "dye:magenta 4"}, - -- https://en.wikipedia.org/wiki/Catechu ancient brown dye from the wood of acacia trees - {"moretrees:acacia_trunk", "dye:brown 8"}, } for _, data in ipairs(dye_recipes) do @@ -49,13 +37,21 @@ -- overwrite the existing crafting recipes local dyes = {"white", "red", "yellow", "blue", "violet", "orange"} for _, color in ipairs(dyes) do - minetest.register_craft({ - type = "shapeless", - output = "dye:"..color.." 1", - recipe = {"group:flower,color_"..color}, + minetest.clear_craft({ + type = "shapeless", + recipe = {"group:flower,color_"..color}, }) - + minetest.register_craft({ + type = "shapeless", + output = "dye:"..color.." 1", + recipe = {"group:flower,color_"..color}, + }) end + + minetest.clear_craft({ + type = "shapeless", + recipe = {"group:coal"}, + }) minetest.register_craft({ type = "shapeless", output = "dye:black 1", @@ -63,6 +59,10 @@ }) if unifieddyes then + minetest.clear_craft({ + type = "shapeless", + recipe = {"default:cactus"}, + }) minetest.register_craft({ type = "shapeless", output = "dye:green 1", -- Gitblit v1.8.0