homedecor_modpack/shutters.lua
kaeza 10cef3dda1 Use a single `intllib.Getter' for all the texts.
Just a minimal code reduction, but big reduction in code
duplication. This could help if in the future, support for
different "internationalization" mods will be added, or in
case Minetest supports I18N/L10N internally in the engine.
2013-10-21 22:31:54 -02:00

44 lines
1.1 KiB
Lua

-- Various kinds of window shutters
local S = homedecor.gettext
local shutters = {
{"oak", "Unpainted oak"},
{"mahogany", "Mahogany"},
{"red", "Red"},
{"yellow", "Yellow"},
{"forest_green", "Forest green"},
{"light_blue", "Light blue"},
{"violet", "Violet"},
{"black", "Black"},
{"dark_grey", "Dark grey"},
{"grey", "Grey"},
{"white", "White"},
}
for i in ipairs(shutters) do
local name = shutters[i][1]
local desc = shutters[i][2]
minetest.register_node("homedecor:shutter_"..name, {
description = S("Wooden Shutter ("..desc..")"),
tiles = { "homedecor_window_shutter_"..name..".png" },
inventory_image = "homedecor_window_shutter_"..name..".png",
wield_image = "homedecor_window_shutter_"..name..".png",
drawtype = 'signlike',
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
end
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")