This commit is contained in:
root 2020-12-09 21:59:08 +01:00
parent a19f5f5649
commit cab32fbda5
33 changed files with 86 additions and 78 deletions

View file

@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog: ### Changelog:
- 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 - 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, minmax light setting
options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna 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.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.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.

View file

@ -108,8 +108,8 @@ minetest.register_node("farming:barley_7", table.copy(def))
farming.registered_plants["farming:barley"] = { farming.registered_plants["farming:barley"] = {
crop = "farming:barley", crop = "farming:barley",
seed = "farming:seed_barley", seed = "farming:seed_barley",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 7 steps = 7
} }

View file

@ -226,8 +226,8 @@ minetest.register_node("farming:beanpole_5", table.copy(def))
farming.registered_plants["farming:beans"] = { farming.registered_plants["farming:beans"] = {
crop = "farming:beanpole", crop = "farming:beanpole",
seed = "farming:beans", seed = "farming:beans",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -86,7 +86,7 @@ minetest.register_node("farming:beetroot_5", table.copy(def))
farming.registered_plants["farming:beetroot"] = { farming.registered_plants["farming:beetroot"] = {
crop = "farming:beetroot", crop = "farming:beetroot",
seed = "farming:beetroot", seed = "farming:beetroot",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -88,7 +88,7 @@ minetest.register_node("farming:blueberry_4", table.copy(def))
farming.registered_plants["farming:blueberries"] = { farming.registered_plants["farming:blueberries"] = {
crop = "farming:blueberry", crop = "farming:blueberry",
seed = "farming:blueberries", seed = "farming:blueberries",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 4 steps = 4
} }

View file

@ -63,7 +63,7 @@ minetest.register_node("farming:cabbage_6", table.copy(def))
farming.registered_plants["farming:cabbage"] = { farming.registered_plants["farming:cabbage"] = {
crop = "farming:cabbage", crop = "farming:cabbage",
seed = "farming:cabbage", seed = "farming:cabbage",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 6 steps = 6
} }

View file

@ -118,7 +118,7 @@ minetest.register_node("farming:carrot_8", table.copy(def))
farming.registered_plants["farming:carrot"] = { farming.registered_plants["farming:carrot"] = {
crop = "farming:carrot", crop = "farming:carrot",
seed = "farming:carrot", seed = "farming:carrot",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -95,7 +95,7 @@ minetest.register_node("farming:chili_8", table.copy(def))
farming.registered_plants["farming:chili_pepper"] = { farming.registered_plants["farming:chili_pepper"] = {
crop = "farming:chili", crop = "farming:chili",
seed = "farming:chili_pepper", seed = "farming:chili_pepper",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -194,8 +194,8 @@ minetest.register_node("farming:cocoa_4", table.copy(def))
farming.registered_plants["farming:cocoa_beans"] = { farming.registered_plants["farming:cocoa_beans"] = {
crop = "farming:cocoa", crop = "farming:cocoa",
seed = "farming:cocoa_beans", seed = "farming:cocoa_beans",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 4 steps = 4
} }

View file

@ -106,7 +106,7 @@ minetest.register_node("farming:coffee_5", table.copy(def))
farming.registered_plants["farming:coffee"] = { farming.registered_plants["farming:coffee"] = {
crop = "farming:coffee", crop = "farming:coffee",
seed = "farming:coffee_beans", seed = "farming:coffee_beans",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -153,7 +153,7 @@ minetest.register_node("farming:corn_8", table.copy(def))
farming.registered_plants["farming:corn"] = { farming.registered_plants["farming:corn"] = {
crop = "farming:corn", crop = "farming:corn",
seed = "farming:corn", seed = "farming:corn",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -172,8 +172,8 @@ minetest.register_node("farming:cotton_8", table.copy(def))
farming.registered_plants["farming:cotton"] = { farming.registered_plants["farming:cotton"] = {
crop = "farming:cotton", crop = "farming:cotton",
seed = "farming:seed_cotton", seed = "farming:seed_cotton",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -59,7 +59,7 @@ minetest.register_node("farming:cucumber_4", table.copy(def))
farming.registered_plants["farming:cucumber"] = { farming.registered_plants["farming:cucumber"] = {
crop = "farming:cucumber", crop = "farming:cucumber",
seed = "farming:cucumber", seed = "farming:cucumber",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 4 steps = 4
} }

View file

@ -129,7 +129,7 @@ minetest.register_node("farming:garlic_5", table.copy(def))
farming.registered_plants["farming:garlic"] = { farming.registered_plants["farming:garlic"] = {
crop = "farming:garlic", crop = "farming:garlic",
seed = "farming:garlic_clove", seed = "farming:garlic_clove",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -233,8 +233,8 @@ minetest.register_node("farming:grapes_8", table.copy(def))
farming.registered_plants["farming:grapes"] = { farming.registered_plants["farming:grapes"] = {
crop = "farming:grapes", crop = "farming:grapes",
seed = "farming:grapes", seed = "farming:grapes",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -256,7 +256,7 @@ minetest.register_node("farming:hemp_8", table.copy(def))
farming.registered_plants["farming:hemp"] = { farming.registered_plants["farming:hemp"] = {
crop = "farming:hemp", crop = "farming:hemp",
seed = "farming:seed_hemp", seed = "farming:seed_hemp",
minlight = 13, mminlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -88,7 +88,7 @@ minetest.register_node("farming:melon_8", table.copy(def))
farming.registered_plants["farming:melon"] = { farming.registered_plants["farming:melon"] = {
crop = "farming:melon", crop = "farming:melon",
seed = "farming:melon_slice", seed = "farming:melon_slice",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -101,7 +101,7 @@ minetest.register_node("farming:mint_4", table.copy(def))
farming.registered_plants["farming:mint"] = { farming.registered_plants["farming:mint"] = {
crop = "farming:mint", crop = "farming:mint",
seed = "farming:seed_mint", seed = "farming:seed_mint",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 4 steps = 4
} }

View file

@ -90,7 +90,7 @@ minetest.register_node("farming:onion_5", table.copy(def))
farming.registered_plants["farming:onion"] = { farming.registered_plants["farming:onion"] = {
crop = "farming:onion", crop = "farming:onion",
seed = "farming:onion", seed = "farming:onion",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -91,7 +91,7 @@ minetest.register_node("farming:pea_5", table.copy(def))
farming.registered_plants["farming:pea_pod"] = { farming.registered_plants["farming:pea_pod"] = {
crop = "farming:pea", crop = "farming:pea",
seed = "farming:pea_pod", seed = "farming:pea_pod",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -109,7 +109,7 @@ minetest.register_node("farming:pepper_5", table.copy(def))
farming.registered_plants["farming:pepper"] = { farming.registered_plants["farming:pepper"] = {
crop = "farming:pepper", crop = "farming:pepper",
seed = "farming:peppercorn", seed = "farming:peppercorn",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 5 steps = 5
} }

View file

@ -135,7 +135,7 @@ minetest.register_node("farming:pineapple_8", table.copy(def))
farming.registered_plants["farming:pineapple"] = { farming.registered_plants["farming:pineapple"] = {
crop = "farming:pineapple", crop = "farming:pineapple",
seed = "farming:pineapple_top", seed = "farming:pineapple_top",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -106,7 +106,7 @@ minetest.register_node("farming:potato_4", table.copy(def))
farming.registered_plants["farming:potato"] = { farming.registered_plants["farming:potato"] = {
crop = "farming:potato", crop = "farming:potato",
seed = "farming:potato", seed = "farming:potato",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 4 steps = 4
} }

View file

@ -200,7 +200,7 @@ minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")
farming.registered_plants["farming:pumpkin"] = { farming.registered_plants["farming:pumpkin"] = {
crop = "farming:pumpkin", crop = "farming:pumpkin",
seed = "farming:pumpkin_slice", seed = "farming:pumpkin_slice",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -74,7 +74,7 @@ minetest.register_node("farming:raspberry_4", table.copy(def))
farming.registered_plants["farming:raspberries"] = { farming.registered_plants["farming:raspberries"] = {
crop = "farming:raspberry", crop = "farming:raspberry",
seed = "farming:raspberries", seed = "farming:raspberries",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 4 steps = 4
} }

View file

@ -71,7 +71,7 @@ minetest.register_node("farming:rhubarb_3", table.copy(def))
farming.registered_plants["farming:rhubarb"] = { farming.registered_plants["farming:rhubarb"] = {
crop = "farming:rhubarb", crop = "farming:rhubarb",
seed = "farming:rhubarb", seed = "farming:rhubarb",
minlight = 13, minlight = 10,
maxlight = 15, maxlight = 12,
steps = 3 steps = 3
} }

View file

@ -83,7 +83,7 @@ minetest.register_node("farming:tomato_8", table.copy(def))
farming.registered_plants["farming:tomato"] = { farming.registered_plants["farming:tomato"] = {
crop = "farming:tomato", crop = "farming:tomato",
seed = "farming:tomato", seed = "farming:tomato",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -234,8 +234,8 @@ minetest.register_node("farming:wheat_8", table.copy(def))
farming.registered_plants["farming:wheat"] = { farming.registered_plants["farming:wheat"] = {
crop = "farming:wheat", crop = "farming:wheat",
seed = "farming:seed_wheat", seed = "farming:seed_wheat",
minlight = 13, minlight = farming.min_light,
maxlight = 15, maxlight = farming.max_light,
steps = 8 steps = 8
} }

View file

@ -35,3 +35,7 @@ farming.grains = true -- true or false only
-- default rarety of crops on map (higher number = more crops) -- default rarety of crops on map (higher number = more crops)
farming.rarety = 0.002 farming.rarety = 0.002
-- default minimum and maximum light levels crops need to grow
farming.min_light = 12
farming.max_light = 15

View file

@ -7,13 +7,15 @@
farming = { farming = {
mod = "redo", mod = "redo",
version = "20200702", version = "20201209",
path = minetest.get_modpath("farming"), path = minetest.get_modpath("farming"),
select = { select = {
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5} fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
}, },
registered_plants = {} registered_plants = {},
min_light = 12,
max_light = 15
} }
@ -332,9 +334,8 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
return true return true
end end
local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or 12 local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or farming.min_light
local MAX_LIGHT = minetest.registered_nodes[node_name].maxlight or 15 local MAX_LIGHT = minetest.registered_nodes[node_name].maxlight or farming.max_light
--print ("---", MIN_LIGHT, MAX_LIGHT)
if max_growth == 1 or lambda < 2.0 then if max_growth == 1 or lambda < 2.0 then

View file

@ -8,48 +8,48 @@ Remove Protectors around players (separate names with spaces)=Удалить з
Replace Protector Owner with name provided=Заменить владельца защиты новым владельцем Replace Protector Owner with name provided=Заменить владельца защиты новым владельцем
<owner name> <name to replace with>=<имя владельца> <имя нового владельца> <owner name> <name to replace with>=<имя владельца> <имя нового владельца>
Replacing Protector name '@1' with '@2'=Заменяется владелец защиты с '@1' на '@2' Replacing Protector name '@1' with '@2'=Заменяется владелец защиты с '@1' на '@2'
Show protected areas of your nearby protectors=Показать защищенные территории с ближней защитой Show protected areas of your nearby protectors=Показать ближайшие защищённые территории
Protector Names to remove: @1=Имена защит, подлежащих удалению: @1 Protector Names to remove: @1=Имена, подлежащие удалению: @1
Name List Reset=Сброс списка имен Name List Reset=Очистить список имён
### doors_chest.lua ### ### doors_chest.lua ###
Protected Wooden Door=Защищенная яблоневая дверь Protected Wooden Door=Защищённая яблоневая дверь
Protected Steel Door=Защищенная стальная дверь Protected Steel Door=Защищённая стальная дверь
Protected Trapdoor=Защищенный яблоневый люк Protected Trapdoor=Защищённый яблоневый люк
Protected Steel Trapdoor=Защищенный стальной люк Protected Steel Trapdoor=Защищённый стальной люк
Protected Chest=Защищенный сундук Protected Chest=Защищённый сундук
To Chest=В сундук To Chest=В сундук
To Inventory=В инвентрарь To Inventory=В инвентрарь
Protected Chest (@1)=Защищенный сундук (@1) Protected Chest (@1)=Защищённый сундук (@1)
### init.lua ### ### init.lua ###
-- Protector interface --=-- Настройка защиты -- -- Protector interface --=-- Настройка защиты --
PUNCH node to show protected area=СТУКНУТЬ узел для подсведки защищенной территории PUNCH node to show protected area=СТУКНУТЬ узел для подсветки защищённой территории
USE for area check=ЛКМ для проверки защищенной территории USE for area check=ЛКМ для проверки защищённой территории
Members:=Участники: Members:=Участники:
Close=Закрыть Close=Закрыть
Protection located at: @1=Защита находится на координатах @1 Protection located at: @1=Защита находится на координатах @1
Members: @1.=Участники: @1. Members: @1.=Участники: @1.
This area is not protected.=Территория свободна. This area is not protected.=Территория свободна.
You can build here.=Здесь можно ставить блоки." You can build here.=Здесь можно ставить блоки.
Overlaps into above players protected area=Защитный блок не может быть установлен: пересечение с областями, защищенными другими игроками Overlaps into above players protected area=Защитный блок не может быть установлен: пересечение с областями, защищёнными другими игроками
Protection Block=Защитный блок Protection Block=Защитный блок
Protection (owned by @1)=Защита игрока @1 Protection (owned by @1)=Защита игрока @1
Protection Logo=Защитный знак Protection Logo=Защитный знак
[MOD] Protector Redo loaded=[MOD] Модификация \"Переделанная Защита\" загружена [MOD] Protector Redo loaded=[МОД] Protector Redo загружен
Spawn @1 has been protected up to a @2 block radius.=Спаун @1 защищен в радиусе @2 блока. Spawn @1 has been protected up to a @2 block radius.=Спаун @1 защищён в радиусе @2 блока.
This area is owned by @1=Эта территория пренадлежит @1 This area is owned by @1=Эта территория пренадлежит @1
### pvp.lua ### ### pvp.lua ###
[Protector] on_punchplayer called with nil objects=[Защита] on_punchplayer вызвана с нулевыми объектами [Protector] on_punchplayer called with nil objects=[Защита] on_punchplayer вызвана с нулевыми объектами
[Protector] pvp_protect not active, update your version of Minetest=[Защита] pvp_protect не активен, обновите версию Minetest [Protector] pvp_protect not active, update your version of Minetest=[Защита] pvp_protect неактивен, обновите версию Minetest
[Protector] pvp_protect is disabled=[Защита] pvp_protect отключен [Protector] pvp_protect is disabled=[Защита] pvp_protect отключён
### hud.lua ### ### hud.lua ###
Owner: @1=Владелец: @1 Owner: @1=Владелец: @1
### tool.lua ### ### tool.lua ###
Protector Placer Tool (stand near protector, face direction and use)=Инструмент установки защиты (станьте рядом с защитой, повернитесь в нужное направление и используйте) Protector Placer Tool (stand near protector, face direction and use)=Инструмент установки защиты (встаньте рядом с защитой, повернитесь в нужном направлении и используйте)
Protector already in place!=Защита уже установлена! Protector already in place!=Защита уже установлена!
No protectors available to place!=У вас нет защитных блоков в инвентаре! No protectors available to place!=У вас нет защитных блоков в инвентаре!
Protector placed at @1=Защита находится на координатах @1 Protector placed at @1=Защита находится на координатах @1

View file

@ -0,0 +1,3 @@
ElCeejus, Father of Dragons
ElCeejo
CC BY-SA 3.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB