From 97d15d3ea17d28bb824d6c585a2f06cb12736cc0 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 13 Sep 2022 12:30:10 +0100 Subject: [PATCH] added spinach; eggplant; asparagus; Chili Powder; new Onigiri (thanks Atlante for new textures), mapgen now inside own crop file, added new lucky blocks --- README.md | 4 +- crops/artichoke.lua | 22 ++- crops/asparagus.lua | 95 ++++++++++++ crops/beans.lua | 18 +++ crops/beetroot.lua | 18 +++ crops/blackberry.lua | 20 ++- crops/blueberry.lua | 18 +++ crops/cabbage.lua | 18 +++ crops/carrot.lua | 28 ++++ crops/chili.lua | 36 +++++ crops/coffee.lua | 26 ++++ crops/corn.lua | 18 +++ crops/cotton.lua | 24 +++ crops/cucumber.lua | 27 ++++ crops/eggplant.lua | 87 +++++++++++ crops/garlic.lua | 20 +++ crops/grapes.lua | 18 +++ crops/hemp.lua | 22 ++- crops/lettuce.lua | 20 ++- crops/melon.lua | 30 ++++ crops/mint.lua | 20 +++ crops/onion.lua | 18 +++ crops/parsley.lua | 18 +++ crops/peas.lua | 18 +++ crops/pepper.lua | 23 +++ crops/pineapple.lua | 25 ++++ crops/potato.lua | 18 +++ crops/pumpkin.lua | 28 ++++ crops/raspberry.lua | 18 +++ crops/rhubarb.lua | 18 +++ crops/soy.lua | 25 ++++ crops/spinach.lua | 88 +++++++++++ crops/strawberry.lua | 18 +++ crops/sunflower.lua | 18 +++ crops/tomato.lua | 18 +++ crops/vanilla.lua | 18 +++ farming.conf_example | 3 + init.lua | 14 +- license.txt | 21 +++ lucky_block.lua | 6 + mapgen.lua | 241 ------------------------------ textures/farming_asparagus.png | Bin 0 -> 153 bytes textures/farming_asparagus_1.png | Bin 0 -> 115 bytes textures/farming_asparagus_2.png | Bin 0 -> 140 bytes textures/farming_asparagus_3.png | Bin 0 -> 165 bytes textures/farming_asparagus_4.png | Bin 0 -> 177 bytes textures/farming_asparagus_5.png | Bin 0 -> 200 bytes textures/farming_chili_powder.png | Bin 0 -> 205 bytes textures/farming_eggplant.png | Bin 0 -> 194 bytes textures/farming_eggplant_1.png | Bin 0 -> 113 bytes textures/farming_eggplant_2.png | Bin 0 -> 137 bytes textures/farming_eggplant_3.png | Bin 0 -> 170 bytes textures/farming_eggplant_4.png | Bin 0 -> 195 bytes textures/farming_onigiri.png | Bin 204 -> 166 bytes textures/farming_rice.png | Bin 325 -> 207 bytes textures/farming_spinach.png | Bin 0 -> 166 bytes textures/farming_spinach_1.png | Bin 0 -> 119 bytes textures/farming_spinach_2.png | Bin 0 -> 139 bytes textures/farming_spinach_3.png | Bin 0 -> 146 bytes textures/farming_spinach_4.png | Bin 0 -> 163 bytes 60 files changed, 992 insertions(+), 251 deletions(-) create mode 100644 crops/asparagus.lua create mode 100644 crops/eggplant.lua create mode 100644 crops/spinach.lua delete mode 100644 mapgen.lua create mode 100644 textures/farming_asparagus.png create mode 100644 textures/farming_asparagus_1.png create mode 100644 textures/farming_asparagus_2.png create mode 100644 textures/farming_asparagus_3.png create mode 100644 textures/farming_asparagus_4.png create mode 100644 textures/farming_asparagus_5.png create mode 100644 textures/farming_chili_powder.png create mode 100644 textures/farming_eggplant.png create mode 100644 textures/farming_eggplant_1.png create mode 100644 textures/farming_eggplant_2.png create mode 100644 textures/farming_eggplant_3.png create mode 100644 textures/farming_eggplant_4.png create mode 100644 textures/farming_spinach.png create mode 100644 textures/farming_spinach_1.png create mode 100644 textures/farming_spinach_2.png create mode 100644 textures/farming_spinach_3.png create mode 100644 textures/farming_spinach_4.png diff --git a/README.md b/README.md index 81e352f..61bc474 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ There is one abm for new group `group:growing`. ### Changelog: -- NEXT - 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 +- 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) - 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) - 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna @@ -219,4 +219,4 @@ options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton t - 0.1 - Fixed growing bug - 0.0 - Initial release -### Lucky Blocks: 39 +### Lucky Blocks: 41 diff --git a/crops/artichoke.lua b/crops/artichoke.lua index 92143f6..5604b09 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -19,7 +19,7 @@ local def = { sunlight_propagates = true, walkable = false, buildable_to = true, - drop = "", + drop = "", selection_box = farming.select, groups = { snappy = 3, flammable = 2, plant = 1, attached_node = 1, @@ -62,3 +62,23 @@ farming.registered_plants["farming:artichoke"] = { maxlight = 15, steps = 5 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.artichoke, + spread = {x = 100, y = 100, z = 100}, + seed = 448, + octaves = 3, + persist = 0.6 + }, + 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 new file mode 100644 index 0000000..558e7da --- /dev/null +++ b/crops/asparagus.lua @@ -0,0 +1,95 @@ +-- asparagus +minetest.register_craftitem("farming:asparagus", { + description = "asparagus", + inventory_image = "farming_asparagus.png", + groups = {seed = 2, food_asparagus = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:asparagus_1") + end, + on_use = minetest.item_eat(1) +}) + +-- asparagus definition +local def = { + drawtype = "plantlike", + tiles = {"farming_asparagus_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = { + type = "fixed", + fixed = {-6 / 16, -8 / 8, -6 / 16, 6 / 16, 1 / 55, 6 / 16}, + }, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults(), + place_param2 = 3 +} + +-- stage 1 +minetest.register_node("farming:asparagus_1", table.copy(def)) + + +-- stage 2 +def.tiles = {"farming_asparagus_2.png"} +minetest.register_node("farming:asparagus_2", table.copy(def)) + + +-- stage 3 +def.tiles = {"farming_asparagus_3.png"} +minetest.register_node("farming:asparagus_3", table.copy(def)) + + +-- stage 4 +def.tiles = {"farming_asparagus_4.png"} +def.drop = { + items = { + {items = {"farming:asparagus"}, rarity = 2} + } +} +minetest.register_node("farming:asparagus_4", table.copy(def)) + + +-- stage 5 +def.tiles = {"farming_asparagus_5.png"} +def.drop = { + items = { + {items = {"farming:asparagus"}, rarity = 1}, + {items = {"farming:asparagus 2"}, rarity = 2} + } +} +minetest.register_node("farming:asparagus_5", table.copy(def)) + + +-- add to registered_plants +farming.registered_plants["farming:asparagus"] = { + crop = "farming:asparagus", + seed = "farming:asparagus", + minlight = 7, + maxlight = farming.max_light, + steps = 5 +} + +-- mapgen +minetest.register_decoration({ + name = "farming:asparagus_5", + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = farming.asparagus, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + y_min = 8, + y_max = 32, + decoration = "farming:asparagus_5", + param2 = 3 +}) diff --git a/crops/beans.lua b/crops/beans.lua index 02ebe1a..a6d7369 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -253,3 +253,21 @@ minetest.register_node("farming:beanbush", { }, sounds = default.node_sound_leaves_defaults() }) + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.beans, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 18, + y_max = 38, + decoration = "farming:beanbush" +}) diff --git a/crops/beetroot.lua b/crops/beetroot.lua index 05e0b3a..a2eec21 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -87,3 +87,21 @@ farming.registered_plants["farming:beetroot"] = { maxlight = farming.max_light, steps = 5 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.beetroot, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 20, + decoration = "farming:beetroot_5" +}) diff --git a/crops/blackberry.lua b/crops/blackberry.lua index e2122fd..daadfcb 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -10,7 +10,7 @@ minetest.register_craftitem("farming:blackberry", { on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1") end, - on_use = minetest.item_eat(1), + on_use = minetest.item_eat(1) }) local def = { @@ -60,3 +60,21 @@ farming.registered_plants["farming:blackberry"] = { maxlight = farming.max_light, steps = 4 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.blackberry, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 20, + decoration = "farming:blackberry_4" +}) diff --git a/crops/blueberry.lua b/crops/blueberry.lua index be1d3b2..df32b0e 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -97,3 +97,21 @@ farming.registered_plants["farming:blueberries"] = { maxlight = farming.max_light, steps = 4 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.blueberry, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 15, + decoration = "farming:blueberry_4" +}) diff --git a/crops/cabbage.lua b/crops/cabbage.lua index b57ac00..92b2f71 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -67,3 +67,21 @@ farming.registered_plants["farming:cabbage"] = { maxlight = farming.max_light, steps = 6 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.cabbage, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 2, + y_max = 15, + decoration = "farming:cabbage_6" +}) diff --git a/crops/carrot.lua b/crops/carrot.lua index cbbdf8f..6ea8eca 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -119,3 +119,31 @@ farming.registered_plants["farming:carrot"] = { maxlight = farming.max_light, steps = 8 } + +-- 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"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.carrot, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + 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 +}) diff --git a/crops/chili.lua b/crops/chili.lua index 95f3a30..a4a5cf3 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -33,6 +33,22 @@ minetest.register_craft({ recipe = {{"farming:chili_pepper"}} }) +-- chili powder +minetest.register_craftitem("farming:chili_powder", { + description = S("Chili Powder"), + on_use = minetest.item_eat(-1), + inventory_image = "farming_chili_powder.png" +}) + +minetest.register_craft({ + output = "farming:chili_powder", + recipe = { + {"farming:chili_pepper", "farming:mortar_pestle"} + }, + replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}} +}) + + -- chili definition local def = { drawtype = "plantlike", @@ -96,3 +112,23 @@ farming.registered_plants["farming:chili_pepper"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.chili, + spread = {x = 100, y = 100, z = 100}, + seed = 760, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 35, + decoration = {"farming:chili_8"}, + spawn_by = "group:tree", + num_spawn_by = 1 +}) diff --git a/crops/coffee.lua b/crops/coffee.lua index 490547e..2e6fccb 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -95,3 +95,29 @@ farming.registered_plants["farming:coffee"] = { maxlight = farming.max_light, steps = 5 } + +-- 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"} +} + +minetest.register_decoration({ + deco_type = "simple", + place_on = def.spawn_on, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.coffee, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 20, + y_max = def.y_max, + decoration = "farming:coffee_5" +}) diff --git a/crops/corn.lua b/crops/corn.lua index 97bb86a..099a647 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -176,3 +176,21 @@ farming.registered_plants["farming:corn"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.corn, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 12, + y_max = 25, + decoration = "farming:corn_7" +}) diff --git a/crops/cotton.lua b/crops/cotton.lua index 6ea2e6f..2b7079e 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -184,3 +184,27 @@ farming.register_plant("farming:cotton", { groups = {flammable = 2}, steps = 8, })]] + +-- mapgen +local grow_on = farming.mapgen == "v6" and {"default:dirt_with_grass"} + or {"default:dry_dirt_with_dry_grass"} +local biome = farming.mapgen == "v6" and {"jungle"} or {"savanna"} + +minetest.register_decoration({ + name = "farming:cotton_wild", + deco_type = "simple", + place_on = grow_on, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = 0.1, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + biomes = biome, + y_max = 31000, + y_min = 1, + decoration = "farming:cotton_wild" +}) diff --git a/crops/cucumber.lua b/crops/cucumber.lua index c5e70de..f63eeee 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -63,3 +63,30 @@ farming.registered_plants["farming:cucumber"] = { maxlight = farming.max_light, steps = 4 } + +-- 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"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.cucumber, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 20, + decoration = "farming:cucumber_4", + spawn_by = def.near, + num_spawn_by = def.num +}) diff --git a/crops/eggplant.lua b/crops/eggplant.lua new file mode 100644 index 0000000..afda25b --- /dev/null +++ b/crops/eggplant.lua @@ -0,0 +1,87 @@ +local S = farming.intllib + +-- eggplant +minetest.register_craftitem("farming:eggplant", { + description = S("Eggplant"), + inventory_image = "farming_eggplant.png", + groups = {seed = 2, food_eggplant = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:eggplant_1") + end, + on_use = minetest.item_eat(3) +}) + +-- definition +local def = { + drawtype = "plantlike", + tiles = {"farming_eggplant_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:eggplant_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_eggplant_2.png"} +minetest.register_node("farming:eggplant_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_eggplant_3.png"} +def.drop = { + items = { + {items = {"farming:eggplant"}, rarity = 1}, + {items = {"farming:eggplant"}, rarity = 3} + } +} +minetest.register_node("farming:eggplant_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_eggplant_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:eggplant 2"}, rarity = 1}, + {items = {"farming:eggplant 2"}, rarity = 2} + } +} +minetest.register_node("farming:eggplant_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:eggplant"] = { + crop = "farming:eggplant", + seed = "farming:eggplant", + minlight = 7, + maxlight = farming.max_light, + steps = 4 +} + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = farming.eggplant, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "farming:eggplant_4", + param2 = 3 +}) diff --git a/crops/garlic.lua b/crops/garlic.lua index e141479..279bbc7 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -134,3 +134,23 @@ farming.registered_plants["farming:garlic"] = { maxlight = farming.max_light, steps = 5 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.garlic, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 35, + decoration = "farming:garlic_5", + spawn_by = "group:tree", + num_spawn_by = 1 +}) diff --git a/crops/grapes.lua b/crops/grapes.lua index ee8fe38..342318f 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -260,3 +260,21 @@ minetest.register_node("farming:grapebush", { }, sounds = default.node_sound_leaves_defaults() }) + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.grapes, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 25, + y_max = 50, + decoration = "farming:grapebush" +}) diff --git a/crops/hemp.lua b/crops/hemp.lua index c63487a..60d2ffe 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -257,7 +257,27 @@ minetest.register_node("farming:hemp_8", table.copy(def)) farming.registered_plants["farming:hemp"] = { crop = "farming:hemp", seed = "farming:seed_hemp", - mminlight = farming.min_light, + minlight = farming.min_light, maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.hemp, + spread = {x = 100, y = 100, z = 100}, + seed = 420, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 45, + decoration = "farming:hemp_7", + spawn_by = "group:tree", + num_spawn_by = 1 +}) diff --git a/crops/lettuce.lua b/crops/lettuce.lua index bbd7138..863e703 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -8,7 +8,7 @@ minetest.register_craftitem("farming:lettuce", { on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1") end, - on_use = minetest.item_eat(2), + on_use = minetest.item_eat(2) }) local def = { @@ -61,3 +61,21 @@ farming.registered_plants["farming:lettuce"] = { maxlight = farming.max_light, steps = 5 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.lettuce, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 35, + decoration = "farming:lettuce_5" +}) diff --git a/crops/melon.lua b/crops/melon.lua index 66decdc..65efcae 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -96,3 +96,33 @@ farming.registered_plants["farming:melon"] = { maxlight = farming.max_light, steps = 8 } + +-- 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"}, + near = mg and "group:water" or nil, + num = mg and 1 or -1, +} + +minetest.register_decoration({ + deco_type = "simple", + place_on = def.spawn_on, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.melon, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = def.y_max, + decoration = "farming:melon_8", + spawn_by = def.near, + num_spawn_by = def.num +}) diff --git a/crops/mint.lua b/crops/mint.lua index de4b6b3..b0e91a4 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -87,3 +87,23 @@ farming.registered_plants["farming:mint"] = { maxlight = farming.max_light, steps = 4 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.mint, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 75, + decoration = "farming:mint_4", + spawn_by = "group:water", + num_spawn_by = 1 +}) diff --git a/crops/onion.lua b/crops/onion.lua index 63cdbe5..64e4ec5 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -93,3 +93,21 @@ farming.registered_plants["farming:onion"] = { maxlight = farming.max_light, steps = 5 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.onion, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 28, + decoration = "farming:onion_5" +}) diff --git a/crops/parsley.lua b/crops/parsley.lua index 0bc20eb..74561dd 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -54,3 +54,21 @@ farming.registered_plants["farming:parsley"] = { maxlight = 15, steps = 3 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.parsley, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 10, + y_max = 40, + decoration = "farming:parsley_3" +}) diff --git a/crops/peas.lua b/crops/peas.lua index 94053f2..172fa42 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -89,3 +89,21 @@ farming.registered_plants["farming:pea_pod"] = { maxlight = farming.max_light, steps = 5 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.peas, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 25, + y_max = 55, + decoration = "farming:pea_5" +}) diff --git a/crops/pepper.lua b/crops/pepper.lua index bdf6287..19f5850 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -153,3 +153,26 @@ farming.registered_plants["farming:pepper"] = { maxlight = farming.max_light, steps = 5 } + +-- mapgen +local grow_on = farming.mapgen == "v6" and {"default:dirt_with_grass"} + or {"default:dirt_with_rainforest_litter"} + +minetest.register_decoration({ + deco_type = "simple", + place_on = grow_on, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.pepper, + spread = {x = 100, y = 100, z = 100}, + seed = 933, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 35, + decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"}, + spawn_by = "group:tree", + num_spawn_by = 1 +}) diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 6bb1918..f702ce3 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -139,3 +139,28 @@ farming.registered_plants["farming:pineapple"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +local grow_on = farming.mapgen == "v6" and {"default:dirt_with_grass"} + or {"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass"} +local grow_near = farming.mapgen == "v6" and "default:desert_sand" or nil +local num = farming.mapgen == "v6" and 1 or -1 + +minetest.register_decoration({ + deco_type = "simple", + place_on = grow_on, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.pineapple, + spread = {x = 100, y = 100, z = 100}, + seed = 917, + octaves = 3, + persist = 0.6 + }, + y_min = 18, + y_max = 30, + decoration = {"farming:pineapple_8"}, + spawn_by = grow_near, + num_spawn_by = num +}) diff --git a/crops/potato.lua b/crops/potato.lua index a55ab29..032d954 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -110,3 +110,21 @@ farming.registered_plants["farming:potato"] = { maxlight = farming.max_light, steps = 4 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.potato, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 15, + y_max = 40, + decoration = "farming:potato_3" +}) diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 2829d47..65a8f82 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -206,3 +206,31 @@ farming.registered_plants["farming:pumpkin"] = { maxlight = farming.max_light, steps = 8 } + +-- 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"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.pumpkin, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = def.y_max, + decoration = "farming:pumpkin_8", + spawn_by = def.near, + num_spawn_by = def.num +}) diff --git a/crops/raspberry.lua b/crops/raspberry.lua index df1d3d9..34860bd 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -78,3 +78,21 @@ farming.registered_plants["farming:raspberries"] = { maxlight = farming.max_light, steps = 4 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.raspberry, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 15, + decoration = "farming:raspberry_4" +}) diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index d0ac58a..0b48687 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -75,3 +75,21 @@ farming.registered_plants["farming:rhubarb"] = { maxlight = 12, steps = 3 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.rhubarb, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 3, + y_max = 20, + decoration = "farming:rhubarb_3" +}) diff --git a/crops/soy.lua b/crops/soy.lua index e0ed093..90d1932 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -190,3 +190,28 @@ farming.registered_plants["farming:soy_pod"] = { maxlight = farming.max_light, steps = 7 } + +-- 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"} +} + +minetest.register_decoration({ + deco_type = "simple", + place_on = def.spawn_on, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.soy, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 20, + y_max = 50, + decoration = "farming:soy_6" +}) diff --git a/crops/spinach.lua b/crops/spinach.lua new file mode 100644 index 0000000..8b09461 --- /dev/null +++ b/crops/spinach.lua @@ -0,0 +1,88 @@ +local S = farming.intllib + +-- spinach +minetest.register_craftitem("farming:spinach", { + description = S("spinach"), + inventory_image = "farming_spinach.png", + groups = {seed = 2, food_spinach = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:spinach_1") + end, + on_use = minetest.item_eat(1) +}) + +-- definition +local def = { + drawtype = "plantlike", + tiles = {"farming_spinach_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:spinach_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_spinach_2.png"} +minetest.register_node("farming:spinach_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_spinach_3.png"} +def.drop = { + items = { + {items = {"farming:spinach"}, rarity = 1}, + {items = {"farming:spinach"}, rarity = 3} + } +} +minetest.register_node("farming:spinach_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_spinach_4.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:spinach 2"}, rarity = 1}, + {items = {"farming:spinach 2"}, rarity = 2}, + {items = {"farming:spinach 2"}, rarity = 3} + } +} +minetest.register_node("farming:spinach_4", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:spinach"] = { + crop = "farming:spinach", + seed = "farming:spinach", + minlight = 7, + maxlight = farming.max_light, + steps = 4 +} + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = farming.spinach, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "farming:spinach_4", + param2 = 3 +}) diff --git a/crops/strawberry.lua b/crops/strawberry.lua index d049d9e..20361d0 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -92,3 +92,21 @@ farming.registered_plants["ethereal:strawberry"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.strawberry, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 20, + y_max = 55, + decoration = "farming:strawberry_7" +}) diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 1a45054..c1defde 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -153,3 +153,21 @@ farming.registered_plants["farming:sunflower"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.sunflower, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 10, + y_max = 40, + decoration = "farming:sunflower_8" +}) diff --git a/crops/tomato.lua b/crops/tomato.lua index 6eff7c6..da458d8 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -104,3 +104,21 @@ farming.registered_plants["farming:tomato"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.tomato, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 25, + decoration = "farming:tomato_7" +}) diff --git a/crops/vanilla.lua b/crops/vanilla.lua index f014a8d..5ced49e 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -120,3 +120,21 @@ farming.registered_plants["farming:vanilla"] = { maxlight = farming.max_light, steps = 8 } + +-- mapgen +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = farming.vanilla, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 5, + y_max = 35, + decoration = "farming:vanilla_7" +}) diff --git a/farming.conf_example b/farming.conf_example index 7315775..102d14c 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -6,6 +6,9 @@ --]] -- true to enable crop/food in-game and on mapgen set spawn rarety +farming.asparagus = 0.002 +farming.eggplant = 0.002 +farming.spinach = 0.002 farming.carrot = 0.001 farming.potato = 0.001 farming.tomato = 0.001 diff --git a/init.lua b/init.lua index c8ed458..1261811 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20220603", + version = "20220913", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -15,7 +15,8 @@ farming = { }, registered_plants = {}, min_light = 12, - max_light = 15 + max_light = 15, + mapgen = minetest.get_mapgen_setting("mg_name") } @@ -548,7 +549,7 @@ farming.register_plant = function(name, def) on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":" .. pname .. "_1") - end, + end }) -- Register harvest @@ -627,6 +628,9 @@ end -- default settings +farming.asparagus = 0.002 +farming.eggplant = 0.002 +farming.spinach = 0.002 farming.carrot = 0.001 farming.potato = 0.001 farming.tomato = 0.001 @@ -736,8 +740,10 @@ ddoo("artichoke.lua", farming.artichoke) ddoo("parsley.lua", farming.parsley) ddoo("sunflower.lua", farming.sunflower) ddoo("strawberry.lua", farming.strawberry) +ddoo("asparagus.lua", farming.asparagus) +ddoo("eggplant.lua", farming.eggplant) +ddoo("spinach.lua", farming.eggplant) dofile(farming.path .. "/food.lua") -dofile(farming.path .. "/mapgen.lua") dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility dofile(farming.path .. "/lucky_block.lua") diff --git a/license.txt b/license.txt index ded3fee..5e4fa30 100644 --- a/license.txt +++ b/license.txt @@ -183,3 +183,24 @@ Created by RZR0 (CC-BY-NC-SA) Created by DMBuce (MIT - https://github.com/DMBuce/hatchling-snacks) farming_mac_and_cheese.png + + +Copyright (C) 2021-2022: Atlante - AFL-1.1 +License for code: AFL-1.1 + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + farming_asparagus* + farming_eggplant* + farming_spinach* + farming_onigiri.png + farming_rice.png + farming_chili_powder.png diff --git a/lucky_block.lua b/lucky_block.lua index c6a2000..3f98896 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -63,6 +63,10 @@ if minetest.get_modpath("lucky_block") then {"farming:wheat_8", "farming:chili_8"}, {"farming:cotton_8", "farming:cucumber_4"}, }}, + {"sch", "instafarm", 0, true, { + {"farming:wheat_8", "farming:spinach_4"}, + {"farming:cotton_8", "farming:eggplant_4"}, + }}, {"nod", "default:chest", 0, { {name = "farming:seed_wheat", max = 15}, {name = "farming:seed_barley", max = 15}, @@ -74,6 +78,8 @@ if minetest.get_modpath("lucky_block") then {name = "farming:soil_wet", max = 10}, {name = "farming:cotton_wild", max = 5}, {name = "farming:grapebush", max = 5}, + {name = "farming:asparagus", max = 7} }}, + {"dro", {"farming:chili_powder"}, 5} }) end diff --git a/mapgen.lua b/mapgen.lua deleted file mode 100644 index 598675c..0000000 --- a/mapgen.lua +++ /dev/null @@ -1,241 +0,0 @@ --- what mapgen are we using -local mg_name = minetest.get_mapgen_setting("mg_name") - --- temp vars -local tmp1, tmp2, tmp3 - --- decoration function -local function register_plant(name, min, max, spawnon, spawnby, num, rarety) - - -- do not place on mapgen if no value given (or not true) - if not rarety then - return - end - - -- set rarety value or default to farming.rarety if not a number - rarety = tonumber(rarety) or farming.rarety - - minetest.register_decoration({ - deco_type = "simple", - place_on = spawnon or {"default:dirt_with_grass"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = rarety, - spread = {x = 100, y = 100, z = 100}, - seed = 329, - octaves = 3, - persist = 0.6 - }, - y_min = min, - y_max = max, - decoration = "farming:" .. name, - spawn_by = spawnby, - num_spawn_by = num - }) -end - - --- add crops to mapgen -register_plant("potato_3", 15, 40, nil, "", -1, farming.potato) -register_plant("tomato_7", 5, 25, nil, "", -1, farming.tomato) -register_plant("corn_7", 12, 25, nil, "", -1, farming.corn) -register_plant("strawberry_7", 20, 55, nil, "", -1, farming.strawberry) -register_plant("raspberry_4", 3, 15, nil, "", -1, farming.raspberry) -register_plant("rhubarb_3", 3, 20, nil, "", -1, farming.rhubarb) -register_plant("blueberry_4", 3, 15, nil, "", -1, farming.blueberry) -register_plant("beanbush", 18, 38, nil, "", -1, farming.beans) -register_plant("grapebush", 25, 50, nil, "", -1, farming.grapes) -register_plant("onion_5", 5, 28, nil, "", -1, farming.onion) -register_plant("garlic_5", 3, 35, nil, "group:tree", 1, farming.garlic) -register_plant("pea_5", 25, 55, nil, "", -1, farming.peas) -register_plant("beetroot_5", 1, 20, nil, "", -1, farming.beetroot) -register_plant("cabbage_6", 2, 15, nil, "", -1, farming.cabbage) -register_plant("lettuce_5", 5, 35, nil, "", -1, farming.lettuce) -register_plant("blackberry_4", 3, 20, nil, "", -1, farming.blackberry) -register_plant("vanilla_7", 5, 35, nil, "", -1, farming.vanilla) -register_plant("parsley_3", 10, 40, nil, "", -1, farming.parsley) -register_plant("sunflower_8", 10, 40, nil, "", -1, farming.sunflower) -register_plant("mint_4", 1, 75, { - "default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, - "group:water", 1, farming.mint) - - --- v6 mapgen compatibility for specific crops -if mg_name == "v6" then - - register_plant("carrot_8", 1, 30, nil, "group:water", 1, farming.carrot) - register_plant("cucumber_4", 1, 20, nil, "group:water", 1, farming.cucumber) - register_plant("melon_8", 1, 20, nil, "group:water", 1, farming.melon) - register_plant("pumpkin_8", 1, 20, nil, "group:water", 1, farming.pumpkin) - register_plant("coffee_5", 20, 50, nil, "", -1, farming.coffee) - register_plant("soy_6", 20, 50, nil, "", -1, farming.soy) -else - -- v7 maps have a beach so plants growing near water is limited to 6 high - register_plant("carrot_8", 1, 20, nil, "", -1, farming.carrot) - register_plant("cucumber_4", 1, 20, nil, "", -1, farming.cucumber) - register_plant("melon_8", 1, 6, {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter"}, "", -1, farming.melon) - register_plant("pumpkin_8", 1, 6, nil, "", -1, farming.pumpkin) - register_plant("coffee_5", 20, 55, {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", - "default:dry_dirt_with_dry_grass"}, "", -1, farming.coffee) - register_plant("soy_6", 20, 50, {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", - "default:dry_dirt_with_dry_grass"}, "", -1, farming.soy) -end - - -if farming.hemp then -minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = tonumber(farming.hemp) or farming.rarety, - spread = {x = 100, y = 100, z = 100}, - seed = 420, - octaves = 3, - persist = 0.6 - }, - y_min = 3, - y_max = 45, - decoration = "farming:hemp_7", - spawn_by = "group:tree", - num_spawn_by = 1 -}) -end - - -if farming.chili then -minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = tonumber(farming.chili) or farming.rarety, - spread = {x = 100, y = 100, z = 100}, - seed = 760, - octaves = 3, - persist = 0.6 - }, - y_min = 5, - y_max = 35, - decoration = {"farming:chili_8"}, - spawn_by = "group:tree", - num_spawn_by = 1 -}) -end - - -if farming.artichoke then -minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = tonumber(farming.artichoke) or farming.rarety, - spread = {x = 100, y = 100, z = 100}, - seed = 448, - octaves = 3, - persist = 0.6 - }, - y_min = 1, - y_max = 13, - decoration = {"farming:artichoke_5"}, - spawn_by = "group:tree", - num_spawn_by = 1, -}) -end - - -if farming.pepper then - -local tmp1 = {"default:dirt_with_rainforest_litter"} -- v7 - -if mg_name == "v6" then - tmp1 = {"default:dirt_with_grass"} -- v6 -end - -minetest.register_decoration({ - deco_type = "simple", - place_on = tmp1, - sidelen = 16, - noise_params = { - offset = 0, - scale = tonumber(farming.pepper) or farming.rarety, - spread = {x = 100, y = 100, z = 100}, - seed = 933, - octaves = 3, - persist = 0.6 - }, - y_min = 5, - y_max = 35, - decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"}, - spawn_by = "group:tree", - num_spawn_by = 1 -}) -end - - -if farming.pineapple then - -tmp1 = {"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass"} -tmp2 = nil -tmp3 = -1 - -if mg_name == "v6" then - tmp1 = {"default:dirt_with_grass"} - tmp2 = "default:desert_sand" - tmp3 = 1 -end - -minetest.register_decoration({ - deco_type = "simple", - place_on = tmp1, - sidelen = 16, - noise_params = { - offset = 0, - scale = tonumber(farming.pineapple) or farming.rarety, - spread = {x = 100, y = 100, z = 100}, - seed = 917, - octaves = 3, - persist = 0.6 - }, - y_min = 18, - y_max = 30, - decoration = {"farming:pineapple_8"}, - spawn_by = tmp2, - num_spawn_by = tmp3 -}) -end - -tmp1 = {"default:dry_dirt_with_dry_grass"} -tmp2 = {"savanna"} - -if mg_name == "v6" then - tmp1 = {"default:dirt_with_grass"} - tmp2 = {"jungle"} -end - -minetest.register_decoration({ - name = "farming:cotton_wild", - deco_type = "simple", - place_on = tmp1, - sidelen = 16, - noise_params = { - offset = -0.1, - scale = 0.1, - spread = {x = 50, y = 50, z = 50}, - seed = 4242, - octaves = 3, - persist = 0.7 - }, - biomes = tmp2, - y_max = 31000, - y_min = 1, - decoration = "farming:cotton_wild" -}) diff --git a/textures/farming_asparagus.png b/textures/farming_asparagus.png new file mode 100644 index 0000000000000000000000000000000000000000..4dbc1ecb7c9faab745546690004d452985c88341 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4xHBpZ(Y^aoO+0X`wF`9-;IDQZ3iYW~IQAyt}j zU3!@_P35wZdVmTTOM?7@862M7NCR?=JY5_^IIbrrI53@Y61a6%;1I7b(`B8NOah4= wCdMvP4vH$B5@LBc%W21%0KLf!n@;jD+*reWh2z(vCqUf{p00i_>zopr0J2jp*Z=?k literal 0 HcmV?d00001 diff --git a/textures/farming_asparagus_1.png b/textures/farming_asparagus_1.png new file mode 100644 index 0000000000000000000000000000000000000000..87444d1b361d59443eca33cf1fea0764269c42e8 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9JOMr-u0Yx;PT4(0&A(VZN@l_@ zAfK@$$S;_|;n|HeAV<{G#W95AdUC=734>+>;Ry*zDM>)#jSPJDFKuoESqz@8elF{r G5}E)uRU0G# literal 0 HcmV?d00001 diff --git a/textures/farming_asparagus_2.png b/textures/farming_asparagus_2.png new file mode 100644 index 0000000000000000000000000000000000000000..cb8c6b4bea138df631377ebad21652abded12d0c GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWWysHQic@w^QS&cW_b*kA zXw-5q3_1>!Wh@Eu3ubV5b|VeQ(eQL}4B@z*oUlMOq17-VLZL=%ngEA=%S=|ClV^^w i2qq;Zr6eXLFfhn$Wwd?z?}R*14}+(xpUXO@geCw#EhcpU literal 0 HcmV?d00001 diff --git a/textures/farming_asparagus_3.png b/textures/farming_asparagus_3.png new file mode 100644 index 0000000000000000000000000000000000000000..904fb25f685ae165655f5624556a90f064c6a788 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDUO)Ow=ic@w^QS&cW_b*iq zte1~y)Qad-e%fGj2dIXzB*-tA!Qt7BG$6;?)5S4_k?h=!qd*ZME zgA%5f>b{J2`8G4ywlGv~6VE?=%=FYsYmMGjReM5=rk+sZVlSJ_7_1wb{7B|(0{3=Yq3qyahZo-U3d9M|V|9pr5=;9+*&a5SoJ$lUC_8#FuY7`;S%r&8$l;ikS;{H(c8)I*0whub4y4SyB?VjjOGd&3EXR+~9U! W#%{T0m+cv#kqn-$elF{r5}E*V&pQkN literal 0 HcmV?d00001 diff --git a/textures/farming_asparagus_5.png b/textures/farming_asparagus_5.png new file mode 100644 index 0000000000000000000000000000000000000000..1ed183e03d89549b0cf0524329a0fda20d0e65df GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeX1=7x$5+3=|zU49jjgkS) z;$f}wK@<2QCrC%m7JQ{SR~M*)u_VYZn8D%MjWi%9!qdeugyVYcsg1l120Si-$;E~_ zi4$AzxHuf=FcINtikNQEBo_Yuwa=I09~*v2Z(i)W_EES)=10SVHx0+mzua+AO{2}> s{2EoYiGDj9XQ~=3)kzbb{Y1r$zm$oycJ52lJfIy6p00i_>zopr0G3xnrT_o{ literal 0 HcmV?d00001 diff --git a/textures/farming_chili_powder.png b/textures/farming_chili_powder.png new file mode 100644 index 0000000000000000000000000000000000000000..6451a5d6044f974926e09f5d6de7340d4e585d3e GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv3GfMV1=67m42cX39SjV!7#O@Q zq$8aaQoU6xqD@;eoaa&XcUTm`z* z?lCOdDb6V!-5ha8>ztp{>PDWvyG~wF){Q-pvb)1{-!mC$rB9t6zLv@8l6CspsI5XL xIJDo-uq?KkaBx=GJTWN-BMpU0WPXVo9@O1TaS?83{1OPP6KA`{r literal 0 HcmV?d00001 diff --git a/textures/farming_eggplant.png b/textures/farming_eggplant.png new file mode 100644 index 0000000000000000000000000000000000000000..4315adda2f3424585cd9cb62fec29cb00278649e GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv3GfMV1=2dA#+I6%_F5qxhVcQ` z=~1pFIU!wMCDLuF%i|^~6>ry4wg^xJs$(n(@(X5gcy=QV$no)XaSY+Oo}6%iRm?%- z9V@Q@+hwj5E!XrqI)X|RB6=@8wrQNa-n@(_ l4LI6%aX9e^iX6$)X5d)N*Q3V&@(R#g22WQ%mvv4FO#p-$IsO0u literal 0 HcmV?d00001 diff --git a/textures/farming_eggplant_1.png b/textures/farming_eggplant_1.png new file mode 100644 index 0000000000000000000000000000000000000000..7246860d3a02887a78dc9685071617e671b3422b GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|u0Yy5PbH#Jt3>JVKOl#( zB*-tA!Qt7BG$2RJ)5S4_<9c$!0v3ZN4mE?-j4oCN3=AwS3`f^*jp7HYVDNPHb6Mw< G&;$S;Z5nz2 literal 0 HcmV?d00001 diff --git a/textures/farming_eggplant_2.png b/textures/farming_eggplant_2.png new file mode 100644 index 0000000000000000000000000000000000000000..bfaf3634013536c770dc22f7f85c809bca088c20 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?b1=8MmDk0SxX)_Ir7daKU z%FO`^F_r}R1v5B2yO9RuXn49fhHzX@PEe3GaMloGQxoGj-Ex%SP(e{qgH~XJW}9({ efeXt7NrnVr#)s0M?sfq6FnGH9xvXAc)B=-a9mGLaA13B&}KX%g}b1&V5V!t z0wKP2I-Ch^GgohBn4x$^>IuWdV9tijcEbpf1SKy6wwNP~a}O?JQen8biuH>1VsD^P O3=E#GelF{r5}E)5LNt5; literal 0 HcmV?d00001 diff --git a/textures/farming_eggplant_4.png b/textures/farming_eggplant_4.png new file mode 100644 index 0000000000000000000000000000000000000000..7b32b1be4ec69c1bde7653a0e0f6b9d5c93362f4 GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDUO)Oy0mvV7b2@ldqa7>VE zbZPa-RtzXt_IVWZ8mNY`B*-tA!Qt7BG$1F^)5S4_<9c#}LjzMAi^18j335DwiOIoY z48~2DTSd7VOcn=LEvk^5a4_XW+$6S1i6X_?9Bi+>`7|0*9f# zcdzeYbqU-Hlw~Xl@(X5gcy=QV$Z_&?aSY+Oo}6%iJ0@m9$%<~~j3+wVhB9w@G61v$?EN8<}8jiO{|_9dz*}Wo6khc yxX8{~q*J9FazuJl$#9-i8M$#n;k6U1 zpWZt0{_)AruWtYR`jY+N{&1jD#*!evUG zecp$C;|=TZvoRC-QZ`IEZ+SC}E2U-Ul%=Y>86}q`9mg&&8DLW!6N^62*${Qgm rDV`JqElF)ot_B{V5EGFDX@U&;7DA1pfu1{nRxo(F`njxgN@xNA7~)5= delta 310 zcmX@lc$8^^L_G&H0|SGGE`KnPstE82aRt&#mMmGbX3dr@TefZ6wr9_tef#zuI&|pB zks~Kho;-8r%+;$`Z{ECl_wL;X4<0;z{P@kAH*ep*efRF&moHzwef#$P`}czf51u%2 z;@r7&=g*(Nc=6)3Yu9evxN-aT?K^kw0Chco{v4>~!-o%_K7IQ9x&HIluU~)s`0@Y$ z|J10hZ-ADIl?3^L9D@ZYp5VC#6i)MWaSV}=WIf2rbjW~#Wy6DO55p1+zWn>|ECkYY zAd!zj!#l#1!C=Xossn7wGk6b3O<`h?c(2RgFi*Ue;r68aUs)QWFI|mdTvDrlSAM<> u^N($@yKIW;{x>{TF+FK{ma9P%Xik0ba<;xHjio*yLp@#nT-G@yGywn(*_^ll diff --git a/textures/farming_spinach.png b/textures/farming_spinach.png new file mode 100644 index 0000000000000000000000000000000000000000..2e7d519abfef1b0d7b6a0f5bb728f9d02ebd94d9 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWWysIbvJ*D)61R<#_Q+NU zs#Nve>BZ#0 zro9IWF_r}R1v5B2yO9Ru7<#%mhHzX@PFTQN&~QmdP2g6GYwJ;lBL!t)Mr_`zBsf=U oG)VY(HF+i6x_RWr%}z#!teq?oH-Ect1ZrmRboFyt=akR{060}EGynhq literal 0 HcmV?d00001 diff --git a/textures/farming_spinach_4.png b/textures/farming_spinach_4.png new file mode 100644 index 0000000000000000000000000000000000000000..9435bc66d4d0d9ad7a3ae6435381aece9d87539d GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?b1=3n}!iMf*W&skmQPMqq zX?;K;#*!evU^W^E!_YB literal 0 HcmV?d00001