From: tenplus1 Date: Thu, 23 Aug 2018 19:42:36 +0000 (+0100) Subject: Wool mod: Remove 'basecolor', 'excolor', 'unicolor' groups X-Git-Tag: 5.0.0~44 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6f80fd3737cd4de30e548dd48bc0ab8c288d9930;p=oweals%2Fminetest_game.git Wool mod: Remove 'basecolor', 'excolor', 'unicolor' groups --- 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")