diff --git a/homedecor/models/homedecor_slope.obj b/homedecor/models/homedecor_slope.obj index 97b8bb1..c3ab158 100644 --- a/homedecor/models/homedecor_slope.obj +++ b/homedecor/models/homedecor_slope.obj @@ -1,6 +1,5 @@ -# Blender v2.69 (sub 0) OBJ File: 'slope_test_slope.blend' +# Blender v2.73 (sub 0) OBJ File: 'slope_test_slope_onetexture.blend' # www.blender.org -mtllib slope_test_slope.mtl o Cube_Cube.002 v 0.500000 0.500000 0.500000 v -0.500000 0.500000 0.500000 @@ -8,28 +7,20 @@ v -0.500000 -0.500000 0.500000 v 0.500000 -0.500000 0.500000 v -0.500000 -0.500000 -0.500000 v 0.500000 -0.500000 -0.500000 -vt 0.546875 0.984375 -vt 0.296875 0.984375 -vt 0.296875 0.734375 -vt 0.546875 0.734375 -vt 0.578125 0.734375 -vt 0.828125 0.734375 -vt 0.828125 0.984375 -vt 0.578125 0.984375 -vt 0.546875 0.703125 -vt 0.296875 0.453125 -vt 0.546875 0.453125 -vt 0.578125 0.703125 -vt 0.578125 0.453125 -vt 0.828125 0.453125 -vt 0.265625 0.984375 -vt 0.015625 0.984375 -vt 0.015625 0.609375 -vt 0.265625 0.609375 -usemtl None +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vn 0.000000 -0.000000 1.000000 +vn 0.000000 -1.000000 -0.000000 +vn 0.000000 0.707100 -0.707100 +vn -1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +g Cube_Cube.002_Cube_Cube.002_front-back-bottom s off -f 1/1 2/2 3/3 4/4 -f 4/5 3/6 5/7 6/8 -f 2/9 5/10 3/11 -f 1/12 4/13 6/14 -f 2/15 1/16 6/17 5/18 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 4/3/2 3/4/2 5/1/2 6/2/2 +f 2/1/3 1/2/3 6/3/3 5/4/3 +g Cube_Cube.002_Cube_Cube.002_sides +f 2/1/4 5/3/4 3/4/4 +f 1/2/5 4/3/5 6/4/5 diff --git a/homedecor/models/homedecor_slope_inner_corner.obj b/homedecor/models/homedecor_slope_inner_corner.obj index 8cf7cd3..6f273a4 100644 --- a/homedecor/models/homedecor_slope_inner_corner.obj +++ b/homedecor/models/homedecor_slope_inner_corner.obj @@ -1,6 +1,5 @@ -# Blender v2.69 (sub 0) OBJ File: 'slope_test_icorner.blend' +# Blender v2.73 (sub 0) OBJ File: 'slope_test_icorner_onetexture.blend' # www.blender.org -mtllib slope_test_icorner.mtl o Cube_Cube.000 v 0.500000 0.500000 0.500000 v -0.500000 0.500000 0.500000 @@ -11,38 +10,25 @@ v 0.500000 0.500000 -0.500000 v 0.500000 -0.500000 0.500000 v 0.500000 -0.500000 -0.500000 v -0.500000 -0.500000 -0.500000 -vt 0.546875 0.984375 -vt 0.296875 0.984375 -vt 0.296875 0.734375 -vt 0.546875 0.734375 -vt 0.828125 0.421875 -vt 0.578125 0.171875 -vt 0.828125 0.171875 -vt 0.546875 0.703125 -vt 0.296875 0.703125 -vt 0.546875 0.328125 -vt 0.578125 0.703125 -vt 0.578125 0.453125 -vt 0.828125 0.453125 -vt 0.828125 0.984375 -vt 0.578125 0.984375 -vt 0.578125 0.734375 -vt 0.828125 0.734375 -vt 0.015625 0.734375 -vt 0.265625 0.734375 -vt 0.265625 0.984375 -vt 0.015625 0.984375 -vt 0.265625 0.703125 -vt 0.015625 0.703125 -vt 0.015625 0.328125 -usemtl None +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vn 1.000000 -0.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.707100 -0.707100 +vn 0.000000 -0.000000 -1.000000 +vn -0.000000 -1.000000 -0.000000 +vn -0.000000 -0.000000 1.000000 +vn -0.707100 0.707100 -0.000000 +g Cube_Cube.000_Cube_Cube.000_None s off -f 6/1 1/2 7/3 8/4 -f 2/5 5/6 3/7 -f 2/8 1/9 5/10 -f 6/11 8/12 9/13 -f 9/14 8/15 7/16 3/17 -f 3/18 7/19 1/20 2/21 -f 1/22 6/23 9/24 +f 6/1/1 1/2/1 7/3/1 8/4/1 +f 2/1/2 5/3/2 3/4/2 +f 2/1/3 1/2/3 5/4/3 +f 6/2/4 8/3/4 9/4/4 +f 9/1/5 8/2/5 7/3/5 3/4/5 +f 3/3/6 7/4/6 1/1/6 2/2/6 +f 1/1/7 6/2/7 9/3/7 l 1 4 l 3 4 diff --git a/homedecor/models/homedecor_slope_outer_corner.obj b/homedecor/models/homedecor_slope_outer_corner.obj index 6d94562..2408acf 100644 --- a/homedecor/models/homedecor_slope_outer_corner.obj +++ b/homedecor/models/homedecor_slope_outer_corner.obj @@ -1,32 +1,24 @@ -# Blender v2.69 (sub 0) OBJ File: 'slope_test_ocorner.blend' +# Blender v2.73 (sub 0) OBJ File: 'slope_test_ocorner_onetexture.blend' # www.blender.org -mtllib slope_test_ocorner.mtl o Cube_Cube.002 v 0.500000 0.500000 0.500000 v -0.500000 -0.500000 0.500000 v 0.500000 -0.500000 0.500000 v -0.500000 -0.500000 -0.500000 v 0.500000 -0.500000 -0.500000 -vt 0.578125 0.734375 -vt 0.828125 0.734375 -vt 0.828125 0.984375 -vt 0.578125 0.984375 -vt 0.296875 0.703125 -vt 0.296875 0.453125 -vt 0.546875 0.453125 -vt 0.546875 0.984375 -vt 0.296875 0.734375 -vt 0.546875 0.734375 -vt 0.265625 0.578125 -vt 0.015625 0.203125 -vt 0.265625 0.203125 -vt 0.015625 0.984375 -vt 0.015625 0.609375 -vt 0.265625 0.609375 -usemtl None +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vn 0.000000 -1.000000 -0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 -0.000000 1.000000 +vn -0.707100 0.707100 0.000000 +vn 0.000000 0.707100 -0.707100 +g Cube_Cube.002_Cube_Cube.002_None s off -f 3/1 2/2 4/3 5/4 -f 1/5 3/6 5/7 -f 1/8 2/9 3/10 -f 1/11 4/12 2/13 -f 1/14 5/15 4/16 +f 3/1/1 2/2/1 4/3/1 5/4/1 +f 1/2/2 3/3/2 5/4/2 +f 1/1/3 2/3/3 3/4/3 +f 1/1/4 4/3/4 2/4/4 +f 1/2/5 5/3/5 4/4/5 diff --git a/homedecor/slopes.lua b/homedecor/slopes.lua index 4181949..11b743f 100644 --- a/homedecor/slopes.lua +++ b/homedecor/slopes.lua @@ -34,11 +34,18 @@ local icorner_cbox = { } homedecor.register_outer_corner = function(modname, subname, groups, slope_image, description) + + local tiles = slope_image + + if type(slope_image) ~= "table" then + tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" } + end + minetest.register_node(modname..":shingle_outer_corner_" .. subname, { description = S(description.. " (outer corner)"), drawtype = "mesh", mesh = "homedecor_slope_outer_corner.obj", - tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" }, + tiles = tiles, paramtype = "light", paramtype2 = "facedir", selection_box = ocorner_cbox, @@ -50,11 +57,18 @@ homedecor.register_outer_corner = function(modname, subname, groups, slope_image end homedecor.register_inner_corner = function(modname, subname, groups, slope_image, description) + + local tiles = slope_image + + if type(slope_image) ~= "table" then + tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" } + end + minetest.register_node(modname..":shingle_inner_corner_" .. subname, { description = S(description.. " (inner corner)"), drawtype = "mesh", mesh = "homedecor_slope_inner_corner.obj", - tiles = { "homedecor_slope_inner_corner_"..slope_image..".png" }, + tiles = tiles, paramtype = "light", paramtype2 = "facedir", collision_box = icorner_cbox, @@ -65,11 +79,18 @@ homedecor.register_inner_corner = function(modname, subname, groups, slope_image end homedecor.register_slope = function(modname, subname, recipeitem, groups, slope_image, description) + + local tiles = slope_image + + if type(slope_image) ~= "table" then + tiles = { "homedecor_slope_outer_corner_"..slope_image..".png" } + end + minetest.register_node(modname..":shingle_side_" .. subname, { description = S(description), drawtype = "mesh", mesh = "homedecor_slope.obj", - tiles = { "homedecor_slope_"..slope_image..".png" }, + tiles = tiles, paramtype = "light", paramtype2 = "facedir", selection_box = slope_cbox, @@ -198,50 +219,65 @@ end -- corners -homedecor.register_roof("homedecor", "wood", - { snappy = 3 }, +homedecor.register_roof( + "homedecor", "wood", + { snappy = 3 }, + { "homedecor_shingles_wood.png" }, "Wood Shingles" ) -homedecor.register_roof("homedecor", "asphalt", - { snappy = 3 }, +homedecor.register_roof( + "homedecor", "asphalt", + { snappy = 3 }, + { "homedecor_shingles_asphalt.png" }, "Asphalt Shingles" ) -homedecor.register_roof("homedecor", "terracotta", - { snappy = 3 }, +homedecor.register_roof( + "homedecor", "terracotta", + { snappy = 3 }, + { "homedecor_shingles_terracotta.png" }, "Terracotta Shingles" ) -- register just the slopes -homedecor.register_slope("homedecor", "wood", +homedecor.register_slope( + "homedecor", + "wood", "homedecor:shingles_wood", { snappy = 3 }, - "wood", + { "homedecor_shingles_wood.png" }, "Wood Shingles" ) -homedecor.register_slope("homedecor", "asphalt", +homedecor.register_slope( + "homedecor", + "asphalt", "homedecor:shingles_asphalt", { snappy = 3 }, - "asphalt", + { "homedecor_shingles_asphalt.png" }, "Asphalt Shingles" ) -homedecor.register_slope("homedecor", "terracotta", +homedecor.register_slope( + "homedecor", + "terracotta", "homedecor:shingles_terracotta", { snappy = 3 }, - "terracotta", + { "homedecor_shingles_terracotta.png" }, "Terracotta Shingles" ) -homedecor.register_slope("homedecor", "glass", +homedecor.register_slope( + "homedecor", + "glass", "homedecor:shingles_glass", { snappy = 3 }, - "glass", + { "homedecor_shingles_glass.png", "homedecor_shingles_wood.png" }, "Glass Shingles" ) + diff --git a/homedecor/textures/homedecor_shingles_glass.png b/homedecor/textures/homedecor_shingles_glass.png index 75d361b..9609da8 100644 Binary files a/homedecor/textures/homedecor_shingles_glass.png and b/homedecor/textures/homedecor_shingles_glass.png differ diff --git a/homedecor/textures/homedecor_slope_asphalt.png b/homedecor/textures/homedecor_slope_asphalt.png deleted file mode 100644 index e02a78c..0000000 Binary files a/homedecor/textures/homedecor_slope_asphalt.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_glass.png b/homedecor/textures/homedecor_slope_glass.png deleted file mode 100644 index 358ea2d..0000000 Binary files a/homedecor/textures/homedecor_slope_glass.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_inner_corner_asphalt.png b/homedecor/textures/homedecor_slope_inner_corner_asphalt.png deleted file mode 100644 index 0567e73..0000000 Binary files a/homedecor/textures/homedecor_slope_inner_corner_asphalt.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_inner_corner_terracotta.png b/homedecor/textures/homedecor_slope_inner_corner_terracotta.png deleted file mode 100644 index c6c8da2..0000000 Binary files a/homedecor/textures/homedecor_slope_inner_corner_terracotta.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_inner_corner_wood.png b/homedecor/textures/homedecor_slope_inner_corner_wood.png deleted file mode 100644 index 8dc79d7..0000000 Binary files a/homedecor/textures/homedecor_slope_inner_corner_wood.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_outer_corner_asphalt.png b/homedecor/textures/homedecor_slope_outer_corner_asphalt.png deleted file mode 100644 index b689cbb..0000000 Binary files a/homedecor/textures/homedecor_slope_outer_corner_asphalt.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_outer_corner_terracotta.png b/homedecor/textures/homedecor_slope_outer_corner_terracotta.png deleted file mode 100644 index 43def96..0000000 Binary files a/homedecor/textures/homedecor_slope_outer_corner_terracotta.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_outer_corner_wood.png b/homedecor/textures/homedecor_slope_outer_corner_wood.png deleted file mode 100644 index 5361855..0000000 Binary files a/homedecor/textures/homedecor_slope_outer_corner_wood.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_terracotta.png b/homedecor/textures/homedecor_slope_terracotta.png deleted file mode 100644 index 0c61791..0000000 Binary files a/homedecor/textures/homedecor_slope_terracotta.png and /dev/null differ diff --git a/homedecor/textures/homedecor_slope_wood.png b/homedecor/textures/homedecor_slope_wood.png deleted file mode 100644 index 8001c62..0000000 Binary files a/homedecor/textures/homedecor_slope_wood.png and /dev/null differ