forked from mtcontrib/farming
added spinach; eggplant; asparagus; Chili Powder; new Onigiri (thanks Atlante for new textures), mapgen now inside own crop file, added new lucky blocks
This commit is contained in:
@ -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
|
||||
})
|
||||
|
95
crops/asparagus.lua
Normal file
95
crops/asparagus.lua
Normal file
@ -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
|
||||
})
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
87
crops/eggplant.lua
Normal file
87
crops/eggplant.lua
Normal file
@ -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
|
||||
})
|
@ -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
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
88
crops/spinach.lua
Normal file
88
crops/spinach.lua
Normal file
@ -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
|
||||
})
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
@ -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"
|
||||
})
|
||||
|
Reference in New Issue
Block a user