1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 07:20:31 +01:00
server-nalc/mods/homedecor_modpack/lrfurn/armchairs.lua

59 lines
1.2 KiB
Lua
Raw Normal View History

2014-10-28 18:01:32 +01:00
local armchair_cbox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5 },
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
}
}
2015-10-15 19:50:55 +02:00
for i in ipairs(lrfurn.colors) do
local colour = lrfurn.colors[i][1]
local hue = lrfurn.colors[i][2]
2014-10-28 18:01:32 +01:00
minetest.register_node("lrfurn:armchair_"..colour, {
2015-10-15 19:50:55 +02:00
description = "Armchair ("..colour..")",
drawtype = "mesh",
mesh = "lrfurn_armchair.obj",
tiles = {
2015-10-15 19:50:55 +02:00
"lrfurn_bg_white.png^[colorize:"..hue.."^lrfurn_sofa_overlay.png",
"lrfurn_sofa_bottom.png"
},
2014-10-28 18:01:32 +01:00
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=3},
2014-10-28 18:01:32 +01:00
sounds = default.node_sound_wood_defaults(),
node_box = armchair_cbox,
2014-10-28 18:01:32 +01:00
on_rightclick = function(pos, node, clicker)
if not clicker:is_player() then
return
end
pos.y = pos.y-0.5
clicker:setpos(pos)
end
})
2014-10-28 18:01:32 +01:00
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {
{"wool:"..colour, "", "", },
{"stairs:slab_wood", "", "", },
{"group:stick", "", "", }
}
})
2014-10-28 18:01:32 +01:00
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {
{"wool:"..colour, "", "", },
{"moreblocks:slab_wood", "", "", },
{"group:stick", "", "", }
}
})
end
if minetest.setting_get("log_mods") then
minetest.log("action", "armchairs loaded")
end