minetest_game/mods/wool/init.lua
2019-09-10 19:09:51 +02:00

31 lines
787 B
Lua

-- wool/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("wool")
local dyes = dye.dyes
for i = 1, #dyes do
local name, desc = unpack(dyes[i])
minetest.register_node("wool:" .. name, {
description = S("@1 Wool", desc),
tiles = {"wool_" .. name .. ".png"},
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
flammable = 3, wool = 1},
sounds = default.node_sound_defaults(),
})
minetest.register_craft{
type = "shapeless",
output = "wool:" .. name,
recipe = {"group:dye,color_" .. name, "group:wool"},
}
end
-- 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")