diff --git a/README.md b/README.md index 3aef97b..fff3649 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ mymillwork Crown Mold, Baseboards, Columns and more To minetest -Licence - DWYWPL +Licence - DWYWPL If you want to add or remove a texture simply edit the table at the top of millwork.lua file. -Right now I have these textures: White, Sandstone, Desert Sand and Clay. The others are commented out. +Right now I have these textures: White, Sandstone, Desert Sand and Clay. The others are commented out. Each texture has 28 nodes so careful that you don't add too many textures. @@ -18,7 +18,7 @@ local material = {--{Name for description}, {image without .png}, {item name}, { -- { "Cobble", "default_cobble","cobble","default"}, - { "Sandstone", "default_sandstone","sandstone","default"}, + { "Sandstone", "default_sandstone","sandstone","default"}, -- { "Desert Stone", "default_desert_stone","desert_stone","default"}, @@ -32,3 +32,15 @@ local material = {--{Name for description}, {image without .png}, {item name}, { -- { "Dirt", "default_dirt","dirt","default"}, } + +Newish API example: + +```lua +mymillwork.register_all( + "default_stone", + "Stone", + "default_stone.png", + {cracky = 3,not_in_creative_inventory=1}, + "default:stone" +) +``` diff --git a/machines.lua b/machines.lua index 12da7a9..838f8eb 100644 --- a/machines.lua +++ b/machines.lua @@ -266,27 +266,9 @@ then local ingotstack = inv:get_stack("ingot", 1) local resstack = inv:get_stack("res", 1) ---Register Items - -local items = { - {"default:stone", "default_stone"}, - {"default:stonebrick", "default_stone_brick"}, - {"default:cobble", "default_cobble"}, - {"default:desert_stone", "default_desert_stone"}, - {"default:sandstone", "default_sandstone"}, - {"default:clay", "default_clay"}, - {"default:wood", "default_wood"}, - {"default:junglewood", "default_junglewood"}, - {"default:pine_wood", "default_pine_wood"}, - {"default:pine_acacia", "default_acacia_wood"}, - {"default:aspen_wood", "default_aspen_wood"}, - {"default:coalblock", "default_coal_block"}, - {"default:obsidian", "default_obsidian"} - } - - for i in ipairs(items) do - local itm = items[i][1] - local mat = items[i][2] + for i in ipairs(mymillwork.registered) do + local itm = mymillwork.registered[i][1] + local mat = mymillwork.registered[i][2] if ingotstack:get_name()== itm then material = mat make_ok = "1" diff --git a/millwork.lua b/millwork.lua index 89a8e5b..a3e8891 100644 --- a/millwork.lua +++ b/millwork.lua @@ -1,7 +1,8 @@ +mymillwork.registered = {} function mymillwork.register_all(mat, desc, image, group, itm) -minetest.register_node("mymillwork:crownmould_"..mat, { +minetest.register_node(":mymillwork:crownmould_"..mat, { description = desc.." Crown Mould", drawtype = "nodebox", tiles = {image}, @@ -13,16 +14,16 @@ minetest.register_node("mymillwork:crownmould_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, - {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, + {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, + {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, + {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, + {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, + {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, + {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, + {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, + {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, } }, selection_box = { @@ -35,7 +36,7 @@ minetest.register_node("mymillwork:crownmould_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:crownmould_ic_"..mat, { +minetest.register_node(":mymillwork:crownmould_ic_"..mat, { description = desc.." Crown Mould IC", drawtype = "nodebox", tiles = {image}, @@ -47,26 +48,26 @@ minetest.register_node("mymillwork:crownmould_ic_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, - {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - {0.4375, 0.5, -0.5, 0.5, -0.5, 0.5}, - {0.375, 0.4375, -0.5, 0.5, 0.25, 0.5}, - {0.375, 0.125, -0.5, 0.5, -0.5, 0.5}, - {0.3125, -0.0625, -0.5, 0.5, -0.5, 0.5}, - {0.25, -0.1875, -0.5, 0.5, -0.5, 0.5}, - {-0.4375, -0.375, -0.5, -0.25, -0.5, 0.5}, - {-0.125, -0.375, -0.5, 0.5, -0.5, 0.5}, - {0.0625, -0.3125, -0.5, 0.5, -0.5, 0.5}, - {0.1875, -0.25, -0.5, 0.5, -0.5, 0.5}, - {-0.25, -0.375, -0.25, 0.5, -0.5, 0.5}, + {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, + {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, + {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, + {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, + {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, + {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, + {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, + {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, + {0.4375, 0.5, -0.5, 0.5, -0.5, 0.5}, + {0.375, 0.4375, -0.5, 0.5, 0.25, 0.5}, + {0.375, 0.125, -0.5, 0.5, -0.5, 0.5}, + {0.3125, -0.0625, -0.5, 0.5, -0.5, 0.5}, + {0.25, -0.1875, -0.5, 0.5, -0.5, 0.5}, + {-0.4375, -0.375, -0.5, -0.25, -0.5, 0.5}, + {-0.125, -0.375, -0.5, 0.5, -0.5, 0.5}, + {0.0625, -0.3125, -0.5, 0.5, -0.5, 0.5}, + {0.1875, -0.25, -0.5, 0.5, -0.5, 0.5}, + {-0.25, -0.375, -0.25, 0.5, -0.5, 0.5}, } }, selection_box = { @@ -79,7 +80,7 @@ minetest.register_node("mymillwork:crownmould_ic_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:crownmould_oc_"..mat, { +minetest.register_node(":mymillwork:crownmould_oc_"..mat, { description = desc.." Crown Mould OC", drawtype = "nodebox", tiles = {image}, @@ -91,16 +92,16 @@ minetest.register_node("mymillwork:crownmould_oc_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, 0.5, 0.4375, -0.4375, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, -0.375, 0.25, 0.5}, - {-0.5, 0.125, 0.375, -0.375, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, -0.3125, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, -0.25, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, -0.1875, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, -0.0625, -0.5, 0.5}, - {-0.5, -0.375, -0.125, 0.125, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.4375, -0.5, -0.25}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.5, 0.5, 0.4375, -0.4375, -0.5, 0.5}, + {-0.5, 0.4375, 0.375, -0.375, 0.25, 0.5}, + {-0.5, 0.125, 0.375, -0.375, -0.5, 0.5}, + {-0.5, -0.0625, 0.3125, -0.3125, -0.5, 0.5}, + {-0.5, -0.1875, 0.25, -0.25, -0.5, 0.5}, + {-0.5, -0.25, 0.1875, -0.1875, -0.5, 0.5}, + {-0.5, -0.3125, 0.0625, -0.0625, -0.5, 0.5}, + {-0.5, -0.375, -0.125, 0.125, -0.5, 0.5}, + {-0.5, -0.375, -0.4375, 0.4375, -0.5, -0.25}, {0.25, -0.375, -0.4375, 0.4375, -0.5, 0.5}, } }, @@ -114,7 +115,7 @@ minetest.register_node("mymillwork:crownmould_oc_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:crownmould_beam_"..mat, { +minetest.register_node(":mymillwork:crownmould_beam_"..mat, { description = desc.." Crown Mould with Beam", drawtype = "nodebox", tiles = {image}, @@ -126,19 +127,19 @@ minetest.register_node("mymillwork:crownmould_beam_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, - {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - {-0.25, -0.25, -0.5, 0.25, -0.5, 0.5}, - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, + {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, + {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, + {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, + {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, + {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, + {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, + {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, + {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, + {-0.25, -0.25, -0.5, 0.25, -0.5, 0.5}, + {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, + {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, } }, selection_box = { @@ -151,7 +152,7 @@ minetest.register_node("mymillwork:crownmould_beam_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_" ..mat, { +minetest.register_node(":mymillwork:column_" ..mat, { description = desc.." Column", drawtype = "nodebox", tiles = {image}, @@ -163,11 +164,11 @@ minetest.register_node("mymillwork:column_" ..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, - {-0.4375, -0.5, -0.3125, 0.4375, 0.5, 0.3125}, - {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}, - {-0.3125, -0.5, -0.4375, 0.3125, 0.5, 0.4375}, - {-0.1875, -0.5, -0.5, 0.1875, 0.5, 0.5}, + {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, + {-0.4375, -0.5, -0.3125, 0.4375, 0.5, 0.3125}, + {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}, + {-0.3125, -0.5, -0.4375, 0.3125, 0.5, 0.4375}, + {-0.1875, -0.5, -0.5, 0.1875, 0.5, 0.5}, } }, selection_box = { @@ -180,7 +181,7 @@ minetest.register_node("mymillwork:column_" ..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_base_"..mat, { +minetest.register_node(":mymillwork:column_base_"..mat, { description = desc.." Column Base", drawtype = "nodebox", tiles = {image}, @@ -192,12 +193,12 @@ minetest.register_node("mymillwork:column_base_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, - {-0.4375, -0.5, -0.3125, 0.4375, 0.5, 0.3125}, - {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}, - {-0.3125, -0.5, -0.4375, 0.3125, 0.5, 0.4375}, - {-0.1875, -0.5, -0.5, 0.1875, 0.5, 0.5}, - {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, + {-0.4375, -0.5, -0.3125, 0.4375, 0.5, 0.3125}, + {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}, + {-0.3125, -0.5, -0.4375, 0.3125, 0.5, 0.4375}, + {-0.1875, -0.5, -0.5, 0.1875, 0.5, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, } }, selection_box = { @@ -210,7 +211,7 @@ minetest.register_node("mymillwork:column_base_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_half_"..mat, { +minetest.register_node(":mymillwork:column_half_"..mat, { description = desc.." Half Column", drawtype = "nodebox", tiles = {image}, @@ -222,10 +223,10 @@ minetest.register_node("mymillwork:column_half_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {-0.4375, -0.5, 0.1875, 0.4375, 0.5, 0.5}, - {-0.375, -0.5, 0.125, 0.375, 0.5, 0.5}, - {-0.3125, -0.5, 0.0625, 0.3125, 0.5, 0.4375}, + {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, + {-0.4375, -0.5, 0.1875, 0.4375, 0.5, 0.5}, + {-0.375, -0.5, 0.125, 0.375, 0.5, 0.5}, + {-0.3125, -0.5, 0.0625, 0.3125, 0.5, 0.4375}, {-0.1875, -0.5, 0, 0.1875, 0.5, 0.5}, } }, @@ -239,7 +240,7 @@ minetest.register_node("mymillwork:column_half_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_half_base_"..mat, { +minetest.register_node(":mymillwork:column_half_base_"..mat, { description = desc.." Half Column Base", drawtype = "nodebox", tiles = {image}, @@ -251,11 +252,11 @@ minetest.register_node("mymillwork:column_half_base_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {-0.1875, -0.5, 0, 0.1875, 0.5, 0.5}, - {-0.4375, -0.5, 0.1875, 0.4375, 0.5, 0.5}, - {-0.3125, -0.5, 0.0625, 0.3125, 0.5, 0.5}, - {-0.375, -0.5, 0.125, 0.375, 0.5, 0.5}, + {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, + {-0.1875, -0.5, 0, 0.1875, 0.5, 0.5}, + {-0.4375, -0.5, 0.1875, 0.4375, 0.5, 0.5}, + {-0.3125, -0.5, 0.0625, 0.3125, 0.5, 0.5}, + {-0.375, -0.5, 0.125, 0.375, 0.5, 0.5}, {-0.5, -0.5, -0.0625, 0.5, -0.1875, 0.5}, } }, @@ -269,7 +270,7 @@ minetest.register_node("mymillwork:column_half_base_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_half_wbeam_"..mat, { +minetest.register_node(":mymillwork:column_half_wbeam_"..mat, { description = desc.." Half Column Base With Beam", drawtype = "nodebox", tiles = {image}, @@ -281,20 +282,20 @@ minetest.register_node("mymillwork:column_half_wbeam_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, 0.5, 0.3125, 0.5, -0.5, 0.5}, - {-0.4375, 0.5, 0.1875, 0.4375, -0.5, 0.5}, - {-0.375, 0.5, 0.125, 0.375, -0.5, 0.5}, - {-0.3125, 0.5, 0.0625, 0.3125, -0.5, 0.4375}, - {-0.1875, 0.5, 0, 0.1875, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.25, -0.25, -0.5, 0.25, -0.5, 0.5}, - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, + {-0.5, 0.5, 0.3125, 0.5, -0.5, 0.5}, + {-0.4375, 0.5, 0.1875, 0.4375, -0.5, 0.5}, + {-0.375, 0.5, 0.125, 0.375, -0.5, 0.5}, + {-0.3125, 0.5, 0.0625, 0.3125, -0.5, 0.4375}, + {-0.1875, 0.5, 0, 0.1875, -0.5, 0.5}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.25, -0.25, -0.5, 0.25, -0.5, 0.5}, + {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, + {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, + {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, + {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, + {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, + {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, + {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, } }, selection_box = { @@ -307,7 +308,7 @@ minetest.register_node("mymillwork:column_half_wbeam_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_quarter_"..mat, { +minetest.register_node(":mymillwork:column_quarter_"..mat, { description = desc.." Quarter Column", drawtype = "nodebox", tiles = {image}, @@ -319,11 +320,11 @@ minetest.register_node("mymillwork:column_quarter_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, + {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, + {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, + {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, + {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, + {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, } }, selection_box = { @@ -336,7 +337,7 @@ minetest.register_node("mymillwork:column_quarter_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_quarter_base_"..mat, { +minetest.register_node(":mymillwork:column_quarter_base_"..mat, { description = desc.." Quarter Column Base", drawtype = "nodebox", tiles = {image}, @@ -348,12 +349,12 @@ minetest.register_node("mymillwork:column_quarter_base_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - {-0.5, -0.5, -0.0625, 0.0625, -0.1875, 0.5}, + {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, + {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, + {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, + {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, + {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, + {-0.5, -0.5, -0.0625, 0.0625, -0.1875, 0.5}, } }, selection_box = { @@ -366,7 +367,7 @@ minetest.register_node("mymillwork:column_quarter_base_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_quarter_wbase_"..mat, { +minetest.register_node(":mymillwork:column_quarter_wbase_"..mat, { description = desc.." Quarter Column Base Baseboard", drawtype = "nodebox", tiles = {image}, @@ -378,14 +379,14 @@ minetest.register_node("mymillwork:column_quarter_wbase_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - {-0.5, -0.5, -0.0625, 0.0625, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, - {-0.4375, -0.5, -0.5, -0.5, -0.1875, 0.5}, + {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, + {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, + {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, + {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, + {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, + {-0.5, -0.5, -0.0625, 0.0625, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + {-0.4375, -0.5, -0.5, -0.5, -0.1875, 0.5}, } }, selection_box = { @@ -398,7 +399,7 @@ minetest.register_node("mymillwork:column_quarter_wbase_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:column_quarter_fancybase_"..mat, { +minetest.register_node(":mymillwork:column_quarter_fancybase_"..mat, { description = desc.." Quarter Column Base Fancy Baseboard", drawtype = "nodebox", tiles = {image}, @@ -410,19 +411,19 @@ minetest.register_node("mymillwork:column_quarter_fancybase_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, - {-0.5, -0.5, -0.5, -0.4375, 0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.3125, -0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.375, -0.0625, 0.5}, - {-0.5, 0, -0.5, -0.375, 0.125, 0.5}, + {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, + {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, + {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, + {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, + {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, + {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, + {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, + {-0.5, -0.5, -0.5, -0.4375, 0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, -0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.375, -0.0625, 0.5}, + {-0.5, 0, -0.5, -0.375, 0.125, 0.5}, } }, selection_box = { @@ -435,7 +436,7 @@ minetest.register_node("mymillwork:column_quarter_fancybase_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:ceiling_" ..mat, { +minetest.register_node(":mymillwork:ceiling_" ..mat, { description = desc.." Ceiling", drawtype = "nodebox", tiles = {image}, @@ -447,20 +448,20 @@ minetest.register_node("mymillwork:ceiling_" ..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, } }, selection_box = { type = "fixed", fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, } }, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:ceiling_post_"..mat, { +minetest.register_node(":mymillwork:ceiling_post_"..mat, { description = desc.." Ceiling with Post", drawtype = "nodebox", tiles = {image}, @@ -472,16 +473,16 @@ minetest.register_node("mymillwork:ceiling_post_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.125, 0.5, -0.0625, 0.125, -0.5, 0.0625}, - {-0.0625, 0.5, -0.125, 0.0625, -0.5, 0.125}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.125, 0.5, -0.0625, 0.125, -0.5, 0.0625}, + {-0.0625, 0.5, -0.125, 0.0625, -0.5, 0.125}, } }, selection_box = { type = "fixed", fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.125, 0.5, -0.0625, 0.125, -0.5, 0.0625}, + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + {-0.125, 0.5, -0.0625, 0.125, -0.5, 0.0625}, {-0.0625, 0.5, -0.125, 0.0625, -0.5, 0.125}, } }, @@ -489,7 +490,7 @@ minetest.register_node("mymillwork:ceiling_post_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:beam_ceiling_"..mat, { +minetest.register_node(":mymillwork:beam_ceiling_"..mat, { description = desc.." Ceiling with Beam", drawtype = "nodebox", tiles = {image}, @@ -517,7 +518,7 @@ minetest.register_node("mymillwork:beam_ceiling_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:beam_ceiling_t_"..mat, { +minetest.register_node(":mymillwork:beam_ceiling_t_"..mat, { description = desc.." Ceiling with Beam T", drawtype = "nodebox", tiles = {image}, @@ -530,12 +531,12 @@ minetest.register_node("mymillwork:beam_ceiling_t_"..mat, { type = "fixed", fixed = { {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, + {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, + {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, {-0.5, -0.25, -0.25, 0.5, -0.5, 0.25}, {-0.5, -0.1875, -0.25, 0.5, -0.5, -0.1875}, {-0.5, -0.1875, 0.1875, 0.5, -0.5, 0.25}, - {-0.25, -0.1875, -0.25, 0.25, -0.5, 0.1875}, + {-0.25, -0.1875, -0.25, 0.25, -0.5, 0.1875}, {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, } }, @@ -549,7 +550,7 @@ minetest.register_node("mymillwork:beam_ceiling_t_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:beam_" ..mat, { +minetest.register_node(":mymillwork:beam_" ..mat, { description = desc.." Beam", drawtype = "nodebox", tiles = {image}, @@ -576,7 +577,7 @@ minetest.register_node("mymillwork:beam_" ..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:beam_t_"..mat, { +minetest.register_node(":mymillwork:beam_t_"..mat, { description = desc.." Beam T", drawtype = "nodebox", tiles = {image}, @@ -589,8 +590,8 @@ minetest.register_node("mymillwork:beam_t_"..mat, { type = "fixed", fixed = { {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, + {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, + {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, {-0.5, -0.25, -0.25, 0.5, -0.5, 0.25}, {-0.5, -0.1875, -0.25, 0.5, -0.5, -0.1875}, {-0.5, -0.1875, 0.1875, 0.5, -0.5, 0.25}, @@ -607,7 +608,7 @@ minetest.register_node("mymillwork:beam_t_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:base_" ..mat, { +minetest.register_node(":mymillwork:base_" ..mat, { description = desc.." Baseboard", drawtype = "nodebox", tiles = {image}, @@ -632,7 +633,7 @@ minetest.register_node("mymillwork:base_" ..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:base_ic_"..mat, { +minetest.register_node(":mymillwork:base_ic_"..mat, { description = desc.." Baseboard IC", drawtype = "nodebox", tiles = {image}, @@ -644,22 +645,22 @@ minetest.register_node("mymillwork:base_ic_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, {-0.4375, -0.5, -0.5, -0.5, -0.1875, 0.5}, } }, selection_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3375, 0.5, -0.0875, 0.5}, - {-0.3375, -0.5, -0.5, -0.5, -0.0875, 0.5}, + {-0.5, -0.5, 0.3375, 0.5, -0.0875, 0.5}, + {-0.3375, -0.5, -0.5, -0.5, -0.0875, 0.5}, } }, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:base_oc_"..mat, { +minetest.register_node(":mymillwork:base_oc_"..mat, { description = desc.." Baseboard OC", drawtype = "nodebox", tiles = {image}, @@ -671,7 +672,7 @@ minetest.register_node("mymillwork:base_oc_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.4375, -0.4375, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, -0.4375, -0.1875, 0.5}, } }, selection_box = { @@ -684,7 +685,7 @@ minetest.register_node("mymillwork:base_oc_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:base_fancy_"..mat, { +minetest.register_node(":mymillwork:base_fancy_"..mat, { description = desc.." Fancy Baseboard", drawtype = "nodebox", tiles = {image}, @@ -696,10 +697,10 @@ minetest.register_node("mymillwork:base_fancy_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, + {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, + {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, } }, selection_box = { @@ -712,7 +713,7 @@ minetest.register_node("mymillwork:base_fancy_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:base_fancy_ic_"..mat, { +minetest.register_node(":mymillwork:base_fancy_ic_"..mat, { description = desc.." Fancy Baseboard IC", drawtype = "nodebox", tiles = {image}, @@ -724,14 +725,14 @@ minetest.register_node("mymillwork:base_fancy_ic_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, - {-0.5, -0.5, -0.5, -0.4375, 0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.3125, -0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.375, -0.0625, 0.5}, - {-0.5, 0, -0.5, -0.375, 0.125, 0.5}, + {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, + {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, + {-0.5, -0.5, -0.5, -0.4375, 0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, -0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.375, -0.0625, 0.5}, + {-0.5, 0, -0.5, -0.375, 0.125, 0.5}, } }, selection_box = { @@ -745,7 +746,7 @@ minetest.register_node("mymillwork:base_fancy_ic_"..mat, { on_place = minetest.rotate_node, }) -minetest.register_node("mymillwork:base_fancy_oc_"..mat, { +minetest.register_node(":mymillwork:base_fancy_oc_"..mat, { description = desc.." Fancy Baseboard OC", drawtype = "nodebox", tiles = {image}, @@ -757,10 +758,10 @@ minetest.register_node("mymillwork:base_fancy_oc_"..mat, { node_box = { type = "fixed", fixed = { - {-0.5, -0.5, 0.3125, -0.3125, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, -0.4375, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, -0.375, -0.0625, 0.5}, - {-0.5, 0, 0.375, -0.375, 0.125, 0.5}, + {-0.5, -0.5, 0.3125, -0.3125, -0.1875, 0.5}, + {-0.5, -0.5, 0.4375, -0.4375, 0.1875, 0.5}, + {-0.5, -0.5, 0.375, -0.375, -0.0625, 0.5}, + {-0.5, 0, 0.375, -0.375, 0.125, 0.5}, } }, selection_box = { @@ -773,4 +774,6 @@ minetest.register_node("mymillwork:base_fancy_oc_"..mat, { on_place = minetest.rotate_node, }) +table.insert(mymillwork.registered, {itm, mat}) + end