diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index 993487b..7b06955 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -2730,3 +2730,12 @@ minetest.register_craft({ }, }) +minetest.register_craft({ + output = "homedecor:barbecue", + recipe = { + { "","homedecor:fence_chainlink","" }, + { "default:steel_ingot","fake_fire:embers","default:steel_ingot" }, + { "homedecor:pole_wrought_iron","default:steel_ingot","homedecor:pole_wrought_iron" } + }, +}) + diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index ba9003f..67a4f70 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -1547,3 +1547,74 @@ minetest.register_node("homedecor:stonepath", { fixed = { -0.4375, -0.5, -0.4375, 0.4375, -0.4, 0.4375 } } }) + +minetest.register_node("homedecor:barbecue", { + description = "Barbecue", + tiles = { + {name="homedecor_barbecue_top.png", animation={type="vertical_frames", + aspect_w=16, aspect_h=16, length=2}}, + "forniture_black_metal.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = { snappy=3 }, + light_source = 9, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.25, -0.4375, 0.0625, 0.3125}, -- NodeBox1 + {0.4375, -0.5, 0.25, 0.5, 0.0625, 0.3125}, -- NodeBox2 + {-0.5, -0.5, -0.3125, -0.4375, 0.0625, -0.25}, -- NodeBox3 + {0.4375, -0.5, -0.3125, 0.5, 0.0625, -0.25}, -- NodeBox4 + {-0.5, 0.0625, -0.3125, 0.5, 0.375, 0.3125}, -- NodeBox5 + {-0.375, 0.5, -0.25, -0.3125, 0.5, 0.25}, -- NodeBox6 + {-0.25, 0.5, -0.25, -0.1875, 0.5, 0.25}, -- NodeBox7 + {-0.125, 0.5, -0.25, -0.0625, 0.5, 0.25}, -- NodeBox8 + {0, 0.5, -0.25, 0.0625, 0.5, 0.25}, -- NodeBox9 + {0.125, 0.5, -0.25, 0.1875, 0.5, 0.25}, -- NodeBox10 + {0.25, 0.5, -0.25, 0.3125, 0.5, 0.25}, -- NodeBox11 + {0.375, 0.5, -0.25, 0.4375, 0.5, 0.25}, -- NodeBox12 + {-0.5, 0.375, 0.25, 0.5, 0.5, 0.3125}, -- NodeBox13 + {-0.5, 0.0625, -0.3125, 0.5, 0.5, -0.25}, -- NodeBox14 + {-0.5, 0.0625, -0.3125, -0.4375, 0.5, 0.3125}, -- NodeBox15 + {0.4375, 0.0625, -0.3125, 0.5, 0.5, 0.3125}, -- NodeBox16 + } + }, + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.3125, 0.5, 0.625, 0.3125 } + }, + on_place = function(itemstack, placer, pointed_thing) + return homedecor.stack_vertically(itemstack, placer, pointed_thing, + "homedecor:barbecue", "homedecor:barbecue_meat") + 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:barbecue_meat" then + minetest.remove_node(pos2) + end + end +}) + +minetest.register_node("homedecor:barbecue_meat", { + tiles = { + "homedecor_barbecue_meat.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = { snappy=3, not_in_creative_inventory=1 }, + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, -0.125, -0.0625, -0.4375, 0.125}, -- NodeBox1 + {0.125, -0.5, -0.125, 0.3125, -0.4375, 0.125}, -- NodeBox2 + } + }, + selection_box = { + type = "fixed", + fixed = { 0, 0, 0, 0, 0, 0 } + } +}) + diff --git a/homedecor/textures/homedecor_barbecue_meat.png b/homedecor/textures/homedecor_barbecue_meat.png new file mode 100644 index 0000000..3140967 Binary files /dev/null and b/homedecor/textures/homedecor_barbecue_meat.png differ diff --git a/homedecor/textures/homedecor_barbecue_top.png b/homedecor/textures/homedecor_barbecue_top.png new file mode 100644 index 0000000..f300b92 Binary files /dev/null and b/homedecor/textures/homedecor_barbecue_top.png differ