diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index de61cb59..0c647bb0 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -2748,3 +2748,4 @@ minetest.register_craft({ }, }) + diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index 739aa0c7..c3fcbab7 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -1701,3 +1701,83 @@ minetest.register_node("homedecor:beer_mug", { } }) +minetest.register_node("homedecor:tool_cabinet_bottom", { + description = "Metal tool cabinet and work table", + tiles = { + "homedecor_tool_cabinet_bottom_top.png", + "homedecor_tool_cabinet_bottom_sides.png", + "homedecor_tool_cabinet_bottom_sides.png", + "homedecor_tool_cabinet_bottom_sides.png", + "homedecor_tool_cabinet_bottom_sides.png", + "homedecor_tool_cabinet_bottom_front.png" + }, + inventory_image = "homedecor_tool_cabinet_inv.png", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = { snappy=3 }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.4375, -0.4375, -0.375, 0.5}, -- NodeBox1 + {-0.5, -0.5, -0.5, -0.4375, -0.375, -0.4375}, -- NodeBox2 + {0.4375, -0.5, 0.4375, 0.5, -0.375, 0.5}, -- NodeBox3 + {0.4375, -0.5, -0.5, 0.5, -0.375, -0.4375}, -- NodeBox4 + {-0.5, -0.375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox5 + } + }, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 } + }, + on_place = function(itemstack, placer, pointed_thing) + return homedecor.stack_vertically(itemstack, placer, pointed_thing, + "homedecor:tool_cabinet_bottom", "homedecor:tool_cabinet_top") + end, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + local pos2 = { x = pos.x, y=pos.y + 1, z = pos.z } + if minetest.get_node(pos2).name == "homedecor:tool_cabinet_top" then + minetest.remove_node(pos2) + end + end +}) + +minetest.register_node("homedecor:tool_cabinet_top", { + tiles = { + "homedecor_tool_cabinet_top_top.png", + "homedecor_tool_cabinet_top_bottom.png", + "homedecor_tool_cabinet_top_right.png", + "homedecor_tool_cabinet_top_left.png", + "homedecor_tool_cabinet_top_back.png", + "homedecor_tool_cabinet_top_front.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = { snappy=3, not_in_creative_inventory=1 }, + node_box = { + type = "fixed", + fixed = { + {-0.1875, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox1 + {-0.5, -0.5, -0.4375, -0.1875, -0.4375, 0.125}, -- NodeBox2 + {-0.375, -0.4375, 0, -0.3125, 0.1875, 0.0625}, -- NodeBox3 + {-0.4375, -0.1875, -0.375, -0.25, 0.125, 0.125}, -- NodeBox4 + {-0.25, -0.0625, -0.3125, -0.22, 0.3125, -0.2825}, -- NodeBox5 + {-0.375, -0.1875, -0.25, -0.3125, -0.218, -0.3125}, -- NodeBox6 + {-0.35, -0.32, -0.285, -0.3375, -0.218, -0.2725}, -- NodeBox7 + {0, -0.3125, 0.375, 0.0625, 0.1875, 0.4375}, -- NodeBox8 + {0.125, 0.1875, 0.375, 0.1875, 0.25, 0.4375}, -- NodeBox9 + {-0.0625, 0.1875, 0.375, 0.125, 0.3125, 0.4375}, -- NodeBox10 + {0.343, -0.125, 0.42, 0.375, 0.125, 0.4375}, -- NodeBox11 + {0.3125, 0.095, 0.42, 0.343, 0.1575, 0.4375}, -- NodeBox12 + {0.375, 0.095, 0.42, 0.405, 0.1575, 0.4375}, -- NodeBox13 + {0.3125, -0.155, 0.42, 0.343, -0.093, 0.4375}, -- NodeBox14 + {0.375, -0.155, 0.42, 0.405, -0.093, 0.4375}, -- NodeBox15 + } + }, + selection_box = { + type = "fixed", + fixed = { 0, 0, 0, 0, 0, 0 } + } +}) + diff --git a/homedecor/textures/homedecor_tool_cabinet_bottom_front.png b/homedecor/textures/homedecor_tool_cabinet_bottom_front.png new file mode 100644 index 00000000..77fc7c7d Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_bottom_front.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_bottom_sides.png b/homedecor/textures/homedecor_tool_cabinet_bottom_sides.png new file mode 100644 index 00000000..7b41a7a4 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_bottom_sides.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_bottom_top.png b/homedecor/textures/homedecor_tool_cabinet_bottom_top.png new file mode 100644 index 00000000..b9e22e9e Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_bottom_top.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_inv.png b/homedecor/textures/homedecor_tool_cabinet_inv.png new file mode 100644 index 00000000..aa9e1ef6 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_inv.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_top_back.png b/homedecor/textures/homedecor_tool_cabinet_top_back.png new file mode 100644 index 00000000..ee252a06 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_top_back.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_top_bottom.png b/homedecor/textures/homedecor_tool_cabinet_top_bottom.png new file mode 100644 index 00000000..7eca3a63 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_top_bottom.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_top_front.png b/homedecor/textures/homedecor_tool_cabinet_top_front.png new file mode 100644 index 00000000..e9e55be0 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_top_front.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_top_left.png b/homedecor/textures/homedecor_tool_cabinet_top_left.png new file mode 100644 index 00000000..488b5367 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_top_left.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_top_right.png b/homedecor/textures/homedecor_tool_cabinet_top_right.png new file mode 100644 index 00000000..579b5371 Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_top_right.png differ diff --git a/homedecor/textures/homedecor_tool_cabinet_top_top.png b/homedecor/textures/homedecor_tool_cabinet_top_top.png new file mode 100644 index 00000000..02d0fc5c Binary files /dev/null and b/homedecor/textures/homedecor_tool_cabinet_top_top.png differ