diff --git a/LICENSE b/LICENSE index 51b524f..9f78883 100644 --- a/LICENSE +++ b/LICENSE @@ -13,3 +13,16 @@ CC-BY-SA-3.0 bbq_potato.png, bbq_tomato.png, and bbq_corn.png (C) Auke Kok CC-BY-SA-3.0 + +Sounds: + - bbq_sizzle.ogg by Shanecantly *01-23-2018 EDITED TO SHORTEN & FADE OUT* + https://freesound.org/people/shaynecantly/sounds/131553/ + CC-BY-3.0 + + - bbq_grill_brush.ogg by NSDAP *01-24-2018 EDITED TO SHORTEN* + https://freesound.org/people/NSDAP/sounds/397639/ + CC-BY-3.0 + + - bbq_basting.ogg by j1987 *01-24-2018 EDITED TO SHORTEN* +https://freesound.org/people/j1987/sounds/106395/ + CC-BY-3.0 diff --git a/README.md b/README.md index 87ae5d2..098826b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -BBQ v1.12 by Grizzly Adam +Your Dad's BBQ Mod +---For Minetest--- +v1.20 by Grizzly Adam https://forum.minetest.net/viewtopic.php?f=9&t=19324 @@ -10,7 +12,7 @@ Goals -Add working smoker and grill to Minetest -Utilize under-used items, such as vessels, vessel shelf, and mushrooms -Be compatible with and expand on Mobs-Redo and it's Animals pack --Be compatible with Food Rubenwardy's Food Mod +-Be compatible with Rubenwardy's Food Mod -Be compatible with Auke Kok's Crops Mod -Be compatible with Farming-Redo Mod @@ -21,6 +23,43 @@ For more information about what is in this pack, check the file: description.txt New In This Version ------------------- +Name changed to Your Dad's BBQ Mod. +Added a new smoker, renamed old smoker "Propane Grill." +Added spatula, basting brush, and grill brush. All three play sounds when used with any of the grills while they are active. +Removed mutton (Mobs-Redo has offically added mutton). +Hotdog and hamburger meats must now be crafted, cooked, and combined with bread to make finished product. +bucket:bucket_milk can now be placed in the vessel shelf. +Added support for xdecor:honey. +Removed all dependences except default. +Revamped some older recipes to include tomato sauce, garlic clove, and onion. +Added a wood pile for each type of wood in the default game. +Converted all food recipes to shapeless. + + +New Items: + Smoker + Chimney Smoke (Place on top of a chimney) + Wood Pile + Acacia Wood Pile + Aspen Wood Pile + Junglewood Wood Pile + Pine Wood Pile + Spatula + Basting Brush + Grill Brush + Hamburger Patty (Raw and Cooked) + Hotdog (Raw and Cooked) + Pulled Pork Sandwich + London Broil (Raw and Cooked) + Stuffed Porkchop (Raw and Cooked) + Garlic + Garlic Clove + Garlic Braid + Onion + + +New In Version 1.12 +------------------- Adjusted food items to make output of recipes equivalent to the foods used. Replaced beef textures. Updated license. diff --git a/cooking.lua b/cooking.lua index c346980..68015cd 100644 --- a/cooking.lua +++ b/cooking.lua @@ -1,19 +1,98 @@ ---------------- ---CRAFT RECIPES ---------------- +-------------- +--ITEM RECIPES +-------------- ---Beer Craft Recipe +--Smoker Craft Recipe minetest.register_craft( { - output = "bbq:beer", + output = "bbq:smoker", recipe = { - {"", "bucket:bucket_water", ""}, - {"bbq:yeast", "farming:wheat", "group:sugar"}, - {"", "vessels:drinking_glass", ""} - }, - replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, + {"", "", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"} + } }) ---Propane Craft Recipe +--Kettle Grill Craft Recipe +minetest.register_craft( { + output = "bbq:kettle_grill", + recipe = { + {"default:steel_ingot", "bbq:charcoal_lump", "default:steel_ingot"}, + {"default:steel_ingot", "bbq:charcoal_lump", "default:steel_ingot"}, + {"", "default:steel_ingot", ""} + } +}) + +--Propane Grill Craft Recipe +minetest.register_craft( { + output = "bbq:propane_grill", + recipe = { + {"default:steel_ingot", "default:glass", "default:steel_ingot"}, + {"default:steel_ingot", "bbq:propane", "default:steel_ingot"}, + {"", "default:steel_ingot", ""} + } +}) + +--Chimeny Smoke Craft Recipe +minetest.register_craft( { + output = "bbq:chimney_smoke", + recipe = { + {"", "group:wood", ""}, + {"", "group:wood", ""}, + {"", "default:torch", ""} + } +}) + +--Beef Map Recipe +minetest.register_craft( { + output = "bbq:beef_map", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "mobs:leather", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +--Smoker Blueprint Recipe +minetest.register_craft( { + output = "bbq:smoker_blueprint", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "dye:blue", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +--Spatula Craft Recipe +minetest.register_craft( { + output = "bbq:spatula", + recipe = { + {"", "default:tin_ingot", ""}, + {"", "default:tin_ingot", ""}, + {"", "default:stick", ""} + } +}) + +--Basting Brush Craft Recipe +minetest.register_craft( { + output = "bbq:basting_brush", + recipe = { + {"", "farming:cotton", ""}, + {"", "default:tin_ingot", ""}, + {"", "default:stick", ""} + } +}) + +--Grill Brush Craft Recipe +minetest.register_craft( { + output = "bbq:grill_brush", + recipe = { + {"", "default:tin_ingot", "farming:cotton"}, + {"", "default:tin_ingot", ""}, + {"", "default:stick", ""} + } +}) + +--Foil Craft Recipe minetest.register_craft( { output = "bbq:foil", recipe = { @@ -56,11 +135,8 @@ minetest.register_craft( { --Charcoal Lump Recipe minetest.register_craft( { output = "bbq:charcoal_lump", - recipe = { - {"", "", ""}, - {"", "group:tree", ""}, - {"", "default:torch", ""} - } + type = "shapeless", + recipe = {"group:tree", "default:torch"} }) --Sawdust Craft Recipe @@ -71,298 +147,251 @@ minetest.register_craft( { }) ---Vinegar Craft Recipe + +-------------- +--FOOD RECIPES +-------------- + +--Beer Craft Recipe minetest.register_craft( { - output = "bbq:vinegar", - recipe = { - {"", "group:mother", ""}, - {"", "group:sugar", ""}, - {"", "bucket:bucket_water", ""} - }, + output = "bbq:beer", + type = "shapeless", + recipe = {"bucket:bucket_water", "bbq:yeast", "farming:wheat", "group:sugar", "vessels:drinking_glass"}, replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, }) - ---Kettle Grill Craft Recipe +--Vinegar Craft Recipe minetest.register_craft( { - output = "bbq:kettle_grill", - recipe = { - {"default:steel_ingot", "bbq:charcoal_lump", "default:steel_ingot"}, - {"default:steel_ingot", "bbq:charcoal_lump", "default:steel_ingot"}, - {"", "default:steel_ingot", ""} - } -}) - ---Smoker Craft Recipe -minetest.register_craft( { - output = "bbq:smoker", - recipe = { - {"default:steel_ingot", "default:glass", "default:steel_ingot"}, - {"default:steel_ingot", "group:wood", "default:steel_ingot"}, - {"", "default:steel_ingot", ""} - } -}) - ---Beef Map Recipe -minetest.register_craft( { - output = "bbq:beef_map", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"group:wood", "mobs:leather", "group:wood"}, - {"group:wood", "group:wood", "group:wood"}, - } -}) - ---Smoker Blueprint Recipe -minetest.register_craft( { - output = "bbq:smoker_blueprint", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"group:wood", "dye:blue", "group:wood"}, - {"group:wood", "group:wood", "group:wood"}, - } + output = "bbq:vinegar", + type = "shapeless", + recipe = {"group:mother", "group:sugar", "bucket:bucket_water"}, + replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, }) --Lamb Kebab Craft Recipe minetest.register_craft( { - output = "bbq:lamb_kebab_raw 3", - recipe = { - {"", "group:pepper", ""}, - {"", "bbq:mutton_raw", ""}, - {"", "default:stick", ""} - } + output = "bbq:lamb_kebab_raw 4", + type = "shapeless", + recipe = {"group:pepper", "mobs:mutton_raw", "default:stick", "flowers:mushroom_brown", "group:onion"} }) --Rack of Lamb Craft Recipe minetest.register_craft( { output = "bbq:rack_lamb_raw 2", - recipe = { - {"", "bbq:bbq_sauce", ""}, - {"", "bbq:mutton_raw", ""}, - {"", "bbq:mutton_raw", ""} - } + type = "shapeless", + recipe = {"bbq:bbq_sauce", "mobs:mutton_raw", "mobs:mutton_raw"} }) --Leg of Lamb Craft Recipe minetest.register_craft( { output = "bbq:leg_lamb_raw 2", - recipe = { - {"", "", ""}, - {"", "", ""}, - {"bbq:sea_salt", "bbq:mutton_raw", "bbq:mutton_raw"} - } + type = "shapeless", + recipe = {"group:garlic_clove", "mobs:mutton_raw", "mobs:mutton_raw"} }) --Ham Craft Recipe minetest.register_craft( { output = "bbq:ham_raw 2", - recipe = { - {"", "", ""}, - {"", "", ""}, - {"bbq:brine", "mobs:pork_raw", "mobs:honey"} - } + type = "shapeless", + recipe = {"bbq:brine", "mobs:pork_raw", "group:honey"} }) --Pickled Peppers Recipe minetest.register_craft( { output = "bbq:pickled_peppers", - recipe = { - {"", "group:peppercorn", ""}, - {"", "group:pepper", ""}, - {"", "bbq:brine", ""} - } + type = "shapeless", + recipe = {"group:peppercorn", "group:pepper", "bbq:brine"} }) --BBQ Chicken Craft Recipe minetest.register_craft( { output = "bbq:bbq_chicken_raw 3", - recipe = { - {"", "", ""}, - {"", "", ""}, - {"bbq:bbq_sauce", "mobs:chicken_raw", "bbq:paprika"} - } + type = "shapeless", + recipe = {"bbq:bbq_sauce", "mobs:chicken_raw", "bbq:paprika"} }) --BBQ Beef Ribs Craft Recipe minetest.register_craft( { output = "bbq:bbq_beef_ribs_raw 2", - recipe = { - {"", "", ""}, - {"", "", ""}, - {"bbq:bbq_sauce", "bbq:beef_raw", "group:pepper_ground"} - } + type = "shapeless", + recipe = {"bbq:bbq_sauce", "bbq:beef_raw", "group:pepper_ground"} }) --Corned Beef Craft Recipe minetest.register_craft( { output = "bbq:corned_beef_raw", - recipe = { - {"", "group:peppercorn", ""}, - {"", "bbq:beef_raw", ""}, - {"", "bbq:brine", ""} - } + type = "shapeless", + recipe = {"group:peppercorn", "bbq:beef_raw","bbq:brine",} }) --BBQ Brisket Craft Recipe minetest.register_craft( { output = "bbq:brisket_raw 2", - recipe = { - {"", "", ""}, - {"", "bbq:bbq_sauce", ""}, - {"bbq:molasses", "bbq:beef_raw", "bbq:paprika"} - } + type = "shapeless", + recipe = {"bbq:bbq_sauce", "bbq:molasses", "bbq:beef_raw", "group:garlic_clove"} }) --Hot Wings Craft Recipe minetest.register_craft( { output = "bbq:hot_wings_raw 3", - recipe = { - {"", "", ""}, - {"", "", ""}, - {"bbq:hot_sauce", "mobs:chicken_raw", "bbq:paprika"} - } + type = "shapeless", + recipe = {"bbq:hot_sauce", "mobs:chicken_raw", "bbq:paprika"} +}) + + +--Cheese Steak Craft Recipe +minetest.register_craft( { + output = "bbq:cheese_steak 2", + type = "shapeless", + recipe = {"farming:bread", "group:pepper", "bbq:beef", "group:cheese", "group:onion"} }) --Bacon Cheeseburger Craft Recipe minetest.register_craft( { output = "bbq:bacon_cheeseburger 3", - recipe = { - {"", "farming:bread", ""}, - {"bbq:bacon", "bbq:beef", "group:cheese"}, - {"", "farming:bread", ""} - } -}) - ---Cheese Steak Craft Recipe -minetest.register_craft( { - output = "bbq:cheese_steak 3", - recipe = { - {"", "farming:bread", ""}, - {"group:pepper", "bbq:beef", "group:cheese"}, - {"", "farming:bread", ""} - } + type = "shapeless", + recipe = {"farming:bread", "bbq:bacon", "bbq:hamburger_patty", "group:cheese"} }) --Hamburger Craft Recipe minetest.register_craft( { output = "bbq:hamburger 2", - recipe = { - {"", "farming:bread", ""}, - {"", "bbq:beef", ""}, - {"", "farming:bread", ""} - } + type = "shapeless", + recipe = {"farming:bread", "bbq:hamburger_patty"} +}) + +--Hamburger Craft Recipe +minetest.register_craft( { + output = "bbq:hamburger_patty_raw", + type = "shapeless", + recipe = {"bbq:beef_raw"} }) --Hotdog Craft Recipe minetest.register_craft( { output = "bbq:hotdog 2", - recipe = { - {"", "", ""}, - {"", "", ""}, - {"mobs:pork_cooked", "mobs:chicken_cooked", "farming:bread"} - } + type = "shapeless", + recipe = {"bbq:hotdog_cooked", "farming:bread"} +}) + +--Hotdog Raw Craft Recipe +minetest.register_craft( { + output = "bbq:hotdog_raw", + type = "shapeless", + recipe = {"mobs:pork_raw", "mobs:chicken_raw", "bbq:sawdust"} +}) + +--Pulled Pork Craft Recipe +minetest.register_craft( { + output = "bbq:pulled_pork 2", + type = "shapeless", + recipe = {"mobs:pork_cooked", "farming:bread", "bbq:bbq_sauce"} }) --Grilled Pizza Craft Recipe minetest.register_craft( { output = "bbq:grilled_pizza_raw 3", - recipe = { - {"", "group:cheese", ""}, - {"group:pepper", "bbq:grilled_tomato", "flowers:mushroom_brown"}, - {"bbq:sea_salt", "farming:wheat", "bbq:yeast"} - } + type = "shapeless", + recipe = {"group:cheese", "group:pepper", "bbq:grilled_tomato", "flowers:mushroom_brown", "bbq:sea_salt", "farming:wheat", "bbq:yeast"} }) --Bacon Craft Recipe minetest.register_craft( { output = "bbq:bacon_raw 2", - recipe = { - {"", "", ""}, - {"bbq:liquid_smoke", "bbq:brine", "mobs:pork_raw"}, - {"", "", ""} - } + type = "shapeless", + recipe = {"bbq:liquid_smoke", "bbq:brine", "mobs:pork_raw"} +}) + +--London Broil Craft Recipe +minetest.register_craft( { + output = "bbq:london_broil_raw 2", + type = "shapeless", + recipe = {"bbq:bacon", "group:garlic_clove", "bbq:beef_raw"} }) --Beef Jerky Craft Recipe minetest.register_craft( { output = "bbq:beef_jerky_raw 3", - recipe = { - {"", "", ""}, - {"bbq:liquid_smoke", "bbq:brine", "bbq:beef_raw"}, - {"", "", ""} - } + type = "shapeless", + recipe = {"bbq:liquid_smoke", "bbq:brine", "bbq:beef_raw"} }) --Pepper Steak Craft Recipe minetest.register_craft( { output = "bbq:pepper_steak_raw", - recipe = { - {"", "", ""}, - {"group:pepper_ground", "bbq:beef_raw", "group:pepper_ground"}, - {"", "", ""} - } + type = "shapeless", + recipe = {"group:pepper_ground", "bbq:beef_raw", "group:pepper_ground"} +}) + +--Stuffed Chop Craft Recipe +minetest.register_craft( { + output = "bbq:stuffed_chop_raw 3", + type = "shapeless", + recipe = {"group:onion", "farming:bread", "flowers:mushroom_brown", "mobs:pork_raw", "default:apple"} }) --Stuffed Mushroom Craft Recipe minetest.register_craft( { output = "bbq:stuffed_mushroom_raw 2", - recipe = { - {"", "group:tomato", ""}, - {"", "farming:bread", ""}, - {"", "flowers:mushroom_brown", ""} - } + type = "shapeless", + recipe = {"group:tomato", "farming:bread", "flowers:mushroom_brown"} }) --Veggie Kebab Craft Recipe minetest.register_craft( { output = "bbq:veggie_kebab_raw 2", - recipe = { - {"", "group:pepper", ""}, - {"group:potato", "group:tomato", "flowers:mushroom_brown"}, - {"", "default:stick", ""} - } + type = "shapeless", + recipe = {"group:pepper", "group:potato", "group:tomato", "flowers:mushroom_brown", "default:stick"} }) --Veggie Packet Craft Recipe minetest.register_craft( { output = "bbq:veggie_packet_raw 2", - recipe = { - {"", "bbq:pepper_ground", ""}, - {"group:tomato", "group:potato", "group:corn"}, - {"", "bbq:foil", ""} - } + type = "shapeless", + recipe = {"bbq:pepper_ground", "group:tomato", "group:potato", "group:corn", "bbq:foil"} }) --Portebello Steak Craft Recipe minetest.register_craft( { output = "bbq:portebello_steak_raw", - recipe = { - {"", "group:pepper_ground", ""}, - {"", "bbq:steak_sauce", ""}, - {"", "flowers:mushroom_brown", ""} - } + type = "shapeless", + recipe = {"group:pepper_ground", "bbq:steak_sauce", "flowers:mushroom_brown"} }) --Stuffed Pepper Craft Recipe minetest.register_craft( { output = "bbq:stuffed_pepper_raw 3", - recipe = { - {"", "group:cheese", ""}, - {"", "farming:bread", ""}, - {"", "group:pepper", ""} - } + type = "shapeless", + recipe = {"group:cheese", "farming:bread", "group:pepper"} }) --Grilled Corn Craft Recipe minetest.register_craft( { output = "bbq:grilled_corn_raw 2", - recipe = { - {"", "group:cheese", ""}, - {"", "bbq:paprika", ""}, - {"", "group:corn", ""} - } + type = "shapeless", + recipe = {"group:cheese", "bbq:paprika", "group:corn"} }) +--------------------- +--Spices, Sauces, Etc +--------------------- +--Tomato Sauce Craft Recipe +if minetest.registered_items["crops:tomato"] ~= nil then +minetest.register_craft({ + type = "shapeless", + output = "bbq:tomato_sauce", + recipe = { "group:tomato" }, + replacements = {{"group:tomato","crops:tomato_seed"}} +}) +else + +minetest.register_craft({ + type = "shapeless", + output = "bbq:tomato_sauce", + recipe = { "group:tomato" }, +}) +end + --Paprika Craft Recipe minetest.register_craft( { output = "bbq:paprika", @@ -372,46 +401,58 @@ minetest.register_craft( { }, }) +--Garlic Clove Craft Recipe +minetest.register_craft({ + type = "shapeless", + output = "bbq:garlic_clove 9", + recipe = { "group:garlic" } +}) + +--Garlic Braid Craft Recipe +minetest.register_craft({ + output = "bbq:garlic_braid", + recipe = { + {"group:garlic", "group:garlic", "group:garlic"}, + {"group:garlic", "group:garlic", "group:garlic"}, + {"group:garlic", "group:garlic", "group:garlic"} + } +}) + +--Garlic Craft Recipe +minetest.register_craft({ + type = "shapeless", + output = "bbq:garlic 9", + recipe = { "group:garlic_braid" } +}) + --Ground Pepper Craft Recipe minetest.register_craft( { output = "bbq:pepper_ground", - recipe = { - {"", "", ""}, - {"", "group:peppercorn", ""}, - {"", "vessels:glass_bottle", ""} - } + type = "shapeless", + recipe = {"group:peppercorn", "vessels:glass_bottle"} }) --Brine minetest.register_craft( { output = "bbq:brine", - recipe = { - {"", "", ""}, - {"bbq:sea_salt", "group:sugar", "bucket:bucket_water"}, - {"", "vessels:drinking_glass", ""} - }, + type = "shapeless", + recipe = {"bbq:sea_salt", "group:sugar", "bucket:bucket_water", "vessels:drinking_glass"}, replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, }) --Steak Sauce minetest.register_craft( { output = "bbq:steak_sauce", - recipe = { - {"", "", ""}, - {"flowers:mushroom_brown", "bbq:vinegar", "bbq:hot_sauce"}, - {"", "vessels:glass_bottle", ""} - }, + type = "shapeless", + recipe = {"flowers:mushroom_brown", "bbq:vinegar", "bbq:hot_sauce", "vessels:glass_bottle"}, replacements = {{"bbq:vinegar","bbq:vinegar_mother"}}, }) --Liquid Smoke minetest.register_craft( { output = "bbq:liquid_smoke", - recipe = { - {"", "vessels:glass_bottle", ""}, - {"", "", ""}, - {"", "default:torch", ""} - }, + type = "shapeless", + recipe = {"vessels:glass_bottle", "default:torch"} }) --Sugar @@ -427,22 +468,16 @@ minetest.register_craft( { --Hot Sauce minetest.register_craft( { output = "bbq:hot_sauce", - recipe = { - {"", "", ""}, - {"group:pepper_ground", "bucket:bucket_water", "bbq:paprika"}, - {"", "vessels:glass_bottle", ""} - }, + type = "shapeless", + recipe = {"group:pepper_ground", "bucket:bucket_water", "bbq:paprika", "vessels:glass_bottle"}, replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, }) --BBQ Sauce minetest.register_craft( { output = "bbq:bbq_sauce", - recipe = { - {"", "bbq:molasses", ""}, - {"group:sugar", "group:tomato", "bbq:liquid_smoke"}, - {"", "bbq:vinegar", ""} - }, + type = "shapeless", + recipe = {"bbq:molasses", "group:sugar", "group:tomato_sauce", "bbq:liquid_smoke", "bbq:vinegar"}, replacements = {{"bbq:vinegar","bbq:vinegar_mother"}}, }) @@ -460,11 +495,19 @@ minetest.register_craft({ cooktime = 8, }) ---Mutton Cooking +--Hamburger Patty Cooking minetest.register_craft({ type = "cooking", - output = "bbq:mutton", - recipe = "bbq:mutton_raw", + output = "bbq:hamburger_patty", + recipe = "bbq:hamburger_patty_raw", + cooktime = 5, +}) + +--Hotdog Cooking +minetest.register_craft({ + type = "cooking", + output = "bbq:hotdog_cooked", + recipe = "bbq:hotdog_raw", cooktime = 5, }) @@ -508,6 +551,14 @@ minetest.register_craft({ cooktime = 6, }) +--Stuffed Chop Cooking +minetest.register_craft({ + type = "cooking", + output = "bbq:stuffed_chop", + recipe = "bbq:stuffed_chop_raw", + cooktime = 8, +}) + --Portebello Steak Cooking minetest.register_craft({ type = "cooking", @@ -548,6 +599,14 @@ minetest.register_craft({ cooktime = 5, }) +--London Broil Cooking +minetest.register_craft({ + type = "cooking", + output = "bbq:london_broil", + recipe = "bbq:london_broil_raw", + cooktime = 6, +}) + --Hot Wings Cooking minetest.register_craft({ type = "cooking", diff --git a/crafts.lua b/crafts.lua index 1e9ccc1..ab6aa51 100644 --- a/crafts.lua +++ b/crafts.lua @@ -1,11 +1,11 @@ -- Kettle Grill minetest.register_node("bbq:kettle_grill", { - description = ("Propane"), + description = ("Kettle Grill"), inventory_image = "bbq_kettle_grill.png", wield_image = "bbq_kettle_grill.png", drawtype = "plantlike", tiles = {"bbq_kettle_grill.png"}, - groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + groups = {grill=1, vessel = 1, dig_immediate = 3, attached_node = 1}, sounds = default.node_sound_metal_defaults(), }) @@ -31,6 +31,30 @@ minetest.register_node("bbq:sawdust", { }, }) +-- Chimeny Smoke +minetest.register_node("bbq:chimney_smoke", { + description = ("Chimney Smoke"), + inventory_image = "bbq_chimney_smoke.png", + wield_image = "bbq_chimney_smoke.png", + drawtype = "plantlike", + tiles = { + { + image = "bbq_chimney_smoke_animation.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }, + + }, + + + groups = {dig_immediate = 3, attached_node = 1}, +}) + -- Foil minetest.register_craftitem("bbq:foil", { description = ("Foil"), @@ -102,7 +126,7 @@ minetest.register_node("bbq:propane", { wield_image = "bbq_propane.png", drawtype = "plantlike", tiles = {"bbq_propane.png"}, - groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + groups = {explody = 1, dig_immediate = 3, attached_node = 1}, sounds = default.node_sound_metal_defaults(), }) @@ -366,6 +390,20 @@ minetest.register_craftitem("bbq:hamburger", { on_use = minetest.item_eat(9), }) +-- Hamburger Patty +minetest.register_craftitem("bbq:hamburger_patty", { + description = ("Hamburger Patty"), + inventory_image = "bbq_hamburger_patty.png", + on_use = minetest.item_eat(8), +}) + +-- Hamburger Patty Raw +minetest.register_craftitem("bbq:hamburger_patty_raw", { + description = ("Hamburger Patty Raw"), + inventory_image = "bbq_hamburger_patty_raw.png", + on_use = minetest.item_eat(3), +}) + -- Hot Dog minetest.register_craftitem("bbq:hotdog", { description = ("Hot Dog"), @@ -373,6 +411,27 @@ minetest.register_craftitem("bbq:hotdog", { on_use = minetest.item_eat(8), }) +-- Hotdog Raw +minetest.register_craftitem("bbq:hotdog_cooked", { + description = ("Hotdog Cooked"), + inventory_image = "bbq_hotdog_cooked.png", + on_use = minetest.item_eat(7), +}) + +-- Hotdog Raw +minetest.register_craftitem("bbq:hotdog_raw", { + description = ("Hotdog Raw"), + inventory_image = "bbq_hotdog_raw.png", + on_use = minetest.item_eat(3), +}) + +-- Pulled Pork +minetest.register_craftitem("bbq:pulled_pork", { + description = ("Pulled Pork"), + inventory_image = "bbq_pulled_pork.png", + on_use = minetest.item_eat(8), +}) + -- Grilled Pizza Raw minetest.register_craftitem("bbq:grilled_pizza_raw", { description = ("Grilled Pizza Raw"), @@ -429,6 +488,34 @@ minetest.register_craftitem("bbq:bacon", { on_use = minetest.item_eat(7), }) +-- London Broil Raw +minetest.register_craftitem("bbq:london_broil_raw", { + description = ("London Broil Raw"), + inventory_image = "bbq_london_broil_raw.png", + on_use = minetest.item_eat(3), +}) + +-- London Broil +minetest.register_craftitem("bbq:london_broil", { + description = ("London Broil"), + inventory_image = "bbq_london_broil.png", + on_use = minetest.item_eat(7), +}) + +-- Stuffed Chop Raw +minetest.register_craftitem("bbq:stuffed_chop_raw", { + description = ("Stuffed Chop Raw"), + inventory_image = "bbq_stuffed_chop_raw.png", + on_use = minetest.item_eat(3), +}) + +-- Stuffed Chop +minetest.register_craftitem("bbq:stuffed_chop", { + description = ("Stuffed Chop"), + inventory_image = "bbq_stuffed_chop.png", + on_use = minetest.item_eat(8), +}) + -- Stuffed Pepper minetest.register_craftitem("bbq:stuffed_pepper", { description = ("Stuffed Pepper"), @@ -466,6 +553,63 @@ minetest.register_craftitem("bbq:tomato", { groups = {tomato=1}, }) +minetest.register_craftitem("bbq:tomato_sauce", { + description = ("Tomato Sauce"), + inventory_image = "bbq_tomato_sauce.png", + groups = { tomato_sauce=1, vessel=1 }, + on_use = minetest.item_eat(2) +}) + +minetest.register_craftitem("bbq:onion", { + description = ("Onion"), + groups= {onion=1}, + inventory_image = "bbq_onion.png", + on_use = minetest.item_eat(1) +}) + +--Garlic +minetest.register_craftitem("bbq:garlic", { + description = ("Garlic"), + inventory_image = "bbq_garlic.png", + on_use = minetest.item_eat(1), + groups = {garlic = 1}, +}) + +--Garlic Braid +minetest.register_node("bbq:garlic_braid", { + description = ("Garlic Braid"), + inventory_image = "bbq_garlic_braid.png", + wield_image = "bbq_garlic_braid.png", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "bbq_garlic_braid_side.png","bbq_garlic_braid.png", + "bbq_garlic_braid_side.png^[transformFx","bbq_garlic_braid_side.png", + "bbq_garlic_braid.png","bbq_garlic_braid.png" + }, + groups = {garlic_braid=1, vessel = 1, dig_immediate = 3}, + sounds = default.node_sound_leaves_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.13, -0.45, 0.5, 0.13, 0.45, 0.24, + + }, + }, + } +}) + +--Garlic Clove +minetest.register_node("bbq:garlic_clove", { + description = ("Garlic Clove"), + inventory_image = "bbq_garlic_clove.png", + wield_image = "bbq_garlic_clove.png", + tiles = { "bbq_garlic_clove.png" }, + groups = { garlic_clove=1, snappy=3,flammable=3,flora=1,attached_node=1 }, + +}) + --Potato minetest.register_craftitem("bbq:potato", { description = ("Potato"), @@ -698,20 +842,6 @@ minetest.register_node("bbq:yeast", { --Animal Drop Meats ------------------- --- Raw Mutton -minetest.register_craftitem("bbq:mutton_raw", { - description = ("Raw Mutton"), - inventory_image = "bbq_mutton_raw.png", - on_use = minetest.item_eat(3), -}) - --- Cooked Mutton -minetest.register_craftitem("bbq:mutton", { - description = ("Mutton"), - inventory_image = "bbq_mutton_cooked.png", - on_use = minetest.item_eat(8), -}) - -- Raw Beef minetest.register_craftitem("bbq:beef_raw", { description = ("Raw Beef"), @@ -725,3 +855,168 @@ minetest.register_craftitem("bbq:beef", { inventory_image = "bbq_beef_cooked.png", on_use = minetest.item_eat(8), }) + +--Spatula +minetest.register_node("bbq:spatula", { + description = ("Spatula"), + inventory_image = "bbq_spatula.png", + wield_image = "bbq_spatula.png", + groups = {dig_immediate = 3, cracky=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_metal_defaults(), + + + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "bbq_spatula_tile.png", "bbq_spatula_tile.png", + "bbq_spatula_tile.png", "bbq_spatula_tile.png", + "bbq_spatula_tile.png", "bbq_spatula_tile.png", + }, + groups = {vessel = 1, dig_immediate = 3}, + sounds = default.node_sound_leaves_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.15, -0.45, 0.5, 0.125, -.218, 0.45,}, + {-0.105, -0.218, 0.5, 0.085, -0.19, 0.45,}, + {-0.0625, -0.19, 0.5, 0.03125, .5, 0.45,}, +-- {-0.15, -0.45, 0.5, 0.125, -.1, 0.45,}, + }, + }, + +on_use = function(itemstack, placer, pointed_thing) + + -- check if a grill + if minetest.get_node(pointed_thing.under).name == "bbq:kettle_grill_active" then + minetest.sound_play("bbq_sizzle", + {pos=pointed_thing.under, max_hear_distance = 10,}) + + else + + if minetest.get_node(pointed_thing.under).name == "bbq:propane_grill_active" then + minetest.sound_play("bbq_sizzle", + {pos=pointed_thing.under, max_hear_distance = 10,}) + + else + + if minetest.get_node(pointed_thing.under).name == "bbq:smoker_active" then + minetest.sound_play("bbq_sizzle", + {pos=pointed_thing.under, max_hear_distance = 10,}) + end + end + end +end + +}) + +--Basting Brush +minetest.register_node("bbq:basting_brush", { + description = ("Basting Brush"), + inventory_image = "bbq_basting_brush.png", + wield_image = "bbq_basting_brush.png", + groups = {dig_immediate = 3, cracky=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_metal_defaults(), + + + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "bbq_basting_brush_hang.png", "bbq_basting_brush_hang.png", + "bbq_basting_brush_hang.png", "bbq_basting_brush_hang.png", + "bbq_basting_brush_hang.png", "bbq_basting_brush_hang.png", + }, + groups = {vessel = 1, dig_immediate = 3}, + sounds = default.node_sound_leaves_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.085, -0.45, 0.5, 0.085, -.2525, 0.45,}, + {-0.0625, -0.2525, 0.5, 0.0625, -.218, 0.45,}, + {-0.03, -0.218, 0.5, 0.03, 0.0 , 0.45,}, + {-0.0625, 0.0, 0.5, 0.0625, 0.465, 0.45,}, + {-0.03, .465, 0.5, 0.03, .5, 0.45,}, + }, + }, + +on_use = function(itemstack, placer, pointed_thing) + + -- check if a grill + if minetest.get_node(pointed_thing.under).name == "bbq:kettle_grill_active" then + minetest.sound_play("bbq_basting", + {pos=pointed_thing.under, max_hear_distance = 10,}) + + else + + if minetest.get_node(pointed_thing.under).name == "bbq:propane_grill_active" then + minetest.sound_play("bbq_basting", + {pos=pointed_thing.under, max_hear_distance = 10,}) + + else + + if minetest.get_node(pointed_thing.under).name == "bbq:smoker_active" then + minetest.sound_play("bbq_basting", + {pos=pointed_thing.under, max_hear_distance = 10,}) + end + end + end +end + +}) + +--Grill Brush +minetest.register_node("bbq:grill_brush", { + description = ("Grill Brush"), + inventory_image = "bbq_grill_brush.png", + wield_image = "bbq_grill_brush.png", + groups = {dig_immediate = 3, cracky=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_metal_defaults(), + + + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "bbq_grill_brush_hang_top.png", "bbq_grill_brush_hang.png", + "bbq_grill_brush_hang.png", "bbq_grill_brush_hang.png", + "bbq_grill_brush_hang.png", "bbq_grill_brush_hang.png", + }, + groups = {vessel = 1, dig_immediate = 3}, + sounds = default.node_sound_leaves_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.12, -0.5, 0.49, 0.12, -.467, 0.48,}, + {-0.15, -0.467, 0.5, 0.15, -.2225, 0.45,}, + {-0.125, -0.44, 0.5, 0.125, -.25, 0.35,}, + {-0.03, -0.2225, 0.5, 0.03, 0.13, 0.45,}, + {-0.0625, 0.13 , 0.5, 0.0625, 0.485, 0.45,}, + {-0.03, .485, 0.5, 0.03, .5, 0.45,}, + }, + }, + +on_use = function(itemstack, placer, pointed_thing) + + -- check if a grill + if minetest.get_node(pointed_thing.under).name == "bbq:kettle_grill_active" then + minetest.sound_play("bbq_grill_brush", + {pos=pointed_thing.under, max_hear_distance = 10,}) + + else + + if minetest.get_node(pointed_thing.under).name == "bbq:propane_grill_active" then + minetest.sound_play("bbq_grill_brush", + {pos=pointed_thing.under, max_hear_distance = 10,}) + + else + + if minetest.get_node(pointed_thing.under).name == "bbq:smoker_active" then + minetest.sound_play("bbq_grill_brush", + {pos=pointed_thing.under, max_hear_distance = 10,}) + end + end + end +end + +}) diff --git a/depends.txt b/depends.txt index a38caa8..3638694 100644 --- a/depends.txt +++ b/depends.txt @@ -1,9 +1,10 @@ default -vessels -bucket -farming -mobs -mobs_animal +bucket? +mobs? +mobs_animal? craft_guide? food? crops? +vessels? +farming? +xdecor? diff --git a/description.txt b/description.txt index 3bfce7b..332443c 100644 --- a/description.txt +++ b/description.txt @@ -1,9 +1,10 @@ -A BBQ add-on for Minetest. +Your Dad's BBQ Mod +---For Minetest--- Depends on (and expands upon) Mobs-Redo and it's animals add-ons. Causes cows to drop beef and sheep to drop mutton. -Play's nice with Crops, Food, and Farming Redo addons. Can use potatos, corn, tomatos, chili peppers, cheese, sugar, and honey from Crops, Food, Farming Redo, and Mobs-Redo add-ons. Also compatible with Crops Plus, my expansion of the Crops add-on (adds peppers, peppercorns, and ground pepper to the Crops add-on, all are present in this addon but without the actual pepper plant). +Play's nice with Crops, Food, and Farming Redo addons. Can use potatos, corn, tomatos, chili peppers, cheese, sugar, and honey from Crops, Food, Farming Redo, Mobs-Redo and xDecor add-ons. Also compatible with Crops Plus, my expansion of the Crops add-on (adds peppers, peppercorns, and ground pepper to the Crops add-on, all are present in this addon but without the actual pepper plant). Upgrades the BTUs of wood and wood planks in a realistic way when used in furnaces (including the smoker). Allows trees, slabs, and sticks to be stored in woodpile. Adds propane and charcoal fuels. @@ -13,16 +14,27 @@ All spices and sauces can be placed on the vessels shelf. Also added support for Adds the following items: Smoker -Kettle Gril +Kettle Grill +Propane Grill Beef Map (Wall Hanging) Smoker Blueprint (Wall Hanging) -Wood Pile Lump Charcoal (fuel) Charcoal Briquettes (fuel) Bag O' Charcoal (fuel) Propane (fuel) Sawdust Foil +Chimney Smoke (Place on top of a chimney) + +Wood Pile +Acaica Wood Pile +Aspen Wood Pile +Junglewood Wood Pile +Pine Wood Pile + +Spatula +Basting Brush +Grill Brush Peppercorn Ground Pepper @@ -35,7 +47,11 @@ Yeast (Can be found when harvesting grass and jungle grass) Bell Pepper Tomato Potato -Tomato +Corn +Garlic +Garlic Clove +Garlic Braid +Onion Brine Liquid Smoke @@ -45,7 +61,6 @@ Steak sauce Vinegar Vinegar Mother -Mutton (Raw & Cooked) Beef (Raw & Cooked) Rack of Lamb (Raw & Cooked) Leg of Lamb (Raw & Cooked) @@ -54,15 +69,20 @@ BBQ Chicken (Raw & Cooked) BBQ Beef Ribs (Raw & Cooked) Hot Wings (Raw & Cooked) Hamburger +Hamburger Patty (Raw and Cooked) Bacon Cheeseburger Hot Dog +Hotdog (Raw and Cooked) +Pulled Pork Sandwich +London Broil (Raw and Cooked) +Stuffed Porkchop (Raw and Cooked) Beef Jerky (Raw & Cooked) Pepper Steak (Raw & Cooked) Bacon (Raw & Cooked) Stuffed Pepper Beer Cheese Steak (Raw & Cooked) -Pizza (Raw & Cooked) +Grilled Pizza (Raw & Cooked) Grilled Tomato Brisket (Raw & Cooked) Corned Beef (Raw & Cooked) @@ -71,6 +91,6 @@ Lamb Kebabs (Raw & Cooked) Smoked Pepper (Raw & Cooked) Grilled Corn (Raw & Cooked) Stuffed Mushroom (Raw & Cooked) -Portabella Steaks (Raw & Cooked) +Portebello Steaks (Raw & Cooked) Pickled peppers Veggie Packets (Raw & Cooked) diff --git a/init.lua b/init.lua index 5686ea9..2ec3d85 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,7 @@ dofile(minetest.get_modpath("bbq").."/cooking.lua") dofile(minetest.get_modpath("bbq").."/crafts.lua") dofile(minetest.get_modpath("bbq").."/kettle.lua") +dofile(minetest.get_modpath("bbq").."/propane_grill.lua") dofile(minetest.get_modpath("bbq").."/smoker.lua") dofile(minetest.get_modpath("bbq").."/overrides.lua") dofile(minetest.get_modpath("bbq").."/woodpile.lua") diff --git a/kettle.lua b/kettle.lua index 43556d8..7a6eb21 100644 --- a/kettle.lua +++ b/kettle.lua @@ -434,9 +434,9 @@ minetest.register_node("bbq:kettle_grill_base", { description = "Kettle Grill Base", tiles = { - "bbq_chrome_top.png", "bbq_chrome_bottom.png^[transformFY", - "bbq_chrome.png^[transformFX", "bbq_chrome.png", - "bbq_chrome_side.png", "bbq_chrome_side.png", + "bbq_kettle_top.png", "bbq_kettle_bottom.png^[transformFY", + "bbq_kettle.png^[transformFX", "bbq_kettle.png", + "bbq_kettle_side.png", "bbq_kettle_side.png", }, paramtype2 = "facedir", diff --git a/overrides.lua b/overrides.lua index 378cc9b..f13ea1e 100644 --- a/overrides.lua +++ b/overrides.lua @@ -1,9 +1,46 @@ +--------- +--ALIASES +--------- +minetest.register_alias("bbq:mutton_raw", "mobs:mutton_raw") +minetest.register_alias("bbq:mutton", "mobs:mutton_cooked") +minetest.register_alias("bbq:wood_pile", "bbq:woodpile_aspen") + -------------------------- --COMPATIBILITY WITH CROPS -------------------------- -if minetest.registered_items["crops:peppercorn"] ~= 1 then +if minetest.registered_items["crops:garlic_clove"] ~= 1 then +minetest.override_item("bbq:garlic_clove", { + tiles = { "crops_garlic_plant_1.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = false, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + node_placement_prediction = "crops:garlic_plant_1", + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, -0.4, 0.45} + }, + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:garlic_plant_1", param2 = 3}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) +end + +if minetest.registered_items["crops:peppercorn"] ~= 1 then minetest.override_item("bbq:peppercorn", { on_place =function(itemstack, placer, pointed_thing) @@ -115,118 +152,40 @@ minetest.override_item("farming:potato", { groups = {potato=1}, }) end + --------------------------------------------------------- +if minetest.registered_items["mobs:honey"] ~= nil then minetest.override_item("mobs:honey", { - groups = {sugar=1}, + groups = {sugar=1, honey=1}, }) +end +if minetest.registered_items["mobs:cheese"] ~= nil then minetest.override_item("mobs:cheese", { groups = {cheese=1}, }) +end + +--------------------xdecor----------------------------- + +if minetest.registered_items["xdecor:honey"] ~= nil then +minetest.override_item("xdecor:honey", { + groups = {sugar=1, honey=1}, +}) +end --------------------------------- --UPGRADE MEAT DROPS IN MOBS REDO --------------------------------- - -local def = minetest.registered_entities["mobs_animal:sheep_black"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_blue"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_brown"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_cyan"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_dark_green"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_dark_grey"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_green"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_grey"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_magenta"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_orange"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_pink"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_red"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_violet"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_white"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - -local def = minetest.registered_entities["mobs_animal:sheep_yellow"] -assert(def, "mobs:sheep not found") -def.drops = { - {name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 }, -} - - - +if minetest.registered_items["mobs_animal:cow"] ~= nil then local def = minetest.registered_entities["mobs_animal:cow"] assert(def, "mobs:cow not found") def.drops = { {name = "bbq:beef_raw", chance = 1, min = 1, max = 3}, {name = "mobs:leather", chance = 1, min = 1, max = 2}, } +end ------------------------------- --MAKE YEAST NATURALLY OCCURING @@ -255,6 +214,7 @@ minetest.override_item("default:junglegrass", {drop = { ----------------------------------------------- --MAKE VESSEL TYPE ITEMS WORK WITH VESSEL SHELF ----------------------------------------------- +if minetest.registered_items["bucket:bucket_empty"] ~= nil then minetest.override_item("bucket:bucket_empty", { groups = {vessel=1}, }) @@ -270,6 +230,13 @@ minetest.override_item("bucket:bucket_river_water", { minetest.override_item("bucket:bucket_lava", { groups = {vessel=1}, }) +end + +if minetest.registered_items["mobs:bucket_milk"] ~= nil then +minetest.override_item("mobs:bucket_milk", { + groups = {vessel=1}, +}) +end ---------------------- --UPGRADING WOOD FUELS diff --git a/propane_grill.lua b/propane_grill.lua new file mode 100644 index 0000000..ce34ef3 --- /dev/null +++ b/propane_grill.lua @@ -0,0 +1,395 @@ + +-- +-- Formspecs +-- + +function default.get_propane_grill_active_formspec(fuel_percent, item_percent) + return "size[8,8.5]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "list[context;src;2.75,0.5;1,1;]".. + "list[context;fuel;2.75,2.5;1,1;]".. + "image[2.75,1.5;1,1;bbq_smoker_fire_bg.png^[lowpart:".. + (100-fuel_percent)..":bbq_smoker_fire_fg.png]".. + "image[3.75,1.5;1,1;gui_smoker_arrow_bg.png^[lowpart:".. + (item_percent)..":gui_smoker_arrow_fg.png^[transformR270]".. + "list[context;dst;4.8,0.5;3,3;]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "listring[context;dst]".. + "listring[current_player;main]".. + "listring[context;src]".. + "listring[current_player;main]".. + "listring[context;fuel]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0, 4.25) +end + +function default.get_propane_grill_inactive_formspec() + return "size[8,8.5]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "list[context;src;2.75,0.5;1,1;]".. + "list[context;fuel;2.75,2.5;1,1;]".. + "image[2.75,1.5;1,1;bbq_smoker_fire_bg.png]".. + "image[3.75,1.5;1,1;gui_smoker_arrow_bg.png^[transformR270]".. + "list[context;dst;4.8,0.5;3,3;]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "listring[context;dst]".. + "listring[current_player;main]".. + "listring[context;src]".. + "listring[current_player;main]".. + "listring[context;fuel]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0, 4.25) +end + +-- +-- Node callback functions that are the same for active and inactive propane_grill +-- + +local function can_dig(pos, player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("fuel") and inv:is_empty("dst") and inv:is_empty("src") +end + +local function allow_metadata_inventory_put(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if listname == "fuel" then + if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then + if inv:is_empty("src") then + meta:set_string("infotext", "propane_grill is empty") + end + return stack:get_count() + else + return 0 + end + elseif listname == "src" then + return stack:get_count() + elseif listname == "dst" then + return 0 + end +end + +local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local stack = inv:get_stack(from_list, from_index) + return allow_metadata_inventory_put(pos, to_list, to_index, stack, player) +end + +local function allow_metadata_inventory_take(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + return stack:get_count() +end + +local function swap_node(pos, name) + local node = minetest.get_node(pos) + if node.name == name then + return + end + node.name = name + minetest.swap_node(pos, node) +end + +local function propane_grill_node_timer(pos, elapsed) + -- + -- Inizialize metadata + -- + local meta = minetest.get_meta(pos) + local fuel_time = meta:get_float("fuel_time") or 0 + local src_time = meta:get_float("src_time") or 0 + local fuel_totaltime = meta:get_float("fuel_totaltime") or 0 + + local inv = meta:get_inventory() + local srclist, fuellist + + local cookable, cooked + local fuel + + local update = true + while elapsed > 0 and update do + update = false + + srclist = inv:get_list("src") + fuellist = inv:get_list("fuel") + + -- + -- Cooking + -- + + -- Check if we have cookable content + local aftercooked + cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) + cookable = cooked.time ~= 0 + + local el = math.min(elapsed, fuel_totaltime - fuel_time) + + + if cookable then -- fuel lasts long enough, adjust el to cooking duration + el = math.min(el, cooked.time - src_time) + end + + -- Check if we have enough fuel to burn + if fuel_time < fuel_totaltime then + -- The propane_grill is currently active and has enough fuel + fuel_time = fuel_time + el + -- If there is a cookable item then check if it is ready yet + if cookable then + src_time = src_time + el + if src_time >= cooked.time then + -- Place result in dst list if possible + if inv:room_for_item("dst", cooked.item) then + inv:add_item("dst", cooked.item) + inv:set_stack("src", 1, aftercooked.items[1]) + src_time = src_time - cooked.time + update = true + end + else + -- Item could not be cooked: probably missing fuel + update = true + end + end + else + -- propane_grill ran out of fuel + if cookable then + -- We need to get new fuel + local afterfuel + fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + + if fuel.time == 0 then + -- No valid fuel in fuel list + fuel_totaltime = 0 + src_time = 0 + else + -- Take fuel from fuel list + inv:set_stack("fuel", 1, afterfuel.items[1]) + update = true + fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time) + end + else + -- We don't need to get new fuel since there is no cookable item + fuel_totaltime = 0 + src_time = 0 + end + fuel_time = 0 + end + + elapsed = elapsed - el + end + + if fuel and fuel_totaltime > fuel.time then + fuel_totaltime = fuel.time + end + if srclist[1]:is_empty() then + src_time = 0 + end + + -- + -- Update formspec, infotext and node + -- + local formspec + local item_state + local item_percent = 0 + if cookable then + item_percent = math.floor(src_time / cooked.time * 100) + if item_percent > 100 then + item_state = "100% (output full)" + else + item_state = item_percent .. "%" + end + else + if srclist[1]:is_empty() then + item_state = "Empty" + else + item_state = "Not cookable" + end + end + + local fuel_state = "Empty" + local active = "inactive" + local result = false + + if fuel_totaltime ~= 0 then + active = "active" + local fuel_percent = math.floor(fuel_time / fuel_totaltime * 100) + fuel_state = fuel_percent .. "%" + formspec = default.get_propane_grill_active_formspec(fuel_percent, item_percent) + swap_node(pos, "bbq:propane_grill_active") + -- make sure timer restarts automatically + result = true + else + if not fuellist[1]:is_empty() then + fuel_state = "0%" + end + formspec = default.get_propane_grill_inactive_formspec() + swap_node(pos, "bbq:propane_grill") + -- stop timer on the inactive propane_grill + minetest.get_node_timer(pos):stop() + end + + local infotext = "propane_grill " .. active .. "\n(Item: " .. item_state .. + "; Fuel: " .. fuel_state .. ")" + + -- + -- Set meta values + -- + meta:set_float("fuel_totaltime", fuel_totaltime) + meta:set_float("fuel_time", fuel_time) + meta:set_float("src_time", src_time) + meta:set_string("formspec", formspec) + meta:set_string("infotext", infotext) + + return result +end + +------------------- +-- Node definitions +------------------- + +minetest.register_node("bbq:propane_grill", { + description = "propane_grill", + tiles = { + "bbq_propane_grill_top.png", "bbq_propane_grill_bottom.png", + "bbq_propane_grill_side.png", "bbq_propane_grill_side.png", + "bbq_propane_grill_back.png", "bbq_propane_grill_front.png", + }, + + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-1, 0.2, -0.5, 1, 0.25, 0.5},-- wings + {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, -- main body + {-0.5, 0.25, -0.5, 0.5, 0.68, 0.5}, -- top + }, + }, + + groups = {cracky=2}, + legacy_facedir_simple = true, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + + can_dig = can_dig, + + on_timer = propane_grill_node_timer, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", default.get_propane_grill_inactive_formspec()) + local inv = meta:get_inventory() + inv:set_size('src', 1) + inv:set_size('fuel', 1 ) + inv:set_size('dst', 9) + end, + + on_metadata_inventory_move = function(pos) + minetest.get_node_timer(pos):start(1.0) + end, + on_metadata_inventory_put = function(pos) + -- start timer function, it will sort out whether propane_grill can burn or not. + minetest.get_node_timer(pos):start(1.0) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "src", drops) + default.get_inventory_drops(pos, "fuel", drops) + default.get_inventory_drops(pos, "dst", drops) + drops[#drops+1] = "bbq:propane_grill" + minetest.remove_node(pos) + return drops + end, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, +}) + +minetest.register_node("bbq:propane_grill_active", { + description = "propane_grill", + + + + tiles = { + "bbq_propane_grill_top.png", "bbq_propane_grill_bottom.png", + + { + image = "bbq_propane_grill_side_active.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }, + + { + image = "bbq_propane_grill_side_active.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }, + + "bbq_propane_grill_back.png", + { + image = "bbq_propane_grill_front_active.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }, + }, + + + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-1, 0.2, -0.5, 1, 0.25, 0.5},-- wings + {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, -- main body + {-0.5, 0.25, -0.5, 0.5, 0.68, 0.5}, -- top + }, + }, + + + + + + + + + + + drop = "bbq:propane_grill", + groups = {cracky=2, not_in_creative_inventory=1}, + legacy_facedir_simple = true, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + on_timer = propane_grill_node_timer, + + can_dig = can_dig, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, +}) diff --git a/screenshot1.png b/screenshot1.png index 19feeef..686b7df 100644 Binary files a/screenshot1.png and b/screenshot1.png differ diff --git a/screenshot2.png b/screenshot2.png new file mode 100644 index 0000000..bf89929 Binary files /dev/null and b/screenshot2.png differ diff --git a/smoker.lua b/smoker.lua index 1a42a56..78652b4 100644 --- a/smoker.lua +++ b/smoker.lua @@ -260,9 +260,12 @@ end minetest.register_node("bbq:smoker", { description = "Smoker", tiles = { - "bbq_smoker_top.png", "bbq_smoker_bottom.png", - "bbq_smoker_side.png", "bbq_smoker_side.png", - "bbq_smoker_back.png", "bbq_smoker_front.png", + "bbq_smoker_texture_bottom.png", --top + "bbq_smoker_texture_bottom.png^[transformFY", --bottom + "bbq_smoker_texture_side.png", --right side + "bbq_smoker_texture_side.png^[transformFX", --left side + "bbq_smoker_texture_back.png", --back + "bbq_smoker_texture.png", --front }, paramtype2 = "facedir", @@ -270,9 +273,22 @@ minetest.register_node("bbq:smoker", { node_box = { type = "fixed", fixed = { - {-1, 0.2, -0.5, 1, 0.25, 0.5},-- wings - {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, -- main body - {-0.5, 0.25, -0.5, 0.5, 0.68, 0.5}, -- top + {-1, -0.03, -0.3, -0.5, 0.35, 0.093},-- smokebox + {-0.5, -0.08, -0.5, 1.0, 0.6, 0.435 }, -- main body + {.125, 0.095, -.52, .34, 0.155, -0.54}, -- main handle + {-.87, 0.095, -.32, -.66, 0.155, -0.34}, -- smokebox handle + {.155, 0.115, -.5, .175, 0.135, -0.55}, -- left handle bolt + {.29, 0.115, -.5, .31, 0.135, -0.55}, -- right handle bolt + {-.82, 0.115, -.35, -.84, 0.135, -0.3}, -- left smokebox handle bolt + {-.69, 0.115, -.35, -.71, 0.135, -0.3}, -- right smokebox handle bolt + {1.0, 0.18, .10, 1.49, 0.30, 0.22}, -- chimney x + {1.37, 0.18, .10, 1.49, .62, 0.22}, -- chimney y +-- {1.26, 0.62, .1, 1.5, .9, 0.34}, -- chimney smoke + {-0.3, -0.5, -0.3, -.4, -0.08, -0.4}, -- front leftleg + {0.8, -0.5, -0.3, 0.9, -0.08, -0.4}, -- front right leg + {-0.3, -0.5, 0.3, -.4, -0.08, 0.4}, -- front leftleg + {0.8, -0.5, 0.3, 0.9, -0.08, 0.4}, -- front right leg + }, }, @@ -322,10 +338,29 @@ minetest.register_node("bbq:smoker_active", { tiles = { - "bbq_smoker_top.png", "bbq_smoker_bottom.png", - { - image = "bbq_smoker_side_active.png", + image = "bbq_smoker_texture_bottom_animated.png", --top + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }, + "bbq_smoker_texture_bottom.png^[transformFY", --bottom + { + image = "bbq_smoker_texture_side_animated.png", --right side + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }, + { + image = "bbq_smoker_texture_side_animated.png^[transformFX", --left side backface_culling = false, animation = { type = "vertical_frames", @@ -336,7 +371,7 @@ minetest.register_node("bbq:smoker_active", { }, { - image = "bbq_smoker_side_active.png", + image = "bbq_smoker_texture_back_animated.png", --back backface_culling = false, animation = { type = "vertical_frames", @@ -345,10 +380,8 @@ minetest.register_node("bbq:smoker_active", { length = 1.5 }, }, - - "bbq_smoker_back.png", - { - image = "bbq_smoker_front_active.png", +{ + image = "bbq_smoker_texture_animated.png", --front backface_culling = false, animation = { type = "vertical_frames", @@ -365,9 +398,21 @@ minetest.register_node("bbq:smoker_active", { node_box = { type = "fixed", fixed = { - {-1, 0.2, -0.5, 1, 0.25, 0.5},-- wings - {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, -- main body - {-0.5, 0.25, -0.5, 0.5, 0.68, 0.5}, -- top + {-1, -0.03, -0.3, -0.5, 0.35, 0.093},-- smokebox + {-0.5, -0.08, -0.5, 1.0, 0.6, 0.435 }, -- main body + {.125, 0.095, -.52, .34, 0.155, -0.54}, -- main handle + {-.87, 0.095, -.32, -.66, 0.155, -0.34}, -- smokebox handle + {.155, 0.115, -.5, .175, 0.135, -0.55}, -- left handle bolt + {.29, 0.115, -.5, .31, 0.135, -0.55}, -- right handle bolt + {-.82, 0.115, -.35, -.84, 0.135, -0.3}, -- left smokebox handle bolt + {-.69, 0.115, -.35, -.71, 0.135, -0.3}, -- right smokebox handle bolt + {1.0, 0.18, .10, 1.49, 0.30, 0.22}, -- chimney x + {1.37, 0.18, .10, 1.49, .62, 0.22}, -- chimney y + {1.37, 0.62, .10, 1.49, .9, 0.22}, -- chimney smoke + {-0.3, -0.5, -0.3, -.4, -0.08, -0.4}, -- front leftleg + {0.8, -0.5, -0.3, 0.9, -0.08, -0.4}, -- front right leg + {-0.3, -0.5, 0.3, -.4, -0.08, 0.4}, -- front leftleg + {0.8, -0.5, 0.3, 0.9, -0.08, 0.4}, -- front right leg }, }, diff --git a/sounds/bbq_basting.ogg b/sounds/bbq_basting.ogg new file mode 100644 index 0000000..9d9c3b7 Binary files /dev/null and b/sounds/bbq_basting.ogg differ diff --git a/sounds/bbq_grill_brush.ogg b/sounds/bbq_grill_brush.ogg new file mode 100644 index 0000000..11992c2 Binary files /dev/null and b/sounds/bbq_grill_brush.ogg differ diff --git a/sounds/bbq_sizzle.ogg b/sounds/bbq_sizzle.ogg new file mode 100644 index 0000000..b6d9631 Binary files /dev/null and b/sounds/bbq_sizzle.ogg differ diff --git a/woodpile.lua b/woodpile.lua index 35e3b1a..bffec81 100644 --- a/woodpile.lua +++ b/woodpile.lua @@ -1,7 +1,7 @@ -- Minetest 0.4 mod: bbq -- See README.txt for licensing and other information. -local bbq_wood_pile_formspec = +local bbq_woodpile_formspec = "size[8,7;]" .. default.gui_bg .. default.gui_bg_img .. @@ -13,8 +13,8 @@ local bbq_wood_pile_formspec = "listring[current_player;main]" .. default.get_hotbar_bg(0, 2.85) -local function get_bbq_wood_pile_formspec(inv) - local formspec = bbq_wood_pile_formspec +local function get_bbq_woodpile_formspec(inv) + local formspec = bbq_woodpile_formspec local invlist = inv and inv:get_list("bbq") -- Inventory slots overlay local vx, vy = 0, 0.3 @@ -25,17 +25,17 @@ local function get_bbq_wood_pile_formspec(inv) end if not invlist or invlist[i]:is_empty() then formspec = formspec .. - "image[" .. vx .. "," .. vy .. ";1,1;bbq_wood_pile_slot.png]" + "image[" .. vx .. "," .. vy .. ";1,1;bbq_woodpile_slot.png]" end vx = vx + 1 end return formspec end -minetest.register_node("bbq:wood_pile", { +minetest.register_node("bbq:woodpile", { description = "Wood Pile", - tiles = {"bbq_wood_pile_top.png", "bbq_wood_pile_top.png", "bbq_wood_pile_side.png", - "bbq_wood_pile_side.png", "bbq_wood_pile_front.png", "bbq_wood_pile_front.png"}, + tiles = {"bbq_woodpile_wood_top.png", "bbq_woodpile_wood_top.png", "bbq_woodpile_wood_side.png", + "bbq_woodpile_wood_side.png", "bbq_woodpile_wood_front.png", "bbq_woodpile_wood_front.png"}, paramtype2 = "facedir", is_ground_content = false, groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, @@ -43,7 +43,7 @@ minetest.register_node("bbq:wood_pile", { on_construct = function(pos) local meta = minetest.get_meta(pos) - meta:set_string("formspec", get_bbq_wood_pile_formspec(nil)) + meta:set_string("formspec", get_bbq_woodpile_formspec(nil)) local inv = meta:get_inventory() inv:set_size("bbq", 8 * 2) end, @@ -52,43 +52,288 @@ minetest.register_node("bbq:wood_pile", { return inv:is_empty("bbq") end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) - if minetest.get_item_group(stack:get_name(), "wood_pile") ~= 0 then + if minetest.get_item_group(stack:get_name(), "woodpile") ~= 0 then return stack:get_count() end return 0 end, on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) minetest.log("action", player:get_player_name() .. - " moves stuff in bbq wood_pile at ".. minetest.pos_to_string(pos)) + " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) local meta = minetest.get_meta(pos) - meta:set_string("formspec", get_bbq_wood_pile_formspec(meta:get_inventory())) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) end, on_metadata_inventory_put = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name() .. - " moves stuff to bbq wood_pile at ".. minetest.pos_to_string(pos)) + " moves stuff to bbq woodpile at ".. minetest.pos_to_string(pos)) local meta = minetest.get_meta(pos) - meta:set_string("formspec", get_bbq_wood_pile_formspec(meta:get_inventory())) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) end, on_metadata_inventory_take = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name() .. - " takes stuff from bbq wood_pile at ".. minetest.pos_to_string(pos)) + " takes stuff from bbq woodpile at ".. minetest.pos_to_string(pos)) local meta = minetest.get_meta(pos) - meta:set_string("formspec", get_bbq_wood_pile_formspec(meta:get_inventory())) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) end, on_blast = function(pos) local drops = {} default.get_inventory_drops(pos, "bbq", drops) - drops[#drops + 1] = "bbq:wood_pile" + drops[#drops + 1] = "bbq:woodpile" minetest.remove_node(pos) return drops end, }) +minetest.register_node("bbq:woodpile_acacia", { + description = "Acacia Wood Pile", + tiles = {"bbq_woodpile_acacia_top.png", "bbq_woodpile_acacia_top.png", "bbq_woodpile_acacia_side.png", + "bbq_woodpile_acacia_side.png", "bbq_woodpile_acacia_front.png", "bbq_woodpile_acacia_front.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(nil)) + local inv = meta:get_inventory() + inv:set_size("bbq", 8 * 2) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("bbq") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if minetest.get_item_group(stack:get_name(), "woodpile") ~= 0 then + return stack:get_count() + end + return 0 + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves stuff to bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "bbq", drops) + drops[#drops + 1] = "bbq:woodpile" + minetest.remove_node(pos) + return drops + end, +}) + +minetest.register_node("bbq:woodpile_pine", { + description = "Pine Wood Pile", + tiles = {"bbq_woodpile_pine_top.png", "bbq_woodpile_pine_top.png", "bbq_woodpile_pine_side.png", + "bbq_woodpile_pine_side.png", "bbq_woodpile_pine_front.png", "bbq_woodpile_pine_front.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(nil)) + local inv = meta:get_inventory() + inv:set_size("bbq", 8 * 2) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("bbq") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if minetest.get_item_group(stack:get_name(), "woodpile") ~= 0 then + return stack:get_count() + end + return 0 + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves stuff to bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "bbq", drops) + drops[#drops + 1] = "bbq:woodpile" + minetest.remove_node(pos) + return drops + end, +}) + +minetest.register_node("bbq:woodpile_junglewood", { + description = "Junglewood Wood Pile", + tiles = {"bbq_woodpile_junglewood_top.png", "bbq_woodpile_junglewood_top.png", "bbq_woodpile_junglewood_side.png", + "bbq_woodpile_junglewood_side.png", "bbq_woodpile_junglewood_front.png", "bbq_woodpile_junglewood_front.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(nil)) + local inv = meta:get_inventory() + inv:set_size("bbq", 8 * 2) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("bbq") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if minetest.get_item_group(stack:get_name(), "woodpile") ~= 0 then + return stack:get_count() + end + return 0 + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves stuff to bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "bbq", drops) + drops[#drops + 1] = "bbq:woodpile" + minetest.remove_node(pos) + return drops + end, +}) + +minetest.register_node("bbq:woodpile_aspen", { + description = "Aspen Wood Pile", + tiles = {"bbq_woodpile_aspen_top.png", "bbq_woodpile_aspen_top.png", "bbq_woodpile_aspen_side.png", + "bbq_woodpile_aspen_side.png", "bbq_woodpile_aspen_front.png", "bbq_woodpile_aspen_front.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(nil)) + local inv = meta:get_inventory() + inv:set_size("bbq", 8 * 2) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("bbq") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if minetest.get_item_group(stack:get_name(), "woodpile") ~= 0 then + return stack:get_count() + end + return 0 + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves stuff to bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from bbq woodpile at ".. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", get_bbq_woodpile_formspec(meta:get_inventory())) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "bbq", drops) + drops[#drops + 1] = "bbq:woodpile" + minetest.remove_node(pos) + return drops + end, +}) + + minetest.register_craft({ - output = "bbq:wood_pile", + output = "bbq:woodpile", recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"group:wood", "group:wood", "group:wood"}, - {"group:wood", "group:wood", "group:wood"}, + {"default:wood", "default:wood", "default:wood"}, + {"default:wood", "default:wood", "default:wood"}, + {"default:wood", "default:wood", "default:wood"}, + } +}) + +minetest.register_craft({ + output = "bbq:woodpile_pine", + recipe = { + {"default:pine_wood", "default:pine_wood", "default:pine_wood"}, + {"default:pine_wood", "default:pine_wood", "default:pine_wood"}, + {"default:pine_wood", "default:pine_wood", "default:pine_wood"}, + } +}) + +minetest.register_craft({ + output = "bbq:woodpile_aspen", + recipe = { + {"default:aspen_wood", "default:aspen_wood", "default:aspen_wood"}, + {"default:aspen_wood", "default:aspen_wood", "default:aspen_wood"}, + {"default:aspen_wood", "default:aspen_wood", "default:aspen_wood"}, + } +}) + +minetest.register_craft({ + output = "bbq:woodpile_junglewood", + recipe = { + {"default:junglewood", "default:junglewood", "default:junglewood"}, + {"default:junglewood", "default:junglewood", "default:junglewood"}, + {"default:junglewood", "default:junglewood", "default:junglewood"}, + } +}) + +minetest.register_craft({ + output = "bbq:woodpile_acacia", + recipe = { + {"default:acacia_wood", "default:acacia_wood", "default:acacia_wood"}, + {"default:acacia_wood", "default:acacia_wood", "default:acacia_wood"}, + {"default:acacia_wood", "default:acacia_wood", "default:acacia_wood"}, } })