Browse files

Wool mod: Remove 'basecolor', 'excolor', 'unicolor' groups

  • Loading branch information...
tenplus1 authored and paramat committed Aug 23, 2018
1 parent 3484ff2 commit 6f80fd3737cd4de30e548dd48bc0ab8c288d9930
Showing with 18 additions and 24 deletions.
  1. +18 −24 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
type = "shapeless",
output = "wool:" .. name,
recipe = {"group:dye," .. craft_color_group, "group:wool"},
recipe = {"group:dye,color_" .. name, "group:wool"},

-- 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")

0 comments on commit 6f80fd3

Please sign in to comment.