use mesh nodes for kitchen chairs

also fix their selectboxes
This commit is contained in:
Vanessa Ezekowitz 2015-04-15 01:52:30 -04:00
parent 7e05a9a8f0
commit d6a86d736a
28 changed files with 220 additions and 22 deletions

View File

@ -86,42 +86,35 @@ local chaircolors = {
{ "dark_green", "Dark Green" }, { "dark_green", "Dark Green" },
} }
local kc_cbox = {
type = "fixed",
fixed = { -0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125 },
}
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 color2 = chaircolors[i][1]
local name = S(chaircolors[i][2]) local name = S(chaircolors[i][2])
local chairtiles = { local chairtiles = {
"forniture_kitchen_chair_top"..color..".png", "forniture_wood.png",
"forniture_wood.png", "wool"..color..".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",
} }
if chaircolors[i][1] == "" then if chaircolors[i][1] == "" then
color = "" color = ""
chairtiles = { "forniture_wood.png" } chairtiles = {
"forniture_wood.png",
"forniture_wood.png"
}
end end
homedecor.register("chair"..color, { homedecor.register("chair"..color, {
description = S("Kitchen chair (%s)"):format(name), description = S("Kitchen chair (%s)"):format(name),
mesh = "homedecor_kitchen_chair.obj",
tiles = chairtiles, tiles = chairtiles,
node_box = { selection_box = kc_cbox,
type = "fixed", collision_box = kc_cbox,
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}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
--[[ --[[
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)

View File

@ -0,0 +1,205 @@
# Blender v2.73 (sub 0) OBJ File: 'kitchen-chair.blend'
# www.blender.org
o Cylinder
v 0.312500 -0.125000 0.187500
v -0.312500 -0.125000 0.187500
v 0.312500 -0.500000 -0.312500
v 0.312500 -0.500000 -0.187500
v 0.187500 -0.500000 -0.187500
v 0.187500 -0.500000 -0.312500
v 0.312500 -0.125000 -0.312500
v 0.312500 -0.125000 -0.187500
v 0.187500 -0.125000 -0.187500
v 0.187500 -0.125000 -0.312500
v -0.187500 -0.500000 -0.312500
v -0.187500 -0.500000 -0.187500
v -0.312500 -0.500000 -0.187500
v -0.187500 -0.125000 -0.312500
v -0.187500 -0.125000 -0.187500
v -0.312500 -0.125000 -0.187500
v -0.312500 -0.125000 -0.312500
v 0.312500 -0.062500 0.187500
v 0.312500 -0.062500 -0.312500
v -0.312500 -0.062500 -0.312500
v 0.312500 0.000000 0.187500
v -0.312500 0.000000 0.187500
v 0.312500 0.000000 -0.312500
v -0.312500 0.000000 -0.312500
v 0.312500 0.500000 0.312500
v 0.312500 0.500000 0.187500
v 0.187500 0.500000 0.187500
v 0.187500 0.500000 0.312500
v -0.187500 0.500000 0.312500
v -0.187500 0.500000 0.187500
v -0.312500 0.500000 0.187500
v -0.312500 0.500000 0.312500
v -0.312500 -0.062500 0.187500
v 0.187500 0.437500 0.257812
v -0.187500 0.437500 0.257813
v 0.187500 0.062500 0.257812
v -0.187500 0.062500 0.257813
v 0.187500 0.437500 0.242187
v -0.187500 0.437500 0.242187
v 0.187500 0.062500 0.242188
v -0.187500 0.062500 0.242188
v -0.187500 -0.500000 -0.312500
v -0.187500 -0.500000 -0.187500
v -0.312500 -0.500000 -0.187500
v -0.312500 -0.500000 -0.312500
v -0.187500 -0.125000 -0.312500
v -0.312500 -0.125000 -0.187500
v -0.312500 -0.125000 -0.312500
v 0.312500 -0.500000 0.187500
v 0.187500 -0.500000 0.312500
v 0.187500 -0.500000 0.187500
v 0.312500 0.500000 0.187500
v 0.187500 0.500000 0.312500
v 0.187500 0.500000 0.187500
v -0.187500 0.500000 0.187500
v -0.312500 -0.500000 0.187500
v 0.312500 0.500000 0.312500
v 0.312500 0.500000 0.187500
v 0.187500 -0.500000 0.187500
v 0.187500 -0.500000 0.312500
v 0.312500 -0.500000 0.312500
v 0.312500 -0.500000 0.187500
v -0.312500 -0.500000 0.312500
v -0.187500 -0.500000 0.312500
v -0.187500 -0.500000 0.187500
v 0.187500 0.500000 0.312500
v -0.187500 0.500000 0.312500
v -0.312500 0.500000 0.312500
v -0.312500 0.500000 0.187500
v -0.187500 -0.125000 0.187500
v -0.187500 0.000000 0.187500
v 0.187500 -0.125000 0.187500
v 0.187500 0.000000 0.187500
v -0.187500 -0.125000 0.312500
v -0.187500 0.000000 0.312500
v 0.187500 -0.125000 0.312500
v 0.187500 -0.062500 0.312500
v 0.187500 0.000000 0.312500
v -0.187500 -0.062500 0.312500
vt 0.125000 0.375000
vt 0.625000 0.375000
vt 0.625000 0.437500
vt 0.125000 0.437500
vt 0.187500 0.375000
vt 0.812500 0.375000
vt 0.812500 0.437500
vt 0.187500 0.437500
vt 0.500000 0.375000
vt 0.500000 0.000000
vt 0.625000 0.000000
vt 0.687500 0.375000
vt 0.687500 0.000000
vt 0.812500 0.000000
vt 0.375000 0.375000
vt 0.375000 0.000000
vt 0.312500 0.375000
vt 0.187500 0.000000
vt 0.312500 0.000000
vt 0.187500 0.812500
vt 0.187500 0.687500
vt 0.312500 0.687500
vt 0.312500 0.812500
vt 0.812500 0.812500
vt 0.187500 0.187500
vt 0.812500 0.187500
vt 0.187500 1.000000
vt 0.187500 0.875000
vt 0.312500 0.875000
vt 0.312500 1.000000
vt 0.687500 1.000000
vt 0.687500 0.875000
vt 0.812500 0.875000
vt 0.812500 1.000000
vt 0.312500 0.562500
vt 0.687500 0.562500
vt 0.687500 0.937500
vt 0.312500 0.937500
vt 0.312500 0.968750
vt 0.312500 0.906250
vt 0.687500 0.906250
vt 0.687500 0.968750
vt 0.687500 0.812500
vt 0.687500 0.687500
vt 0.812500 0.687500
vt 0.875000 0.375000
vt 0.875000 0.437500
vt 0.375000 0.437500
vt 1.000000 1.000000
vt 0.875000 1.000000
vt 0.875000 0.000000
vt 1.000000 0.000000
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.125000 0.000000
vt 0.187500 0.312500
vt 0.312500 0.187500
vt 0.312500 0.312500
vt 0.687500 0.312500
vt 0.687500 0.187500
vt 0.812500 0.312500
vt 0.687500 0.437500
vt 0.312500 0.437500
vt 0.232843 0.000000
vt 0.250000 0.937500
vt 0.750000 0.937500
vt 0.750000 1.000000
vt 0.250000 1.000000
vt 0.250000 0.687500
vt 0.750000 0.687500
vt 0.750000 0.750000
vt 0.250000 0.750000
vt 0.312500 0.625000
vt 0.687500 0.625000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
g Cylinder_Cylinder_wood
s off
f 1/1/1 7/2/1 19/3/1 18/4/1
f 7/5/2 17/6/2 20/7/2 19/8/2
f 7/2/1 8/9/1 4/10/1 3/11/1
f 8/6/3 9/12/3 5/13/3 4/14/3
f 9/9/4 10/15/4 6/16/4 5/10/4
f 10/17/2 7/5/2 3/18/2 6/19/2
f 3/20/5 4/21/5 5/22/5 6/23/5
f 14/2/1 15/9/1 12/10/1 11/11/1
f 15/17/3 16/5/3 13/18/3 12/19/3
f 17/24/5 7/20/5 1/25/5 2/26/5
f 25/27/6 26/28/6 27/29/6 28/30/6
f 29/31/6 30/32/6 31/33/6 32/34/6
f 37/35/3 36/36/3 34/37/3 35/38/3
f 41/36/2 39/37/2 38/38/2 40/35/2
f 34/39/6 38/40/6 39/41/6 35/42/6
f 37/40/5 41/41/5 40/42/5 36/39/5
f 42/43/5 43/44/5 44/45/5 45/24/5
f 48/6/2 46/12/2 42/13/2 45/14/2
f 17/15/4 2/46/4 33/47/4 20/48/4
f 47/9/4 48/15/4 45/16/4 44/10/4
f 53/49/4 54/50/4 51/51/4 50/52/4
f 54/30/2 52/27/2 49/18/2 51/19/2
f 55/53/1 67/54/1 64/55/1 65/56/1
f 62/57/5 61/25/5 60/58/5 59/59/5
f 65/60/5 64/61/5 63/26/5 56/62/5
f 57/34/3 66/31/3 60/13/3 61/14/3
f 58/53/1 57/54/1 61/55/1 62/56/1
f 69/34/2 55/31/2 65/13/2 56/14/2
f 68/49/4 69/50/4 56/51/4 63/52/4
f 67/30/3 68/27/3 63/18/3 64/19/3
f 77/63/3 79/64/3 74/17/3 76/12/3
f 70/65/5 72/65/5 76/65/5 74/65/5
f 72/65/2 70/65/2 71/65/2 73/65/2
g Cylinder_Cylinder_seat
f 19/20/2 20/24/2 24/33/2 23/28/2
f 24/20/6 22/57/6 21/62/6 23/24/6
f 18/66/1 19/67/1 23/68/1 21/69/1
f 20/70/4 33/71/4 22/72/4 24/73/4
f 77/74/3 78/35/3 75/36/3 79/75/3
f 73/60/6 71/59/6 75/58/6 78/61/6

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B