diff --git a/chisel.lua b/chisel.lua index fb71b2c..ae59c2e 100644 --- a/chisel.lua +++ b/chisel.lua @@ -122,6 +122,24 @@ minetest.register_tool( "mychisel:chisel",{ parti(pos) end end + if mode == "5" then + if node.name == item then + minetest.set_node(pos,{name = "mychisel:square_"..mat.."1", param2=minetest.dir_to_facedir(user:get_look_dir())}) + parti(pos) + end + if node.name == "mychisel:square_"..mat.."1" then + minetest.set_node(pos,{name = "mychisel:square_"..mat.."2", param2=minetest.dir_to_facedir(user:get_look_dir())}) + parti(pos) + end + if node.name == "mychisel:square_"..mat.."2" then + minetest.set_node(pos,{name = "mychisel:square_"..mat.."3", param2=minetest.dir_to_facedir(user:get_look_dir())}) + parti(pos) + end + if node.name == "mychisel:square_"..mat.."3" then + minetest.set_node(pos,{name = "mychisel:square_"..mat.."4", param2=minetest.dir_to_facedir(user:get_look_dir())}) + parti(pos) + end + end end if not minetest.setting_getbool("creative_mode") then itemstack:add_wear(65535 / (USES - 1)) @@ -142,6 +160,9 @@ end, mode = "4" minetest.chat_send_player(usr,"Cross Grooves") elseif mode == "4" then + mode = "5" + minetest.chat_send_player(usr,"Square") + elseif mode == "5" then mode = "1" minetest.chat_send_player(usr,"Chisel 4 Edges") end diff --git a/nodes.lua b/nodes.lua index 7a24ea4..aabcc04 100644 --- a/nodes.lua +++ b/nodes.lua @@ -137,9 +137,49 @@ local chis4 = { {-0.25, -0.25, -0.5, 0.25, 0.25, 0.5}, } } +local squar1 = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.4375}, + {0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375}, + {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.4375}, + {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.4375}, + } + } +local squar2 = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.375}, + {0.3125, -0.5, -0.5, 0.5, 0.5, -0.375}, + {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.375}, + {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.375}, + } + } +local squar3 = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.3125}, + {0.3125, -0.5, -0.5, 0.5, 0.5, -0.3125}, + {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.3125}, + {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.3125}, + } + } +local squar4 = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.25}, + {0.3125, -0.5, -0.5, 0.5, 0.5, -0.25}, + {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.25}, + {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.25}, + } + } local default_material = { - {"default:cobble", "default_cobble", "Cobble", {cracky = 3, not_in_creative_inventory=0}}, + {"default:cobble", "default_cobble", "Cobble", {cracky = 3, not_in_creative_inventory=1}}, {"default:sandstone","default_sandstone", "Sandstone", {crumbly=2, not_in_creative_inventory=1}}, {"default:clay","default_clay", "Clay", {crumbly=3, not_in_creative_inventory=1}}, {"default:coalblock","default_coal_block", "Coal Block", {cracky = 3, not_in_creative_inventory=1}}, @@ -463,5 +503,81 @@ minetest.register_node("mychisel:cross_"..mat.."4", { node_box = cross4, selection_box = cross4 +}) +minetest.register_node("mychisel:square_"..mat.."1", { + description = "cross "..desc.."1", + drawtype = "nodebox", + tiles = { + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png^mychisel_stint.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drop = item, + groups = gro, + node_box = squar1, + selection_box = squar1 + +}) +minetest.register_node("mychisel:square_"..mat.."2", { + description = "cross"..desc.."2", + drawtype = "nodebox", + tiles = { + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png^mychisel_stint.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drop = item, + groups = gro, + node_box = squar2, + selection_box = squar2 + +}) +minetest.register_node("mychisel:square_"..mat.."3", { + description = "cross"..desc.."3", + drawtype = "nodebox", + tiles = { + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png^mychisel_stint.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drop = item, + groups = gro, + node_box = squar3, + selection_box = squar3 + +}) +minetest.register_node("mychisel:square_"..mat.."4", { + description = "cross"..desc.."4", + drawtype = "nodebox", + tiles = { + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png", + mat..".png^mychisel_stint.png", + }, + paramtype = "light", + paramtype2 = "facedir", + drop = item, + groups = gro, + node_box = squar4, + selection_box = squar4 + }) end diff --git a/textures/mychisel_stint.png b/textures/mychisel_stint.png new file mode 100644 index 0000000..a97b999 Binary files /dev/null and b/textures/mychisel_stint.png differ