From 6f80fd3737cd4de30e548dd48bc0ab8c288d9930 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 23 Aug 2018 20:42:36 +0100 Subject: [PATCH] Wool mod: Remove 'basecolor', 'excolor', 'unicolor' groups --- mods/wool/init.lua | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/mods/wool/init.lua b/mods/wool/init.lua index a36e4dd8..3e565a47 100644 --- a/mods/wool/init.lua +++ b/mods/wool/init.lua @@ -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") -- 2.25.1