Wool mod: Remove 'basecolor', 'excolor', 'unicolor' groups
authortenplus1 <tenplus1@users.noreply.github.com>
Thu, 23 Aug 2018 19:42:36 +0000 (20:42 +0100)
committerParamat <paramat@users.noreply.github.com>
Thu, 23 Aug 2018 19:42:36 +0000 (20:42 +0100)
mods/wool/init.lua

index a36e4dd862404622b33e9a5aec79ff72842a9e84..3e565a47d5d32447c813e1f4275943fd83d8a097 100644 (file)
@@ -1,27 +1,23 @@
--- This uses a trick: you can first define the recipes using all of the base
--- colors, and then some recipes using more specific colors for a few non-base
--- colors available. When crafting, the last recipes will be checked first.
-
 local dyes = {
-       {"white",      "White",      "basecolor_white"},
-       {"grey",       "Grey",       "basecolor_grey"},
-       {"black",      "Black",      "basecolor_black"},
-       {"red",        "Red",        "basecolor_red"},
-       {"yellow",     "Yellow",     "basecolor_yellow"},
-       {"green",      "Green",      "basecolor_green"},
-       {"cyan",       "Cyan",       "basecolor_cyan"},
-       {"blue",       "Blue",       "basecolor_blue"},
-       {"magenta",    "Magenta",    "basecolor_magenta"},
-       {"orange",     "Orange",     "excolor_orange"},
-       {"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"},
+       {"white",      "White"},
+       {"grey",       "Grey"},
+       {"black",      "Black"},
+       {"red",        "Red"},
+       {"yellow",     "Yellow"},
+       {"green",      "Green"},
+       {"cyan",       "Cyan"},
+       {"blue",       "Blue"},
+       {"magenta",    "Magenta"},
+       {"orange",     "Orange"},
+       {"violet",     "Violet"},
+       {"brown",      "Brown"},
+       {"pink",       "Pink"},
+       {"dark_grey",  "Dark Grey"},
+       {"dark_green", "Dark Green"},
 }
 
 for i = 1, #dyes do
-       local name, desc, craft_color_group = unpack(dyes[i])
+       local name, desc = unpack(dyes[i])
 
        minetest.register_node("wool:" .. name, {
                description = desc .. " Wool",
@@ -35,13 +31,11 @@ for i = 1, #dyes do
        minetest.register_craft{
                type = "shapeless",
                output = "wool:" .. name,
-               recipe = {"group:dye," .. craft_color_group, "group:wool"},
+               recipe = {"group:dye,color_" .. name, "group:wool"},
        }
 end
 
-
--- legacy
-
+-- Legacy
 -- Backwards compatibility with jordach's 16-color wool mod
 minetest.register_alias("wool:dark_blue", "wool:blue")
 minetest.register_alias("wool:gold", "wool:yellow")