tweak crop levels on map, add strawberry if ethereal mod not active

This commit is contained in:
tenplus1 2022-09-10 08:44:29 +01:00
parent 3e522de47e
commit c945100237
14 changed files with 117 additions and 19 deletions

View File

@ -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)
- 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.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

94
crops/strawberry.lua Normal file
View File

@ -0,0 +1,94 @@
local S = farming.intllib
-- Strawberry (can also be planted as seed)
minetest.register_craftitem(":ethereal:strawberry", {
description = S("Strawberry"),
inventory_image = "ethereal_strawberry.png",
wield_image = "ethereal_strawberry.png",
groups = {food_strawberry = 1, food_berry = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:strawberry_1")
end,
on_use = minetest.item_eat(1)
})
-- Define Strawberry Bush growth stages
local crop_def = {
drawtype = "plantlike",
tiles = {"ethereal_strawberry_1.png"},
paramtype = "light",
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
drop = "",
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
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(":ethereal:strawberry_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"ethereal_strawberry_2.png"}
minetest.register_node(":ethereal:strawberry_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"ethereal_strawberry_3.png"}
minetest.register_node(":ethereal:strawberry_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"ethereal_strawberry_4.png"}
minetest.register_node(":ethereal:strawberry_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"ethereal_strawberry_5.png"}
minetest.register_node(":ethereal:strawberry_5", table.copy(crop_def))
-- stage 6
crop_def.tiles = {"ethereal_strawberry_6.png"}
crop_def.drop = {
items = {
{items = {"ethereal:strawberry 1"}, rarity = 2},
{items = {"ethereal:strawberry 2"}, rarity = 3}
}
}
minetest.register_node(":ethereal:strawberry_6", table.copy(crop_def))
-- stage 7
crop_def.tiles = {"ethereal_strawberry_7.png"}
crop_def.drop = {
items = {
{items = {"ethereal:strawberry 1"}, rarity = 1},
{items = {"ethereal:strawberry 2"}, rarity = 3}
}
}
minetest.register_node(":ethereal:strawberry_7", table.copy(crop_def))
-- stage 8
crop_def.tiles = {"ethereal_strawberry_8.png"}
crop_def.groups.growing = nil
crop_def.drop = {
items = {
{items = {"ethereal:strawberry 2"}, rarity = 1},
{items = {"ethereal:strawberry 3"}, rarity = 3}
}
}
minetest.register_node(":ethereal:strawberry_8", table.copy(crop_def))
-- add to registered_plants
farming.registered_plants["ethereal:strawberry"] = {
crop = "ethereal:strawberry",
seed = "ethereal:strawberry",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 8
}

View File

@ -38,6 +38,7 @@ farming.vanilla = 0.001
farming.artichoke = 0.001
farming.parsley = 0.002
farming.sunflower = 0.001
farming.strawberry = minetest.get_modpath("ethereal") and nil or 0.002
farming.grains = true -- true or false only
farming.rice = true

View File

@ -659,6 +659,7 @@ farming.lettuce = 0.001
farming.artichoke = 0.001
farming.parsley = 0.002
farming.sunflower = 0.001
farming.strawberry = not minetest.get_modpath("ethereal") and 0.002
farming.grains = true
farming.rice = true
farming.rarety = 0.002
@ -734,6 +735,7 @@ ddoo("lettuce.lua", farming.lettuce)
ddoo("artichoke.lua", farming.artichoke)
ddoo("parsley.lua", farming.parsley)
ddoo("sunflower.lua", farming.sunflower)
ddoo("strawberry.lua", farming.strawberry)
dofile(farming.path .. "/food.lua")
dofile(farming.path .. "/mapgen.lua")

View File

@ -38,20 +38,21 @@ end
-- add crops to mapgen
register_plant("potato_3", 15, 40, nil, "", -1, farming.potato)
register_plant("tomato_7", 5, 20, nil, "", -1, farming.tomato)
register_plant("corn_7", 12, 22, nil, "", -1, farming.corn)
register_plant("raspberry_4", 3, 10, nil, "", -1, farming.raspberry)
register_plant("rhubarb_3", 3, 15, nil, "", -1, farming.rhubarb)
register_plant("blueberry_4", 3, 10, nil, "", -1, farming.blueberry)
register_plant("beanbush", 18, 35, nil, "", -1, farming.beans)
register_plant("grapebush", 25, 45, nil, "", -1, farming.grapes)
register_plant("onion_5", 5, 22, nil, "", -1, farming.onion)
register_plant("garlic_5", 3, 30, nil, "group:tree", 1, farming.garlic)
register_plant("pea_5", 25, 50, nil, "", -1, farming.peas)
register_plant("beetroot_5", 1, 15, nil, "", -1, farming.beetroot)
register_plant("cabbage_6", 2, 10, nil, "", -1, farming.cabbage)
register_plant("lettuce_5", 5, 30, nil, "", -1, farming.lettuce)
register_plant("blackberry_4", 3, 10, nil, "", -1, farming.blackberry)
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)
@ -67,16 +68,16 @@ if mg_name == "v6" then
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, 45, nil, "", -1, farming.coffee)
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, 15, nil, "", -1, farming.carrot)
register_plant("cucumber_4", 1, 10, nil, "", -1, farming.cucumber)
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, 45, {"default:dirt_with_dry_grass",
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",

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B