mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
Add color_* groups to wool
This commit is contained in:
parent
aff9c28eed
commit
508a9070a0
@ -8,19 +8,21 @@ local dyes = dye.dyes
|
|||||||
for i = 1, #dyes do
|
for i = 1, #dyes do
|
||||||
local name, desc = unpack(dyes[i])
|
local name, desc = unpack(dyes[i])
|
||||||
|
|
||||||
|
local color_group = "color_" .. name
|
||||||
|
|
||||||
minetest.register_node("wool:" .. name, {
|
minetest.register_node("wool:" .. name, {
|
||||||
description = S(desc .. " Wool"),
|
description = S(desc .. " Wool"),
|
||||||
tiles = {"wool_" .. name .. ".png"},
|
tiles = {"wool_" .. name .. ".png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
|
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
|
||||||
flammable = 3, wool = 1},
|
flammable = 3, wool = 1, [color_group] = 1},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft{
|
minetest.register_craft{
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "wool:" .. name,
|
output = "wool:" .. name,
|
||||||
recipe = {"group:dye,color_" .. name, "group:wool"},
|
recipe = {"group:dye," .. color_group, "group:wool"},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user