add several colors of kitchen chairs
(same colors as armchairs) this necessitated a slight change to the existing model, it is now exactly fit to pixels so that the new textures will align correctly. Also, phased out the *lat1/lat2 textures used on the armchairs - redundant.
@ -37,31 +37,8 @@ for _, i in ipairs(table_colors) do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("homedecor:chair", {
|
|
||||||
description = S("Chair"),
|
|
||||||
tiles = { "forniture_wood.png" },
|
|
||||||
drawtype = "nodebox",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -0.3, -0.5, 0.20, -0.2, 0.5, 0.30 },
|
|
||||||
{ 0.2, -0.5, 0.20, 0.3, 0.5, 0.30 },
|
|
||||||
{ -0.3, -0.5, -0.30, -0.2, -0.1, -0.20 },
|
|
||||||
{ 0.2, -0.5, -0.30, 0.3, -0.1, -0.20 },
|
|
||||||
{ -0.3, -0.1, -0.30, 0.3, 0.0, 0.20 },
|
|
||||||
{ -0.2, 0.1, 0.25, 0.2, 0.4, 0.26 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
|
||||||
},
|
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
|
||||||
})
|
|
||||||
|
|
||||||
local chaircolors = {
|
local chaircolors = {
|
||||||
|
{ "", "plain" },
|
||||||
{ "black", "Black" },
|
{ "black", "Black" },
|
||||||
{ "red", "Red" },
|
{ "red", "Red" },
|
||||||
{ "pink", "Pink" },
|
{ "pink", "Pink" },
|
||||||
@ -71,55 +48,87 @@ local chaircolors = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i in ipairs(chaircolors) do
|
for i in ipairs(chaircolors) do
|
||||||
local color = chaircolors[i][1]
|
|
||||||
|
local color = "_"..chaircolors[i][1]
|
||||||
|
local color2 = chaircolors[i][1]
|
||||||
local name = S(chaircolors[i][2])
|
local name = S(chaircolors[i][2])
|
||||||
minetest.register_node("homedecor:armchair_"..color, {
|
|
||||||
description = S("Armchair (%s)"):format(name),
|
if chaircolors[i][1] == "" then
|
||||||
tiles = {
|
color = ""
|
||||||
"forniture_armchair_top_"..color..".png",
|
end
|
||||||
"forniture_armchair_top_"..color..".png",
|
|
||||||
"forniture_armchair_lat1_"..color..".png",
|
minetest.register_node("homedecor:chair"..color, {
|
||||||
"forniture_armchair_lat1_"..color..".png",
|
description = S("Kitchen chair (%s)"):format(name),
|
||||||
"forniture_armchair_lat2_"..color..".png",
|
tiles = {
|
||||||
"forniture_armchair_lat2_"..color..".png",
|
"forniture_kitchen_chair_top"..color..".png",
|
||||||
},
|
"forniture_wood.png",
|
||||||
drawtype = "nodebox",
|
"forniture_kitchen_chair_sides"..color..".png",
|
||||||
sunlight_propagates = true,
|
"forniture_kitchen_chair_sides"..color..".png^[transformFX",
|
||||||
paramtype = "light",
|
"forniture_kitchen_chair_back"..color..".png",
|
||||||
paramtype2 = "facedir",
|
"forniture_kitchen_chair_front"..color..".png",
|
||||||
node_box = {
|
},
|
||||||
type = "fixed",
|
drawtype = "nodebox",
|
||||||
fixed = {
|
paramtype = "light",
|
||||||
{ -0.50, -0.50, -0.45, -0.30, 0.05, 0.30 },
|
paramtype2 = "facedir",
|
||||||
{ -0.45, -0.50, -0.50, -0.35, 0.05, -0.45 },
|
node_box = {
|
||||||
{ -0.45, 0.05, -0.45, -0.35, 0.10, 0.15 },
|
type = "fixed",
|
||||||
{ 0.30, -0.50, -0.45, 0.50, 0.05, 0.30 },
|
fixed = {
|
||||||
{ 0.35, -0.50, -0.50, 0.45, 0.05, -0.45 },
|
{-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125},
|
||||||
{ 0.35, 0.05, -0.45, 0.45, 0.10, 0.15 },
|
{0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125},
|
||||||
{ -0.50, -0.50, 0.30, 0.50, 0.45, 0.50 },
|
{-0.3125, -0.5, -0.3125, -0.1875, 0, -0.1875},
|
||||||
{ -0.45, 0.45, 0.35, 0.45, 0.50, 0.45 },
|
{0.1875, -0.5, -0.3125, 0.3125, 0, -0.1875},
|
||||||
{ -0.30, -0.45, -0.35, 0.30, -0.10, 0.30 },
|
{-0.3125, -0.125, -0.3125, 0.3125, 0, 0.3125},
|
||||||
{ -0.30, -0.45, -0.40, 0.30, -0.15, -0.35 },
|
{-0.25, 0.0625, 0.25, 0.25, 0.4375, 0.25},
|
||||||
{ -0.50, 0.05, 0.15, -0.30, 0.45, 0.30 },
|
},
|
||||||
{ -0.45, 0.10, 0.10, -0.35, 0.45, 0.15 },
|
|
||||||
{ -0.45, 0.45, 0.15, -0.35, 0.50, 0.35 },
|
|
||||||
{ 0.30, 0.05, 0.15, 0.50, 0.45, 0.30 },
|
|
||||||
{ 0.35, 0.10, 0.10, 0.45, 0.45, 0.15 },
|
|
||||||
{ 0.35, 0.45, 0.15, 0.45, 0.50, 0.35 },
|
|
||||||
},
|
},
|
||||||
},
|
selection_box = {
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
type = "fixed",
|
||||||
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||||
|
},
|
||||||
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
if color ~= "" then
|
||||||
output = "homedecor:armchair_"..color.." 2",
|
minetest.register_node("homedecor:armchair"..color, {
|
||||||
recipe = {
|
description = S("Armchair (%s)"):format(name),
|
||||||
{ "wool:"..color,""},
|
tiles = { "forniture_armchair_top"..color..".png" },
|
||||||
{ "group:wood","group:wood" },
|
drawtype = "nodebox",
|
||||||
{ "wool:"..color,"wool:"..color },
|
sunlight_propagates = true,
|
||||||
},
|
paramtype = "light",
|
||||||
})
|
paramtype2 = "facedir",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{ -0.50, -0.50, -0.45, -0.30, 0.05, 0.30 },
|
||||||
|
{ -0.45, -0.50, -0.50, -0.35, 0.05, -0.45 },
|
||||||
|
{ -0.45, 0.05, -0.45, -0.35, 0.10, 0.15 },
|
||||||
|
{ 0.30, -0.50, -0.45, 0.50, 0.05, 0.30 },
|
||||||
|
{ 0.35, -0.50, -0.50, 0.45, 0.05, -0.45 },
|
||||||
|
{ 0.35, 0.05, -0.45, 0.45, 0.10, 0.15 },
|
||||||
|
{ -0.50, -0.50, 0.30, 0.50, 0.45, 0.50 },
|
||||||
|
{ -0.45, 0.45, 0.35, 0.45, 0.50, 0.45 },
|
||||||
|
{ -0.30, -0.45, -0.35, 0.30, -0.10, 0.30 },
|
||||||
|
{ -0.30, -0.45, -0.40, 0.30, -0.15, -0.35 },
|
||||||
|
{ -0.50, 0.05, 0.15, -0.30, 0.45, 0.30 },
|
||||||
|
{ -0.45, 0.10, 0.10, -0.35, 0.45, 0.15 },
|
||||||
|
{ -0.45, 0.45, 0.15, -0.35, 0.50, 0.35 },
|
||||||
|
{ 0.30, 0.05, 0.15, 0.50, 0.45, 0.30 },
|
||||||
|
{ 0.35, 0.10, 0.10, 0.45, 0.45, 0.15 },
|
||||||
|
{ 0.35, 0.45, 0.15, 0.45, 0.50, 0.35 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:armchair"..color.." 2",
|
||||||
|
recipe = {
|
||||||
|
{ "wool:"..color2,""},
|
||||||
|
{ "group:wood","group:wood" },
|
||||||
|
{ "wool:"..color2,"wool:"..color2 },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local repl = { off="low", low="med", med="hi", hi="max", max="off", }
|
local repl = { off="low", low="med", med="hi", hi="max", max="off", }
|
||||||
|
BIN
homedecor/textures/forniture_kitchen_chair_back.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
homedecor/textures/forniture_kitchen_chair_back_black.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
homedecor/textures/forniture_kitchen_chair_back_blue.png
Normal file
After Width: | Height: | Size: 482 B |
BIN
homedecor/textures/forniture_kitchen_chair_back_dark_green.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
homedecor/textures/forniture_kitchen_chair_back_pink.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
homedecor/textures/forniture_kitchen_chair_back_red.png
Normal file
After Width: | Height: | Size: 481 B |
BIN
homedecor/textures/forniture_kitchen_chair_back_violet.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
homedecor/textures/forniture_kitchen_chair_front.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
homedecor/textures/forniture_kitchen_chair_front_black.png
Normal file
After Width: | Height: | Size: 448 B |
BIN
homedecor/textures/forniture_kitchen_chair_front_blue.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
homedecor/textures/forniture_kitchen_chair_front_dark_green.png
Normal file
After Width: | Height: | Size: 479 B |
BIN
homedecor/textures/forniture_kitchen_chair_front_pink.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
homedecor/textures/forniture_kitchen_chair_front_red.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
homedecor/textures/forniture_kitchen_chair_front_violet.png
Normal file
After Width: | Height: | Size: 485 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides_black.png
Normal file
After Width: | Height: | Size: 323 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides_blue.png
Normal file
After Width: | Height: | Size: 342 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides_dark_green.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides_pink.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides_red.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
homedecor/textures/forniture_kitchen_chair_sides_violet.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
homedecor/textures/forniture_kitchen_chair_top.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
homedecor/textures/forniture_kitchen_chair_top_black.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
homedecor/textures/forniture_kitchen_chair_top_blue.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
homedecor/textures/forniture_kitchen_chair_top_dark_green.png
Normal file
After Width: | Height: | Size: 433 B |
BIN
homedecor/textures/forniture_kitchen_chair_top_pink.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
homedecor/textures/forniture_kitchen_chair_top_red.png
Normal file
After Width: | Height: | Size: 434 B |
BIN
homedecor/textures/forniture_kitchen_chair_top_violet.png
Normal file
After Width: | Height: | Size: 443 B |