From df0fc50a25f831a263d345715e61919b275ad0b0 Mon Sep 17 00:00:00 2001 From: sys4-fr Date: Tue, 28 Feb 2017 22:54:25 +0100 Subject: [PATCH] Add bonemeal support --- README.md | 9 ++++-- depends.txt | 1 + init.lua | 27 ++++++++++++------ maidroid_core_morefarming.lua | 2 +- ..._carrot.png => morefarming_wildcarrot.png} | Bin ...rot_1.png => morefarming_wildcarrot_1.png} | Bin ...rot_2.png => morefarming_wildcarrot_2.png} | Bin ...rot_3.png => morefarming_wildcarrot_3.png} | Bin ...rot_4.png => morefarming_wildcarrot_4.png} | Bin ...rot_5.png => morefarming_wildcarrot_5.png} | Bin ...rot_6.png => morefarming_wildcarrot_6.png} | Bin ...rot_7.png => morefarming_wildcarrot_7.png} | Bin ...rot_8.png => morefarming_wildcarrot_8.png} | Bin ...ed.png => morefarming_wildcarrot_seed.png} | Bin 14 files changed, 27 insertions(+), 12 deletions(-) rename textures/{morefarming_wild_carrot.png => morefarming_wildcarrot.png} (100%) rename textures/{morefarming_wild_carrot_1.png => morefarming_wildcarrot_1.png} (100%) rename textures/{morefarming_wild_carrot_2.png => morefarming_wildcarrot_2.png} (100%) rename textures/{morefarming_wild_carrot_3.png => morefarming_wildcarrot_3.png} (100%) rename textures/{morefarming_wild_carrot_4.png => morefarming_wildcarrot_4.png} (100%) rename textures/{morefarming_wild_carrot_5.png => morefarming_wildcarrot_5.png} (100%) rename textures/{morefarming_wild_carrot_6.png => morefarming_wildcarrot_6.png} (100%) rename textures/{morefarming_wild_carrot_7.png => morefarming_wildcarrot_7.png} (100%) rename textures/{morefarming_wild_carrot_8.png => morefarming_wildcarrot_8.png} (100%) rename textures/{morefarming_wild_carrot_seed.png => morefarming_wildcarrot_seed.png} (100%) diff --git a/README.md b/README.md index 79cadf3..176118a 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,12 @@ This mod add more things to do farming, make it more realistic, more harder and Dependencies: - moreflowers, by me (https://github.com/sys4-fr/moreflowers) - farming -- farming_redo, by TenPlus1 (optional) -- farming_plus, by PilzAdam (optional) -- maidroid_core, by tacigar (optional) + +Optional dependencies: +- farming_redo by TenPlus1 (https://forum.minetest.net/viewtopic.php?f=11&t=9019) +- farming_plus by PilzAdam (https://forum.minetest.net/viewtopic.php?f=11&t=2787&hilit=PilzAdam+farming) +- maidroid_core by tacigar (https://forum.minetest.net/viewtopic.php?f=11&t=14808&hilit=maidroid+tacigar) +- bonemeal by TenPlus1 (https://forum.minetest.net/viewtopic.php?f=9&t=16446) Why another farming mod ? - 1- I want to have a more realistic farming mod because when you spawn into a blank world, i think it's a non-sense if you found "domestic" vegetables wich already populate the world IMHO. diff --git a/depends.txt b/depends.txt index aa54260..8ce6525 100644 --- a/depends.txt +++ b/depends.txt @@ -2,3 +2,4 @@ moreflowers farming farming_plus? maidroid_core? +bonemeal? diff --git a/init.lua b/init.lua index a89bed1..5927b0a 100644 --- a/init.lua +++ b/init.lua @@ -11,14 +11,14 @@ minetest.override_item("moreflowers:wild_carrot", { drop = { max_items = 1, items = { - { items = {"morefarming:seed_wild_carrot"}, rarity = 12}, + { items = {"morefarming:seed_wildcarrot"}, rarity = 12}, { items = {"moreflowers:wild_carrot"}}, } }}) -farming.register_plant("morefarming:wild_carrot", { +farming.register_plant("morefarming:wildcarrot", { description = "Wild Carrot seed", - inventory_image = "morefarming_wild_carrot_seed.png", + inventory_image = "morefarming_wildcarrot_seed.png", steps = 8, minlight = 13, maxlight = default.LIGHT_MAX, @@ -30,18 +30,18 @@ local carrot_seed = "morefarming:seed_carrot" if redo then carrot_seed = "farming:carrot" end if plus then carrot_seed = "farming_plus:carrot_seed" end -minetest.override_item("morefarming:wild_carrot_8", { +minetest.override_item("morefarming:wildcarrot_8", { drop = { max_items = 3, items = { - { items = {"morefarming:seed_wild_carrot"}, rarity = 6}, + { items = {"morefarming:seed_wildcarrot"}, rarity = 6}, { items = {carrot_seed}, rarity = 8}, - { items = {"morefarming:wild_carrot"}, rarity = 2}, + { items = {"morefarming:wildcarrot"}, rarity = 2}, { items = {"moreflowers:wild_carrot"}}, } }}) -minetest.override_item("morefarming:wild_carrot", { +minetest.override_item("morefarming:wildcarrot", { on_use = minetest.item_eat(1) }) @@ -93,8 +93,19 @@ elseif plus then } }) end - + +-- Maidroid behaviour if not redo and not plus and minetest.get_modpath("maidroid_core") then minetest.registered_items["moreflowers:wild_carrot"].groups["seed"] = 1 dofile(minetest.get_modpath("morefarming").."/maidroid_core_morefarming.lua") end + +-- bonemeal behaviour +if minetest.get_modpath("bonemeal") and bonemeal then + + bonemeal:add_crop({{"morefarming:wildcarrot_", 8, "morefarming:seed_wildcarrot"}}) + + if not redo and not plus then + bonemeal:add_crop({{"morefarming:carrot_", 8, "morefarming:seed_carrot"}}) + end +end diff --git a/maidroid_core_morefarming.lua b/maidroid_core_morefarming.lua index 0cd8d28..cbd3917 100644 --- a/maidroid_core_morefarming.lua +++ b/maidroid_core_morefarming.lua @@ -17,7 +17,7 @@ local target_plants = { "farming:wheat_8", "farming:cotton_8", "moreflowers:wild_carrot", - "morefarming:wild_carrot_8", + "morefarming:wildcarrot_8", "morefarming:carrot_8", } diff --git a/textures/morefarming_wild_carrot.png b/textures/morefarming_wildcarrot.png similarity index 100% rename from textures/morefarming_wild_carrot.png rename to textures/morefarming_wildcarrot.png diff --git a/textures/morefarming_wild_carrot_1.png b/textures/morefarming_wildcarrot_1.png similarity index 100% rename from textures/morefarming_wild_carrot_1.png rename to textures/morefarming_wildcarrot_1.png diff --git a/textures/morefarming_wild_carrot_2.png b/textures/morefarming_wildcarrot_2.png similarity index 100% rename from textures/morefarming_wild_carrot_2.png rename to textures/morefarming_wildcarrot_2.png diff --git a/textures/morefarming_wild_carrot_3.png b/textures/morefarming_wildcarrot_3.png similarity index 100% rename from textures/morefarming_wild_carrot_3.png rename to textures/morefarming_wildcarrot_3.png diff --git a/textures/morefarming_wild_carrot_4.png b/textures/morefarming_wildcarrot_4.png similarity index 100% rename from textures/morefarming_wild_carrot_4.png rename to textures/morefarming_wildcarrot_4.png diff --git a/textures/morefarming_wild_carrot_5.png b/textures/morefarming_wildcarrot_5.png similarity index 100% rename from textures/morefarming_wild_carrot_5.png rename to textures/morefarming_wildcarrot_5.png diff --git a/textures/morefarming_wild_carrot_6.png b/textures/morefarming_wildcarrot_6.png similarity index 100% rename from textures/morefarming_wild_carrot_6.png rename to textures/morefarming_wildcarrot_6.png diff --git a/textures/morefarming_wild_carrot_7.png b/textures/morefarming_wildcarrot_7.png similarity index 100% rename from textures/morefarming_wild_carrot_7.png rename to textures/morefarming_wildcarrot_7.png diff --git a/textures/morefarming_wild_carrot_8.png b/textures/morefarming_wildcarrot_8.png similarity index 100% rename from textures/morefarming_wild_carrot_8.png rename to textures/morefarming_wildcarrot_8.png diff --git a/textures/morefarming_wild_carrot_seed.png b/textures/morefarming_wildcarrot_seed.png similarity index 100% rename from textures/morefarming_wild_carrot_seed.png rename to textures/morefarming_wildcarrot_seed.png