diff --git a/deco_walls.lua b/deco_walls.lua new file mode 100644 index 0000000..be660eb --- /dev/null +++ b/deco_walls.lua @@ -0,0 +1,60 @@ +local colbox_type1 = { --column + type = "fixed", + fixed = {{-.5, -.5, -.5, .5, .5, .5},} +} +local colbox_type2 = { --wall + type = "fixed", + fixed = {{-.5, -.5, -.3, .5, .5, .5},} +} + +local block_type1 = { -- desc2, obj, colbox, grup +{"Deco Wall Round Top", "wall_r", colbox_type1, {cracky=2,not_in_creative_inventory=visible}}, +{"Deco Wall Flat Top", "wall_f", colbox_type1, {cracky=2,not_in_creative_inventory=visible}}, +{"Deco Wall Column", "column", colbox_type2, {cracky=2,not_in_creative_inventory=visible}}, +} +for i in ipairs (block_type1) do + local desc2 = block_type1[i][1] + local obj = block_type1[i][2] + local colbox = block_type1[i][3] + local grup = block_type1[i][4] + +local color_tab = { +{"black", "Black", "^[colorize:black:150"}, +{"blue", "Blue", "^[colorize:#0404B4:100"}, +{"brown", "Brown", "^[colorize:#190B07:100"}, +{"cyan", "Cyan", "^[colorize:cyan:100"}, +{"dark_green", "Dark Green", "^[colorize:#071907:150"}, +{"dark_grey", "Dark Grey", "^[colorize:black:150"}, +{"green", "Green", "^[colorize:green:100"}, +{"grey", "Grey", "^[colorize:black:100"}, +{"magenta", "Magenta", "^[colorize:magenta:100"}, +{"orange", "Orange", "^[colorize:orange:100"}, +{"pink", "Pink", "^[colorize:#FE2E9A:100"}, +{"red", "Red", "^[colorize:#B40404:100"}, +{"violet", "Violet", "^[colorize:#2F0B3A:100"}, +{"white", "White", "^[colorize:white:100"}, +{"yellow", "Yellow", "^[colorize:yellow:100"}, +{"cement", "Concrete", ""}, +} +for i in ipairs (color_tab) do +local col = color_tab[i][1] +local coldesc = color_tab[i][2] +local alpha = color_tab[i][3] + +minetest.register_node('mylandscaping:deco_'..obj..'_'..col, { + description = desc2.." "..coldesc, + drawtype = 'mesh', + mesh = 'mylandscaping_deco_'..obj..'.obj', + tiles = {{name='mylandscaping_block_split.png'..alpha}, {name='mylandscaping_block_smooth.png'..alpha}}, + groups = grup, + paramtype = 'light', + paramtype2 = 'facedir', + selection_box = colbox, + collision_box = colbox, + sounds = default.node_sound_stone_defaults(), +}) + +end +end + + diff --git a/init.lua b/init.lua index be5c623..b4abe56 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,7 @@ +--configs +-- change this to make blocks show in creative inventory. 0 will show, 1 is invisible +visible = 1 + --Load File dofile(minetest.get_modpath('mylandscaping')..'/walls.lua') dofile(minetest.get_modpath('mylandscaping')..'/stones.lua') @@ -5,4 +9,4 @@ dofile(minetest.get_modpath('mylandscaping')..'/recipes.lua') dofile(minetest.get_modpath("mylandscaping").."/machine.lua") dofile(minetest.get_modpath("mylandscaping").."/mixer.lua") dofile(minetest.get_modpath('mylandscaping')..'/concrete.lua') - +dofile(minetest.get_modpath('mylandscaping')..'/deco_walls.lua') diff --git a/models/mylandscaping_deco_column.obj b/models/mylandscaping_deco_column.obj new file mode 100644 index 0000000..9e7019a --- /dev/null +++ b/models/mylandscaping_deco_column.obj @@ -0,0 +1,78 @@ +# Blender v2.74 (sub 5) OBJ File: 'Walls.blend' +# www.blender.org +o Deco_column_Cube.027 +v -0.100000 -0.500000 0.100000 +v -0.100000 -0.100000 0.100000 +v -0.100000 -0.500000 0.500000 +v -0.100000 -0.100000 0.500000 +v -0.500000 -0.500000 0.100000 +v -0.500000 -0.100000 0.100000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.100000 0.500000 +v -0.180000 -0.050000 0.180000 +v -0.180000 -0.050000 0.420000 +v -0.420000 -0.050000 0.420000 +v -0.420000 -0.050000 0.180000 +v -0.180000 -0.000000 0.180000 +v -0.180000 -0.000000 0.420000 +v -0.420000 -0.000000 0.420000 +v -0.420000 -0.000000 0.180000 +vt 0.850960 0.849202 +vt 0.146966 0.849202 +vt 0.303069 0.691939 +vt 0.692022 0.691939 +vt 0.848123 0.145482 +vt 0.692022 0.302744 +vt 0.144133 0.145482 +vt 0.303069 0.302744 +vt 0.691970 0.304614 +vt 0.691970 0.692257 +vt 0.304327 0.692257 +vt 0.304327 0.304614 +vt 0.490835 0.490836 +vt 0.000000 0.490836 +vt 0.000000 0.000000 +vt 0.490835 0.000000 +vt 1.000000 1.000000 +vt 0.507353 1.000000 +vt 0.507353 0.507353 +vt 1.000000 0.507353 +vt 0.014706 1.000000 +vt 0.014706 0.507353 +vt 0.981671 0.490836 +vt 0.981671 0.000000 +vt 0.255281 0.505435 +vt 0.010520 0.505435 +vt 0.010520 0.454443 +vt 0.255281 0.454443 +vt 0.744803 0.505435 +vt 0.500042 0.505435 +vt 0.500042 0.454443 +vt 0.744803 0.454443 +vt 0.989564 0.505435 +vt 0.989564 0.454443 +vn 0.000000 0.848000 0.530000 +vn -0.530000 0.848000 0.000000 +vn 0.530000 0.848000 0.000000 +vn 0.000000 0.848000 -0.530000 +vn 0.000000 1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +g Deco_column_Cube.027_Split +s off +f 8/1/1 4/2/1 10/3/1 11/4/1 +f 6/5/2 8/1/2 11/4/2 12/6/2 +f 4/2/3 2/7/3 9/8/3 10/3/3 +f 2/7/4 6/5/4 12/6/4 9/8/4 +f 16/9/5 15/10/5 14/11/5 13/12/5 +g Deco_column_Cube.027_Smooth +f 2/13/6 4/14/6 3/15/6 1/16/6 +f 4/17/7 8/18/7 7/19/7 3/20/7 +f 8/18/8 6/21/8 5/22/8 7/19/8 +f 6/23/9 2/13/9 1/16/9 5/24/9 +f 9/25/9 12/26/9 16/27/9 13/28/9 +f 11/29/7 10/30/7 14/31/7 15/32/7 +f 12/33/8 11/29/8 15/32/8 16/34/8 +f 10/30/6 9/25/6 13/28/6 14/31/6 diff --git a/models/mylandscaping_deco_wall_f.obj b/models/mylandscaping_deco_wall_f.obj new file mode 100644 index 0000000..b07bae2 --- /dev/null +++ b/models/mylandscaping_deco_wall_f.obj @@ -0,0 +1,44 @@ +# Blender v2.74 (sub 5) OBJ File: 'Walls.blend' +# www.blender.org +o Cube.001_Cube.038 +v 0.500000 -0.500000 0.200000 +v 0.500000 -0.100000 0.200000 +v 0.500000 -0.500000 0.400000 +v 0.500000 -0.100000 0.400000 +v -0.500000 -0.500000 0.200000 +v -0.500000 -0.100000 0.200000 +v -0.500000 -0.500000 0.400000 +v -0.500000 -0.100000 0.400000 +vt 1.999884 0.373272 +vt 1.999884 0.738302 +vt 0.062616 0.738302 +vt 0.062616 0.373272 +vt 0.393551 0.439484 +vt 0.195779 0.439484 +vt 0.195779 0.043941 +vt 0.393551 0.043941 +vt 0.004166 0.493551 +vt 0.995780 0.493551 +vt 0.995780 0.890196 +vt 0.004166 0.890196 +vt 0.898239 0.666729 +vt 0.700467 0.666729 +vt 0.700467 0.271185 +vt 0.898238 0.271185 +vt 0.995779 0.493099 +vt 0.004166 0.493099 +vt 0.004166 0.096453 +vt 0.995779 0.096453 +vn 0.000000 1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +g Cube.001_Cube.038_Split +s off +f 6/1/1 8/2/1 4/3/1 2/4/1 +g Cube.001_Cube.038_Smooth +f 2/5/2 4/6/2 3/7/2 1/8/2 +f 4/9/3 8/10/3 7/11/3 3/12/3 +f 8/13/4 6/14/4 5/15/4 7/16/4 +f 6/17/5 2/18/5 1/19/5 5/20/5 diff --git a/models/mylandscaping_deco_wall_r.obj b/models/mylandscaping_deco_wall_r.obj new file mode 100644 index 0000000..06b8457 --- /dev/null +++ b/models/mylandscaping_deco_wall_r.obj @@ -0,0 +1,116 @@ +# Blender v2.74 (sub 5) OBJ File: 'Walls.blend' +# www.blender.org +o Deco_wall_Cube.032 +v 0.500000 -0.500000 0.200000 +v 0.500000 -0.100000 0.200000 +v 0.500000 -0.500000 0.400000 +v 0.500000 -0.100000 0.400000 +v -0.500000 -0.500000 0.200000 +v -0.500000 -0.100000 0.200000 +v -0.500000 -0.500000 0.400000 +v -0.500000 -0.100000 0.400000 +v 0.333333 -0.000000 0.400000 +v 0.166667 -0.000000 0.400000 +v 0.000000 -0.100000 0.400000 +v -0.166667 -0.000000 0.400000 +v -0.333333 -0.000000 0.400000 +v -0.333333 -0.500000 0.400000 +v -0.166667 -0.500000 0.400000 +v 0.000000 -0.500000 0.400000 +v 0.166667 -0.500000 0.400000 +v 0.333333 -0.500000 0.400000 +v -0.333333 -0.000000 0.200000 +v -0.166667 -0.000000 0.200000 +v 0.000000 -0.100000 0.200000 +v 0.166667 -0.000000 0.200000 +v 0.333333 -0.000000 0.200000 +v 0.333333 -0.500000 0.200000 +v 0.166667 -0.500000 0.200000 +v 0.000000 -0.500000 0.200000 +v -0.166667 -0.500000 0.200000 +v -0.333333 -0.500000 0.200000 +vt 0.348750 0.134350 +vt 0.348750 0.490561 +vt 0.002576 0.490561 +vt 0.002576 0.134350 +vt 0.986502 0.509574 +vt 0.986502 0.863415 +vt 0.642631 0.863415 +vt 0.642631 0.509574 +vt 0.347764 0.863415 +vt 0.347764 0.509574 +vt 0.003893 0.863415 +vt 0.003893 0.509574 +vt 0.991767 0.134350 +vt 0.991767 0.490561 +vt 0.645593 0.490561 +vt 0.645593 0.134350 +vt 0.192663 0.385326 +vt 0.000000 0.385326 +vt 0.000000 0.000000 +vt 0.192663 0.000000 +vt 0.165595 1.000000 +vt 0.000000 0.900614 +vt 0.000000 0.503070 +vt 0.165595 0.503070 +vt 1.000000 0.893822 +vt 0.802606 0.893822 +vt 0.802606 0.499034 +vt 1.000000 0.499034 +vt 0.164532 0.495791 +vt 0.000000 0.396632 +vt 0.164532 0.000000 +vt 0.989881 0.399762 +vt 0.824433 0.499472 +vt 0.824433 0.000921 +vt 0.989881 0.000921 +vt 0.658985 0.499472 +vt 0.658985 0.000921 +vt 0.493537 0.399762 +vt 0.493537 0.000920 +vt 0.493595 0.396633 +vt 0.329063 0.495791 +vt 0.329063 0.000000 +vt 0.493595 0.000000 +vt 1.000000 0.901056 +vt 0.835142 1.000000 +vt 0.835141 0.505280 +vt 1.000000 0.505279 +vt 0.670283 1.000000 +vt 0.670283 0.505280 +vt 0.505424 0.901056 +vt 0.505424 0.505280 +vt 0.496785 0.900614 +vt 0.331190 1.000000 +vt 0.331190 0.503070 +vt 0.496785 0.503070 +vn 0.514500 0.857500 0.000000 +vn -0.514500 0.857500 0.000000 +vn 0.000000 1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +g Deco_wall_Cube.032_Split +s off +f 23/1/1 9/2/1 4/3/1 2/4/1 +f 6/5/2 8/6/2 13/7/2 19/8/2 +f 19/8/3 13/7/3 12/9/3 20/10/3 +f 20/10/1 12/9/1 11/11/1 21/12/1 +f 21/13/2 11/14/2 10/15/2 22/16/2 +f 22/16/3 10/15/3 9/2/3 23/1/3 +g Deco_wall_Cube.032_Smooth +f 2/17/4 4/18/4 3/19/4 1/20/4 +f 13/21/5 8/22/5 7/23/5 14/24/5 +f 8/25/6 6/26/6 5/27/6 7/28/6 +f 23/29/7 2/30/7 1/19/7 24/31/7 +f 6/32/7 19/33/7 28/34/7 5/35/7 +f 19/33/7 20/36/7 27/37/7 28/34/7 +f 20/36/7 21/38/7 26/39/7 27/37/7 +f 21/40/7 22/41/7 25/42/7 26/43/7 +f 22/41/7 23/29/7 24/31/7 25/42/7 +f 4/44/5 9/45/5 18/46/5 3/47/5 +f 9/45/5 10/48/5 17/49/5 18/46/5 +f 10/48/5 11/50/5 16/51/5 17/49/5 +f 11/52/5 12/53/5 15/54/5 16/55/5 +f 12/53/5 13/21/5 14/24/5 15/54/5 diff --git a/textures/mylandscaping_block_top.png b/textures/mylandscaping_block_smooth.png similarity index 100% rename from textures/mylandscaping_block_top.png rename to textures/mylandscaping_block_smooth.png diff --git a/textures/mylandscaping_block_face.png b/textures/mylandscaping_block_split.png similarity index 100% rename from textures/mylandscaping_block_face.png rename to textures/mylandscaping_block_split.png diff --git a/walls.lua b/walls.lua index b601d6d..a6d2521 100644 --- a/walls.lua +++ b/walls.lua @@ -25,20 +25,20 @@ local colbox_type6 = { --corner } local block_type1 = { -- desc2, typ, obj, colbox, drops, grup -{"Retaining Wall Left", "left", "block1_l_t", colbox_type1, "left", {cracky=2,not_in_creative_inventory=1}}, -{"Retaining Wall Middle", "middle", "block1_m_t", colbox_type1, "middle", {cracky=2,not_in_creative_inventory=1}}, -{"Retaining Wall Right", "right", "block1_r_t", colbox_type1, "right", {cracky=2,not_in_creative_inventory=1}}, -{"Retaining Wall Corner", "corner", "block1_c_t", colbox_type4, "corner", {cracky=2,not_in_creative_inventory=1}}, -{"Retaining Wall Left Bot", "bleft", "block1_l_b", colbox_type3, "left", {not_in_creative_inventory=1}}, -{"Retaining Wall Middle Bot", "bmiddle", "block1_m_b", colbox_type3, "middle", {not_in_creative_inventory=1}}, -{"Retaining Wall Right Bot", "bright", "block1_r_b", colbox_type3, "right", {not_in_creative_inventory=1}}, -{"Retaining Wall Corner Bot", "bcorner", "block1_c_b", colbox_type4, "corner", {not_in_creative_inventory=1}}, -{"Column Inside Corner", "column_ic_t", "column_ic_t", colbox_type5, "column_ic_t", {cracky=2,not_in_creative_inventory=1}}, -{"Column Outside Corner", "column_oc_t", "column_oc_t", colbox_type2, "column_oc_t", {cracky=2,not_in_creative_inventory=1}}, -{"Column Middle", "column_m_t", "column_m_t", colbox_type6, "column_m_t", {cracky=2,not_in_creative_inventory=1}}, -{"Column Inside Corner Bot", "bcolumn_ic_t", "column_ic_b", colbox_type5, "column_ic_b", {not_in_creative_inventory=1}}, -{"Column Outside Corner Bot", "bcolumn_oc_t", "column_oc_b", colbox_type2, "column_oc_b", {not_in_creative_inventory=1}}, -{"Column Middle Bot", "bcolumn_m_t", "column_m_b", colbox_type6, "column_m_b", {not_in_creative_inventory=1}}, +{"Retaining Wall Left", "left", "block1_l_t", colbox_type1, "left", {cracky=2,not_in_creative_inventory=visible}}, +{"Retaining Wall Middle", "middle", "block1_m_t", colbox_type1, "middle", {cracky=2,not_in_creative_inventory=visible}}, +{"Retaining Wall Right", "right", "block1_r_t", colbox_type1, "right", {cracky=2,not_in_creative_inventory=visible}}, +{"Retaining Wall Corner", "corner", "block1_c_t", colbox_type4, "corner", {cracky=2,not_in_creative_inventory=visible}}, +{"Retaining Wall Left Bot", "bleft", "block1_l_b", colbox_type3, "left", {not_in_creative_inventory=visible}}, +{"Retaining Wall Middle Bot", "bmiddle", "block1_m_b", colbox_type3, "middle", {not_in_creative_inventory=visible}}, +{"Retaining Wall Right Bot", "bright", "block1_r_b", colbox_type3, "right", {not_in_creative_inventory=visible}}, +{"Retaining Wall Corner Bot", "bcorner", "block1_c_b", colbox_type4, "corner", {not_in_creative_inventory=visible}}, +{"Column Inside Corner", "column_ic_t", "column_ic_t", colbox_type5, "column_ic_t", {cracky=2,not_in_creative_inventory=visible}}, +{"Column Outside Corner", "column_oc_t", "column_oc_t", colbox_type2, "column_oc_t", {cracky=2,not_in_creative_inventory=visible}}, +{"Column Middle", "column_m_t", "column_m_t", colbox_type6, "column_m_t", {cracky=2,not_in_creative_inventory=visible}}, +{"Column Inside Corner Bot", "bcolumn_ic_t", "column_ic_b", colbox_type5, "column_ic_b", {not_in_creative_inventory=visible}}, +{"Column Outside Corner Bot", "bcolumn_oc_t", "column_oc_b", colbox_type2, "column_oc_b", {not_in_creative_inventory=visible}}, +{"Column Middle Bot", "bcolumn_m_t", "column_m_b", colbox_type6, "column_m_b", {not_in_creative_inventory=visible}}, } for i in ipairs (block_type1) do local desc2 = block_type1[i][1] @@ -48,20 +48,6 @@ for i in ipairs (block_type1) do local drops = block_type1[i][5] local grup = block_type1[i][6] - -local block_mat = { -- desc1, mat, img, img2, img3 - {"Cement", "cement", "mylandscaping_block_top.png","","mylandscaping_block_face.png"}, - {"Tan Cement", "cement_tan", "mylandscaping_block_top.png","^[colorize:#b8882a:75", "mylandscaping_block_face.png"}, - {"Autumn Cement", "cement_autumn", "mylandscaping_block_top.png","^[colorize:#ffaf00:75", "mylandscaping_block_face.png"}, - {"Red Cement", "cement_red", "mylandscaping_block_top.png","^[colorize:#cf0f00:75","mylandscaping_block_face.png"}, -} -for i in ipairs (block_mat) do - local desc1 = block_mat[i][1] - local mat = block_mat[i][2] - local img = block_mat[i][3] - local img2 = block_mat[i][4] - local img3 = block_mat[i][5] - local color_tab = { {"black", "Black", "^[colorize:black:150"}, {"blue", "Blue", "^[colorize:#0404B4:100"}, @@ -89,7 +75,7 @@ minetest.register_node('mylandscaping:rwall_'..typ.."_"..col, { description = desc2.." "..coldesc, drawtype = 'mesh', mesh = 'mylandscaping_'..obj..'.obj', - tiles = {{name=img..alpha}, {name=img3..alpha}}, + tiles = {{name='mylandscaping_block_smooth.png'..alpha}, {name='mylandscaping_block_split.png'..alpha}}, groups = grup, paramtype = 'light', paramtype2 = 'facedir', @@ -127,6 +113,4 @@ end, end end -end -