diff --git a/README.md b/README.md index 3151f07..3ef9147 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -BBQ v1.01 by Grizzly Adam +BBQ v1.02 by Grizzly Adam https://forum.minetest.net/viewtopic.php?f=9&t=19324 @@ -9,6 +9,7 @@ New In This Version Bug Fix: All Colours of Sheep Now Drop Mutton Added support for Farming Redo +Improved support for Crops New Items: Wood Pile (can store trees, wood slabs, and sticks) diff --git a/crafts.lua b/crafts.lua index 117ef16..4ffa962 100644 --- a/crafts.lua +++ b/crafts.lua @@ -186,8 +186,6 @@ minetest.register_node("bbq:peppercorn", { sounds = default.node_sound_leaves_defaults(), }) - - --Ground Pepper minetest.register_node("bbq:pepper_ground", { description = ("Ground Pepper"), diff --git a/depends.txt b/depends.txt index a0c72d8..a38caa8 100644 --- a/depends.txt +++ b/depends.txt @@ -6,3 +6,4 @@ mobs mobs_animal craft_guide? food? +crops? diff --git a/overrides.lua b/overrides.lua index 50c00eb..53f8702 100644 --- a/overrides.lua +++ b/overrides.lua @@ -1,3 +1,43 @@ +-------------------------- +--COMPATIBILITY WITH CROPS +-------------------------- + +if minetest.registered_items["crops:peppercorn"] ~= 1 then + +minetest.override_item("bbq:peppercorn", { + + 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:pepper_plant_1", param2 = 1}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) +end + +if minetest.registered_items["crops:tomato"] ~= nil then +minetest.override_item("crops:tomato", { + groups = {tomato=1}, +}) +end + +if minetest.registered_items["crops:pepper"] ~= nil then +minetest.override_item("crops:pepper", { + groups = {pepper=1}, +}) +end + +if minetest.registered_items["crops:peppercorn"] ~= nil then +minetest.override_item("crops:peppercorn", { + groups = {peppercorn=1}, +}) +end + ------------------------- --Add food to Like Groups -------------------------