added vanilla, soy (thanks Felfa), added tofu, simplified porridge/burger recipe

This commit is contained in:
tenplus1 2020-12-13 10:37:08 +00:00
parent 2e18ef6ba6
commit a5b07379ce
30 changed files with 319 additions and 50 deletions

View File

@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames)
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya and vanilla (thanks Felfa), added tofu
- 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
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates

171
crops/soy.lua Normal file
View File

@ -0,0 +1,171 @@
local S = farming.intllib
-- soy pod
minetest.register_craftitem("farming:soy_pod", {
description = S("Soy Pod"),
inventory_image = "farming_soy_pod.png",
groups = {seed = 2, food_soy_pod = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:soy_1")
end
})
minetest.register_craftitem("farming:soy_beans", {
description = S("Soy Beans"),
inventory_image = "farming_soy_beans.png",
groups = {food_soy = 1, flammable = 2},
on_use = minetest.item_eat(1)
})
minetest.register_craft({
type = "shapeless",
output = "farming:soy_beans",
recipe = {"farming:soy_pod"}
})
-- soy milk
minetest.register_node("farming:soy_milk", {
description = S("Soy Milk"),
drawtype = "plantlike",
tiles = {"farming_soy_milk_glass.png"},
inventory_image = "farming_soy_milk_glass.png",
wield_image = "farming_soy_milk_glass.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
groups = {
vessel = 1, food_milk_glass = 1, dig_immediate = 3,
attached_node = 1, drink = 1
},
sounds = default.node_sound_glass_defaults()
})
minetest.register_craft( {
type = "shapeless",
output = "farming:soy_milk",
recipe = {
"group:food_soy", "group:food_soy", "group:food_soy",
"farming:vanilla_extract", "bucket:bucket_water", "vessels:drinking_glass"
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
{"farming:vanilla_extract", "vessels:glass_bottle"}
}
})
-- tofu
minetest.register_craftitem("farming:tofu", {
description = S("Tofu"),
inventory_image = "farming_tofu.png",
groups = {food_tofu = 1, food_meat_raw = 1, flammable = 2},
on_use = minetest.item_eat(3)
})
minetest.register_craft({
output = "farming:tofu",
type = "shapeless",
recipe = {
"farming:baking_tray", "group:food_soy", "group:food_soy",
"group:food_soy", "group:food_soy", "group:food_soy",
},
replacements = {{"farming:baking_tray", "farming:baking_tray"}}
})
-- cooked tofu
minetest.register_craftitem("farming:tofu_cooked", {
description = S("Cooked Tofu"),
inventory_image = "farming_tofu_cooked.png",
groups = {food_meat = 1, flammable = 2},
on_use = minetest.item_eat(6)
})
minetest.register_craft({
type = "cooking",
output = "farming:tofu_cooked",
recipe = "farming:tofu",
cooktime = 5
})
-- crop definition
local def = {
drawtype = "plantlike",
tiles = {"farming_soy_1.png"},
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
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:soy_1", table.copy(def))
-- stage 2
def.tiles = {"farming_soy_2.png"}
minetest.register_node("farming:soy_2", table.copy(def))
-- stage 3
def.tiles = {"farming_soy_3.png"}
minetest.register_node("farming:soy_3", table.copy(def))
-- stage 4
def.tiles = {"farming_soy_4.png"}
minetest.register_node("farming:soy_4", table.copy(def))
-- stage 5
def.tiles = {"farming_soy_5.png"}
def.drop = {
max_items = 1, items = {
{items = {'farming:soy_pod'}, rarity = 1},
}
}
minetest.register_node("farming:soy_5", table.copy(def))
-- stage 6
def.tiles = {"farming_soy_6.png"}
def.drop = {
max_items = 3, items = {
{items = {'farming:soy_pod'}, rarity = 1},
{items = {'farming:soy_pod'}, rarity = 2},
{items = {'farming:soy_pod'}, rarity = 3},
}
}
minetest.register_node("farming:soy_6", table.copy(def))
-- stage 7
def.tiles = {"farming_soy_7.png"}
def.groups.growing = nil
def.drop = {
max_items = 5, items = {
{items = {'farming:soy_pod'}, rarity = 1},
{items = {'farming:soy_pod'}, rarity = 2},
{items = {'farming:soy_pod'}, rarity = 3},
{items = {'farming:soy_pod'}, rarity = 4},
{items = {'farming:soy_pod'}, rarity = 5}
}
}
minetest.register_node("farming:soy_7", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:soy_pod"] = {
crop = "farming:soy",
seed = "farming:soy_pod",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 7
}

122
crops/vanilla.lua Normal file
View File

@ -0,0 +1,122 @@
local S = farming.intllib
-- vanilla
minetest.register_craftitem("farming:vanilla", {
description = S("Vanilla"),
inventory_image = "farming_vanilla.png",
groups = {seed = 2, food_vanilla = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1")
end,
on_use = minetest.item_eat(1),
})
-- crop definition
local def = {
drawtype = "plantlike",
tiles = {"farming_vanilla_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()
}
-- vanilla extract
minetest.register_node("farming:vanilla_extract", {
description = S("Vanilla Extract"),
drawtype = "plantlike",
tiles = {"farming_vanilla_extract.png"},
inventory_image = "farming_vanilla_extract.png",
wield_image = "farming_vanilla_extract.png",
paramtype = "light",
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
},
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft( {
output = "farming:vanilla_extract",
recipe = {
{ "group:food_vanilla", "group:food_vanilla", "group:food_vanilla"},
{ "group:food_vanilla", "farming:bottle_ethanol", "bucket:bucket_water"},
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "farming:vanilla_extract",
burntime = 25,
replacements = {{ "farming:vanilla_extract", "vessels:glass_bottle" }}
})
-- stage 1
minetest.register_node("farming:vanilla_1", table.copy(def))
-- stage 2
def.tiles = {"farming_vanilla_2.png"}
minetest.register_node("farming:vanilla_2", table.copy(def))
-- stage 3
def.tiles = {"farming_vanilla_3.png"}
minetest.register_node("farming:vanilla_3", table.copy(def))
-- stage 4
def.tiles = {"farming_vanilla_4.png"}
minetest.register_node("farming:vanilla_4", table.copy(def))
-- stage 5
def.tiles = {"farming_vanilla_5.png"}
minetest.register_node("farming:vanilla_5", table.copy(def))
-- stage 6
def.tiles = {"farming_vanilla_6.png"}
def.visual_scale = 1.9
minetest.register_node("farming:vanilla_6", table.copy(def))
-- stage 7
def.tiles = {"farming_vanilla_7.png"}
def.drop = {
items = {
{items = {'farming:vanilla'}, rarity = 1},
{items = {'farming:vanilla'}, rarity = 2},
{items = {'farming:vanilla'}, rarity = 3}
}
}
minetest.register_node("farming:vanilla_7", table.copy(def))
-- stage 8 (final)
def.tiles = {"farming_vanilla_8.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:vanilla 2'}, rarity = 1},
{items = {'farming:vanilla 2'}, rarity = 2},
{items = {'farming:vanilla 2'}, rarity = 2},
{items = {'farming:vanilla 2'}, rarity = 3}
}
}
minetest.register_node("farming:vanilla_8", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:vanilla"] = {
crop = "farming:vanilla",
seed = "farming:vanilla",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 8
}

View File

@ -33,6 +33,8 @@ farming.mint = 0.005
farming.cabbage = 0.001
farming.blackberry = 0.002
farming.lettuce = 0.001
farming.soy = 0.001
farming.vanilla = 0.001
farming.grains = true -- true or false only
-- default rarety of crops on map (higher number = more crops)

View File

@ -181,44 +181,18 @@ minetest.register_craftitem("farming:porridge", {
on_use = minetest.item_eat(6, "farming:bowl")
})
minetest.after(0, function()
local fluid = "group:water_bucket"
local fluid_return = {
{"group:water_bucket", "bucket:bucket_empty"},
{"group:water_bucket_wooden", "bucket:bucket_empty"}
minetest.register_craft({
type = "shapeless",
output = "farming:porridge",
recipe = {
"group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", "group:food_milk_glass"
},
replacements = {
{"mobs:glass_milk", "vessels:drinking_glass"},
{"farming:soy_milk", "vessels:drinking_glass"}
}
if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then
fluid = "group:food_milk"
fluid_return = {
{"mobs:bucket_milk", "bucket:bucket_empty"}
}
else
minetest.register_craft({
type = "shapeless",
output = "farming:porridge",
recipe = {
"group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", "group:water_bucket_wooden"
},
replacements = fluid_return
})
end
minetest.register_craft({
type = "shapeless",
output = "farming:porridge",
recipe = {
"group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", fluid
},
replacements = fluid_return
})
if minetest.get_modpath("bucket_wooden") then
end
end)
})
--= Jaffa Cake
@ -382,7 +356,6 @@ minetest.register_craftitem("farming:burger", {
on_use = minetest.item_eat(16),
})
if minetest.get_modpath("mobs_animal") or minetest.get_modpath("xanadu")then
minetest.register_craft({
type = "shapeless",
output = "farming:burger",
@ -392,16 +365,6 @@ minetest.register_craft({
"group:food_lettuce"
}
})
else
minetest.register_craft({
type = "shapeless",
output = "farming:burger",
recipe = {
"farming:bread", "group:food_mushroom", "group:food_tomato",
"group:food_cucumber", "group:food_onion", "group:food_lettuce"
}
})
end
-- Salad

View File

@ -7,7 +7,7 @@
farming = {
mod = "redo",
version = "20201210",
version = "20201213",
path = minetest.get_modpath("farming"),
select = {
type = "fixed",
@ -630,6 +630,8 @@ farming.beetroot = 0.001
farming.mint = 0.005
farming.cabbage = 0.001
farming.blackberry = 0.002
farming.soy = 0.001
farming.vanilla = 0.001
farming.lettuce = 0.001
farming.grains = true
farming.rarety = 0.002
@ -698,6 +700,8 @@ ddoo("ryeoatrice.lua", farming.grains)
ddoo("mint.lua", farming.mint)
ddoo("cabbage.lua", farming.cabbage)
ddoo("blackberry.lua", farming.blackberry)
ddoo("soy.lua", farming.soy)
ddoo("vanilla.lua", farming.vanilla)
ddoo("lettuce.lua", farming.lettuce)
dofile(farming.path .. "/food.lua")

View File

@ -128,6 +128,7 @@ Created by TenPlus1 (CC BY 3.0)
farming_rhubarb.png
farming_rhubarb_pie.png
farming_hemp*.png
farming_tofu*.png
Created by ademant (CC-BY-3.0)
farming_rye*.png
@ -148,3 +149,5 @@ Created by Felfa
farming_lettuce*.png
farming_burger.png
farming_berry_smoothie.png
farming_soy*.png
farming_vanilla*.png

View File

@ -52,6 +52,10 @@ register_plant("mint_4", 1, 75, {"default:dirt_with_grass",
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("soy_6", 20, 50, {"default:dirt_with_dry_grass",
"default:dirt_with_rainforest_litter",
"default:dry_dirt_with_dry_grass"}, "", -1, farming.soy)
register_plant("vanilla_7", 5, 35, nil, "", -1, farming.vanilla)
if minetest.get_mapgen_setting("mg_name") == "v6" then

BIN
textures/farming_soy_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

BIN
textures/farming_soy_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
textures/farming_soy_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

BIN
textures/farming_soy_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

BIN
textures/farming_soy_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
textures/farming_soy_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

BIN
textures/farming_soy_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

BIN
textures/farming_tofu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B