Fix french translation of snow block slab
[oweals/minetest_game.git] / mods / wool / init.lua
1 -- wool/init.lua
2
3 -- Load support for MT game translation.
4 local S = minetest.get_translator("wool")
5
6 local dyes = dye.dyes
7
8 for i = 1, #dyes do
9         local name, desc = unpack(dyes[i])
10
11         minetest.register_node("wool:" .. name, {
12                 description = S(desc .. " Wool"),
13                 tiles = {"wool_" .. name .. ".png"},
14                 is_ground_content = false,
15                 groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
16                                 flammable = 3, wool = 1},
17                 sounds = default.node_sound_defaults(),
18         })
19
20         minetest.register_craft{
21                 type = "shapeless",
22                 output = "wool:" .. name,
23                 recipe = {"group:dye,color_" .. name, "group:wool"},
24         }
25 end
26
27 -- Legacy
28 -- Backwards compatibility with jordach's 16-color wool mod
29 minetest.register_alias("wool:dark_blue", "wool:blue")
30 minetest.register_alias("wool:gold", "wool:yellow")
31
32 -- Dummy calls to S() to allow translation scripts to detect the strings.
33 -- To update this run:
34 -- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Wool")) end
35
36 --[[
37 S("White Wool")
38 S("Grey Wool")
39 S("Dark Grey Wool")
40 S("Black Wool")
41 S("Violet Wool")
42 S("Blue Wool")
43 S("Cyan Wool")
44 S("Dark Green Wool")
45 S("Green Wool")
46 S("Yellow Wool")
47 S("Brown Wool")
48 S("Orange Wool")
49 S("Red Wool")
50 S("Magenta Wool")
51 S("Pink Wool")
52 --]]