More colors for the bed
red, (dark) green, violet
@ -2372,15 +2372,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_blue_foot",
|
||||
recipe = {
|
||||
{ "group:stick", "", "group:stick" },
|
||||
{ "wool:white", "wool:blue", "wool:blue" },
|
||||
{ "group:wood", "", "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:pool_table",
|
||||
recipe = {
|
||||
@ -2517,3 +2508,25 @@ minetest.register_craft( {
|
||||
{ "moreblocks:slab_wood", "", "moreblocks:slab_wood" }
|
||||
},
|
||||
})
|
||||
|
||||
local bedcolors = {
|
||||
{ "red", "red"},
|
||||
{ "green", "dark_green"},
|
||||
{ "blue", "blue"},
|
||||
{ "violet", "violet"}
|
||||
}
|
||||
|
||||
for c in ipairs(bedcolors) do
|
||||
local color = bedcolors[c][1]
|
||||
local woolcolor = bedcolors[c][2]
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_"..color.."_foot",
|
||||
recipe = {
|
||||
{ "group:stick", "", "group:stick" },
|
||||
{ "wool:white", "wool:"..woolcolor, "wool:"..woolcolor },
|
||||
{ "group:wood", "", "group:wood" },
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
|
@ -240,16 +240,30 @@ minetest.register_node(":homedecor:openframe_bookshelf", {
|
||||
}
|
||||
})
|
||||
|
||||
-- decorative bed and wardrobe, models by jp
|
||||
local bedcolors = {
|
||||
"red",
|
||||
"green",
|
||||
"blue",
|
||||
"violet",
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:bed_blue_head", {
|
||||
local fdir_to_fwd = {
|
||||
{ 0, 1 },
|
||||
{ 1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 0 },
|
||||
}
|
||||
|
||||
for _, color in ipairs(bedcolors) do
|
||||
|
||||
minetest.register_node("homedecor:bed_"..color.."_head", {
|
||||
tiles = {
|
||||
"homedecor_bed_blue_top1.png",
|
||||
"homedecor_bed_"..color.."_top1.png",
|
||||
"homedecor_bed_bottom1.png",
|
||||
"homedecor_bed_blue_side1.png",
|
||||
"homedecor_bed_blue_side1.png^[transformFX",
|
||||
"homedecor_bed_blue_head1.png",
|
||||
"homedecor_bed_blue_head2.png"
|
||||
"homedecor_bed_"..color.."_side1.png",
|
||||
"homedecor_bed_"..color.."_side1.png^[transformFX",
|
||||
"homedecor_bed_"..color.."_head1.png",
|
||||
"homedecor_bed_"..color.."_head2.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
@ -280,24 +294,17 @@ minetest.register_node("homedecor:bed_blue_head", {
|
||||
}
|
||||
})
|
||||
|
||||
local fdir_to_fwd = {
|
||||
{ 0, 1 },
|
||||
{ 1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 0 },
|
||||
}
|
||||
|
||||
minetest.register_node("homedecor:bed_blue_foot", {
|
||||
minetest.register_node("homedecor:bed_"..color.."_foot", {
|
||||
tiles = {
|
||||
"homedecor_bed_blue_top2.png",
|
||||
"homedecor_bed_"..color.."_top2.png",
|
||||
"homedecor_bed_bottom2.png",
|
||||
"homedecor_bed_blue_side2.png",
|
||||
"homedecor_bed_blue_side2.png^[transformFX",
|
||||
"homedecor_bed_blue_foot2.png",
|
||||
"homedecor_bed_blue_foot1.png"
|
||||
"homedecor_bed_"..color.."_side2.png",
|
||||
"homedecor_bed_"..color.."_side2.png^[transformFX",
|
||||
"homedecor_bed_"..color.."_foot2.png",
|
||||
"homedecor_bed_"..color.."_foot1.png"
|
||||
},
|
||||
inventory_image = "homedecor_bed_blue_inv.png",
|
||||
description = "Bed",
|
||||
inventory_image = "homedecor_bed_"..color.."_inv.png",
|
||||
description = S("Bed (%s)"):format(color),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -342,8 +349,8 @@ minetest.register_node("homedecor:bed_blue_foot", {
|
||||
and homedecor.get_nodedef_field(tnode2.name, "buildable_to")
|
||||
and not minetest.is_protected(pos, placer:get_player_name())
|
||||
and not minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
minetest.add_node(pos, { name = "homedecor:bed_blue_foot", param2 = fdir })
|
||||
minetest.add_node(pos2, { name = "homedecor:bed_blue_head", param2 = fdir })
|
||||
minetest.add_node(pos, { name = "homedecor:bed_"..color.."_foot", param2 = fdir })
|
||||
minetest.add_node(pos2, { name = "homedecor:bed_"..color.."_head", param2 = fdir })
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
@ -354,12 +361,14 @@ minetest.register_node("homedecor:bed_blue_foot", {
|
||||
local fdir = oldnode.param2
|
||||
if not fdir or fdir > 3 then return end
|
||||
local pos2 = { x = pos.x + fdir_to_fwd[fdir+1][1], y=pos.y, z = pos.z + fdir_to_fwd[fdir+1][2] }
|
||||
if minetest.get_node(pos2).name == "homedecor:bed_blue_head" then
|
||||
if minetest.get_node(pos2).name == "homedecor:bed_"..color.."_head" then
|
||||
minetest.remove_node(pos2)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:wardrobe_top", {
|
||||
tiles = {
|
||||
"homedecor_wardrobe_top.png",
|
||||
|
BIN
homedecor/textures/homedecor_bed_green_foot1.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
homedecor/textures/homedecor_bed_green_foot2.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
homedecor/textures/homedecor_bed_green_head1.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
homedecor/textures/homedecor_bed_green_head2.png
Normal file
After Width: | Height: | Size: 433 B |
BIN
homedecor/textures/homedecor_bed_green_inv.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
homedecor/textures/homedecor_bed_green_side1.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
homedecor/textures/homedecor_bed_green_side2.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
homedecor/textures/homedecor_bed_green_top1.png
Normal file
After Width: | Height: | Size: 674 B |
BIN
homedecor/textures/homedecor_bed_green_top2.png
Normal file
After Width: | Height: | Size: 630 B |
BIN
homedecor/textures/homedecor_bed_red_foot1.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
homedecor/textures/homedecor_bed_red_foot2.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
homedecor/textures/homedecor_bed_red_head1.png
Normal file
After Width: | Height: | Size: 495 B |
BIN
homedecor/textures/homedecor_bed_red_head2.png
Normal file
After Width: | Height: | Size: 434 B |
BIN
homedecor/textures/homedecor_bed_red_inv.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
homedecor/textures/homedecor_bed_red_side1.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
homedecor/textures/homedecor_bed_red_side2.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
homedecor/textures/homedecor_bed_red_top1.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
homedecor/textures/homedecor_bed_red_top2.png
Normal file
After Width: | Height: | Size: 472 B |
BIN
homedecor/textures/homedecor_bed_violet_foot1.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
homedecor/textures/homedecor_bed_violet_foot2.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
homedecor/textures/homedecor_bed_violet_head1.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
homedecor/textures/homedecor_bed_violet_head2.png
Normal file
After Width: | Height: | Size: 433 B |
BIN
homedecor/textures/homedecor_bed_violet_inv.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
homedecor/textures/homedecor_bed_violet_side1.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
homedecor/textures/homedecor_bed_violet_side2.png
Normal file
After Width: | Height: | Size: 337 B |
BIN
homedecor/textures/homedecor_bed_violet_top1.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
homedecor/textures/homedecor_bed_violet_top2.png
Normal file
After Width: | Height: | Size: 602 B |