Skip to content

Commit 6f80fd3

Browse files
tenplus1paramat
authored andcommittedAug 23, 2018
Wool mod: Remove 'basecolor', 'excolor', 'unicolor' groups
1 parent 3484ff2 commit 6f80fd3

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed
 

‎mods/wool/init.lua

+18-24
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
-- This uses a trick: you can first define the recipes using all of the base
2-
-- colors, and then some recipes using more specific colors for a few non-base
3-
-- colors available. When crafting, the last recipes will be checked first.
4-
51
local dyes = {
6-
{"white", "White", "basecolor_white"},
7-
{"grey", "Grey", "basecolor_grey"},
8-
{"black", "Black", "basecolor_black"},
9-
{"red", "Red", "basecolor_red"},
10-
{"yellow", "Yellow", "basecolor_yellow"},
11-
{"green", "Green", "basecolor_green"},
12-
{"cyan", "Cyan", "basecolor_cyan"},
13-
{"blue", "Blue", "basecolor_blue"},
14-
{"magenta", "Magenta", "basecolor_magenta"},
15-
{"orange", "Orange", "excolor_orange"},
16-
{"violet", "Violet", "excolor_violet"},
17-
{"brown", "Brown", "unicolor_dark_orange"},
18-
{"pink", "Pink", "unicolor_light_red"},
19-
{"dark_grey", "Dark Grey", "unicolor_darkgrey"},
20-
{"dark_green", "Dark Green", "unicolor_dark_green"},
2+
{"white", "White"},
3+
{"grey", "Grey"},
4+
{"black", "Black"},
5+
{"red", "Red"},
6+
{"yellow", "Yellow"},
7+
{"green", "Green"},
8+
{"cyan", "Cyan"},
9+
{"blue", "Blue"},
10+
{"magenta", "Magenta"},
11+
{"orange", "Orange"},
12+
{"violet", "Violet"},
13+
{"brown", "Brown"},
14+
{"pink", "Pink"},
15+
{"dark_grey", "Dark Grey"},
16+
{"dark_green", "Dark Green"},
2117
}
2218

2319
for i = 1, #dyes do
24-
local name, desc, craft_color_group = unpack(dyes[i])
20+
local name, desc = unpack(dyes[i])
2521

2622
minetest.register_node("wool:" .. name, {
2723
description = desc .. " Wool",
@@ -35,13 +31,11 @@ for i = 1, #dyes do
3531
minetest.register_craft{
3632
type = "shapeless",
3733
output = "wool:" .. name,
38-
recipe = {"group:dye," .. craft_color_group, "group:wool"},
34+
recipe = {"group:dye,color_" .. name, "group:wool"},
3935
}
4036
end
4137

42-
43-
-- legacy
44-
38+
-- Legacy
4539
-- Backwards compatibility with jordach's 16-color wool mod
4640
minetest.register_alias("wool:dark_blue", "wool:blue")
4741
minetest.register_alias("wool:gold", "wool:yellow")

0 commit comments

Comments
 (0)
Please sign in to comment.