Add teosinte and corn with related crafts
25
README.md
@ -44,16 +44,27 @@ A concrete example with Wild carrot:
|
|||||||
- 11- Good you have a new variety of carrots, you taste it and you realize that his nutritional power is much better than the wild version.
|
- 11- Good you have a new variety of carrots, you taste it and you realize that his nutritional power is much better than the wild version.
|
||||||
|
|
||||||
For now this mod add:
|
For now this mod add:
|
||||||
- Wild Carrot
|
- Wild Carrot -> Carrot
|
||||||
- Carrot (domestic)
|
|
||||||
- Golden Carrot
|
- Golden Carrot
|
||||||
|
- Teosinte -> Corn
|
||||||
|
- Corn on the Cob
|
||||||
|
- Chicha (Bottle of Ethanol equivalent) (Original Texture by TenPlus1 modified by me)
|
||||||
|
|
||||||
Behaviour with optional mods loaded (for now):
|
Behaviour with optional mods loaded (for now):
|
||||||
- farming_redo: Domestic and golden carrots are provided by farming_redo. There is no carrot seeds.
|
- farming_redo:
|
||||||
- farming_plus: Domestic carrots and carrots seeds are provided by farming_plus.
|
--> Carrots and golden carrots are provided by farming_redo. There is no carrot seeds.
|
||||||
- farming_redo and farming_plus together: Domestic carrots and carrots seeds provided by farming_plus, golden carrot by farming_redo.
|
--> Corn, Corn on the Cob, Chicha replaced by Bottle of Ethanol (craft slightly changed)
|
||||||
- maidroid_core: The core farming was modified so that your robot has ability to harvest and plant wild carrots (flowers and seeds) and domestic carrots.
|
- farming_plus:
|
||||||
- WARNING: If farming_redo or farming_plus is loaded then maidroid_core will not load due to incompatibility.
|
--> Carrots and carrots seeds are provided by farming_plus.
|
||||||
|
- farming_redo and farming_plus together:
|
||||||
|
--> Carrots and carrots seeds provided by farming_plus, golden carrot by farming_redo.
|
||||||
|
- maidroid_core: The core farming was modified so that your robot has ability to harvest and plant:
|
||||||
|
--> wild carrots (flowers and seeds)
|
||||||
|
--> Carrots
|
||||||
|
--> Teosinte (Flowers and seeds)
|
||||||
|
--> Corn
|
||||||
|
|
||||||
|
WARNING: If farming_redo or farming_plus is loaded then maidroid_core will not load due to incompatibility.
|
||||||
|
|
||||||
LICENCES:
|
LICENCES:
|
||||||
- Code & Textures: GPLv3
|
- Code & Textures: GPLv3
|
||||||
|
257
init.lua
@ -6,8 +6,10 @@
|
|||||||
local redo = farming.mod and farming.mod == "redo"
|
local redo = farming.mod and farming.mod == "redo"
|
||||||
local plus = minetest.get_modpath("farming_plus")
|
local plus = minetest.get_modpath("farming_plus")
|
||||||
|
|
||||||
-- Wild carrot
|
-- Override flowers --
|
||||||
minetest.override_item("moreflowers:wild_carrot", {
|
--
|
||||||
|
minetest.override_item(
|
||||||
|
"moreflowers:wild_carrot", {
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -16,7 +18,23 @@ minetest.override_item("moreflowers:wild_carrot", {
|
|||||||
}
|
}
|
||||||
}})
|
}})
|
||||||
|
|
||||||
farming.register_plant("morefarming:wildcarrot", {
|
minetest.override_item(
|
||||||
|
"moreflowers:teosinte", {
|
||||||
|
drop = {
|
||||||
|
max_items = 1,
|
||||||
|
items = {
|
||||||
|
{ items = {"morefarming:seed_teosinte"}, rarity = 6},
|
||||||
|
{ items = {"moreflowers:teosinte"}},
|
||||||
|
}
|
||||||
|
}})
|
||||||
|
|
||||||
|
|
||||||
|
-- Register morefarming plants --
|
||||||
|
--
|
||||||
|
-- Wild Carrot
|
||||||
|
farming.register_plant(
|
||||||
|
"morefarming:wildcarrot",
|
||||||
|
{
|
||||||
description = "Wild Carrot seed",
|
description = "Wild Carrot seed",
|
||||||
inventory_image = "morefarming_wildcarrot_seed.png",
|
inventory_image = "morefarming_wildcarrot_seed.png",
|
||||||
steps = 8,
|
steps = 8,
|
||||||
@ -26,28 +44,38 @@ farming.register_plant("morefarming:wildcarrot", {
|
|||||||
groups = {flammable = 4},
|
groups = {flammable = 4},
|
||||||
})
|
})
|
||||||
|
|
||||||
local carrot_seed = "morefarming:seed_carrot"
|
minetest.override_item(
|
||||||
if redo then carrot_seed = "farming:carrot" end
|
"morefarming:wildcarrot",
|
||||||
if plus then carrot_seed = "farming_plus:carrot_seed" end
|
{
|
||||||
|
|
||||||
minetest.override_item("morefarming:wildcarrot_8", {
|
|
||||||
drop = {
|
|
||||||
max_items = 3,
|
|
||||||
items = {
|
|
||||||
{ items = {"morefarming:seed_wildcarrot"}, rarity = 6},
|
|
||||||
{ items = {carrot_seed}, rarity = 8},
|
|
||||||
{ items = {"morefarming:wildcarrot"}, rarity = 2},
|
|
||||||
{ items = {"moreflowers:wild_carrot"}},
|
|
||||||
}
|
|
||||||
}})
|
|
||||||
|
|
||||||
minetest.override_item("morefarming:wildcarrot", {
|
|
||||||
on_use = minetest.item_eat(1)
|
on_use = minetest.item_eat(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Teosinte
|
||||||
|
farming.register_plant(
|
||||||
|
"morefarming:teosinte",
|
||||||
|
{
|
||||||
|
description = "Teosinte seed",
|
||||||
|
inventory_image = "morefarming_teosinte_seed.png",
|
||||||
|
steps = 8,
|
||||||
|
minlight = 13,
|
||||||
|
maxlight = default.LIGHT_MAX,
|
||||||
|
fertility = {"grassland", "desert"},
|
||||||
|
groups = {flammable = 4},
|
||||||
|
})
|
||||||
|
|
||||||
|
for i=1, 8 do
|
||||||
|
minetest.override_item(
|
||||||
|
"morefarming:teosinte_"..i,
|
||||||
|
{
|
||||||
|
visual_scale = 1.3
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
if not redo and not plus then
|
if not redo and not plus then
|
||||||
-- Carrot
|
-- Carrot
|
||||||
farming.register_plant("morefarming:carrot", {
|
farming.register_plant(
|
||||||
|
"morefarming:carrot",
|
||||||
|
{
|
||||||
description = "Carrot seed",
|
description = "Carrot seed",
|
||||||
paramtype2 = "meshoptions",
|
paramtype2 = "meshoptions",
|
||||||
inventory_image = "morefarming_carrot_seed.png",
|
inventory_image = "morefarming_carrot_seed.png",
|
||||||
@ -59,23 +87,105 @@ if not redo and not plus then
|
|||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.override_item("morefarming:carrot", {
|
minetest.override_item(
|
||||||
|
"morefarming:carrot",
|
||||||
|
{
|
||||||
on_use = minetest.item_eat(4)
|
on_use = minetest.item_eat(4)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not redo then
|
||||||
|
-- Corn
|
||||||
|
farming.register_plant(
|
||||||
|
"morefarming:corn",
|
||||||
|
{
|
||||||
|
description = "Corn seed",
|
||||||
|
inventory_image = "morefarming_corn_seed.png",
|
||||||
|
steps = 8,
|
||||||
|
minlight = 13,
|
||||||
|
maxlight = default.LIGHT_MAX,
|
||||||
|
fertility = {"grassland", "desert"},
|
||||||
|
groups = {flammable = 4},
|
||||||
|
})
|
||||||
|
|
||||||
|
for i=1, 8 do
|
||||||
|
minetest.override_item(
|
||||||
|
"morefarming:corn_"..i,
|
||||||
|
{
|
||||||
|
visual_scale = 1.6
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.override_item(
|
||||||
|
"morefarming:corn",
|
||||||
|
{
|
||||||
|
on_use = minetest.item_eat(3)
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Override mature plants--
|
||||||
|
--
|
||||||
|
local carrot_seed = "morefarming:seed_carrot"
|
||||||
|
local corn_seed = "morefarming:seed_corn"
|
||||||
|
|
||||||
|
if redo then
|
||||||
|
carrot_seed = "farming:carrot"
|
||||||
|
corn_seed = "farming:corn"
|
||||||
|
end
|
||||||
|
|
||||||
|
if plus then
|
||||||
|
carrot_seed = "farming_plus:carrot_seed"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Wild Carrot
|
||||||
|
minetest.override_item(
|
||||||
|
"morefarming:wildcarrot_8", {
|
||||||
|
drop = {
|
||||||
|
max_items = 3,
|
||||||
|
items = {
|
||||||
|
{ items = {"morefarming:seed_wildcarrot"}, rarity = 6},
|
||||||
|
{ items = {carrot_seed}, rarity = 8},
|
||||||
|
{ items = {"morefarming:wildcarrot"}, rarity = 2},
|
||||||
|
{ items = {"moreflowers:wild_carrot"}},
|
||||||
|
}
|
||||||
|
}})
|
||||||
|
|
||||||
|
-- Teosinte
|
||||||
|
minetest.override_item(
|
||||||
|
"morefarming:teosinte_8", {
|
||||||
|
drop = {
|
||||||
|
max_items = 3,
|
||||||
|
items = {
|
||||||
|
{ items = {"morefarming:seed_teosinte"}, rarity = 3},
|
||||||
|
{ items = {corn_seed}, rarity = 8},
|
||||||
|
{ items = {"morefarming:teosinte"}, rarity = 2},
|
||||||
|
{ items = {"moreflowers:teosinte"}},
|
||||||
|
}
|
||||||
|
}})
|
||||||
|
|
||||||
|
-- Register craftitems
|
||||||
|
--
|
||||||
local carrot_item = "morefarming:carrot"
|
local carrot_item = "morefarming:carrot"
|
||||||
if plus then carrot_item = "farming_plus:carrot_item" end
|
local corn_item = "morefarming:corn"
|
||||||
|
|
||||||
|
if plus then
|
||||||
|
carrot_item = "farming_plus:carrot_item"
|
||||||
|
end
|
||||||
|
|
||||||
if not redo then
|
if not redo then
|
||||||
|
|
||||||
-- golden carrot
|
-- golden carrot
|
||||||
minetest.register_craftitem("morefarming:carrot_gold", {
|
minetest.register_craftitem(
|
||||||
|
"morefarming:carrot_gold",
|
||||||
|
{
|
||||||
description = "Golden Carrot",
|
description = "Golden Carrot",
|
||||||
inventory_image = "morefarming_carrot_gold.png",
|
inventory_image = "morefarming_carrot_gold.png",
|
||||||
on_use = minetest.item_eat(6),
|
on_use = minetest.item_eat(6),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = "morefarming:carrot_gold",
|
output = "morefarming:carrot_gold",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "default:gold_lump", ""},
|
{"", "default:gold_lump", ""},
|
||||||
@ -83,8 +193,64 @@ if not redo then
|
|||||||
{"", "default:gold_lump", ""},
|
{"", "default:gold_lump", ""},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Corn on the cob
|
||||||
|
minetest.register_craftitem(
|
||||||
|
"morefarming:corn_cooked",
|
||||||
|
{
|
||||||
|
description = "Corn on the Cob",
|
||||||
|
inventory_image = "morefarming_corn_cooked.png",
|
||||||
|
on_use = minetest.item_eat(5),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
type = "cooking",
|
||||||
|
cooktime = 10,
|
||||||
|
output = "morefarming:corn_cooked",
|
||||||
|
recipe = "morefarming:corn"
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("vessels") then
|
||||||
|
-- Chicha (Ethanol equivalent ;)
|
||||||
|
minetest.register_craftitem(
|
||||||
|
"morefarming:chicha",
|
||||||
|
{
|
||||||
|
description = "Chicha",
|
||||||
|
inventory_image = "morefarming_chicha.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "morefarming:chicha 2",
|
||||||
|
recipe = {
|
||||||
|
{ "vessels:glass_bottle", "vessels:glass_bottle", "morefarming:corn"},
|
||||||
|
{ "morefarming:corn", "morefarming:corn", "morefarming:corn"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "morefarming:chicha",
|
||||||
|
recipe = {
|
||||||
|
{ "vessels:glass_bottle", "morefarming:teosinte", "morefarming:teosinte"},
|
||||||
|
{ "morefarming:teosinte", "morefarming:teosinte", "morefarming:teosinte"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "morefarming:chicha",
|
||||||
|
burntime = 240,
|
||||||
|
replacements = {{"morefarming:chicha", "vessels:glass_bottle"}}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
elseif plus then
|
elseif plus then
|
||||||
minetest.register_craft({
|
-- Golden Carrot
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = "farming:carrot_gold",
|
output = "farming:carrot_gold",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "default:gold_lump", ""},
|
{"", "default:gold_lump", ""},
|
||||||
@ -94,9 +260,43 @@ elseif plus then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if redo then
|
||||||
|
|
||||||
|
if minetest.get_modpath("vessels") then
|
||||||
|
-- Bottle of Ethanol
|
||||||
|
minetest.clear_craft(
|
||||||
|
{
|
||||||
|
recipe = {
|
||||||
|
{"vessels:glass_bottle", "farming:corn", "farming:corn"},
|
||||||
|
{"farming:corn", "farming:corn", "farming:corn"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "farming:bottle_ethanol 2",
|
||||||
|
recipe = {
|
||||||
|
{ "vessels:glass_bottle", "vessels:glass_bottle", "farming:corn"},
|
||||||
|
{ "farming:corn", "farming:corn", "farming:corn"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft(
|
||||||
|
{
|
||||||
|
output = "farming:bottle_ethanol",
|
||||||
|
recipe = {
|
||||||
|
{ "vessels:glass_bottle", "morefarming:teosinte", "morefarming:teosinte"},
|
||||||
|
{ "morefarming:teosinte", "morefarming:teosinte", "morefarming:teosinte"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Maidroid behaviour
|
-- Maidroid behaviour
|
||||||
if not redo and not plus and minetest.get_modpath("maidroid_core") then
|
if not redo and not plus and minetest.get_modpath("maidroid_core") then
|
||||||
minetest.registered_items["moreflowers:wild_carrot"].groups["seed"] = 1
|
minetest.registered_items["moreflowers:wild_carrot"].groups["seed"] = 1
|
||||||
|
minetest.registered_items["moreflowers:teosinte"].groups["seed"] = 1
|
||||||
dofile(minetest.get_modpath("morefarming").."/maidroid_core_morefarming.lua")
|
dofile(minetest.get_modpath("morefarming").."/maidroid_core_morefarming.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -104,8 +304,13 @@ end
|
|||||||
if minetest.get_modpath("bonemeal") and bonemeal then
|
if minetest.get_modpath("bonemeal") and bonemeal then
|
||||||
|
|
||||||
bonemeal:add_crop({{"morefarming:wildcarrot_", 8, "morefarming:seed_wildcarrot"}})
|
bonemeal:add_crop({{"morefarming:wildcarrot_", 8, "morefarming:seed_wildcarrot"}})
|
||||||
|
bonemeal:add_crop({{"morefarming:teosinte_", 8, "morefarming:seed_teosinte"}})
|
||||||
|
|
||||||
if not redo and not plus then
|
if not redo then
|
||||||
|
if not plus then
|
||||||
bonemeal:add_crop({{"morefarming:carrot_", 8, "morefarming:seed_carrot"}})
|
bonemeal:add_crop({{"morefarming:carrot_", 8, "morefarming:seed_carrot"}})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
bonemeal:add_crop({{"morefarming:corn_", 8, "morefarming:seed_corn"}})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -19,6 +19,9 @@ local target_plants = {
|
|||||||
"moreflowers:wild_carrot",
|
"moreflowers:wild_carrot",
|
||||||
"morefarming:wildcarrot_8",
|
"morefarming:wildcarrot_8",
|
||||||
"morefarming:carrot_8",
|
"morefarming:carrot_8",
|
||||||
|
"moreflowers:teosinte",
|
||||||
|
"morefarming:teosinte_8",
|
||||||
|
"morefarming:corn_8",
|
||||||
}
|
}
|
||||||
|
|
||||||
local _aux = maidroid_core._aux
|
local _aux = maidroid_core._aux
|
||||||
|
BIN
textures/morefarming_chicha.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
textures/morefarming_corn.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
textures/morefarming_corn_1.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
textures/morefarming_corn_2.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/morefarming_corn_3.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
textures/morefarming_corn_4.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
textures/morefarming_corn_5.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
textures/morefarming_corn_6.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
textures/morefarming_corn_7.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
textures/morefarming_corn_8.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
textures/morefarming_corn_cooked.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
textures/morefarming_corn_seed.png
Normal file
After Width: | Height: | Size: 194 B |
BIN
textures/morefarming_teosinte.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
textures/morefarming_teosinte_1.png
Normal file
After Width: | Height: | Size: 131 B |
BIN
textures/morefarming_teosinte_2.png
Normal file
After Width: | Height: | Size: 140 B |
BIN
textures/morefarming_teosinte_3.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/morefarming_teosinte_4.png
Normal file
After Width: | Height: | Size: 154 B |
BIN
textures/morefarming_teosinte_5.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
textures/morefarming_teosinte_6.png
Normal file
After Width: | Height: | Size: 205 B |
BIN
textures/morefarming_teosinte_7.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
textures/morefarming_teosinte_8.png
Normal file
After Width: | Height: | Size: 236 B |
BIN
textures/morefarming_teosinte_seed.png
Normal file
After Width: | Height: | Size: 185 B |