1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-16 15:20:35 +01:00
homedecor_modpack/lrfurn/armchairs.lua

71 lines
1.6 KiB
Lua
Raw Normal View History

2014-07-19 01:37:08 +02:00
local armchairs_list = {
{ "Red Armchair", "red"},
{ "Orange Armchair", "orange"},
2014-07-19 01:37:08 +02:00
{ "Yellow Armchair", "yellow"},
{ "Green Armchair", "green"},
{ "Blue Armchair", "blue"},
{ "Violet Armchair", "violet"},
{ "Black Armchair", "black"},
{ "Grey Armchair", "grey"},
{ "White Armchair", "white"},
}
for i in ipairs(armchairs_list) do
local armchairdesc = armchairs_list[i][1]
local colour = armchairs_list[i][2]
minetest.register_node("lrfurn:armchair_"..colour, {
description = armchairdesc,
drawtype = "mesh",
mesh = "lrfurn_armchair.obj",
tiles = {
"lrfurn_sofa_"..colour..".png",
"lrfurn_sofa_bottom.png"
},
2014-07-19 01:37:08 +02:00
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
on_rightclick = function(pos, node, clicker)
if not clicker:is_player() then
return
end
pos.y = pos.y-0.5
clicker:setpos(pos)
clicker:set_hp(20)
end
})
2014-07-19 01:37:08 +02:00
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {
{"wool:"..colour, "", "", },
{"stairs:slab_wood", "", "", },
{"group:stick", "", "", }
2014-07-19 01:37:08 +02:00
}
})
2014-07-19 01:37:08 +02:00
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {
{"wool:"..colour, "", "", },
{"moreblocks:slab_wood", "", "", },
{"group:stick", "", "", }
2014-07-19 01:37:08 +02:00
}
})
minetest.register_craft({
output = "lrfurn:armchair_"..colour,
recipe = {
{"wool:"..colour, "", "", },
{"group:wood_slab", "", "", },
{"group:stick", "", "", }
2014-07-19 01:37:08 +02:00
}
})
end
if minetest.setting_get("log_mods") then
minetest.log("action", "armchairs loaded")
end