write something there

This commit is contained in:
N-Nachtigal 2025-05-04 16:01:41 +02:00
commit b4b6c08f4f
8546 changed files with 309825 additions and 0 deletions

View file

@ -0,0 +1,43 @@
Minetest Game mod: farming
==========================
See license.txt for license information.
Authors of source code
----------------------
Originally by PilzAdam (MIT)
webdesigner97 (MIT)
Various Minetest Game developers and contributors (MIT)
Authors of media (textures)
---------------------------
Created by PilzAdam (CC BY 3.0):
farming_bread.png
farming_soil.png
farming_soil_wet.png
farming_soil_wet_side.png
farming_string.png
Created by BlockMen (CC BY 3.0):
farming_tool_diamondhoe.png
farming_tool_mesehoe.png
farming_tool_bronzehoe.png
farming_tool_steelhoe.png
farming_tool_stonehoe.png
farming_tool_woodhoe.png
Created by MasterGollum (CC BY 3.0):
farming_straw.png
Created by Gambit (CC BY 3.0):
farming_wheat.png
farming_wheat_*.png
farming_cotton_*.png
farming_flour.png
farming_cotton_seed.png
farming_wheat_seed.png
Created by Napiophelios (CC BY-SA 3.0):
farming_cotton.png
Created by Extex101 (CC BY-SA 3.0):
farming_cotton_wild.png

View file

@ -0,0 +1,406 @@
-- farming/api.lua
-- support for MT game translation.
local S = farming.get_translator
-- Wear out hoes, place soil
-- TODO Ignore group:flower
farming.registered_plants = {}
farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return
end
if pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local above = minetest.get_node(p)
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return
end
if not minetest.registered_nodes[above.name] then
return
end
-- check if the node above the pointed thing is air
if above.name ~= "air" then
return
end
-- check if pointing at soil
if minetest.get_item_group(under.name, "soil") ~= 1 then
return
end
-- check if (wet) soil defined
local regN = minetest.registered_nodes
if regN[under.name].soil == nil or regN[under.name].soil.wet == nil or regN[under.name].soil.dry == nil then
return
end
local player_name = user and user:get_player_name() or ""
if minetest.is_protected(pt.under, player_name) then
minetest.record_protection_violation(pt.under, player_name)
return
end
if minetest.is_protected(pt.above, player_name) then
minetest.record_protection_violation(pt.above, player_name)
return
end
-- turn the node into soil and play sound
minetest.set_node(pt.under, {name = regN[under.name].soil.dry})
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.3,
}, true)
if not minetest.is_creative_enabled(player_name) then
-- wear tool
local wdef = itemstack:get_definition()
itemstack:add_wear_by_uses(uses)
-- tool break sound
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {pos = pt.above,
gain = 0.5}, true)
end
end
return itemstack
end
-- Register new hoes
farming.register_hoe = function(name, def)
-- Check for : prefix (register new hoes in your mod's namespace)
if name:sub(1,1) ~= ":" then
name = ":" .. name
end
-- Check def table
if def.description == nil then
def.description = S("Hoe")
end
if def.inventory_image == nil then
def.inventory_image = "unknown_item.png"
end
if def.max_uses == nil then
def.max_uses = 30
end
-- Register the tool
minetest.register_tool(name, {
description = def.description,
inventory_image = def.inventory_image,
on_use = function(itemstack, user, pointed_thing)
return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses)
end,
groups = def.groups,
sound = {breaks = "default_tool_breaks"},
})
-- Register its recipe
if def.recipe then
minetest.register_craft({
output = name:sub(2),
recipe = def.recipe
})
elseif def.material then
minetest.register_craft({
output = name:sub(2),
recipe = {
{def.material, def.material},
{"", "group:stick"},
{"", "group:stick"}
}
})
end
end
-- how often node timers for plants will tick, +/- some random value
local function tick(pos)
minetest.get_node_timer(pos):start(math.random(166, 286))
end
-- how often a growth failure tick is retried (e.g. too dark)
local function tick_again(pos)
minetest.get_node_timer(pos):start(math.random(40, 80))
end
-- Seed placement
farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return itemstack
end
if pt.type ~= "node" then
return itemstack
end
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
local player_name = placer and placer:get_player_name() or ""
if minetest.is_protected(pt.under, player_name) then
minetest.record_protection_violation(pt.under, player_name)
return
end
if minetest.is_protected(pt.above, player_name) then
minetest.record_protection_violation(pt.above, player_name)
return
end
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return itemstack
end
if not minetest.registered_nodes[above.name] then
return itemstack
end
-- check if pointing at the top of the node
if pt.above.y ~= pt.under.y+1 then
return itemstack
end
-- check if you can replace the node above the pointed node
if not minetest.registered_nodes[above.name].buildable_to then
return itemstack
end
-- check if pointing at soil
if minetest.get_item_group(under.name, "soil") < 2 then
return itemstack
end
-- add the node and remove 1 item from the itemstack
if placer then
default.log_player_action(placer, "places node", plantname, "at", pt.above)
end
minetest.add_node(pt.above, {name = plantname, param2 = 1})
tick(pt.above)
if not minetest.is_creative_enabled(player_name) then
itemstack:take_item()
end
return itemstack
end
-- check if on wet soil
farming.can_grow = function(pos)
local below = minetest.get_node(pos:offset(0, -1, 0))
return minetest.get_item_group(below.name, "soil") >= 3
end
farming.grow_plant = function(pos, elapsed)
local node = minetest.get_node(pos)
local name = node.name
local def = minetest.registered_nodes[name]
if not def.next_plant then
-- disable timer for fully grown plant
return
end
-- grow seed
if minetest.get_item_group(node.name, "seed") and def.fertility then
local soil_node = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
if not soil_node then
tick_again(pos)
return
end
-- omitted is a check for light, we assume seeds can germinate in the dark.
for _, v in pairs(def.fertility) do
if minetest.get_item_group(soil_node.name, v) ~= 0 then
local placenode = {name = def.next_plant}
if def.place_param2 then
placenode.param2 = def.place_param2
end
minetest.swap_node(pos, placenode)
if minetest.registered_nodes[def.next_plant].next_plant then
tick(pos)
return
end
end
end
return
end
if not (def.can_grow or farming.can_grow)(pos) then
tick_again(pos)
return
end
-- check light
local light = minetest.get_node_light(pos)
if not light or light < def.minlight or light > def.maxlight then
tick_again(pos)
return
end
-- grow
local placenode = {name = def.next_plant}
if def.place_param2 then
placenode.param2 = def.place_param2
end
minetest.swap_node(pos, placenode)
-- new timer needed?
if minetest.registered_nodes[def.next_plant].next_plant then
tick(pos)
end
return
end
-- Register plants
farming.register_plant = function(name, def)
local mname = name:split(":")[1]
local pname = name:split(":")[2]
-- Check def table
if not def.description then
def.description = S("Seed")
end
if not def.harvest_description then
def.harvest_description = pname:gsub("^%l", string.upper)
end
if not def.inventory_image then
def.inventory_image = "unknown_item.png"
end
if not def.steps then
return nil
end
if not def.minlight then
def.minlight = 1
end
if not def.maxlight then
def.maxlight = 14
end
if not def.fertility then
def.fertility = {}
end
farming.registered_plants[pname] = def
-- Register seed
local lbm_nodes = {mname .. ":seed_" .. pname}
local g = {seed = 1, snappy = 3, attached_node = 1, flammable = 2}
for k, v in pairs(def.fertility) do
g[v] = 1
end
minetest.register_node(":" .. mname .. ":seed_" .. pname, {
description = def.description,
tiles = {def.inventory_image},
inventory_image = def.inventory_image,
wield_image = def.inventory_image,
drawtype = "signlike",
groups = g,
paramtype = "light",
paramtype2 = "wallmounted",
place_param2 = def.place_param2 or nil, -- this isn't actually used for placement
walkable = false,
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
fertility = def.fertility,
sounds = default.node_sound_dirt_defaults({
dig = {name = "", gain = 0},
dug = {name = "default_grass_footstep", gain = 0.2},
place = {name = "default_place_node", gain = 0.25},
}),
on_place = function(itemstack, placer, pointed_thing)
local under = pointed_thing.under
local node = minetest.get_node(under)
local udef = minetest.registered_nodes[node.name]
if udef and udef.on_rightclick and
not (placer and placer:is_player() and
placer:get_player_control().sneak) then
return udef.on_rightclick(under, node, placer, itemstack,
pointed_thing) or itemstack
end
return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":seed_" .. pname)
end,
next_plant = mname .. ":" .. pname .. "_1",
on_timer = farming.grow_plant,
minlight = def.minlight,
maxlight = def.maxlight,
})
-- Register harvest
minetest.register_craftitem(":" .. mname .. ":" .. pname, {
description = def.harvest_description,
inventory_image = mname .. "_" .. pname .. ".png",
groups = def.groups or {flammable = 2},
})
-- Register growing steps
for i = 1, def.steps do
local base_rarity = 1
if def.steps ~= 1 then
base_rarity = 8 - (i - 1) * 7 / (def.steps - 1)
end
local drop = {
items = {
{items = {mname .. ":" .. pname}, rarity = base_rarity},
{items = {mname .. ":" .. pname}, rarity = base_rarity * 2},
{items = {mname .. ":seed_" .. pname}, rarity = base_rarity},
{items = {mname .. ":seed_" .. pname}, rarity = base_rarity * 2},
}
}
local nodegroups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1}
nodegroups[pname] = i
local next_plant = nil
if i < def.steps then
next_plant = mname .. ":" .. pname .. "_" .. (i + 1)
lbm_nodes[#lbm_nodes + 1] = mname .. ":" .. pname .. "_" .. i
end
minetest.register_node(":" .. mname .. ":" .. pname .. "_" .. i, {
drawtype = "plantlike",
waving = 1,
tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
paramtype = "light",
paramtype2 = def.paramtype2 or nil,
place_param2 = def.place_param2 or nil,
walkable = false,
buildable_to = true,
drop = drop,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
groups = nodegroups,
sounds = default.node_sound_leaves_defaults(),
next_plant = next_plant,
on_timer = farming.grow_plant,
minlight = def.minlight,
maxlight = def.maxlight,
})
end
-- replacement LBM for pre-nodetimer plants
minetest.register_lbm({
name = ":" .. mname .. ":start_nodetimer_" .. pname,
nodenames = lbm_nodes,
action = function(pos, node)
tick_again(pos)
end,
})
-- Return
local r = {
seed = mname .. ":seed_" .. pname,
harvest = mname .. ":" .. pname
}
return r
end

View file

@ -0,0 +1,54 @@
-- farming/hoes.lua
-- support for MT game translation.
local S = farming.get_translator
farming.register_hoe(":farming:hoe_wood", {
description = S("Wooden Hoe"),
inventory_image = "farming_tool_woodhoe.png",
max_uses = 30,
material = "group:wood",
groups = {hoe = 1, flammable = 2},
})
farming.register_hoe(":farming:hoe_stone", {
description = S("Stone Hoe"),
inventory_image = "farming_tool_stonehoe.png",
max_uses = 90,
material = "group:stone",
groups = {hoe = 1}
})
farming.register_hoe(":farming:hoe_steel", {
description = S("Steel Hoe"),
inventory_image = "farming_tool_steelhoe.png",
max_uses = 500,
material = "default:steel_ingot",
groups = {hoe = 1}
})
-- The following are deprecated by removing the 'material' field to prevent
-- crafting and removing from creative inventory, to cause them to eventually
-- disappear from worlds. The registrations should be removed in a future
-- release.
farming.register_hoe(":farming:hoe_bronze", {
description = S("Bronze Hoe"),
inventory_image = "farming_tool_bronzehoe.png",
max_uses = 220,
groups = {hoe = 1, not_in_creative_inventory = 1},
})
farming.register_hoe(":farming:hoe_mese", {
description = S("Mese Hoe"),
inventory_image = "farming_tool_mesehoe.png",
max_uses = 350,
groups = {hoe = 1, not_in_creative_inventory = 1},
})
farming.register_hoe(":farming:hoe_diamond", {
description = S("Diamond Hoe"),
inventory_image = "farming_tool_diamondhoe.png",
max_uses = 500,
groups = {hoe = 1, not_in_creative_inventory = 1},
})

View file

@ -0,0 +1,152 @@
-- farming/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("farming")
-- Global farming namespace
farming = {}
farming.path = minetest.get_modpath("farming")
farming.get_translator = S
-- Load files
dofile(farming.path .. "/api.lua")
dofile(farming.path .. "/nodes.lua")
dofile(farming.path .. "/hoes.lua")
-- Wheat
farming.register_plant("farming:wheat", {
description = S("Wheat Seed"),
harvest_description = S("Wheat"),
paramtype2 = "meshoptions",
inventory_image = "farming_wheat_seed.png",
steps = 8,
minlight = 13,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {food_wheat = 1, flammable = 4},
place_param2 = 3,
})
minetest.register_craftitem("farming:flour", {
description = S("Flour"),
inventory_image = "farming_flour.png",
groups = {food_flour = 1, flammable = 1},
})
minetest.register_craftitem("farming:bread", {
description = S("Bread"),
inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5),
groups = {food_bread = 1, flammable = 2},
})
minetest.register_craft({
type = "shapeless",
output = "farming:flour",
recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"}
})
minetest.register_craft({
type = "cooking",
cooktime = 15,
output = "farming:bread",
recipe = "farming:flour"
})
-- Cotton
farming.register_plant("farming:cotton", {
description = S("Cotton Seed"),
harvest_description = S("Cotton"),
inventory_image = "farming_cotton_seed.png",
steps = 8,
minlight = 13,
maxlight = default.LIGHT_MAX,
fertility = {"grassland", "desert"},
groups = {flammable = 4},
})
minetest.register_craftitem("farming:string", {
description = S("String"),
inventory_image = "farming_string.png",
groups = {flammable = 2},
})
minetest.register_craft({
output = "wool:white",
recipe = {
{"farming:cotton", "farming:cotton"},
{"farming:cotton", "farming:cotton"},
}
})
minetest.register_craft({
output = "farming:string 2",
recipe = {
{"farming:cotton"},
{"farming:cotton"},
}
})
-- Straw
minetest.register_craft({
output = "farming:straw 3",
recipe = {
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:wheat", "farming:wheat"},
}
})
minetest.register_craft({
output = "farming:wheat 3",
recipe = {
{"farming:straw"},
}
})
-- Fuels
minetest.register_craft({
type = "fuel",
recipe = "farming:wheat",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:cotton",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:string",
burntime = 1,
})
minetest.register_craft({
type = "fuel",
recipe = "farming:hoe_wood",
burntime = 5,
})
-- Register farming items as dungeon loot
if minetest.global_exists("dungeon_loot") then
dungeon_loot.register({
{name = "farming:string", chance = 0.5, count = {1, 8}},
{name = "farming:wheat", chance = 0.5, count = {2, 5}},
{name = "farming:seed_cotton", chance = 0.4, count = {1, 4},
types = {"normal"}},
})
end

View file

@ -0,0 +1,95 @@
License of source code
----------------------
The MIT License (MIT)
Copyright (C) 2012-2016 PilzAdam
Copyright (C) 2014-2016 webdesigner97
Copyright (C) 2012-2016 Various Minetest Game developers and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
For more details:
https://opensource.org/licenses/MIT
License of media (textures)
---------------------------
Attribution 3.0 Unported (CC BY 3.0)
Copyright (C) 2012-2016 PilzAdam
Copyright (C) 2014-2016 BlockMen
Copyright (C) 2015-2016 MasterGollum
Copyright (C) 2015-2016 Gambit
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by/3.0/
-----------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2017 Napiophelios
Copyright (C) 2020 Extex101
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Hacke
Seed=Samen
Wooden Hoe=Holzhacke
Stone Hoe=Steinhacke
Steel Hoe=Stahlhacke
Bronze Hoe=Bronzehacke
Mese Hoe=Mesehacke
Diamond Hoe=Diamanthacke
Wheat Seed=Weizensamen
Wheat=Weizen
Flour=Mehl
Bread=Brot
Cotton Seed=Baumwollsamen
Cotton=Baumwolle
String=Faden
Soil=Ackerboden
Wet Soil=Nasser Ackerboden
Savanna Soil=Savannenackerboden
Wet Savanna Soil=Nasser Savannenackerboden
Desert Sand Soil=Wüstensandackerboden
Wet Desert Sand Soil=Nasser Wüstensandackerboden
Straw=Stroh
Straw Stair=Strohtreppe
Inner Straw Stair=Innere Strohtreppe
Outer Straw Stair=Äußere Strohtreppe
Straw Slab=Strohplatte
Wild Cotton=Wilde Baumwolle

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Sarkilo
Seed=Semo
Wooden Hoe=Ligna sarkilo
Stone Hoe=Ŝtona sarkilo
Steel Hoe=Ŝtala sarkilo
Bronze Hoe=Bronza sarkilo
Mese Hoe=Mesea sarkilo
Diamond Hoe=Diamanta sarkilo
Wheat Seed=Tritika semo
Wheat=Tritiko
Flour=Faruno
Bread=Pano
Cotton Seed=Katuna semo
Cotton=Katuno
String=Ŝnuro
Soil=Tero
Wet Soil=Malseka tero
Savanna Soil=Savana tero
Wet Savanna Soil=Malseka savana tero
Desert Sand Soil=Dezerta sablo tero
Wet Desert Sand Soil=Malseka dezerta sablo tero
Straw=Pajlo
Straw Stair=Pajla ŝtupo
Inner Straw Stair=Interna pajla ŝtupo
Outer Straw Stair=Ekstera pajla ŝtupo
Straw Slab=Pajla plato
Wild Cotton=Sovaĝa kotonujo

View file

@ -0,0 +1,34 @@
# textdomain: farming
Hoe=
Seed=
Wooden Hoe=Azada de madera
Stone Hoe=Azada de piedra
Steel Hoe=Azada de acero
Bronze Hoe=Azada de bronce
Mese Hoe=Azada de mese
Diamond Hoe=Azada de diamante
Wheat Seed=Semilla de trigo
Wheat=Trigo
Flour=Harina
Bread=Pan
Cotton Seed=Semilla de algodón
Cotton=Algodón
String=Hilo
Soil=Tierra de cultivo
Wet Soil=Tierra de cultivo humeda
Savanna Soil=
Wet Savanna Soil=
Desert Sand Soil=Tierra de cultivo de arena de desierto
Wet Desert Sand Soil=Tierra de cultivo de arena de desierto humeda
Straw=Paja
Straw Stair=Escalera de paja
Inner Straw Stair=Escalera de paja interior
Outer Straw Stair=Escalera de paja exterior
Straw Slab=Losa de paja
Wild Cotton=Algodón silvestre
##### not used anymore #####
Dry Soil=Tierra de cultivo seca
Wet Dry Soil=Tierra de cultivo seca-humeda

View file

@ -0,0 +1,34 @@
# textdomain: farming
Hoe=Houe
Seed=Grain
Wooden Hoe=Houe en bois
Stone Hoe=Houe en pierre
Steel Hoe=Houe en acier
Bronze Hoe=Houe en bronze
Mese Hoe=Houe en Mese
Diamond Hoe=Houe en diamant
Wheat Seed=Grain de blé
Wheat=Blé
Flour=Farine
Bread=Pain
Cotton Seed=Graine de coton
Cotton=Coton
String=Ficelle
Soil=Sol
Wet Soil=Sol humide
Savanna Soil=Sol de la savanne
Wet Savanna Soil=Sol de la savanne humide
Desert Sand Soil=Sol de sable du désert
Wet Desert Sand Soil=Sol de sable du désert humide
Straw=Paille
Straw Stair=Escalier de paille
Inner Straw Stair=Escalier intérieur en paille
Outer Straw Stair=Escalier extérieur en paille
Straw Slab=Dalle de paille
Wild Cotton=Coton sauvage
##### not used anymore #####
Dry Soil=Sol sec
Wet Dry Soil=Sol sec et humide

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Cangkul
Seed=Benih
Wooden Hoe=Cangkul Kayu
Stone Hoe=Cangkul Batu
Steel Hoe=Cangkul Baja
Bronze Hoe=Cangkul Perunggu
Mese Hoe=Cangkul Mese
Diamond Hoe=Cangkul Berlian
Wheat Seed=Benih Gandum
Wheat=Gandum
Flour=Tepung
Bread=Roti
Cotton Seed=Benih Kapas
Cotton=Kapas
String=Benang
Soil=Tanah Tanam
Wet Soil=Tanah Tanam Basah
Savanna Soil=Tanah Tanam Sabana
Wet Savanna Soil=Tanah Tanam Sabana Basah
Desert Sand Soil=Pasir Tanam Gurun
Wet Desert Sand Soil=Pasir Tanam Gurun Basah
Straw=Jerami
Straw Stair=Tangga Jerami
Inner Straw Stair=Tangga Jerami Dalam
Outer Straw Stair=Tangga Jerami Luar
Straw Slab=Lempengan Jerami
Wild Cotton=Kapas Liar

View file

@ -0,0 +1,34 @@
# textdomain: farming
Hoe=
Seed=
Wooden Hoe=Zappa di legno
Stone Hoe=Zappa di pietra
Steel Hoe=Zappa d'acciaio
Bronze Hoe=Zappa di bronzo
Mese Hoe=Zappa di mese
Diamond Hoe=Zappa di diamante
Wheat Seed=Seme di grano
Wheat=Grano
Flour=Farina
Bread=Pane
Cotton Seed=Seme di cotone
Cotton=Cotone
String=Filo
Soil=Terreno
Wet Soil=Terreno bagnato
Savanna Soil=
Wet Savanna Soil=
Desert Sand Soil=Terreno di sabbia del deserto
Wet Desert Sand Soil=Terreno bagnato di sabbia del deserto
Straw=Paglia
Straw Stair=Scala di paglia
Inner Straw Stair=Scala di paglia interna
Outer Straw Stair=Scala di paglia esterna
Straw Slab=Lastra di paglia
Wild Cotton=
##### not used anymore #####
Dry Soil=Terreno asciutto
Wet Dry Soil=Terreno asciutto bagnato

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=クワ
Seed=種
Wooden Hoe=木製のクワ
Stone Hoe=石のクワ
Steel Hoe=鉄のクワ
Bronze Hoe=青銅のクワ
Mese Hoe=メセのクワ
Diamond Hoe=ダイヤモンドのクワ
Wheat Seed=小麦の種
Wheat=小麦
Flour=小麦粉
Bread=パン
Cotton Seed=綿の種
Cotton=綿
String=糸
Soil=土壌
Wet Soil=湿った土壌
Savanna Soil=サバンナの土壌
Wet Savanna Soil=湿ったサバンナの土壌
Desert Sand Soil=砂漠の砂の土壌
Wet Desert Sand Soil=湿った砂漠の砂の土壌
Straw=ワラ
Straw Stair=ワラの階段
Inner Straw Stair=ワラの凹階段
Outer Straw Stair=ワラの凸階段
Straw Slab=ワラの厚板
Wild Cotton=天然綿

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=lo te plixa
Seed=lo tsiju
Wooden Hoe=lo mudri te plixa
Stone Hoe=lo rokci te plixa
Steel Hoe=lo gasta te plixa
Bronze Hoe=lo ransu te plixa
Mese Hoe=lo za'e kunrmese te plixa
Diamond Hoe=lo tabjme te plixa
Wheat Seed=lo tsiju be lo maxri
Wheat=lo maxri
Flour=lo grupu'o
Bread=lo nanba
Cotton Seed=lo tsiju be lo mapni
Cotton=lo mapni
String=lo skori
Soil=lo ferti dertu
Wet Soil=lo cilmo ke ferti dertu
Savanna Soil=lo ferti ke sudytu'a dertu
Wet Savanna Soil=lo cilmo ke ferti ke sudytu'a dertu
Desert Sand Soil=lo ferti ke cantu'a canre
Wet Desert Sand Soil=lo cilmo ke ferti ke cantu'a canre
Straw=lo sudysrasu
Straw Stair=lo sudysrasu serti
Inner Straw Stair=lo zo'i sudysrasu serti
Outer Straw Stair=lo ze'o sudysrasu serti
Straw Slab=lo sudysrasu ke xadba bliku
Wild Cotton=lo cilce ke mapni spati

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Kaplis
Seed=Sēklas
Wooden Hoe=Koka kaplis
Stone Hoe=Akmens kaplis
Steel Hoe=Tērauda kaplis
Bronze Hoe=Bronzas kaplis
Mese Hoe=Mēzes kaplis
Diamond Hoe=Dimanta kaplis
Wheat Seed=Kviešu sēkla
Wheat=Kvieši
Flour=Milti
Bread=Maize
Cotton Seed=Kokvilnas sēklas
Cotton=Kokvilna
String=Stiegra
Soil=Augsne
Wet Soil=Slapja augsne
Savanna Soil=Savannas augsne
Wet Savanna Soil=Slapja savannas augsne
Desert Sand Soil=Tuksneša smilts augsne
Wet Desert Sand Soil=Slapja tuksneša smilts augsne
Straw=Salmi
Straw Stair=Salmu pakāpiens
Inner Straw Stair=Iekšējais salmu pakāpiens
Outer Straw Stair=Ārējais salmu pakāpiens
Straw Slab=Salmu plātne
Wild Cotton=Savvaļas kokvilna

View file

@ -0,0 +1,34 @@
# textdomain: farming
Hoe=Cangkul
Seed=Benih
Wooden Hoe=Cangkul Kayu
Stone Hoe=Cangkul Batu
Steel Hoe=Cangkul Keluli
Bronze Hoe=Cangkul Gangsa
Mese Hoe=Cangkul Mese
Diamond Hoe=Cangkul Intan
Wheat Seed=Benih Gandum
Wheat=Gandum
Flour=Tepung
Bread=Roti
Cotton Seed=Benih Kapas
Cotton=Kapas
String=Benang
Soil=Tanih
Wet Soil=Tanih Lembap
Savanna Soil=Tanih Savana
Wet Savanna Soil=Tanih Savana Lembap
Desert Sand Soil=Tanih Pasir Gurun
Wet Desert Sand Soil=Tanih Pasir Gurun Lembap
Straw=Jerami
Straw Stair=Tangga Jerami
Inner Straw Stair=Tangga Jerami Dalaman
Outer Straw Stair=Tangga Jerami Luaran
Straw Slab=Papak Jerami
Wild Cotton=Kapuk
##### not used anymore #####
Dry Soil=Tanih Kering
Wet Dry Soil=Tanih Kering Lembap

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Motyka
Seed=Nasiona
Wooden Hoe=Drewniana motyka
Stone Hoe=Kamienna motyka
Steel Hoe=Stalowa motyka
Bronze Hoe=Brązowa motyka
Mese Hoe=Mesowa motyka
Diamond Hoe=Diamentowa motyka
Wheat Seed=Nasiona pszenicy
Wheat=Pszenica
Flour=Mąka
Bread=Chleb
Cotton Seed=Nasiona bawełny
Cotton=Bawełna
String=Nić
Soil=Gleba
Wet Soil=Mokra gleba
Savanna Soil=Sawannowa gleba
Wet Savanna Soil=Mokra sawannowa gleba
Desert Sand Soil=Pustynno-piaszczysta gleba
Wet Desert Sand Soil=Mokra pustynno-piaszczysta gleba
Straw=Słoma
Straw Stair=Słomiane schody
Inner Straw Stair=Wewnętrzne słomiane schody
Outer Straw Stair=Zewnętrzne słomiane schody
Straw Slab=Słomiany półblok
Wild Cotton=Dzika bawełna

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Enxada
Seed=Semente
Wooden Hoe=Enxada de Madeira
Stone Hoe=Enxada de Pedra
Steel Hoe=Enxada de Aço
Bronze Hoe=Enxada de Bronze
Mese Hoe=Enxada de Mese
Diamond Hoe=Enxada de Diamante
Wheat Seed=Semente de Trigo
Wheat=Trigo
Flour=Farinha
Bread=Pão
Cotton Seed=Semente de Algodão
Cotton=Algodão
String=Fio
Soil=Solo
Wet Soil=Solo Molhado
Savanna Soil=Solo da Savana
Wet Savanna Soil=Solo da Savana Molhado
Desert Sand Soil=Solo Arenoso do Deserto
Wet Desert Sand Soil=Solo Arenoso do Deserto Molhado
Straw=Palha
Straw Stair=Escada de Palha
Inner Straw Stair=Escada de Palha Externa
Outer Straw Stair=Escada de Palha Interna
Straw Slab=Laje de Palha
Wild Cotton=Algodão Selvagem

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Enxada
Seed=Semente
Wooden Hoe=Enxada de Madeira
Stone Hoe=Enxada de Pedra
Steel Hoe=Enxada de Aço
Bronze Hoe=Enxada de Bronze
Mese Hoe=Enxada de Mese
Diamond Hoe=Enxada de Diamante
Wheat Seed=Semente de Trigo
Wheat=Trigo
Flour=Farinha
Bread=Pão
Cotton Seed=Semente de Algodão
Cotton=Algodão
String=Fio
Soil=Solo
Wet Soil=Solo Molhado
Savanna Soil=Solo da Savana
Wet Savanna Soil=Solo da Savana Molhado
Desert Sand Soil=Solo Arenoso do Deserto
Wet Desert Sand Soil=Solo Arenoso do Deserto Molhado
Straw=Palha
Straw Stair=Escada de Palha
Inner Straw Stair=Escada de Palha Externa
Outer Straw Stair=Escada de Palha Interna
Straw Slab=Laje de Palha
Wild Cotton=Algodão Selvagem

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Мотыга
Seed=Семена
Wooden Hoe=Деревянная мотыга
Stone Hoe=Каменная мотыга
Steel Hoe=Стальная мотыга
Bronze Hoe=Бронзовая мотыга
Mese Hoe=Мезовая мотыга
Diamond Hoe=Алмазная мотыга
Wheat Seed=Семена пшеницы
Wheat=Пшеница
Flour=Мука
Bread=Хлеб
Cotton Seed=Семена хлопчатника
Cotton=Хлопок
String=Нить
Soil=Почва
Wet Soil=Влажная почва
Savanna Soil=Саванная почва
Wet Savanna Soil=Влажная саванная почва
Desert Sand Soil=Пустынная песчаная почва
Wet Desert Sand Soil=Влажная пустынная песчаная почва
Straw=Солома
Straw Stair=Соломенные ступени
Inner Straw Stair=Внутренние соломенные ступени
Outer Straw Stair=Внешние соломенные ступени
Straw Slab=Соломенная плита
Wild Cotton=Дикий хлопчатник

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Motyka
Seed=Semienko
Wooden Hoe=Drevená motyka
Stone Hoe=Kamenná motyka
Steel Hoe=Oceľová motyka
Bronze Hoe=Bronzová motyka
Mese Hoe=Mese motyka
Diamond Hoe=Diamantová motyka
Wheat Seed=Pšeničné semienko
Wheat=Pšenica
Flour=Múka
Bread=Chlieb
Cotton Seed=Bavlnené semienko
Cotton=Bavlna
String=Šňúra
Soil=Zemina
Wet Soil=Mokrá zemina
Savanna Soil=Zemina zo savany
Wet Savanna Soil=Morká zemina zo savany
Desert Sand Soil=Zemina s púšte
Wet Desert Sand Soil=Mokrá zemina s púšte
Straw=Slama
Straw Stair=Slamenné schody
Inner Straw Stair=Vnútorné slamenné schodisko
Outer Straw Stair=Vonkajšie slamenné schodisko
Straw Slab=Slamenná doska
Wild Cotton=Divoká bavlna

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Kratta
Seed=Frö
Wooden Hoe=Träkratta
Stone Hoe=Stenkratta
Steel Hoe=Stålkratta
Bronze Hoe=Bronskratta
Mese Hoe=Mesekratta
Diamond Hoe=Diamantkratta
Wheat Seed=Vetefrö
Wheat=Vete
Flour=Mjöl
Bread=Bröd
Cotton Seed=Bomullfrö
Cotton=Bomull
String=Snöre
Soil=Odlinngsmark
Wet Soil=Våt Odlingsmark
Savanna Soil=Savannodlingsmark
Wet Savanna Soil=Våt savannodlingsmark
Desert Sand Soil=Ökensandsodlingsmark
Wet Desert Sand Soil=Våt ökensandsodlingsmark
Straw=Halm
Straw Stair=Halmtrappa
Inner Straw Stair=Inre halmtrappa
Outer Straw Stair=Yttre halmtrappa
Straw Slab=Halmplatta
Wild Cotton=

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=Мотика
Seed=Насіння
Wooden Hoe=Дерев'яна мотика
Stone Hoe=Кам'яна мотика
Steel Hoe=Сталева мотика
Bronze Hoe=Бронзова мотика
Mese Hoe=Месе-мотика
Diamond Hoe=Діамантова мотика
Wheat Seed=Насіння пшениці
Wheat=Пшениця
Flour=Борошно
Bread=Хліб
Cotton Seed=Насіння бавовнику
Cotton=Бавовна
String=Нитка
Soil=Ґрунт
Wet Soil=Вологий ґрунт
Savanna Soil=Саванний ґрунт
Wet Savanna Soil=Вологий саванний ґрунт
Desert Sand Soil=Пустельний піщаний ґрунт
Wet Desert Sand Soil=Вологий пустельний піщаний ґрунт
Straw=Солома
Straw Stair=Солом'яна сходинка
Inner Straw Stair=Кутова солом'яна сходинка (внутрішній кут)
Outer Straw Stair=Кутова солом'яна сходинка (зовнішній кут)
Straw Slab=Солом'яна плита
Wild Cotton=Дикий бавовник

View file

@ -0,0 +1,34 @@
# textdomain: farming
Hoe=锄头
Seed=种子
Wooden Hoe=木锄头
Stone Hoe=石锄头
Steel Hoe=铁锄头
Bronze Hoe=青铜锄头
Mese Hoe=黄石锄头
Diamond Hoe=钻石锄头
Wheat Seed=小麦种子
Wheat=小麦
Flour=面粉
Bread=面包
Cotton Seed=棉花种子
Cotton=棉
String=线
Soil=土
Wet Soil=湿土
Savanna Soil=草原土
Wet Savanna Soil=湿草原土
Desert Sand Soil=沙漠沙土
Wet Desert Sand Soil=湿沙漠沙土
Straw=稻草
Straw Stair=稻草台阶
Inner Straw Stair=稻草内楼梯
Outer Straw Stair=稻草外楼梯
Straw Slab=稻草板
Wild Cotton=野棉花
##### not used anymore #####
Dry Soil=干土
Wet Dry Soil=湿干土

View file

@ -0,0 +1,34 @@
# textdomain: farming
Hoe=鋤頭
Seed=種子
Wooden Hoe=木鋤頭
Stone Hoe=石鋤頭
Steel Hoe=鐵鋤頭
Bronze Hoe=青銅鋤頭
Mese Hoe=黃石鋤頭
Diamond Hoe=鑽石鋤頭
Wheat Seed=小麥種子
Wheat=小麥
Flour=麵粉
Bread=麵包
Cotton Seed=棉花種子
Cotton=棉
String=線
Soil=土
Wet Soil=溼土
Savanna Soil=草原土
Wet Savanna Soil=溼草原土
Desert Sand Soil=沙漠沙土
Wet Desert Sand Soil=溼沙漠沙土
Straw=稻草
Straw Stair=稻草臺階
Inner Straw Stair=稻草內樓梯
Outer Straw Stair=稻草外樓梯
Straw Slab=稻草板
Wild Cotton=野生棉花
##### not used anymore #####
Dry Soil=乾土
Wet Dry Soil=溼乾土

View file

@ -0,0 +1,28 @@
# textdomain: farming
Hoe=
Seed=
Wooden Hoe=
Stone Hoe=
Steel Hoe=
Bronze Hoe=
Mese Hoe=
Diamond Hoe=
Wheat Seed=
Wheat=
Flour=
Bread=
Cotton Seed=
Cotton=
String=
Soil=
Wet Soil=
Savanna Soil=
Wet Savanna Soil=
Desert Sand Soil=
Wet Desert Sand Soil=
Straw=
Straw Stair=
Inner Straw Stair=
Outer Straw Stair=
Straw Slab=
Wild Cotton=

View file

@ -0,0 +1,4 @@
name = farming
description = Minetest Game mod: farming
depends = default, wool, stairs
optional_depends = dungeon_loot

View file

@ -0,0 +1,282 @@
-- farming/nodes.lua
-- support for MT game translation.
local S = farming.get_translator
minetest.override_item("default:dirt", {
soil = {
base = "default:dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_grass", {
soil = {
base = "default:dirt_with_grass",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_dry_grass", {
soil = {
base = "default:dirt_with_dry_grass",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_rainforest_litter", {
soil = {
base = "default:dirt_with_rainforest_litter",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dirt_with_coniferous_litter", {
soil = {
base = "default:dirt_with_coniferous_litter",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.override_item("default:dry_dirt", {
soil = {
base = "default:dry_dirt",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
minetest.override_item("default:dry_dirt_with_dry_grass", {
soil = {
base = "default:dry_dirt_with_dry_grass",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
minetest.register_node("farming:soil", {
description = S("Soil"),
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
drop = "default:dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.register_node("farming:soil_wet", {
description = S("Wet Soil"),
tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
drop = "default:dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dirt",
dry = "farming:soil",
wet = "farming:soil_wet"
}
})
minetest.register_node("farming:dry_soil", {
description = S("Savanna Soil"),
tiles = {"default_dry_dirt.png^farming_soil.png", "default_dry_dirt.png"},
drop = "default:dry_dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dry_dirt",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
minetest.register_node("farming:dry_soil_wet", {
description = S("Wet Savanna Soil"),
tiles = {"default_dry_dirt.png^farming_soil_wet.png", "default_dry_dirt.png^farming_soil_wet_side.png"},
drop = "default:dry_dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1},
sounds = default.node_sound_dirt_defaults(),
soil = {
base = "default:dry_dirt",
dry = "farming:dry_soil",
wet = "farming:dry_soil_wet"
}
})
minetest.override_item("default:desert_sand", {
groups = {crumbly=3, falling_node=1, sand=1, soil = 1},
soil = {
base = "default:desert_sand",
dry = "farming:desert_sand_soil",
wet = "farming:desert_sand_soil_wet"
}
})
minetest.register_node("farming:desert_sand_soil", {
description = S("Desert Sand Soil"),
drop = "default:desert_sand",
tiles = {"farming_desert_sand_soil.png", "default_desert_sand.png"},
groups = {crumbly=3, not_in_creative_inventory = 1, falling_node=1, sand=1, soil = 2, desert = 1, field = 1},
sounds = default.node_sound_sand_defaults(),
soil = {
base = "default:desert_sand",
dry = "farming:desert_sand_soil",
wet = "farming:desert_sand_soil_wet"
}
})
minetest.register_node("farming:desert_sand_soil_wet", {
description = S("Wet Desert Sand Soil"),
drop = "default:desert_sand",
tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"},
groups = {crumbly=3, falling_node=1, sand=1, not_in_creative_inventory=1, soil=3, wet = 1, desert = 1, field = 1},
sounds = default.node_sound_sand_defaults(),
soil = {
base = "default:desert_sand",
dry = "farming:desert_sand_soil",
wet = "farming:desert_sand_soil_wet"
}
})
minetest.register_node("farming:straw", {
description = S("Straw"),
tiles = {"farming_straw.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
sounds = default.node_sound_leaves_defaults(),
})
-- Registered before the stairs so the stairs get fuel recipes.
minetest.register_craft({
type = "fuel",
recipe = "farming:straw",
burntime = 3,
})
do
local recipe = "farming:straw"
local groups = {snappy = 3, flammable = 4}
local images = {"farming_straw.png"}
local sounds = default.node_sound_leaves_defaults()
stairs.register_stair("straw", recipe, groups, images, S("Straw Stair"),
sounds, true)
stairs.register_stair_inner("straw", recipe, groups, images, "",
sounds, true, S("Inner Straw Stair"))
stairs.register_stair_outer("straw", recipe, groups, images, "",
sounds, true, S("Outer Straw Stair"))
stairs.register_slab("straw", recipe, groups, images, S("Straw Slab"),
sounds, true)
end
minetest.register_abm({
label = "Farming soil",
nodenames = {"group:field"},
interval = 15,
chance = 4,
action = function(pos, node)
local n_def = minetest.registered_nodes[node.name] or nil
local wet = n_def.soil.wet or nil
local base = n_def.soil.base or nil
local dry = n_def.soil.dry or nil
if not n_def or not n_def.soil or not wet or not base or not dry then
return
end
pos.y = pos.y + 1
local nn = minetest.get_node_or_nil(pos)
if not nn or not nn.name then
return
end
local nn_def = minetest.registered_nodes[nn.name] or nil
pos.y = pos.y - 1
if nn_def and nn_def.walkable and minetest.get_item_group(nn.name, "plant") == 0 then
minetest.set_node(pos, {name = base})
return
end
-- check if there is water nearby
local wet_lvl = minetest.get_item_group(node.name, "wet")
if minetest.find_node_near(pos, 3, {"group:water"}) then
-- if it is dry soil and not base node, turn it into wet soil
if wet_lvl == 0 then
minetest.set_node(pos, {name = wet})
end
else
-- only turn back if there are no unloaded blocks (and therefore
-- possible water sources) nearby
if not minetest.find_node_near(pos, 3, {"ignore"}) then
-- turn it back into base if it is already dry
if wet_lvl == 0 then
-- only turn it back if there is no plant/seed on top of it
if minetest.get_item_group(nn.name, "plant") == 0 and minetest.get_item_group(nn.name, "seed") == 0 then
minetest.set_node(pos, {name = base})
end
-- if its wet turn it back into dry soil
elseif wet_lvl == 1 then
minetest.set_node(pos, {name = dry})
end
end
end
end,
})
-- Make default:grass_* occasionally drop wheat seed
for i = 1, 5 do
minetest.override_item("default:grass_"..i, {drop = {
max_items = 1,
items = {
{items = {"farming:seed_wheat"}, rarity = 5},
{items = {"default:grass_1"}},
}
}})
end
-- Make default:junglegrass occasionally drop cotton seed.
-- This is the old source of cotton seeds that makes no sense. It is a leftover
-- from Mapgen V6 where junglegrass was the only plant available to be a source.
-- This source is kept for now to avoid disruption but should probably be
-- removed in future as players get used to the new source.
minetest.override_item("default:junglegrass", {drop = {
max_items = 1,
items = {
{items = {"farming:seed_cotton"}, rarity = 8},
{items = {"default:junglegrass"}},
}
}})
-- Wild cotton as a source of cotton seed
minetest.register_node("farming:cotton_wild", {
description = S("Wild Cotton"),
drawtype = "plantlike",
waving = 1,
tiles = {"farming_cotton_wild.png"},
inventory_image = "farming_cotton_wild.png",
wield_image = "farming_cotton_wild.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, attached_node = 1, flammable = 4},
drop = "farming:seed_cotton",
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B