milan2018_v3.2
Milan2018 2 years ago
parent 94779af9b0
commit 5f61268cb0

@ -0,0 +1,30 @@
std = "lua51+minetest"
unused_args = false
allow_defined_top = true
max_line_length = 999
stds.minetest = {
read_globals = {
"DIR_DELIM",
"minetest",
"core",
"dump",
"vector",
"nodeupdate",
"VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
table = {
fields = {
"copy",
},
},
}
}
read_globals = {
"default",
"moreores",
}

@ -1,2 +0,0 @@
default
moreores?

@ -1,27 +1,30 @@
-- Translation support
local S = minetest.get_translator("basic_materials")
-- items
minetest.register_craftitem("basic_materials:silicon", {
description = "Silicon lump",
description = S("Silicon lump"),
inventory_image = "basic_materials_silicon.png",
})
minetest.register_craftitem("basic_materials:ic", {
description = "Simple Integrated Circuit",
description = S("Simple Integrated Circuit"),
inventory_image = "basic_materials_ic.png",
})
minetest.register_craftitem("basic_materials:motor", {
description = "Simple Motor",
description = S("Simple Motor"),
inventory_image = "basic_materials_motor.png",
})
minetest.register_craftitem("basic_materials:heating_element", {
description = "Heating element",
description = S("Heating element"),
inventory_image = "basic_materials_heating_element.png",
})
minetest.register_craftitem("basic_materials:energy_crystal_simple", {
description = "Simple energy crystal",
description = S("Simple energy crystal"),
inventory_image = "basic_materials_energy_crystal.png",
})
@ -46,10 +49,14 @@ minetest.register_craft( {
minetest.register_craft( {
output = "basic_materials:motor 2",
recipe = {
{ "default:mese_crystal_fragment", "homedecor:copper_wire", "homedecor:plastic_sheeting" },
{ "default:copper_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:mese_crystal_fragment", "homedecor:copper_wire", "homedecor:plastic_sheeting" }
{ "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" },
{ "default:copper_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" }
},
replacements = {
{ "basic_materials:copper_wire", "basic_materials:empty_spool" },
{ "basic_materials:copper_wire", "basic_materials:empty_spool" },
}
})
minetest.register_craft( {

@ -7,6 +7,7 @@
local modpath = minetest.get_modpath("basic_materials")
basic_materials = {}
basic_materials.mod = { author = "Vanessa Dannenberg" }
dofile(modpath.."/metals.lua")
dofile(modpath.."/plastics.lua")

@ -0,0 +1,33 @@
# textdomain: basic_materials
Silicon lump=Siliziumklumpen
Simple Integrated Circuit=Einfacher Integrierter Schaltkreis
Simple Motor=Einfacher Motor
Heating element=Heizelement
Simple energy crystal=Einfacher Energiekristall
Spool of steel wire=Spule mit Stahldraht
Spool of copper wire=Spule mit Kupferdraht
Spool of silver wire=Spule mit Silberdraht
Spool of gold wire=Spule mit Golddraht
Steel Strip=Stahlstreifen
Copper Strip=Kupferstreifen
Steel Bar=Stahlstab
Chainlinks (brass)=Messingkettenglieder
Chainlinks (steel)=Stahlkettenglieder
Brass Ingot=Messingbarren
Steel gear=Stahlzahnrad
Padlock=Vorhängeschloss
Chain (steel, hanging)=Hängende Stahlkette
Chain (brass, hanging)=Hängende Messingkette
Brass Block=Messingblock
Oil extract=Ölextrakt
Unprocessed paraffin=Unverarbeitetes Paraffin
Uncooked Terracotta Base=Ungebranntes Terrakotta
Wet Cement=Nasser Zement
Cement=Zement
Concrete Block=Betonblock
Plastic sheet=Kunststoffplatte
Plastic strips=Kunststoffstreifen
Empty wire spool=Leere Drahtspule

@ -0,0 +1,33 @@
# textdomain: basic_materials
Silicon lump=Morceau de silicium
Simple Integrated Circuit=Circuit intégré simple
Simple Motor=Moteur simple
Heating element=Élément chauffant
Simple energy crystal=Cristal dénergie simple
Spool of steel wire=Bobine de fil dacier
Spool of copper wire=Bobine de fil de cuivre
Spool of silver wire=Bobine de fil dargent
Spool of gold wire=Bobine de fil dor
Steel Strip=Bande de acier
Copper Strip=Bande de cuivre
Steel Bar=Barre dacier
Chainlinks (brass)=Maillon en laiton
Chainlinks (steel)=Maillon en acier
Brass Ingot=Lingot de laiton
Steel gear=Rouage en acier
Padlock=Cadenas
Chain (steel, hanging)=Chaine en acier
Chain (brass, hanging)=Chaine en laiton
Brass Block=Bloc de laiton
Oil extract=Extrait dhuile
Unprocessed paraffin=Paraffine non transformée
Uncooked Terracotta Base=Argile crue
Wet Cement=Ciment humide
Cement=Ciment
Concrete Block=Bloc de béton
Plastic sheet=Morceau de plastique
Plastic strips=Bande de plastique
Empty wire spool=Bobine de fil vide

@ -0,0 +1,34 @@
# textdomain: basic_materials
# Author: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
Silicon lump=Grumo di silicio
Simple Integrated Circuit=Circuito integrato semplice
Simple Motor=Motore semplice
Heating element=Elemento riscaldante
Simple energy crystal=Cristallo di energia semplice
Spool of steel wire=Bobina di filo d'acciaio
Spool of copper wire=Bobina di filo di rame
Spool of silver wire=Bobina di filo d'argento
Spool of gold wire=Bobina di filo d'oro
Steel Strip=Striscia d'acciaio
Copper Strip=Striscia di rame
Steel Bar=Barra d'acciaio
Chainlinks (brass)=Catena (ottone)
Chainlinks (steel)=Catena (acciaio)
Brass Ingot=Lingotto di ottone
Steel gear=Ingranaggio d'acciaio
Padlock=Catenaccio
Chain (steel, hanging)=Catena (acciaio, pendente)
Chain (brass, hanging)=Catena (ottone, pendente)
Brass Block=Blocco di ottone
Oil extract=Estratto d'olio
Unprocessed paraffin=Paraffina grezza
Uncooked Terracotta Base=Argilla cruda
Wet Cement=Cemento umido
Cement=Cemento
Concrete Block=Blocco di calcestruzzo
Plastic sheet=Foglio di plastica
Plastic strips=Striscia di plastica
Empty wire spool=Rocchetto vuoto

@ -0,0 +1,33 @@
# textdomain: basic_materials
Silicon lump=Кусок Кремния
Simple Integrated Circuit=Микросхема
Simple Motor=Мотор
Heating element=Нить Накала
Simple energy crystal=Энергетический Кристалл
Spool of steel wire=Катушка Стальной Проволоки
Spool of copper wire=Катушка Медной Проволоки
Spool of silver wire=Катушка Серебрянной Проволоки
Spool of gold wire=Катушка Золотой Проволоки
Steel Strip=Стальная Полоса
Copper Strip=Медная Полоса
Steel Bar=Стальной Прут
Chainlinks (brass)=Латунные Звенья
Chainlinks (steel)=Стальные Звенья
Brass Ingot=Латунный Брусок
Steel gear=Стальная Шестерня
Padlock=Навесной Замок
Chain (steel, hanging)=Стальная Цепь
Chain (brass, hanging)=Латунная Цепь
Brass Block=Латунный Блок
Oil extract=Масляный Экстракт
Unprocessed paraffin=Необработанный Парафин
Uncooked Terracotta Base=Ком Мокрого Терракота
Wet Cement=Ком Мокрого Цемента
Cement=Цемент
Concrete Block=Железобетон
Plastic sheet=Пластиковый Лист
Plastic strips=Пластиковая Полоса
Empty wire spool=Пустая Катушка

@ -1,62 +1,73 @@
-- Translation support
local S = minetest.get_translator("basic_materials")
-- items
minetest.register_craftitem("basic_materials:steel_wire", {
description = "Spool of steel wire",
description = S("Spool of steel wire"),
groups = { wire = 1 },
inventory_image = "basic_materials_steel_wire.png"
})
minetest.register_craftitem("basic_materials:copper_wire", {
description = "Spool of copper wire",
description = S("Spool of copper wire"),
groups = { wire = 1 },
inventory_image = "basic_materials_copper_wire.png"
})
minetest.register_craftitem("basic_materials:silver_wire", {
description = "Spool of silver wire",
description = S("Spool of silver wire"),
groups = { wire = 1 },
inventory_image = "basic_materials_silver_wire.png"
})
minetest.register_craftitem("basic_materials:gold_wire", {
description = "Spool of gold wire",
description = S("Spool of gold wire"),
groups = { wire = 1 },
inventory_image = "basic_materials_gold_wire.png"
})
minetest.register_craftitem("basic_materials:steel_strip", {
description = "Steel Strip",
description = S("Steel Strip"),
groups = { strip = 1 },
inventory_image = "basic_materials_steel_strip.png"
})
minetest.register_craftitem("basic_materials:copper_strip", {
description = "Copper Strip",
description = S("Copper Strip"),
groups = { strip = 1 },
inventory_image = "basic_materials_copper_strip.png"
})
minetest.register_craftitem("basic_materials:steel_bar", {
description = "Steel Bar",
description = S("Steel Bar"),
inventory_image = "basic_materials_steel_bar.png",
})
minetest.register_craftitem("basic_materials:chainlink_brass", {
description = "Chainlinks (brass)",
description = S("Chainlinks (brass)"),
groups = { chainlinks = 1 },
inventory_image = "basic_materials_chainlink_brass.png"
})
minetest.register_craftitem("basic_materials:chainlink_steel", {
description = "Chainlinks (steel)",
description = S("Chainlinks (steel)"),
groups = { chainlinks = 1 },
inventory_image = "basic_materials_chainlink_steel.png"
})
minetest.register_craftitem("basic_materials:brass_ingot", {
description = "Brass Ingot",
description = S("Brass Ingot"),
inventory_image = "basic_materials_brass_ingot.png",
})
minetest.register_craftitem("basic_materials:gear_steel", {
description = "Steel gear",
description = S("Steel gear"),
inventory_image = "basic_materials_gear_steel.png"
})
minetest.register_craftitem("basic_materials:padlock", {
description = "Padlock",
description = S("Padlock"),
inventory_image = "basic_materials_padlock.png"
})
@ -67,16 +78,8 @@ local chains_sbox = {
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
}
local topchains_sbox = {
type = "fixed",
fixed = {
{ -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
{ -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 }
}
}
minetest.register_node("basic_materials:chain_steel", {
description = "Chain (steel, hanging)",
description = S("Chain (steel, hanging)"),
drawtype = "mesh",
mesh = "basic_materials_chains.obj",
tiles = {"basic_materials_chain_steel.png"},
@ -90,7 +93,7 @@ minetest.register_node("basic_materials:chain_steel", {
})
minetest.register_node("basic_materials:chain_brass", {
description = "Chain (brass, hanging)",
description = S("Chain (brass, hanging)"),
drawtype = "mesh",
mesh = "basic_materials_chains.obj",
tiles = {"basic_materials_chain_brass.png"},
@ -104,7 +107,7 @@ minetest.register_node("basic_materials:chain_brass", {
})
minetest.register_node("basic_materials:brass_block", {
description = "Brass Block",
description = S("Brass Block"),
tiles = { "basic_materials_brass_block.png" },
is_ground_content = false,
groups = {cracky=1, level=2},
@ -242,6 +245,18 @@ minetest.register_craft( {
},
})
if not minetest.get_modpath("moreores") then
-- Without moreores, there still should be a way to create brass.
minetest.register_craft( {
output = "basic_materials:brass_ingot 9",
recipe = {
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
{"default:gold_ingot", "default:copper_ingot", "default:gold_ingot"},
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
},
})
end
minetest.register_craft( {
type = "shapeless",
output = "basic_materials:brass_ingot 9",

@ -1,29 +1,32 @@
--items
-- Translation support
local S = minetest.get_translator("basic_materials")
-- items
minetest.register_craftitem("basic_materials:oil_extract", {
description = "Oil extract",
description = S("Oil extract"),
inventory_image = "basic_materials_oil_extract.png",
})
minetest.register_craftitem("basic_materials:paraffin", {
description = "Unprocessed paraffin",
description = S("Unprocessed paraffin"),
inventory_image = "basic_materials_paraffin.png",
})
minetest.register_craftitem("basic_materials:terracotta_base", {
description = "Uncooked Terracotta Base",
description = S("Uncooked Terracotta Base"),
inventory_image = "basic_materials_terracotta_base.png",
})
minetest.register_craftitem("basic_materials:wet_cement", {
description = "Wet Cement",
description = S("Wet Cement"),
inventory_image = "basic_materials_wet_cement.png",
})
-- nodes
minetest.register_node("basic_materials:cement_block", {
description = "Cement",
description = S("Cement"),
tiles = {"basic_materials_cement_block.png"},
is_ground_content = true,
groups = {cracky=2},
@ -31,7 +34,7 @@ minetest.register_node("basic_materials:cement_block", {
})
minetest.register_node("basic_materials:concrete_block", {
description = "Concrete Block",
description = S("Concrete Block"),
tiles = {"basic_materials_concrete_block.png",},
groups = {cracky=1, level=2, concrete=1},
sounds = default.node_sound_stone_defaults(),
@ -41,7 +44,7 @@ minetest.register_node("basic_materials:concrete_block", {
minetest.register_craft({
type = "shapeless",
output = "basic_materials:oil_extract 3",
output = "basic_materials:oil_extract 2",
recipe = {
"group:leaves",
"group:leaves",

@ -0,0 +1,4 @@
name = basic_materials
depends = default
optional_depends = moreores
min_minetest_version = 5.2.0

@ -1,17 +1,21 @@
-- Translation support
local S = minetest.get_translator("basic_materials")
-- items
minetest.register_craftitem("basic_materials:plastic_sheet", {
description = "Plastic sheet",
description = S("Plastic sheet"),
inventory_image = "basic_materials_plastic_sheet.png",
})
minetest.register_craftitem("basic_materials:plastic_strip", {
description = "Plastic strips",
description = S("Plastic strips"),
groups = { strip = 1 },
inventory_image = "basic_materials_plastic_strip.png",
})
minetest.register_craftitem("basic_materials:empty_spool", {
description = "Empty wire spool",
description = S("Empty wire spool"),
inventory_image = "basic_materials_empty_spool.png"
})

@ -0,0 +1 @@
farming.conf

@ -13,14 +13,21 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click.
- 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, 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
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates
- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.
- 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block.
- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf)
- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support.
- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread.
- 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable
- 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example)
- 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes
- 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes
- 1.34 - Added scarecrow Base (5x sticks in a cross shape)
- 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts.
- 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts.
- 1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts
- 1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods.
- 1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures

@ -21,7 +21,7 @@ The farming API allows you to easily register plants and hoes.
{
description = "", -- Description for tooltip
description = "My Hoe", -- Description for tooltip
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
max_uses = 30, -- Uses until destroyed
material = "", -- Material for recipes
@ -35,7 +35,7 @@ The farming API allows you to easily register plants and hoes.
### Plant definition
{
description = "", -- Description of seed item
description = "My Plant", -- Description of seed item
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
steps = 8, -- How many steps the plant has to grow, until it can be harvested
-- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)

@ -1,4 +1,6 @@
local S = farming.intllib
--= Helpers
local eth = minetest.get_modpath("ethereal")
@ -10,13 +12,13 @@ end
minetest.override_item("default:apple", {
groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1},
leafdecay = 3, leafdecay_drop = 1}
})
if minetest.registered_nodes["flowers:mushroom_brown"] then
minetest.override_item("flowers:mushroom_brown", {
light_source = 1,
groups = {food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 2},
groups = {food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 2}
})
end
@ -29,11 +31,11 @@ if eth then
alias("farming_plus:banana", "ethereal:banana")
else
minetest.register_node(":ethereal:banana", {
description = "Banana",
description = S("Banana"),
drawtype = "torchlike",
tiles = {"banana_single.png"},
inventory_image = "banana_single.png",
wield_image = "banana_single.png",
tiles = {"farming_banana_single.png"},
inventory_image = "farming_banana_single.png",
wield_image = "farming_banana_single.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
@ -43,18 +45,18 @@ else
},
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
on_use = minetest.item_eat(2),
sounds = default.node_sound_leaves_defaults(),
sounds = default.node_sound_leaves_defaults()
})
minetest.register_node(":ethereal:bananaleaves", {
description = "Banana Leaves",
tiles = {"banana_leaf.png"},
inventory_image = "banana_leaf.png",
wield_image = "banana_leaf.png",
description = S("Banana Leaves"),
tiles = {"farming_banana_leaf.png"},
inventory_image = "farming_banana_leaf.png",
wield_image = "farming_banana_leaf.png",
paramtype = "light",
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
sounds = default.node_sound_leaves_defaults(),
sounds = default.node_sound_leaves_defaults()
})
alias("farming_plus:banana_sapling", "default:sapling")
@ -87,7 +89,7 @@ if eth then
alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling")
else
minetest.register_node(":ethereal:orange", {
description = "Orange",
description = S("Orange"),
drawtype = "plantlike",
tiles = {"farming_orange.png"},
inventory_image = "farming_orange.png",
@ -101,7 +103,7 @@ else
},
groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
on_use = minetest.item_eat(4),
sounds = default.node_sound_leaves_defaults(),
sounds = default.node_sound_leaves_defaults()
})
alias("farming_plus:orange_item", "ethereal:orange")
@ -145,11 +147,11 @@ if eth then
alias("farming_plus:strawberry", "ethereal:strawberry_7")
else
minetest.register_craftitem(":ethereal:strawberry", {
description = "Strawberry",
inventory_image = "strawberry.png",
wield_image = "strawberry.png",
description = S("Strawberry"),
inventory_image = "farming_strawberry.png",
wield_image = "farming_strawberry.png",
groups = {food_strawberry = 1, flammable = 2},
on_use = minetest.item_eat(1),
on_use = minetest.item_eat(1)
})
alias("farming_plus:strawberry_item", "ethereal:strawberry")

@ -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
}

@ -16,29 +16,28 @@ minetest.register_node("farming:seed_barley", {
selection_box = farming.select,
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:barley_1")
end,
end
})
-- harvested barley
minetest.register_craftitem("farming:barley", {
description = S("Barley"),
inventory_image = "farming_barley.png",
groups = {food_barley = 1, flammable = 2},
groups = {food_barley = 1, flammable = 2}
})
-- flour
minetest.register_craft({
type = "shapeless",
output = "farming:flour",
recipe = {
"farming:barley", "farming:barley", "farming:barley",
"farming:barley", "farming:mortar_pestle"
{"farming:barley", "farming:barley", "farming:barley"},
{"farming:barley", "farming:mortar_pestle", ""}
},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}},
replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
})
-- barley definition
local crop_def = {
local def = {
drawtype = "plantlike",
tiles = {"farming_barley_1.png"},
paramtype = "light",
@ -57,66 +56,65 @@ local crop_def = {
}
-- stage 1
minetest.register_node("farming:barley_1", table.copy(crop_def))
minetest.register_node("farming:barley_1", table.copy(def))
-- stage 2
crop_def.tiles = {"farming_barley_2.png"}
minetest.register_node("farming:barley_2", table.copy(crop_def))
def.tiles = {"farming_barley_2.png"}
minetest.register_node("farming:barley_2", table.copy(def))
-- stage 3
crop_def.tiles = {"farming_barley_3.png"}
minetest.register_node("farming:barley_3", table.copy(crop_def))
def.tiles = {"farming_barley_3.png"}
minetest.register_node("farming:barley_3", table.copy(def))
-- stage 4
crop_def.tiles = {"farming_barley_4.png"}
minetest.register_node("farming:barley_4", table.copy(crop_def))
def.tiles = {"farming_barley_4.png"}
minetest.register_node("farming:barley_4", table.copy(def))
-- stage 5
crop_def.tiles = {"farming_barley_5.png"}
crop_def.drop = {
def.tiles = {"farming_barley_5.png"}
def.drop = {
items = {
{items = {'farming:barley'}, rarity = 2},
{items = {'farming:seed_barley'}, rarity = 2},
{items = {"farming:barley"}, rarity = 2},
{items = {"farming:seed_barley"}, rarity = 2}
}
}
minetest.register_node("farming:barley_5", table.copy(crop_def))
minetest.register_node("farming:barley_5", table.copy(def))
-- stage 6
crop_def.tiles = {"farming_barley_6.png"}
crop_def.drop = {
def.tiles = {"farming_barley_6.png"}
def.drop = {
items = {
{items = {'farming:barley'}, rarity = 2},
{items = {'farming:seed_barley'}, rarity = 1},
{items = {"farming:barley"}, rarity = 2},
{items = {"farming:seed_barley"}, rarity = 1}
}
}
minetest.register_node("farming:barley_6", table.copy(crop_def))
minetest.register_node("farming:barley_6", table.copy(def))
-- stage 7 (final)
crop_def.tiles = {"farming_barley_7.png"}
crop_def.groups.growing = 0
crop_def.drop = {
def.tiles = {"farming_barley_7.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:barley'}, rarity = 1},
{items = {'farming:barley'}, rarity = 3},
{items = {'farming:seed_barley'}, rarity = 1},
{items = {'farming:seed_barley'}, rarity = 3},
{items = {"farming:barley"}, rarity = 1},
{items = {"farming:barley"}, rarity = 3},
{items = {"farming:seed_barley"}, rarity = 1},
{items = {"farming:seed_barley"}, rarity = 3}
}
}
minetest.register_node("farming:barley_7", table.copy(crop_def))
minetest.register_node("farming:barley_7", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:barley"] = {
crop = "farming:barley",
seed = "farming:seed_barley",
minlight = 13,
maxlight = 15,
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 7
}
-- Fuel
minetest.register_craft({
type = "fuel",
recipe = "farming:barley",
burntime = 1,
burntime = 1
})

@ -13,7 +13,6 @@ local function place_beans(itemstack, placer, pointed_thing, plantname)
-- check if pointing at a node
if not pt or pt.type ~= "node" then
return
end
@ -27,7 +26,7 @@ local function place_beans(itemstack, placer, pointed_thing, plantname)
-- am I right-clicking on something that has a custom on_place set?
-- thanks to Krock for helping with this issue :)
local def = minetest.registered_nodes[under.name]
if placer and def and def.on_rightclick then
if placer and itemstack and def and def.on_rightclick then
return def.on_rightclick(pt.under, under, placer, itemstack)
end
@ -72,20 +71,17 @@ end
minetest.register_craftitem("farming:beans", {
description = S("Green Beans"),
inventory_image = "farming_beans.png",
groups = {food_beans = 1, flammable = 2},
groups = {seed = 2, food_beans = 1, flammable = 2},
on_use = minetest.item_eat(1),
on_place = function(itemstack, placer, pointed_thing)
return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1")
end,
end
})
-- beans can be used for green dye
minetest.register_craft({
output = "dye:green",
recipe = {
{'farming:beans'},
}
recipe = {{"farming:beans"}}
})
-- beanpole
@ -94,7 +90,7 @@ minetest.register_node("farming:beanpole", {
drawtype = "plantlike",
tiles = {"farming_beanpole.png"},
inventory_image = "farming_beanpole.png",
visual_scale = 1.90, -- 1.45,
visual_scale = 1.90,
paramtype = "light",
walkable = false,
buildable_to = true,
@ -162,30 +158,30 @@ minetest.register_node("farming:beanpole", {
minetest.register_craft({
output = "farming:beanpole",
recipe = {
{'', '', ''},
{'default:stick', '', 'default:stick'},
{'default:stick', '', 'default:stick'},
{"", "", ""},
{"default:stick", "", "default:stick"},
{"default:stick", "", "default:stick"}
}
})
minetest.register_craft({
type = "fuel",
recipe = "farming:beanpole",
burntime = 10,
burntime = 10
})
-- green bean definition
local crop_def = {
local def = {
drawtype = "plantlike",
tiles = {"farming_beanpole_1.png"},
visual_scale = 1.90, -- 1.45,
visual_scale = 1.90,
paramtype = "light",
walkable = false,
buildable_to = true,
sunlight_propagates = true,
drop = {
items = {
{items = {'farming:beanpole'}, rarity = 1},
{items = {"farming:beanpole"}, rarity = 1}
}
},
selection_box = farming.select,
@ -197,39 +193,39 @@ local crop_def = {
}
-- stage 1
minetest.register_node("farming:beanpole_1", table.copy(crop_def))
minetest.register_node("farming:beanpole_1", table.copy(def))
-- stage2
crop_def.tiles = {"farming_beanpole_2.png"}
minetest.register_node("farming:beanpole_2", table.copy(crop_def))
def.tiles = {"farming_beanpole_2.png"}
minetest.register_node("farming:beanpole_2", table.copy(def))
-- stage 3
crop_def.tiles = {"farming_beanpole_3.png"}
minetest.register_node("farming:beanpole_3", table.copy(crop_def))
def.tiles = {"farming_beanpole_3.png"}
minetest.register_node("farming:beanpole_3", table.copy(def))
-- stage 4
crop_def.tiles = {"farming_beanpole_4.png"}
minetest.register_node("farming:beanpole_4", table.copy(crop_def))
def.tiles = {"farming_beanpole_4.png"}
minetest.register_node("farming:beanpole_4", table.copy(def))
-- stage 5 (final)
crop_def.tiles = {"farming_beanpole_5.png"}
crop_def.groups.growing = 0
crop_def.drop = {
def.tiles = {"farming_beanpole_5.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:beanpole'}, rarity = 1},
{items = {'farming:beans 3'}, rarity = 1},
{items = {'farming:beans 2'}, rarity = 2},
{items = {'farming:beans 2'}, rarity = 3},
{items = {"farming:beanpole"}, rarity = 1},
{items = {"farming:beans 3"}, rarity = 1},
{items = {"farming:beans 2"}, rarity = 2},
{items = {"farming:beans 2"}, rarity = 3}
}
}
minetest.register_node("farming:beanpole_5", table.copy(crop_def))
minetest.register_node("farming:beanpole_5", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:beans"] = {
crop = "farming:beanpole",
seed = "farming:beans",
minlight = 13,
maxlight = 15,
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 5
}
@ -244,15 +240,15 @@ minetest.register_node("farming:beanbush", {
sunlight_propagates = true,
drop = {
items = {
{items = {'farming:beans 1'}, rarity = 1},
{items = {'farming:beans 1'}, rarity = 2},
{items = {'farming:beans 1'}, rarity = 3},
{items = {"farming:beans 1"}, rarity = 1},
{items = {"farming:beans 1"}, rarity = 2},
{items = {"farming:beans 1"}, rarity = 3}
}
},
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory=1
not_in_creative_inventory = 1
},
sounds = default.node_sound_leaves_defaults(),
sounds = default.node_sound_leaves_defaults()
})

@ -5,11 +5,11 @@ local S = farming.intllib
minetest.register_craftitem("farming:beetroot", {
description = S("Beetroot"),
inventory_image = "farming_beetroot.png",
groups = {food_beetroot = 1, flammable = 2},
groups = {seed = 2, food_beetroot = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
end,
on_use = minetest.item_eat(1),
on_use = minetest.item_eat(1)
})
-- beetroot soup
@ -17,32 +17,27 @@ minetest.register_craftitem("farming:beetroot_soup", {
description = S("Beetroot Soup"),
inventory_image = "farming_beetroot_soup.png",
groups = {flammable = 2},
on_use = minetest.item_eat(6, "farming:bowl"),
on_use = minetest.item_eat(6, "farming:bowl")
})
minetest.register_craft({
type = "shapeless",
output = "farming:beetroot_soup",
recipe = {
"group:food_beetroot", "group:food_beetroot",
"group:food_beetroot", "group:food_beetroot",
"group:food_beetroot", "group:food_beetroot","group:food_bowl"
{"group:food_beetroot", "group:food_beetroot", "group:food_beetroot"},
{"group:food_beetroot", "group:food_bowl", "group:food_beetroot"}
}
})
-- red dye
minetest.register_craft({
type = "shapeless",
output = "dye:red",
recipe = {"group:food_beetroot"},
recipe = {{"group:food_beetroot"}}
})
local crop_def = {
local def = {
drawtype = "plantlike",
tiles = {"farming_beetroot_1.png"},
paramtype = "light",
-- paramtype2 = "meshoptions",
-- place_param2 = 3,
sunlight_propagates = true,
waving = 1,
walkable = false,
@ -57,38 +52,38 @@ local crop_def = {
}
-- stage 1
minetest.register_node("farming:beetroot_1", table.copy(crop_def))
minetest.register_node("farming:beetroot_1", table.copy(def))
-- stage 2
crop_def.tiles = {"farming_beetroot_2.png"}
minetest.register_node("farming:beetroot_2", table.copy(crop_def))
def.tiles = {"farming_beetroot_2.png"}
minetest.register_node("farming:beetroot_2", table.copy(def))
-- stage 3
crop_def.tiles = {"farming_beetroot_3.png"}
minetest.register_node("farming:beetroot_3", table.copy(crop_def))
def.tiles = {"farming_beetroot_3.png"}
minetest.register_node("farming:beetroot_3", table.copy(def))
-- stage 4
crop_def.tiles = {"farming_beetroot_4.png"}
minetest.register_node("farming:beetroot_4", table.copy(crop_def))
def.tiles = {"farming_beetroot_4.png"}
minetest.register_node("farming:beetroot_4", table.copy(def))
-- stage 5
crop_def.tiles = {"farming_beetroot_5.png"}
crop_def.groups.growing = 0
crop_def.drop = {
def.tiles = {"farming_beetroot_5.png"}
def.groups.growing = nil
def.drop = {
max_items = 4, items = {
{items = {'farming:beetroot'}, rarity = 1},
{items = {'farming:beetroot'}, rarity = 2},
{items = {'farming:beetroot'}, rarity = 3},
{items = {'farming:beetroot'}, rarity = 4},
{items = {"farming:beetroot"}, rarity = 1},
{items = {"farming:beetroot"}, rarity = 2},
{items = {"farming:beetroot"}, rarity = 3},
{items = {"farming:beetroot"}, rarity = 4}
}
}
minetest.register_node("farming:beetroot_5", table.copy(crop_def))
minetest.register_node("farming:beetroot_5", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:beetroot"] = {
crop = "farming:beetroot",
seed = "farming:beetroot",
minlight = 13,
maxlight = 15,
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 5
}

@ -0,0 +1,62 @@
local S = farming.intllib
-- blackberries
minetest.register_craftitem("farming:blackberry", {
description = S("Blackberries"),
inventory_image = "farming_blackberry.png",
groups = {seed = 2, food_blackberries = 1, food_blackberry = 1,
food_berry = 1, flammable = 2},
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),
})
local def = {
drawtype = "plantlike",
tiles = {"farming_blackberry_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:blackberry_1", table.copy(def))
-- stage 2
def.tiles = {"farming_blackberry_2.png"}
minetest.register_node("farming:blackberry_2", table.copy(def))
-- stage 3
def.tiles = {"farming_blackberry_3.png"}
minetest.register_node("farming:blackberry_3", table.copy(def))
-- stage 4
def.tiles = {"farming_blackberry_4.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:blackberry 2'}, rarity = 1},
{items = {'farming:blackberry'}, rarity = 2},
{items = {'farming:blackberry'}, rarity = 3},
}
}
minetest.register_node("farming:blackberry_4", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:blackberry"] = {
crop = "farming:blackberry",
seed = "farming:blackberry",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 4
}

@ -3,50 +3,48 @@ local S = farming.intllib
-- blueberries
minetest.register_craftitem("farming:blueberries", {
description = S("Blueberries"),
description = S("Wild Blueberries"),
inventory_image = "farming_blueberries.png",
groups = {food_blueberries = 1, food_blueberry = 1, food_berry = 1, flammable = 2},
groups = {seed = 2, food_blueberries = 1, food_blueberry = 1,
food_berry = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
end,
on_use = minetest.item_eat(1),
on_use = minetest.item_eat(1)
})
-- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image)
minetest.register_craftitem("farming:muffin_blueberry", {
description = S("Blueberry Muffin"),
inventory_image = "farming_blueberry_muffin.png",
on_use = minetest.item_eat(2),
on_use = minetest.item_eat(2)
})
minetest.register_craft({
output = "farming:muffin_blueberry 2",
recipe = {
{"group:food_blueberries", "group:food_bread", "group:food_blueberries"},
{"group:food_blueberries", "group:food_bread", "group:food_blueberries"}
}
})
-- Blueberry Pie
minetest.register_craftitem("farming:blueberry_pie", {
description = S("Blueberry Pie"),
inventory_image = "farming_blueberry_pie.png",
on_use = minetest.item_eat(6),
on_use = minetest.item_eat(6)
})
minetest.register_craft({
output = "farming:blueberry_pie",
type = "shapeless",
recipe = {
"group:food_flour", "group:food_sugar",
"group:food_blueberries", "group:food_baking_tray"
{"group:food_flour", "group:food_sugar", "group:food_blueberries"},
{"group:food_baking_tray", "", ""}
},
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
})
-- blueberry definition
local crop_def = {
local def = {
drawtype = "plantlike",
tiles = {"farming_blueberry_1.png"},
paramtype = "light",
@ -63,33 +61,33 @@ local crop_def = {
}
-- stage 1
minetest.register_node("farming:blueberry_1", table.copy(crop_def))
minetest.register_node("farming:blueberry_1", table.copy(def))
-- stage 2
crop_def.tiles = {"farming_blueberry_2.png"}
minetest.register_node("farming:blueberry_2", table.copy(crop_def))
def.tiles = {"farming_blueberry_2.png"}
minetest.register_node("farming:blueberry_2", table.copy(def))
-- stage 3
crop_def.tiles = {"farming_blueberry_3.png"}
minetest.register_node("farming:blueberry_3", table.copy(crop_def))
def.tiles = {"farming_blueberry_3.png"}
minetest.register_node("farming:blueberry_3", table.copy(def))
-- stage 4 (final)
crop_def.tiles = {"farming_blueberry_4.png"}
crop_def.groups.growing = 0
crop_def.drop = {
def.tiles = {"farming_blueberry_4.png"}
def.groups.growing = nil
def.drop = {
items = {
{items = {'farming:blueberries 2'}, rarity = 1},
{items = {'farming:blueberries'}, rarity = 2},
{items = {'farming:blueberries'}, rarity = 3},
{items = {"farming:blueberries 2"}, rarity = 1},
{items = {"farming:blueberries"}, rarity = 2},
{items = {"farming:blueberries"}, rarity = 3}
}
}
minetest.register_node("farming:blueberry_4", table.copy(crop_def))
minetest.register_node("farming:blueberry_4", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:blueberries"] = {
crop = "farming:blueberry",
seed = "farming:blueberries",
minlight = 13,
maxlight = 15,
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 4
}

@ -0,0 +1,69 @@
local S = farming.intllib
-- cabbage
minetest.register_craftitem("farming:cabbage", {
description = S("Cabbage"),
inventory_image = "farming_cabbage.png",
groups = {seed = 2, food_cabbage = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cabbage_1")
end,
on_use = minetest.item_eat(1)
})
local def = {
drawtype = "plantlike",
tiles = {"farming_cabbage_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:cabbage_1", table.copy(def))
-- stage 2
def.tiles = {"farming_cabbage_2.png"}
minetest.register_node("farming:cabbage_2", table.copy(def))
-- stage 3
def.tiles = {"farming_cabbage_3.png"}
minetest.register_node("farming:cabbage_3", table.copy(def))
-- stage 4
def.tiles = {"farming_cabbage_4.png"}
minetest.register_node("farming:cabbage_4", table.copy(def))
-- stage 5
def.tiles = {"farming_cabbage_5.png"}
minetest.register_node("farming:cabbage_5", table.copy(def))
-- stage 6
def.tiles = {"farming_cabbage_6.png"}
def.groups.growing = nil
def.drop = {
max_items = 2, items = {
{items = {"farming:cabbage 2"}, rarity = 1},
{items = {"farming:cabbage 1"}, rarity = 2}
}
}
minetest.register_node("farming:cabbage_6", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:cabbage"] = {
crop = "farming:cabbage",
seed = "farming:cabbage",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 6
}

@ -10,11 +10,11 @@ local S = farming.intllib
minetest.register_craftitem("farming:carrot", {
description = S("Carrot"),
inventory_image = "farming_carrot.png",
groups = {food_carrot = 1, flammable = 2},
groups = {seed = 2, food_carrot = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
end,
on_use = minetest.item_eat(4),
on_use = minetest.item_eat(4)
})
-- carrot juice
@ -22,25 +22,26 @@ minetest.register_craftitem("farming:carrot_juice", {
description = S("Carrot Juice"),
inventory_image = "farming_carrot_juice.png",
on_use = minetest.item_eat(4, "vessels:drinking_glass"),
groups = {vessel = 1},
groups = {vessel = 1, drink = 1}
})
minetest.register_craft({