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.
This commit is contained in:
Vanessa Ezekowitz 2014-06-26 23:20:13 -04:00
parent 949a2a94d8
commit f78ee16d6f
29 changed files with 77 additions and 68 deletions

View File

@ -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,19 +48,51 @@ 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
color = ""
end
minetest.register_node("homedecor:chair"..color, {
description = S("Kitchen chair (%s)"):format(name),
tiles = { tiles = {
"forniture_armchair_top_"..color..".png", "forniture_kitchen_chair_top"..color..".png",
"forniture_armchair_top_"..color..".png", "forniture_wood.png",
"forniture_armchair_lat1_"..color..".png", "forniture_kitchen_chair_sides"..color..".png",
"forniture_armchair_lat1_"..color..".png", "forniture_kitchen_chair_sides"..color..".png^[transformFX",
"forniture_armchair_lat2_"..color..".png", "forniture_kitchen_chair_back"..color..".png",
"forniture_armchair_lat2_"..color..".png", "forniture_kitchen_chair_front"..color..".png",
}, },
drawtype = "nodebox", 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, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
@ -112,14 +121,14 @@ for i in ipairs(chaircolors) do
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:armchair_"..color.." 2", output = "homedecor:armchair"..color.." 2",
recipe = { recipe = {
{ "wool:"..color,""}, { "wool:"..color2,""},
{ "group:wood","group:wood" }, { "group:wood","group:wood" },
{ "wool:"..color,"wool:"..color }, { "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", }

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B