mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-11-19 08:30:34 +01:00
e04a0e5e4f
(underscore -> period). Similarly for intllib calls and the DEBUG variable.
51 lines
1.3 KiB
Lua
51 lines
1.3 KiB
Lua
-- Various kinds of window shutters
|
|
|
|
-- Boilerplate to support localized strings if intllib mod is installed.
|
|
local S
|
|
if homedecor.intllib_modpath then
|
|
dofile(homedecor.intllib_modpath.."/intllib.lua")
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
else
|
|
S = function ( s ) return s end
|
|
end
|
|
|
|
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")
|