From da6f1255f15bb71c7bbe1b41cea94cbd64a72593 Mon Sep 17 00:00:00 2001 From: "A.C.M" Date: Wed, 1 May 2019 18:05:53 +0200 Subject: [PATCH] Support for bonemeal from Tenplus added. --- asparagus_default.lua | 5 +++++ asparagus_redo.lua | 5 +++++ chives_default.lua | 5 +++++ chives_redo.lua | 5 +++++ depends.txt | 1 + flax_default.lua | 5 +++++ flax_redo.lua | 5 +++++ init.lua | 11 +++++++++++ kohlrabi_default.lua | 5 +++++ kohlrabi_redo.lua | 5 +++++ lettuce_default.lua | 5 +++++ lettuce_redo.lua | 5 +++++ mod.conf | 2 +- parsley_default.lua | 5 +++++ parsley_redo.lua | 5 +++++ rice_default.lua | 5 +++++ rice_redo.lua | 5 +++++ rosemary_default.lua | 5 +++++ rosemary_redo.lua | 5 +++++ soy_default.lua | 5 +++++ soy_redo.lua | 5 +++++ sunflower_default.lua | 5 +++++ sunflower_redo.lua | 5 +++++ 23 files changed, 113 insertions(+), 1 deletion(-) diff --git a/asparagus_default.lua b/asparagus_default.lua index 1b14a79..7a134d4 100644 --- a/asparagus_default.lua +++ b/asparagus_default.lua @@ -49,6 +49,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname, { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/asparagus_redo.lua b/asparagus_redo.lua index d646c5b..6806b52 100644 --- a/asparagus_redo.lua +++ b/asparagus_redo.lua @@ -121,6 +121,11 @@ local modname = minetest.get_current_modname() }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/chives_default.lua b/chives_default.lua index 7915b59..ace19f7 100644 --- a/chives_default.lua +++ b/chives_default.lua @@ -49,6 +49,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname, { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/chives_redo.lua b/chives_redo.lua index 3c9de22..9101540 100644 --- a/chives_redo.lua +++ b/chives_redo.lua @@ -111,6 +111,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname .. "", { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/depends.txt b/depends.txt index 801935d..7513a92 100644 --- a/depends.txt +++ b/depends.txt @@ -23,3 +23,4 @@ building_blocks? ropes? cottages? moreblocks? +bonemeal? diff --git a/flax_default.lua b/flax_default.lua index 1af6e44..b24fce5 100644 --- a/flax_default.lua +++ b/flax_default.lua @@ -49,6 +49,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname, { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/flax_redo.lua b/flax_redo.lua index f86dd14..933b222 100644 --- a/flax_redo.lua +++ b/flax_redo.lua @@ -112,6 +112,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname .. "", { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/init.lua b/init.lua index 2c9b282..0aa1c32 100644 --- a/init.lua +++ b/init.lua @@ -15,6 +15,7 @@ local plants = {} local version = "1.8" cucina_vegana_farming_default = true cucina_vegana_plant_settings = {} +cucina_vegana_plant_settings.bonemeal_list = {} local modpath = minetest.get_modpath(minetest.get_current_modname()) local modname = minetest.get_current_modname() @@ -31,6 +32,11 @@ else end -- if(farming.mod +cucina_vegana_plant_settings.bonemeal = false -- Support for bonemeal disabled +if(minetest.get_modpath("bonemeal")) then + cucina_vegana_plant_settings.bonemeal = true + +end -- if(minetest.get_modpath("bonemeal" plants = { @@ -82,6 +88,11 @@ dofile(modpath .. "/recipes_support.lua") dofile(modpath .. "/recipes_5xx.lua") -- New recipes with MT 5.0 dofile(modpath .. "/register_mods.lua") +if(cucina_vegana_plant_settings.bonemeal) then + bonemeal:add_crop(cucina_vegana_plant_settings.bonemeal_list) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (cucina_vegana_farming_default) then print("[MOD] " .. modname .. " Version " .. version .. " in default-mode loaded.") minetest.log("info", "[MOD] " .. modname .. " Version " .. version .. " in default-mode loaded.") diff --git a/kohlrabi_default.lua b/kohlrabi_default.lua index cfd5cd0..fdd885b 100644 --- a/kohlrabi_default.lua +++ b/kohlrabi_default.lua @@ -53,6 +53,11 @@ minetest.register_alias("kohlrabi:kohlrabi", "cucina_vegana:" .. pname) minetest.register_alias("kohlrabi:seed", "cucina_vegana:" .. pname .. "_seed") minetest.register_alias("kohlrabi:wild_kohlrabi", "cucina_vegana:wild_" .. pname) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/kohlrabi_redo.lua b/kohlrabi_redo.lua index ded88cb..a980a45 100644 --- a/kohlrabi_redo.lua +++ b/kohlrabi_redo.lua @@ -135,6 +135,11 @@ minetest.register_alias("kohlrabi:kohlrabi", "cucina_vegana:" .. pname .. "") minetest.register_alias("kohlrabi:seed", "cucina_vegana:" .. pname .. "_seed") minetest.register_alias("kohlrabi:wild_kohlrabi", "cucina_vegana:wild_" .. pname .. "") +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/lettuce_default.lua b/lettuce_default.lua index d263b84..e23c4b5 100644 --- a/lettuce_default.lua +++ b/lettuce_default.lua @@ -54,6 +54,11 @@ minetest.register_alias("lettuce:lettuce", "cucina_vegana:" .. pname) minetest.register_alias("lettuce:seed", "cucina_vegana:" .. pname .. "_seed") minetest.register_alias("lettuce:wild_lettuce", "cucina_vegana:wild_" .. pname) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_5") diff --git a/lettuce_redo.lua b/lettuce_redo.lua index 8f3eb9c..6f480d4 100644 --- a/lettuce_redo.lua +++ b/lettuce_redo.lua @@ -123,6 +123,11 @@ minetest.register_alias("lettuce:lettuce", "cucina_vegana:" .. pname .. "") minetest.register_alias("lettuce:seed", "cucina_vegana:" .. pname .. "_seed") minetest.register_alias("lettuce:wild_lettuce", "cucina_vegana:wild_" .. pname .. "") +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/mod.conf b/mod.conf index 5e0c268..69b5a2b 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = cucina_vegana description = A mod which the vegan kitchen to Minetest. depends = default,dye,farming,vessels -optional_depends = bbq,bees,bucket,bushes,bushes_classic,farming_redo,farming_nextgen,fishing,flowers,intllib,mobs,technic,pizza,wine,wool,basic_materials,homedecor,building_blocks,ropes,cottages,moreblocks +optional_depends = bbq,bees,bucket,bushes,bushes_classic,farming_redo,farming_nextgen,fishing,flowers,intllib,mobs,technic,pizza,wine,wool,basic_materials,homedecor,building_blocks,ropes,cottages,moreblocks,bonemeal diff --git a/parsley_default.lua b/parsley_default.lua index 41290bf..725bb88 100644 --- a/parsley_default.lua +++ b/parsley_default.lua @@ -53,6 +53,11 @@ minetest.register_alias("parsley:parsley", "cucina_vegana:" .. pname) minetest.register_alias("parsley:seed", "cucina_vegana:" .. pname .. "_seed") minetest.register_alias("parsley:wild_parsley", "cucina_vegana:wild_" .. pname) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_parsley", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/parsley_redo.lua b/parsley_redo.lua index daa3574..6f6487b 100644 --- a/parsley_redo.lua +++ b/parsley_redo.lua @@ -125,6 +125,11 @@ minetest.register_alias("parsley:parsley", "cucina_vegana:" .. pname .. "") minetest.register_alias("parsley:seed", "cucina_vegana:" .. pname .. "_seed") minetest.register_alias("parsley:wild_parsley", "cucina_vegana:wild_" .. pname .. "") +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/rice_default.lua b/rice_default.lua index f78b518..b55a2dc 100644 --- a/rice_default.lua +++ b/rice_default.lua @@ -49,6 +49,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname, { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname .. "", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step .. "") diff --git a/rice_redo.lua b/rice_redo.lua index 13bbe11..8907d5d 100644 --- a/rice_redo.lua +++ b/rice_redo.lua @@ -121,6 +121,11 @@ local modname = minetest.get_current_modname() }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/rosemary_default.lua b/rosemary_default.lua index 400d2c8..6c306f6 100644 --- a/rosemary_default.lua +++ b/rosemary_default.lua @@ -50,6 +50,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname, { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/rosemary_redo.lua b/rosemary_redo.lua index db01369..df0be6e 100644 --- a/rosemary_redo.lua +++ b/rosemary_redo.lua @@ -122,6 +122,11 @@ minetest.register_node("cucina_vegana:wild_" .. pname, { }, }) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/soy_default.lua b/soy_default.lua index 6064bde..a6f67d6 100644 --- a/soy_default.lua +++ b/soy_default.lua @@ -53,6 +53,11 @@ minetest.register_alias("soy:wild_".. pname, "cucina_vegana:wild_".. pname) minetest.register_alias("soy:".. pname, "cucina_vegana:".. pname) minetest.register_alias("soy:seed_".. pname, "cucina_vegana:seed_".. pname) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_".. pname, "cucina_vegana:".. pname .. "_1") farmingNG.register_harvest("cucina_vegana:".. pname .. "_" .. step) diff --git a/soy_redo.lua b/soy_redo.lua index d3d7798..dd41343 100644 --- a/soy_redo.lua +++ b/soy_redo.lua @@ -153,6 +153,11 @@ minetest.register_alias("soy:wild_soy", "cucina_vegana:wild_" .. pname) minetest.register_alias("soy:soy", "cucina_vegana:" .. pname) minetest.register_alias("soy:seed_soy", "cucina_vegana:seed_" .. pname) +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step) diff --git a/sunflower_default.lua b/sunflower_default.lua index b89b93f..30501b8 100644 --- a/sunflower_default.lua +++ b/sunflower_default.lua @@ -59,6 +59,11 @@ else end +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:seed_" .. pname, "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step .. "") diff --git a/sunflower_redo.lua b/sunflower_redo.lua index f4724a0..d41587b 100644 --- a/sunflower_redo.lua +++ b/sunflower_redo.lua @@ -118,6 +118,11 @@ else end +if(cucina_vegana_plant_settings.bonemeal) then + table.insert(cucina_vegana_plant_settings.bonemeal_list,{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"}) + +end -- if(cucina_vegana_plant_settings.bonemeal + if (minetest.get_modpath("farming_nextgen")) then farmingNG.register_seed("cucina_vegana:" .. pname .. "_seed", "cucina_vegana:" .. pname .. "_1") farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step)