diff --git a/README.md b/README.md index ec4143e..a850824 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ on an older map are enabled and growing properly. ### Changelog: -- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files., hoes can deal damage. +- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files, hoes can deal damage. Add weed and weed bale (with setting to disable weed growth). - 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility - 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube - 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock) diff --git a/compatibility.lua b/compatibility.lua index 6895326..06da9bd 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -34,12 +34,9 @@ else sunlight_propagates = true, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} - }, - groups = { - food_banana = 1, fleshy = 3, dig_immediate = 3 + type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} }, + groups = {food_banana = 1, fleshy = 3, dig_immediate = 3}, is_ground_content = false, on_use = minetest.item_eat(2), sounds = farming.node_sound_leaves_defaults() @@ -101,12 +98,9 @@ else sunlight_propagates = true, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} - }, - groups = { - food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2 + type = "fixed", fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} }, + groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, is_ground_content = false, on_use = minetest.item_eat(4), sounds = farming.node_sound_leaves_defaults() @@ -165,7 +159,3 @@ alias("farming_plus:tomato_1", "farming:tomato_2") alias("farming_plus:tomato_2", "farming:tomato_4") alias("farming_plus:tomato_3", "farming:tomato_6") alias("farming_plus:tomato", "farming:tomato_8") - --- Weeds - -alias("farming:weed", "default:grass_2") diff --git a/crops/artichoke.lua b/crops/artichoke.lua index 6a986aa..cb9d7a7 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -84,7 +84,9 @@ farming.registered_plants["farming:artichoke"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -94,9 +96,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 13, - decoration = {"farming:artichoke_5"}, - spawn_by = "group:tree", - num_spawn_by = 1 + y_min = 1, y_max = 13, + decoration = "farming:artichoke_5", + spawn_by = "group:tree", num_spawn_by = 1 }) diff --git a/crops/asparagus.lua b/crops/asparagus.lua index 5cd4d02..10ae3ba 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -95,15 +95,14 @@ minetest.register_decoration({ place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = -0.1, + offset = 0, scale = farming.asparagus, spread = {x = 100, y = 100, z = 100}, seed = 234, octaves = 3, persist = 0.6 }, - y_min = 8, - y_max = 32, + y_min = 8, y_max = 32, decoration = "farming:asparagus_5", param2 = 3 }) diff --git a/crops/beans.lua b/crops/beans.lua index 22ca1bd..0ebba69 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -247,7 +247,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 18, - y_max = 38, + y_min = 18, y_max = 38, decoration = "farming:beanbush" }) diff --git a/crops/beetroot.lua b/crops/beetroot.lua index 149b978..179e796 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -85,9 +85,15 @@ farming.registered_plants["farming:beetroot"] = { -- mapgen +local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"} + +if farming.eth then + spawn_on = {"ethereal:prairie_dirt"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -97,7 +103,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 20, + y_min = 1, y_max = 20, decoration = "farming:beetroot_5" }) diff --git a/crops/blackberry.lua b/crops/blackberry.lua index 2d308ac..d21c3ba 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -82,7 +82,9 @@ farming.registered_plants["farming:blackberry"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -92,7 +94,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 20, + y_min = 3, y_max = 20, decoration = "farming:blackberry_4" }) diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 85bbeeb..f4f3b3a 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -81,7 +81,9 @@ farming.registered_plants["farming:blueberries"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -91,7 +93,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 15, + y_min = 3, y_max = 15, decoration = "farming:blueberry_4" }) diff --git a/crops/cabbage.lua b/crops/cabbage.lua index c72c43f..b42eda7 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -99,7 +99,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 2, - y_max = 15, + y_min = 2, y_max = 15, decoration = "farming:cabbage_6" }) diff --git a/crops/carrot.lua b/crops/carrot.lua index 26f69c9..41911a2 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -107,17 +107,11 @@ farming.registered_plants["farming:carrot"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 30 or 20, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -127,9 +121,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, - decoration = "farming:carrot_8", - spawn_by = def.near, - num_spawn_by = def.num + y_min = 1, y_max = 30, + decoration = "farming:carrot_7" }) diff --git a/crops/chili.lua b/crops/chili.lua index 00ae994..98ad043 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -102,7 +102,7 @@ minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_rainforest_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" }, sidelen = 16, noise_params = { @@ -113,9 +113,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, - decoration = {"farming:chili_8"}, - spawn_by = "group:tree", - num_spawn_by = 1 + y_min = 5, y_max = 45, + decoration = "farming:chili_8", + spawn_by = "group:tree", num_spawn_by = 1 }) diff --git a/crops/cocoa.lua b/crops/cocoa.lua index 9f35174..ee1cfce 100644 --- a/crops/cocoa.lua +++ b/crops/cocoa.lua @@ -143,10 +143,44 @@ farming.registered_plants["farming:cocoa_beans"] = { steps = 4 } --- register async mapgen script +-- add random cocoa pods to jungle tree's -if minetest.register_mapgen_script then - minetest.register_mapgen_script(farming.path .. "/crops/cocoa_mapgen.lua") -else - dofile(farming.path .. "/crops/cocoa_mapgen.lua") -end +local random = math.random -- localise for speed + +minetest.register_on_generated(function(minp, maxp) + + if maxp.y < 0 then return end + + local pos, dir + local cocoa = minetest.find_nodes_in_area(minp, maxp, + {"default:jungletree", "mcl_core:jungletree"}) + + for n = 1, #cocoa do + + pos = cocoa[n] + + if minetest.find_node_near(pos, 1, + {"default:jungleleaves", "moretrees:jungletree_leaves_green", + "mcl_core:jungleleaves"}) then + + dir = random(80) + + if dir == 1 then pos.x = pos.x + 1 + elseif dir == 2 then pos.x = pos.x - 1 + elseif dir == 3 then pos.z = pos.z + 1 + elseif dir == 4 then pos.z = pos.z - 1 + end + + if dir < 5 + and minetest.get_node(pos).name == "air" + and minetest.get_node_light(pos) > 12 then + +--print ("Cocoa Pod added at " .. minetest.pos_to_string(pos)) + + minetest.set_node(pos, { + name = "farming:cocoa_" .. tostring(random(4)) + }) + end + end + end +end) diff --git a/crops/cocoa_mapgen.lua b/crops/cocoa_mapgen.lua deleted file mode 100644 index f4bc191..0000000 --- a/crops/cocoa_mapgen.lua +++ /dev/null @@ -1,58 +0,0 @@ - --- Localize things for speed - -local random = math.random -local jungletree_nodes = {"default:jungletree", "mcl_core:jungletree"} -local jungletree_leaves = { - "default:jungleleaves", "moretrees:jungletree_leaves_green", "mcl_core:jungleleaves"} - --- check area to place cocoa pods near jungle trees - -local function generate(vmanip, minp, maxp) - - if maxp.y < 0 then return end - - local min, max = vmanip:get_emerged_area() - local area = VoxelArea:new({MinEdge = min, MaxEdge = max}) - local data = vmanip:get_light_data() - local cocoa = minetest.find_nodes_in_area(minp, maxp, jungletree_nodes) - - for n = 1, #cocoa do - - local pos = cocoa[n] - - if minetest.find_node_near(pos, 1, jungletree_leaves) then - - local dir = random(80) - - if dir == 1 then pos.x = pos.x + 1 - elseif dir == 2 then pos.x = pos.x - 1 - elseif dir == 3 then pos.z = pos.z + 1 - elseif dir == 4 then pos.z = pos.z -1 - end - - if dir < 5 and minetest.get_node(pos).name == "air" then - - local index = area:index(pos.x, pos.y, pos.z) - - if data[index] > 12 then -- light at pos > 12 - - minetest.set_node(pos, {name = "farming:cocoa_" .. random(4)}) ---print("Cocoa Pod added at " .. minetest.pos_to_string(pos)) - end - end - end - end -end - --- mapgen - -if minetest.save_gen_notify then -- async env (5.9+) - minetest.register_on_generated(function(vmanip, minp, maxp, blockseed) - generate(vmanip, minp, maxp) - end) -else -- main thread (5.8 and earlier) - minetest.register_on_generated(function(minp, maxp, blockseed) - generate(minetest.get_mapgen_object("voxelmanip"), minp, maxp) - end) -end diff --git a/crops/coffee.lua b/crops/coffee.lua index e1f254b..6b9f024 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -80,18 +80,19 @@ farming.registered_plants["farming:coffee"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 50 or 55, - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"} +local spawn_on = { + "default:dirt_with_dry_grass", "default:dirt_with_rainforest_litter", + "default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass", + "ethereal:prairie_dirt" } +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -101,7 +102,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = def.y_max, + y_min = 20, y_max = 55, decoration = "farming:coffee_5" }) diff --git a/crops/corn.lua b/crops/corn.lua index b56d9c8..7dcbbb2 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -113,7 +113,9 @@ farming.registered_plants["farming:corn"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -123,7 +125,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 12, - y_max = 25, + y_min = 12, y_max = 27, decoration = "farming:corn_7" }) diff --git a/crops/cotton.lua b/crops/cotton.lua index bc1d142..1dc2ae4 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -172,34 +172,32 @@ minetest.register_node("farming:cotton_wild", { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or {"default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"}, - biome = mg and {"jungle"} or {"savanna"} +local spawn_on = { + "default:dry_dirt_with_dry_grass", "default:dirt_with_dry_grass", + "mcl_core:dirt_with_grass" } +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ name = "farming:cotton_wild", deco_type = "simple", - place_on = def.grow_on, + place_on = spawn_on, sidelen = 16, noise_params = { - offset = -0.1, - scale = 0.1, - spread = {x = 50, y = 50, z = 50}, + offset = 0, + scale = farming.cotton, + spread = {x = 100, y = 100, z = 100}, seed = 4242, octaves = 3, - persist = 0.7 + persist = 0.6 }, - biomes = def.biome, - y_max = 31000, - y_min = 1, + y_min = 1, y_max = 120, decoration = "farming:cotton_wild" }) - --[[ Cotton using api farming.register_plant("farming:cotton", { description = "Cotton seed", diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 66d3867..871eb43 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -80,16 +80,11 @@ farming.registered_plants["farming:cucumber"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -99,9 +94,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 20, + y_min = 1, y_max = 20, decoration = "farming:cucumber_4", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) diff --git a/crops/eggplant.lua b/crops/eggplant.lua index 941e6ee..a6877fb 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -89,16 +89,14 @@ minetest.register_decoration({ place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = -0.1, + offset = 0, scale = farming.eggplant, spread = {x = 100, y = 100, z = 100}, seed = 356, octaves = 3, persist = 0.6 }, - biomes = {"deciduous_forest"}, - y_max = 31000, - y_min = 1, - decoration = "farming:eggplant_4", + y_min = 1, y_max = 40, + decoration = "farming:eggplant_3", param2 = 3 }) diff --git a/crops/garlic.lua b/crops/garlic.lua index 51cd03c..350e1f0 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -84,7 +84,10 @@ farming.registered_plants["farming:garlic"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt", + "default:dirt_with_rainforest_litter" + }, sidelen = 16, noise_params = { offset = 0, @@ -94,9 +97,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 35, + y_min = 3, y_max = 45, decoration = "farming:garlic_5", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) diff --git a/crops/ginger.lua b/crops/ginger.lua index 103f1e0..7bc6ff5 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -86,7 +86,10 @@ farming.registered_plants["farming:ginger"] = { minetest.register_decoration({ name = "farming:ginger_4", deco_type = "simple", - place_on = {"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass", + "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -96,8 +99,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_max = 80, - y_min = 1, + y_min = 1, y_max = 80, decoration = "farming:ginger_3", param2 = 3 }) diff --git a/crops/grapes.lua b/crops/grapes.lua index 6e0fd6d..55104d7 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -250,7 +250,9 @@ minetest.register_node("farming:grapebush", { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -260,7 +262,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 25, - y_max = 50, + y_min = 25, y_max = 50, decoration = "farming:grapebush" }) diff --git a/crops/hemp.lua b/crops/hemp.lua index 4bb595b..f36ef14 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -140,7 +140,7 @@ minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_rainforest_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" }, sidelen = 16, noise_params = { @@ -151,9 +151,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 45, + y_min = 3, y_max = 45, decoration = "farming:hemp_7", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) diff --git a/crops/lettuce.lua b/crops/lettuce.lua index a950d0f..43c6e6d 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -83,7 +83,9 @@ farming.registered_plants["farming:lettuce"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -93,7 +95,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = "farming:lettuce_5" }) diff --git a/crops/melon.lua b/crops/melon.lua index b123eb0..83d4451 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -105,19 +105,12 @@ farming.registered_plants["farming:melon"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 20 or 6, - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass" + }, sidelen = 16, noise_params = { offset = 0, @@ -127,9 +120,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, + y_min = 1, y_max = 3, decoration = "farming:melon_8", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) diff --git a/crops/mint.lua b/crops/mint.lua index 9894e7e..00a99c0 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -105,7 +105,7 @@ minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_coniferous_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:bamboo_dirt" }, sidelen = 16, noise_params = { @@ -116,9 +116,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 0, - y_max = 75, + y_min = 1, y_max = 75, decoration = "farming:mint_4", - spawn_by = {"group:water", "group:sand"}, - num_spawn_by = 1 + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) diff --git a/crops/onion.lua b/crops/onion.lua index 1c56b4f..e62eb44 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -96,7 +96,9 @@ farming.registered_plants["farming:onion"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -106,7 +108,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 28, + y_min = 5, y_max = 28, decoration = "farming:onion_5" }) diff --git a/crops/parsley.lua b/crops/parsley.lua index 4be7ab9..b63b96a 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -75,7 +75,10 @@ farming.registered_plants["farming:parsley"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt", + "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -85,7 +88,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 10, - y_max = 40, + y_min = 10, y_max = 40, decoration = "farming:parsley_3" }) diff --git a/crops/peas.lua b/crops/peas.lua index 467d08e..4dc1ec3 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -94,7 +94,9 @@ farming.registered_plants["farming:pea_pod"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -104,7 +106,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 25, - y_max = 55, + y_min = 25, y_max = 55, decoration = "farming:pea_5" }) diff --git a/crops/pepper.lua b/crops/pepper.lua index 2147929..df24ac8 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -152,16 +152,12 @@ farming.registered_plants["farming:pepper"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or { - "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"} -} - minetest.register_decoration({ deco_type = "simple", - place_on = def.grow_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -171,9 +167,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"}, - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 3f18eed..f4076ff 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -117,18 +117,18 @@ farming.registered_plants["farming:pineapple"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass"}, - grow_near = mg and "group:sand" or nil, - num = mg and 1 or -1 +local spawn_on = { + "default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass", + "mcl_core:dirt_with_grass" } +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = def.grow_on, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -138,9 +138,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 11, - y_max = 30, - decoration = {"farming:pineapple_8"}, - spawn_by = def.grow_near, - num_spawn_by = def.num + y_min = 11, y_max = 30, + decoration = "farming:pineapple_8" }) diff --git a/crops/potato.lua b/crops/potato.lua index 1f76493..f32ca93 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -102,7 +102,10 @@ farming.registered_plants["farming:potato"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -112,7 +115,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 15, - y_max = 40, + y_min = 5, y_max = 40, decoration = "farming:potato_3" }) diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index de3fe08..d133dfe 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -108,17 +108,12 @@ farming.registered_plants["farming:pumpkin"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 20 or 6, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass" + }, sidelen = 16, noise_params = { offset = 0, @@ -128,9 +123,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, + y_min = 1, y_max = 3, decoration = "farming:pumpkin_8", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 210225d..6e04e6b 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -82,7 +82,9 @@ farming.registered_plants["farming:raspberries"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -92,7 +94,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 15, + y_min = 3, y_max = 15, decoration = "farming:raspberry_4" }) diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index 15ff9df..afbffc1 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -87,7 +87,9 @@ farming.registered_plants["farming:rhubarb"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -97,7 +99,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 20, + y_min = 3, y_max = 20, decoration = "farming:rhubarb_3" }) diff --git a/crops/soy.lua b/crops/soy.lua index 78e9390..194243c 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -110,17 +110,13 @@ farming.registered_plants["farming:soy_pod"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"} -} - minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -130,7 +126,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = 50, - decoration = "farming:soy_6" + y_min = 20, y_max = 50, + decoration = "farming:soy_5" }) diff --git a/crops/spinach.lua b/crops/spinach.lua index e84f976..56a8455 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -89,16 +89,14 @@ minetest.register_decoration({ place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = -0.1, + offset = 0, scale = farming.spinach, spread = {x = 100, y = 100, z = 100}, seed = 910, octaves = 3, persist = 0.6 }, - biomes = {"deciduous_forest"}, - y_max = 31000, - y_min = 1, + y_min = 1, y_max = 100, decoration = "farming:spinach_4", param2 = 3 }) diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 9d49485..8c95ff5 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -114,7 +114,9 @@ farming.registered_plants["ethereal:strawberry"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -124,7 +126,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = 55, + y_min = 15, y_max = 55, decoration = "ethereal:strawberry_7" }) diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 9738d5e..55e0fdb 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -132,7 +132,9 @@ farming.registered_plants["farming:sunflower"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -142,7 +144,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 10, - y_max = 40, + y_min = 10, y_max = 40, decoration = "farming:sunflower_8" }) diff --git a/crops/tomato.lua b/crops/tomato.lua index b97246c..a53b8bf 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -111,7 +111,9 @@ farming.registered_plants["farming:tomato"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -121,7 +123,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 25, + y_min = 5, y_max = 25, decoration = "farming:tomato_7" }) diff --git a/crops/vanilla.lua b/crops/vanilla.lua index 307cd46..d07680c 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -109,7 +109,9 @@ farming.registered_plants["farming:vanilla"] = { minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -119,7 +121,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = "farming:vanilla_7" }) diff --git a/farming.conf_example b/farming.conf_example index 9840d7a..d22ba2e 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -9,40 +9,41 @@ farming.asparagus = 0.002 farming.eggplant = 0.002 farming.spinach = 0.002 -farming.carrot = 0.001 -farming.potato = 0.001 -farming.tomato = 0.001 -farming.cucumber = 0.001 -farming.corn = 0.001 -farming.coffee = 0.001 -farming.melon = 0.001 -farming.pumpkin = 0.001 +farming.carrot = 0.002 +farming.potato = 0.002 +farming.tomato = 0.002 +farming.cucumber = 0.002 +farming.corn = 0.002 +farming.coffee = 0.002 +farming.melon = 0.009 +farming.pumpkin = 0.009 farming.cocoa = true -- true or false only -farming.raspberry = 0.001 -farming.blueberry = 0.001 -farming.rhubarb = 0.001 -farming.beans = 0.001 -farming.grapes = 0.001 +farming.raspberry = 0.002 +farming.blueberry = 0.002 +farming.rhubarb = 0.002 +farming.beans = 0.002 +farming.grapes = 0.002 farming.barley = true -- true or false only farming.chili = 0.003 farming.hemp = 0.003 -farming.garlic = 0.001 -farming.onion = 0.001 +farming.garlic = 0.002 +farming.onion = 0.002 farming.pepper = 0.002 -farming.pineapple = 0.001 -farming.peas = 0.001 -farming.beetroot = 0.001 +farming.pineapple = 0.003 +farming.peas = 0.002 +farming.beetroot = 0.002 farming.mint = 0.005 -farming.cabbage = 0.001 +farming.cabbage = 0.002 farming.blackberry = 0.002 -farming.lettuce = 0.001 -farming.soy = 0.001 -farming.vanilla = 0.001 -farming.artichoke = 0.001 +farming.lettuce = 0.002 +farming.soy = 0.002 +farming.vanilla = 0.002 +farming.artichoke = 0.002 farming.parsley = 0.002 -farming.sunflower = 0.001 +farming.sunflower = 0.002 farming.ginger = 0.002 -farming.strawberry = not minetest.get_modpath("ethereal") and 0.002 +farming.cotton = 0.003 +farming.strawberry = 0.002 farming.grains = true -- true or false only farming.rice = true diff --git a/hoes.lua b/hoes.lua index e686575..4968928 100644 --- a/hoes.lua +++ b/hoes.lua @@ -244,7 +244,8 @@ local function hoe_area(pos, player) -- remove flora (grass, flowers etc.) local res = minetest.find_nodes_in_area( {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, - {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, {"group:flora"}) + {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, + {"group:flora", "default:dry_shrub"}) for n = 1, #res do minetest.swap_node(res[n], {name = "air"}) @@ -252,9 +253,9 @@ local function hoe_area(pos, player) -- replace dirt with tilled soil res = minetest.find_nodes_in_area_under_air( - {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, - {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, - {"group:soil"}) + {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, + {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, + {"group:soil", "ethereal:dry_dirt"}) for n = 1, #res do minetest.swap_node(res[n], {name = "farming:soil"}) diff --git a/init.lua b/init.lua index a562edc..8ff4fe4 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ local S = minetest.get_translator("farming") farming = { mod = "redo", - version = "20240912", + version = "20240924", path = minetest.get_modpath("farming"), select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}}, select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}}, @@ -21,6 +21,7 @@ farming = { mapgen = minetest.get_mapgen_setting("mg_name"), use_utensils = minetest.settings:get_bool("farming_use_utensils") ~= false, mtg = minetest.get_modpath("default"), + eth = minetest.get_modpath("ethereal"), mcl = minetest.get_modpath("mcl_core"), mcl_hardness = 0.01, translate = S @@ -655,40 +656,41 @@ end farming.asparagus = 0.002 farming.eggplant = 0.002 farming.spinach = 0.002 -farming.carrot = 0.001 -farming.potato = 0.001 -farming.tomato = 0.001 -farming.cucumber = 0.001 -farming.corn = 0.001 -farming.coffee = 0.001 -farming.melon = 0.001 -farming.pumpkin = 0.001 +farming.carrot = 0.002 +farming.potato = 0.002 +farming.tomato = 0.002 +farming.cucumber = 0.002 +farming.corn = 0.002 +farming.coffee = 0.002 +farming.melon = 0.009 +farming.pumpkin = 0.009 farming.cocoa = true -farming.raspberry = 0.001 -farming.blueberry = 0.001 -farming.rhubarb = 0.001 -farming.beans = 0.001 -farming.grapes = 0.001 +farming.raspberry = 0.002 +farming.blueberry = 0.002 +farming.rhubarb = 0.002 +farming.beans = 0.002 +farming.grapes = 0.002 farming.barley = true farming.chili = 0.003 farming.hemp = 0.003 -farming.garlic = 0.001 -farming.onion = 0.001 +farming.garlic = 0.002 +farming.onion = 0.002 farming.pepper = 0.002 -farming.pineapple = 0.001 -farming.peas = 0.001 -farming.beetroot = 0.001 +farming.pineapple = 0.003 +farming.peas = 0.002 +farming.beetroot = 0.002 farming.mint = 0.005 -farming.cabbage = 0.001 +farming.cabbage = 0.002 farming.blackberry = 0.002 -farming.soy = 0.001 -farming.vanilla = 0.001 -farming.lettuce = 0.001 -farming.artichoke = 0.001 +farming.soy = 0.002 +farming.vanilla = 0.002 +farming.lettuce = 0.002 +farming.artichoke = 0.002 farming.parsley = 0.002 -farming.sunflower = 0.001 +farming.sunflower = 0.002 farming.ginger = 0.002 farming.strawberry = 0.002 +farming.cotton = 0.003 farming.grains = true farming.rice = true diff --git a/item_food.lua b/item_food.lua index c7f7f19..36ae280 100644 --- a/item_food.lua +++ b/item_food.lua @@ -180,7 +180,7 @@ farming.add_eatable("farming:muffin_blueberry", 2) minetest.register_craftitem("farming:tomato_soup", { description = S("Tomato Soup"), inventory_image = "farming_tomato_soup.png", - groups = {compostability = 65}, + groups = {compostability = 65, drink = 1}, on_use = minetest.item_eat(8, "farming:bowl") }) @@ -662,7 +662,8 @@ farming.add_eatable("farming:gingerbread_man", 2) minetest.register_craftitem("farming:mint_tea", { description = S("Mint Tea"), inventory_image = "farming_mint_tea.png", - on_use = minetest.item_eat(2, a.drinking_glass) + on_use = minetest.item_eat(2, a.drinking_glass), + groups = {drink = 1} }) farming.add_eatable("farming:mint_tea", 2) @@ -671,7 +672,7 @@ farming.add_eatable("farming:mint_tea", 2) minetest.register_craftitem("farming:onion_soup", { description = S("Onion Soup"), inventory_image = "farming_onion_soup.png", - groups = {compostability = 65}, + groups = {compostability = 65, drink = 1}, on_use = minetest.item_eat(6, a.bowl) }) @@ -682,7 +683,7 @@ farming.add_eatable("farming:onion_soup", 6) minetest.register_craftitem("farming:pea_soup", { description = S("Pea Soup"), inventory_image = "farming_pea_soup.png", - groups = {compostability = 65}, + groups = {compostability = 65, drink = 1}, on_use = minetest.item_eat(4, a.bowl) }) @@ -1008,7 +1009,8 @@ if not farming.mcl then minetest.register_craftitem("farming:beetroot_soup", { description = S("Beetroot Soup"), inventory_image = "farming_beetroot_soup.png", - on_use = minetest.item_eat(6, "farming:bowl") + on_use = minetest.item_eat(6, "farming:bowl"), + groups = {drink = 1} }) farming.add_eatable("farming:beetroot_soup", 6) diff --git a/item_non_food.lua b/item_non_food.lua index 99b4f3a..d118bf3 100644 --- a/item_non_food.lua +++ b/item_non_food.lua @@ -96,6 +96,42 @@ minetest.register_node("farming:straw", { _mcl_blast_resistance = 1 }) +-- weed + +minetest.register_node("farming:weed", { + description = S("Weed"), + drawtype = "plantlike", + tiles = {"farming_weed.png"}, + inventory_image = "farming_weed.png", + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 2, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + waving = 1, + selection_box = farming.select, + groups = {snappy = 3, flammable = 4, plant = 1, attached_node = 1}, + _mcl_hardness = farming.mcl_hardness, + is_ground_content = false, + sounds = farming.node_sound_leaves_defaults() +}) + +-- weed bale + +minetest.register_node("farming:weed_bale", { + description = S("Weed Bale"), + tiles = { + "farming_weed_bale_top.png", "farming_weed_bale_top.png", + "farming_weed_bale_side.png" + }, + paramtype2 = "facedir", + groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30}, + sounds = farming.node_sound_leaves_defaults(), + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 +}) + -- hemp oil minetest.register_node("farming:hemp_oil", { @@ -108,8 +144,7 @@ minetest.register_node("farming:hemp_oil", { is_ground_content = false, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} }, groups = { food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1, @@ -161,8 +196,7 @@ minetest.register_node("farming:hemp_rope", { is_ground_content = false, sounds = farming.node_sound_leaves_defaults(), selection_box = { - type = "fixed", - fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} + type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} }, _mcl_hardness = 0.8, _mcl_blast_resistance = 1 diff --git a/item_recipes.lua b/item_recipes.lua index 6b8d265..69aa770 100644 --- a/item_recipes.lua +++ b/item_recipes.lua @@ -1118,8 +1118,8 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:mortar_pestle", recipe = { - {a.stone, "group:stick", a.stone}, - {"", a.stone, ""} + {"group:stone", "group:stick", "group:stone"}, + {"", "group:stone", ""} } }) @@ -1139,8 +1139,8 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:juicer", recipe = { - {"", a.stone, ""}, - {a.stone, "", a.stone} + {"", "group:stone", ""}, + {"group:stone", "", "group:stone"} } }) @@ -1253,6 +1253,25 @@ minetest.register_craft({ recipe = {{"farming:straw"}} }) + +-- weed bale + +local tmp = "farming:weed" + +minetest.register_craft({ + output = "farming:weed_bale", + recipe = { + {tmp, tmp, tmp}, + {tmp, tmp, tmp}, + {tmp, tmp, tmp} + } +}) + +minetest.register_craft({ + output = tmp .. " 9", + recipe = {{"farming:weed_bale"}} +}) + --= Recipes we shouldn't add when using Mineclonia/VoxeLibre if not farming.mcl then @@ -1400,6 +1419,8 @@ minetest.register_craft({output = a.dye_yellow, recipe = {{"group:food_onion"}}} minetest.register_craft({type = "fuel", recipe = "farming:straw", burntime = 3}) minetest.register_craft({type = "fuel", recipe = "farming:wheat", burntime = 1}) +minetest.register_craft({type = "fuel", recipe = "farming:weed_bale", burntime = 3}) +minetest.register_craft({type = "fuel", recipe = "farming:weed", burntime = 1}) minetest.register_craft({type = "fuel", recipe = "farming:bowl",burntime = 10}) minetest.register_craft({type = "fuel", recipe = "farming:string", burntime = 1}) minetest.register_craft({type = "fuel", recipe = "farming:cotton", burntime = 1}) diff --git a/locale/farming.de.tr b/locale/farming.de.tr index 815e115..f2da0c6 100644 --- a/locale/farming.de.tr +++ b/locale/farming.de.tr @@ -1,88 +1,79 @@ # textdomain: farming -Artichoke= -Asparagus= -Barley Seed=Gerstenkörner -Barley=Gerste -Green Beans=Grüne Bohnen -Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen) -Beetroot=Rote Beete -Beetroot Soup=Rote Beete Suppe -Blackberries= -Wild Blueberries=Wilde Blaubeeren -Blueberry Muffin=Blaubeermuffin -Blueberry Pie=Blaubeerkuchen -Cabbage=Kohl -Carrot=Möhre -Carrot Juice=Möhrensaft -Golden Carrot=Goldene Möhre -Chili Pepper=Chili -Bowl of Chili=Chili Schale -Chili Powder= -Raw Cocoa Beans= -Cocoa Beans=Kakaobohne -Cookie=Keks -Bar of Dark Chocolate=Tafel Zartbitterschokolade -Chocolate Block=Schokoladenstück -Coffee Beans=Kaffeebohnen -Cup of Coffee=Tasse Kaffee Banana=Banane Banana Leaves=Bananenblätter -Orange=Apfelsine +Orange=Orange +Artichoke=Artischocke + Crop=-Pflanze +Asparagus=Spargel +Barley Seed=Gerstensamen +Barley=Gerste +Green Beans=Grüne Bohnen +Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den@nAckerboden stellen) +Beetroot=Rote Beete +Blackberries=Brombeeren +Blackberry=Brombeere +Wild Blueberries=Wilde Blaubeeren +Blueberry=Blaubeere +Cabbage=Kohl +Carrot=Möhre +Chili Pepper=Chili +Raw Cocoa Beans=Rohe Kakaobohnen +Cocoa Beans=Kakaobohnen +Coffee Beans=Kaffeebohnen +Coffee=Kaffee Corn=Mais -Corn on the Cob=Maiskolben -Popcorn= -Cornstarch=Speisestärke -Bottle of Ethanol=Flasche Ethanol -Wild Cotton=Wilde Baumwolle Cotton Seed=Baumwollsamen Cotton=Baumwolle -String=Faden +Wild Cotton=Wilde Baumwolle Cucumber=Gurke -Eggplant= -Glass of Water= -Sugar=Zucker -Sugar Cube= -Caramel= -Salt=Salz -Mayonnaise= -Rose Water=Rosenwasser -Turkish Delight=Lokum -Garlic Bread=Knoblauchbrot -Donut=Donut -Chocolate Donut=Schokodonut -Apple Donut=Apfeldonut -Porridge=Haferbrei -Jaffa Cake=Jaffakeks -Apple Pie=Apfelkuchen -Cactus Juice=Kaktussaft -Pasta=Pasta -Mac & Cheese= -Spaghetti=Spaghetti -Bibimbap=Bibimbap -Burger= -Salad=Salat -Triple Berry Smoothie= -Spanish Potatoes= -Potato omelet= -Paella= -Vanilla Flan= -Vegan Cheese= -Onigiri= -Gyoza= -Mochi= -Gingerbread Man= +Eggplant=Aubergine Garlic clove=Knoblauchzehe Garlic=Knoblauch -Garlic Braid=Knoblauchzopf -Ginger= +Ginger=Lebkuchen Grapes=Weintrauben -Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen) +Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den@nAckerboden stellen) Hemp Seed=Hanfsamen Hemp Leaf=Hanfblatt -Bottle of Hemp Oil=Flasche mit Hanföl -Hemp Fibre=Hanffaser -Hemp Block=Hanfblock -Hemp Rope=Hanfseil +Hemp=Hanf +Lettuce=Kopfsalat +Melon Slice=Melonenscheibe +Melon=Melone +Mint Seeds=Minzsamen +Mint Leaf=Minzblatt +Mint=Minze +Onion=Zwiebel +Parsley=Petersilie +Pea Pod=Erbsenschote +Pea=Erbse +Peppercorn=Pfefferkorn +Green Pepper=Grüne Paprika +Yellow Pepper=Gelbe Paprika +Red Pepper=Rote Paprika +Pepper=Paprika +Pineapple Top=Ananasdeckel +Pineapple=Ananas +Potato=Kartoffel +Pumpkin Slice=Kürbisscheibe +Pumpkin=Kürbis +Raspberries=Himbeeren +Raspberry=Himbeere +Rhubarb=Rhabarber +Rice Seed=Reissamen +Rice=Reis +Rye seed=Roggensamen +Rye=Roggen +Oat seed=Hafersamen +Oats=Hafer +Soy Pod=Sojaschote +Soy=Soja +Spinach=Spinat +Strawberry=Erdbeere +Sunflower Seeds=Sonnenblumensamen +Sunflower=Sonnenblume +Tomato=Tomate +Vanilla=Vanille +Wheat Seed=Weizensamen +Wheat=Weizen Hoe=Hacke Wooden Hoe=Holzhacke Stone Hoe=Steinhacke @@ -90,72 +81,90 @@ Steel Hoe=Stahlhacke Bronze Hoe=Bronzehacke Mese Hoe=Mesehacke Diamond Hoe=Diamanthacke -Wood Hoe= -Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen) -Mithril Scythe (Use to harvest and replant crops)= +Wood Hoe=Holzhacke +Hoe Bomb (use or throw on grassy areas to hoe land)=Hackenbombe (Auf Grasland werfen oder benutzen,@num Land zu bestellen) +Mithril Scythe (Use to harvest and replant crops)=Mithrilsichel (Benutzen, um Nutzpflanzen zu ernten und neu zu pflanzen) Seed=Saatgut -Lettuce= -Melon Slice=Melonenscheibe -Melon=Melone -Mint Seeds=Minzsamen -Mint Leaf=Minzblatt +Flour=Mehl +Garlic Braid=Knoblauchzopf +Corn on the Cob=Maiskolben +Popcorn=Popcorn +Cornstarch=Speisestärke +Cup of Coffee=Tasse Kaffee +Bar of Dark Chocolate=Tafel Zartbitterschokolade +Chocolate Block=Schokoladenblock +Bowl of Chili=Schüssel mit Chili +Chili Powder=Chilipulver +Carrot Juice=Möhrensaft +Blueberry Pie=Blaubeerkuchen +Blueberry Muffin=Blaubeermuffin +Tomato Soup=Tomatensuppe +Sliced Bread=Geschnittenes Brot +Toast=Toast +Toast Sandwich=Toast-Sandwich +Glass of Water=Glas Wasser +Sugar Cube=Zuckerwürfel +Caramel=Karamell +Salt=Salz +Salt crystal=Salzkristall +Mayonnaise=Mayonnaise +Rose Water=Rosenwasser +Turkish Delight=Lokum +Garlic Bread=Knoblauchbrot +Donut=Donut +Chocolate Donut=Schokodonut +Apple Donut=Apfeldonut +Porridge=Haferbrei +Jaffa Cake=Jaffa +Apple Pie=Apfelkuchen +Cactus Juice=Kaktussaft +Pasta=Pasta +Mac & Cheese=Makkaroni mit Käse +Spaghetti=Spaghetti +Bibimbap=Bibimbap +Burger=Burger +Salad=Salat +Triple Berry Smoothie=Dreibeersmoothie +Spanish Potatoes=Spanische Kartoffeln +Potato omelette=Kartoffelomelette +Paella=Paella +Vanilla Flan=Vanilletorte +Vegan Cheese=Veganer Käse +Vegan Butter=Vegane Butter +Onigiri=Onigiri +Gyoza=Gyoza +Mochi=Mochi +Gingerbread Man=Lebkuchenmann Mint Tea=Minztee -Onion=Zwiebel Onion Soup=Zwiebelsuppe -Parsley= -Pea Pod=Erbsenschote Pea Soup=Erbsensuppe -Peppercorn=Pfefferkorn -Green Pepper= -Yellow Pepper= -Red Pepper= Ground Pepper=Gemahlener Pfeffer -Pineapple Top=Ananasdeckel -Pineapple=Ananas Pineapple Ring=Ananasscheibe Pineapple Juice=Ananassaft -Potato=Kartoffel -Baked Potato=Ofenkartoffel -Cucumber and Potato Salad=Kartoffelsalat mit Gurke -Pumpkin Slice=Kürbisscheibe -Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten) -Scarecrow Bottom=Vogelscheuchengestell -Pumpkin Bread=Kürbisbrot +Cucumber and Potato Salad=Gurken-Kartoffelsalat Pumpkin Dough=Kürbisteig -Pumpkin=Kürbis -Raspberries=Himbeeren +Pumpkin Bread=Kürbisbrot Raspberry Smoothie=Himbeersmoothie -Rhubarb=Rhabarber Rhubarb Pie=Rhabarberkuchen -Rice Seed= -Rice=Reis -Rice Bread=Reiswaffel Rice Flour=Reismehl -Rye seed=Roggensaat -Rye=Roggen -Oat seed=Hafersamen -Oats=Hafer +Rice Bread=Reiswaffel Multigrain Flour=Mehrkornmehl Multigrain Bread=Mehrkornbrot -Savanna Soil=Savannaerde -Wet Savanna Soil=Feuchte Savannaerde -Soil=Ackerboden -Wet Soil=Bewässerter Ackerboden -Soy Pod= -Soy Sauce= -Soy Milk= -Tofu= -Cooked Tofu= -Spinach= -Strawberry=Erdbeere -Sunflower= -Sunflower Seeds= -Toasted Sunflower Seeds= -Bottle of Sunflower Oil= -Sunflower Seed Bread= -Tomato=Tomate -Tomato Soup= -Wooden Bowl=Holzschale +Soy Sauce=Sojasoße +Soy Milk=Sojamilch +Tofu=Tofu +Cooked Tofu=Gekochter Tofu +Toasted Sunflower Seeds=Geröstete Sonnenblumensamen +Bottle of Sunflower Oil=Flasche Sonnenblumenöl +Sunflower Seed Bread=Sonnenblumensamenbrot +Vanilla Extract=Vanilleextrakt +Jerusalem Artichokes=Jerusalemartischocken +Bread=Brot +Cookie=Keks +Golden Carrot=Goldene Möhre +Beetroot Soup=Rote-Beete-Suppe +Sugar=Zucker +Baked Potato=Ofenkartoffel Saucepan=Kasserolle Cooking Pot=Kochtopf Baking Tray=Kuchenblech @@ -164,13 +173,17 @@ Mortar and Pestle=Mörser und Stößel Cutting Board=Schneidebrett Juicer=Entsafter Glass Mixing Bowl=Glasschüssel -Vanilla= -Vanilla Extract= -Wheat Seed=Weizenkörner -Wheat=Weizen +Bottle of Ethanol=Flasche Ethanol Straw=Stroh -Flour=Mehl -Bread=Brot -Sliced Bread=Geschnittenes Brot -Toast=Toast -Toast Sandwich=Toast Sandwich +Bottle of Hemp Oil=Flasche mit Hanföl +Hemp Fibre=Hanffaser +Hemp Block=Hanfblock +Hemp Rope=Hanfseil +Scarecrow Bottom=Vogelscheuchengestell +Wooden Bowl=Holzschale +String=Faden +Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Hauen zum Ein- und Ausschalten) +Savanna Soil=Savannenerde +Wet Savanna Soil=Feuchte Savannenerde +Soil=Ackerboden +Wet Soil=Feuchter Ackerboden diff --git a/lucky_block.lua b/lucky_block.lua index 5aa5f4c..5d5f724 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -105,5 +105,6 @@ lucky_block:add_blocks({ {name = "farming:grapebush", max = 5}, {name = "farming:asparagus", max = 7} }}, - {"dro", {"farming:chili_powder"}, 5} + {"dro", {"farming:chili_powder"}, 5}, + {"dro", {"farming:weed"}, 9}, }) diff --git a/settingtypes.txt b/settingtypes.txt index 7573de9..6eded44 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -2,3 +2,5 @@ farming_stage_length (Farming Stage Length) float 160.0 farming_use_utensils (Use utensil recipes) bool true + +farming_disable_weeds (Disable Weed growth) bool false diff --git a/soil.lua b/soil.lua index 7572d57..aa6a2c9 100644 --- a/soil.lua +++ b/soil.lua @@ -194,3 +194,30 @@ minetest.register_abm({ end end }) + +-- those darn weeds + +if minetest.settings:get_bool("farming_disable_weeds") ~= true then + + minetest.register_abm({ + nodenames = {"group:field"}, + neighbors = {"air"}, + interval = 50, + chance = 35, + catch_up = false, + + action = function(pos, node) + + if minetest.find_node_near(pos, 4, {"farming:scarecrow_bottom"}) then + return + end + + pos.y = pos.y + 1 + + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "farming:weed", param2 = 2}) + end + end + }) +end + diff --git a/textures/farming_burger.png b/textures/farming_burger.png index 59bc340..94e38fc 100644 Binary files a/textures/farming_burger.png and b/textures/farming_burger.png differ diff --git a/textures/farming_pineapple.png b/textures/farming_pineapple.png index febf22a..c2d2ceb 100644 Binary files a/textures/farming_pineapple.png and b/textures/farming_pineapple.png differ diff --git a/textures/farming_pineapple_1.png b/textures/farming_pineapple_1.png index 262eff7..7daa917 100644 Binary files a/textures/farming_pineapple_1.png and b/textures/farming_pineapple_1.png differ diff --git a/textures/farming_pineapple_2.png b/textures/farming_pineapple_2.png index 4b96d17..6fe2a14 100644 Binary files a/textures/farming_pineapple_2.png and b/textures/farming_pineapple_2.png differ diff --git a/textures/farming_pineapple_3.png b/textures/farming_pineapple_3.png index 90464a1..e9a625a 100644 Binary files a/textures/farming_pineapple_3.png and b/textures/farming_pineapple_3.png differ diff --git a/textures/farming_pineapple_4.png b/textures/farming_pineapple_4.png index be58e53..5bc6415 100644 Binary files a/textures/farming_pineapple_4.png and b/textures/farming_pineapple_4.png differ diff --git a/textures/farming_pineapple_5.png b/textures/farming_pineapple_5.png index 2526f83..ddf2dd5 100644 Binary files a/textures/farming_pineapple_5.png and b/textures/farming_pineapple_5.png differ diff --git a/textures/farming_pineapple_6.png b/textures/farming_pineapple_6.png index 741e0e3..a674df2 100644 Binary files a/textures/farming_pineapple_6.png and b/textures/farming_pineapple_6.png differ diff --git a/textures/farming_pineapple_7.png b/textures/farming_pineapple_7.png index 22bad23..5158af3 100644 Binary files a/textures/farming_pineapple_7.png and b/textures/farming_pineapple_7.png differ diff --git a/textures/farming_pineapple_8.png b/textures/farming_pineapple_8.png index 5182c4f..006a54e 100644 Binary files a/textures/farming_pineapple_8.png and b/textures/farming_pineapple_8.png differ diff --git a/textures/farming_pineapple_top.png b/textures/farming_pineapple_top.png index f653d83..78e3f36 100644 Binary files a/textures/farming_pineapple_top.png and b/textures/farming_pineapple_top.png differ diff --git a/textures/farming_weed.png b/textures/farming_weed.png new file mode 100644 index 0000000..8d65d18 Binary files /dev/null and b/textures/farming_weed.png differ diff --git a/textures/farming_weed_bale_side.png b/textures/farming_weed_bale_side.png new file mode 100644 index 0000000..7344c22 Binary files /dev/null and b/textures/farming_weed_bale_side.png differ diff --git a/textures/farming_weed_bale_top.png b/textures/farming_weed_bale_top.png new file mode 100644 index 0000000..648423b Binary files /dev/null and b/textures/farming_weed_bale_top.png differ