diff options
-rw-r--r-- | technic/machines/register/extractor_recipes.lua | 31 | ||||
-rw-r--r-- | technic/machines/register/grinder_recipes.lua | 6 |
2 files changed, 35 insertions, 2 deletions
diff --git a/technic/machines/register/extractor_recipes.lua b/technic/machines/register/extractor_recipes.lua index 994d1a7..d957787 100644 --- a/technic/machines/register/extractor_recipes.lua +++ b/technic/machines/register/extractor_recipes.lua @@ -47,6 +47,37 @@ if minetest.get_modpath("dye") then }) end + + -- When the recipe for 4 default:sand out of 1 default:sandstone is defused in the + -- grinder recipes, some dyed wool becomes broken. This is a known bug and it's in + -- the game itself. However, by re-declaring the recipes for corrupted wool+dye + -- combinations here, we can alleviate this situation. Or so it seeems. + -- The following code snippet is abridged from wool mod in the minetest_game: + + if minetest.get_modpath("wool") then + + local dyes = { + {"violet", "Violet", "excolor_violet"}, + {"brown", "Brown", "unicolor_dark_orange"}, + {"pink", "Pink", "unicolor_light_red"}, + {"dark_grey", "Dark Grey", "unicolor_darkgrey"}, + {"dark_green", "Dark Green", "unicolor_dark_green"}, + } + + for i = 1, #dyes do + local name, desc, craft_color_group = unpack(dyes[i]) + minetest.register_craft{ + type = "shapeless", + output = "wool:" .. name, + recipe = {"group:dye," .. craft_color_group, "group:wool"}, + } + end + + end + + -- end of remedial dye workaround + + minetest.register_craft({ type = "shapeless", output = "dye:black 1", diff --git a/technic/machines/register/grinder_recipes.lua b/technic/machines/register/grinder_recipes.lua index db5449a..2f4b8db 100644 --- a/technic/machines/register/grinder_recipes.lua +++ b/technic/machines/register/grinder_recipes.lua @@ -38,10 +38,12 @@ if minetest.get_modpath("ethereal") then end -- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe) +-- this snippet, when executed, also corrupts some dye+wool combinations. A remedial +-- workaround is included in extractor recipes, since it's where we work with dyes. minetest.clear_craft({ recipe = { - {'default:sandstone'} - }, + {"default:sandstone"} + } }) if minetest.get_modpath("farming") then |