star_wars/mods/wool/init.lua

26 lines
682 B
Lua
Raw Normal View History

2019-05-26 21:21:31 +02:00
local dyes = dye.dyes
2016-06-27 14:02:44 +02:00
for i = 1, #dyes do
local name, desc = unpack(dyes[i])
2016-06-27 14:02:44 +02:00
minetest.register_node("wool:" .. name, {
description = desc .. " Wool",
tiles = {"wool_" .. name .. ".png"},
is_ground_content = false,
2016-06-27 14:02:44 +02:00
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
flammable = 3, wool = 1},
sounds = default.node_sound_defaults(),
})
2016-06-27 14:02:44 +02:00
minetest.register_craft{
type = "shapeless",
output = "wool:" .. name,
recipe = {"group:dye,color_" .. name, "group:wool"},
2016-06-27 14:02:44 +02:00
}
end
-- Legacy
2016-06-27 14:02:44 +02:00
-- Backwards compatibility with jordach's 16-color wool mod
minetest.register_alias("wool:dark_blue", "wool:blue")
minetest.register_alias("wool:gold", "wool:yellow")