minestead_mods/wool/init.lua
Sergei Mozhaisky 2ac5a5fc35
Update default game (#31)
* update: xpanes

* update wool

* update walls

* update vessels

* update tnt

* update stairs

* update spawn

* update sfinv

* update sethome

* update screwdriver

* update player_api

* update map

* update give_initial_stuff

* update game_commands

* update flowers

* update fireflies

* update fire

* update dye

* update dungeon_loot

* update doors

* update creative

* update butterflies

* update bucket

* update bones

* update boats

* update binoculars

* update beds

* update default

* revert to stairs_redo

* mc brick texture

* add xpanes_space.png as dependency
2020-05-25 12:35:59 +03:00

53 lines
1.2 KiB
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(desc .. " Wool"),
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")
-- Dummy calls to S() to allow translation scripts to detect the strings.
-- To update this run:
-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Wool")) end
--[[
S("White Wool")
S("Grey Wool")
S("Dark Grey Wool")
S("Black Wool")
S("Violet Wool")
S("Blue Wool")
S("Cyan Wool")
S("Dark Green Wool")
S("Green Wool")
S("Yellow Wool")
S("Brown Wool")
S("Orange Wool")
S("Red Wool")
S("Magenta Wool")
S("Pink Wool")
--]]