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
|
||||
|
||||
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 = {
|
||||
{ "", "plain" },
|
||||
{ "black", "Black" },
|
||||
{ "red", "Red" },
|
||||
{ "pink", "Pink" },
|
||||
@ -71,19 +48,51 @@ local chaircolors = {
|
||||
}
|
||||
|
||||
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])
|
||||
minetest.register_node("homedecor:armchair_"..color, {
|
||||
description = S("Armchair (%s)"):format(name),
|
||||
|
||||
if chaircolors[i][1] == "" then
|
||||
color = ""
|
||||
end
|
||||
|
||||
minetest.register_node("homedecor:chair"..color, {
|
||||
description = S("Kitchen chair (%s)"):format(name),
|
||||
tiles = {
|
||||
"forniture_armchair_top_"..color..".png",
|
||||
"forniture_armchair_top_"..color..".png",
|
||||
"forniture_armchair_lat1_"..color..".png",
|
||||
"forniture_armchair_lat1_"..color..".png",
|
||||
"forniture_armchair_lat2_"..color..".png",
|
||||
"forniture_armchair_lat2_"..color..".png",
|
||||
"forniture_kitchen_chair_top"..color..".png",
|
||||
"forniture_wood.png",
|
||||
"forniture_kitchen_chair_sides"..color..".png",
|
||||
"forniture_kitchen_chair_sides"..color..".png^[transformFX",
|
||||
"forniture_kitchen_chair_back"..color..".png",
|
||||
"forniture_kitchen_chair_front"..color..".png",
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125},
|
||||
{0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125},
|
||||
{-0.3125, -0.5, -0.3125, -0.1875, 0, -0.1875},
|
||||
{0.1875, -0.5, -0.3125, 0.3125, 0, -0.1875},
|
||||
{-0.3125, -0.125, -0.3125, 0.3125, 0, 0.3125},
|
||||
{-0.25, 0.0625, 0.25, 0.25, 0.4375, 0.25},
|
||||
},
|
||||
},
|
||||
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},
|
||||
})
|
||||
|
||||
if color ~= "" then
|
||||
minetest.register_node("homedecor:armchair"..color, {
|
||||
description = S("Armchair (%s)"):format(name),
|
||||
tiles = { "forniture_armchair_top"..color..".png" },
|
||||
drawtype = "nodebox",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -112,14 +121,14 @@ for i in ipairs(chaircolors) do
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:armchair_"..color.." 2",
|
||||
output = "homedecor:armchair"..color.." 2",
|
||||
recipe = {
|
||||
{ "wool:"..color,""},
|
||||
{ "wool:"..color2,""},
|
||||
{ "group:wood","group:wood" },
|
||||
{ "wool:"..color,"wool:"..color },
|
||||
{ "wool:"..color2,"wool:"..color2 },
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
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 |