add parsley, artichoke and new foods
64
crops/artichoke.lua
Normal file
@ -0,0 +1,64 @@
|
||||
local S = farming.intllib
|
||||
|
||||
-- item definition
|
||||
minetest.register_craftitem("farming:artichoke", {
|
||||
description = S("Artichoke"),
|
||||
inventory_image = "farming_artichoke.png",
|
||||
groups = {seed = 2, food_artichoke = 1, flammable = 2},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1")
|
||||
end,
|
||||
on_use = minetest.item_eat(4)
|
||||
})
|
||||
|
||||
-- crop definition
|
||||
local def = {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_artichoke_1.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
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:artichoke_1", table.copy(def))
|
||||
|
||||
-- stage 2
|
||||
def.tiles = {"farming_artichoke_2.png"}
|
||||
minetest.register_node("farming:artichoke_2", table.copy(def))
|
||||
|
||||
-- stage 3
|
||||
def.tiles = {"farming_artichoke_3.png"}
|
||||
minetest.register_node("farming:artichoke_3", table.copy(def))
|
||||
|
||||
-- stage 4
|
||||
def.tiles = {"farming_artichoke_4.png"}
|
||||
minetest.register_node("farming:artichoke_4", table.copy(def))
|
||||
|
||||
-- stage 5 (final)
|
||||
def.tiles = {"farming_artichoke_5.png"}
|
||||
def.groups.growing = nil
|
||||
def.drop = {
|
||||
items = {
|
||||
{items = {"farming:artichoke 2"}, rarity = 1},
|
||||
{items = {"farming:artichoke"}, rarity = 2}
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:artichoke_5", table.copy(def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:artichoke"] = {
|
||||
crop = "farming:artichoke",
|
||||
seed = "farming:artichoke",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
56
crops/parsley.lua
Normal file
@ -0,0 +1,56 @@
|
||||
local S = farming.intllib
|
||||
|
||||
-- item definition
|
||||
minetest.register_craftitem("farming:parsley", {
|
||||
description = S("Parsley"),
|
||||
inventory_image = "farming_parsley.png",
|
||||
groups = {seed = 2, food_parsley = 1, flammable = 2},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:parsley_1")
|
||||
end
|
||||
})
|
||||
|
||||
-- crop definition
|
||||
local def = {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_parsley_1.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
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:parsley_1", table.copy(def))
|
||||
|
||||
-- stage 2
|
||||
def.tiles = {"farming_parsley_2.png"}
|
||||
minetest.register_node("farming:parsley_2", table.copy(def))
|
||||
|
||||
-- stage 3 (final)
|
||||
def.tiles = {"farming_parsley_3.png"}
|
||||
def.groups.growing = nil
|
||||
def.drop = {
|
||||
items = {
|
||||
{items = {"farming:parsley 2"}, rarity = 1},
|
||||
{items = {"farming:parsley"}, rarity = 2},
|
||||
{items = {"farming:parsley"}, rarity = 3}
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:parsley_3", table.copy(def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:parsley"] = {
|
||||
crop = "farming:parsley",
|
||||
seed = "farming:parsley",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 3
|
||||
}
|
@ -35,6 +35,8 @@ farming.blackberry = 0.002
|
||||
farming.lettuce = 0.001
|
||||
farming.soy = 0.001
|
||||
farming.vanilla = 0.001
|
||||
farming.artichoke = 0.001
|
||||
farming.parsley = 0.002
|
||||
farming.grains = true -- true or false only
|
||||
|
||||
-- default rarety of crops on map (higher number = more crops)
|
||||
|
85
food.lua
@ -16,6 +16,19 @@ minetest.register_craft({
|
||||
recipe = "default:papyrus"
|
||||
})
|
||||
|
||||
--= Sugar caramel
|
||||
|
||||
minetest.register_craftitem("farming:caramel", {
|
||||
description = S("Caramel"),
|
||||
inventory_image = "farming_caramel.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
cooktime = 6,
|
||||
output = "farming:caramel",
|
||||
recipe = "group:food_sugar",
|
||||
})
|
||||
|
||||
--= Salt
|
||||
|
||||
@ -472,3 +485,75 @@ minetest.register_craft({
|
||||
"vessels:drinking_glass"
|
||||
}
|
||||
})
|
||||
|
||||
-- Patatas a la importancia
|
||||
|
||||
minetest.register_craftitem("farming:spanish_potatoes", {
|
||||
description = S("Spanish Potatoes"),
|
||||
inventory_image = "farming_spanish_potatoes.png",
|
||||
on_use = minetest.item_eat(8, "farming:bowl"),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:spanish_potatoes",
|
||||
recipe = {
|
||||
"farming:potato", "group:food_parsley", "farming:potato",
|
||||
"group:food_egg", "group:food_flour", "farming:onion",
|
||||
"farming:garlic_clove", "group:food_bowl", "group:food_skillet"
|
||||
},
|
||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
||||
})
|
||||
|
||||
-- Potato omelet
|
||||
|
||||
minetest.register_craftitem("farming:potato_omelet", {
|
||||
description = S("Potato omelet"),
|
||||
inventory_image = "farming_potato_omelet.png",
|
||||
on_use = minetest.item_eat(6, "farming:bowl"),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:potato_omelet",
|
||||
recipe = {
|
||||
"group:food_egg", "farming:potato", "group:food_onion",
|
||||
"group:food_skillet", "group:food_bowl"},
|
||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
||||
})
|
||||
|
||||
-- Paella
|
||||
|
||||
minetest.register_craftitem("farming:paella", {
|
||||
description = S("Paella"),
|
||||
inventory_image = "farming_paella.png",
|
||||
on_use = minetest.item_eat(8, "farming:bowl")
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:paella",
|
||||
recipe = {
|
||||
"group:food_rice", "dye:orange", "farming:pepper_red",
|
||||
"group:food_peas", "group:food_chicken", "group:food_bowl", "group:food_skillet"
|
||||
},
|
||||
replacements = {{"group:food_skillet", "farming:skillet"}}
|
||||
})
|
||||
|
||||
-- Flan
|
||||
|
||||
minetest.register_craftitem("farming:flan", {
|
||||
description = S("Vanilla Flan"),
|
||||
inventory_image = "farming_vanilla_flan.png",
|
||||
on_use = minetest.item_eat(6)
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:flan",
|
||||
recipe = {
|
||||
"group:food_sugar", "group:food_milk", "farming:caramel",
|
||||
"group:food_egg", "group:food_egg", "farming:vanilla_extract"
|
||||
},
|
||||
replacements = {{"mobs:bucket_milk", "bucket:bucket_empty"}}
|
||||
})
|
||||
|
6
init.lua
@ -7,7 +7,7 @@
|
||||
|
||||
farming = {
|
||||
mod = "redo",
|
||||
version = "20201213",
|
||||
version = "20210311",
|
||||
path = minetest.get_modpath("farming"),
|
||||
select = {
|
||||
type = "fixed",
|
||||
@ -633,6 +633,8 @@ farming.blackberry = 0.002
|
||||
farming.soy = 0.001
|
||||
farming.vanilla = 0.001
|
||||
farming.lettuce = 0.001
|
||||
farming.artichoke = 0.001
|
||||
farming.parsley = 0.002
|
||||
farming.grains = true
|
||||
farming.rarety = 0.002
|
||||
|
||||
@ -703,6 +705,8 @@ ddoo("blackberry.lua", farming.blackberry)
|
||||
ddoo("soy.lua", farming.soy)
|
||||
ddoo("vanilla.lua", farming.vanilla)
|
||||
ddoo("lettuce.lua", farming.lettuce)
|
||||
ddoo("artichoke.lua", farming.artichoke)
|
||||
ddoo("parsley.lua", farming.parsley)
|
||||
|
||||
dofile(farming.path .. "/food.lua")
|
||||
dofile(farming.path .. "/mapgen.lua")
|
||||
|
@ -155,6 +155,12 @@ Created by Felfa (CC0)
|
||||
farming_burger.png
|
||||
farming_soy*.png
|
||||
farming_vanilla*.png
|
||||
farming_artichoke*.png
|
||||
farming_parsley*.png
|
||||
farming_paella.png
|
||||
farming_potato_omelette.png
|
||||
farming_spanish_potatoes.png
|
||||
farming_vanilla_flan.png
|
||||
|
||||
Created by gorlock (CC0)
|
||||
farming_salt_crystal.png
|
||||
|
23
mapgen.lua
@ -53,6 +53,7 @@ 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("vanilla_7", 5, 35, nil, "", -1, farming.vanilla)
|
||||
register_plant("parsley_3", 10, 40, nil, "", -1, farming.parsley)
|
||||
register_plant("mint_4", 1, 75, {
|
||||
"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
|
||||
"group:water", 1, farming.mint)
|
||||
@ -127,6 +128,28 @@ minetest.register_decoration({
|
||||
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
|
||||
|
BIN
textures/farming_artichoke.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
textures/farming_artichoke_1.png
Normal file
After Width: | Height: | Size: 118 B |
BIN
textures/farming_artichoke_2.png
Normal file
After Width: | Height: | Size: 120 B |
BIN
textures/farming_artichoke_3.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
textures/farming_artichoke_4.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
textures/farming_artichoke_5.png
Normal file
After Width: | Height: | Size: 216 B |
BIN
textures/farming_caramel.png
Normal file
After Width: | Height: | Size: 133 B |
BIN
textures/farming_cheese_vegan.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
textures/farming_paella.png
Normal file
After Width: | Height: | Size: 487 B |
BIN
textures/farming_parsley.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
textures/farming_parsley_1.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/farming_parsley_2.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
textures/farming_parsley_3.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
textures/farming_potato_omelet.png
Normal file
After Width: | Height: | Size: 687 B |
BIN
textures/farming_spanish_potatoes.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
textures/farming_vanilla_flan.png
Normal file
After Width: | Height: | Size: 1.2 KiB |