Compare commits

...

38 Commits

Author SHA1 Message Date
57a018cbe4 Merge remote-tracking branch 'upstream/master' 2025-03-20 11:28:53 +01:00
c2d76b779d add ukrainian translation (thx Fromkaniv) 2025-03-15 16:36:27 +00:00
edeee0ffbd Merge remote-tracking branch 'upstream/master' 2024-09-15 08:36:35 +02:00
0d852bff0a add coniferous litter deco, fix df_caverns saplings 2024-07-23 12:35:48 +01:00
2a4ddd96db fix recipe type 2024-05-14 08:00:46 +01:00
09fa9d6251 add new ethereal brown mushroom sapling 2024-05-07 07:36:53 +01:00
53aefab9a2 Merge remote-tracking branch 'upstream/master' 2023-12-13 20:56:53 +01:00
a5421172d7 Merge remote-tracking branch 'upstream/master' 2023-11-22 23:20:53 +01:00
4f8ca6a0a5 add spore grass to mushroom dirt decorations 2023-11-11 07:39:42 +00:00
c4ac6f8490 use 1x bonemeal item with every sapling chance 2023-10-27 08:12:47 +01:00
8e929e5a1c remove default dependency, add mineclone support 2023-09-01 12:27:23 +01:00
7c89cd6b70 edit mod.conf 2023-08-10 18:58:40 +01:00
862fd2bb1c using mulch on dry_dirt makes it dry_dirt_with_dry_grass 2023-08-10 18:56:27 +01:00
2db3f4b026 5.x 2023-08-08 18:08:25 +01:00
6d21268470 if no meta dont change bush 2023-07-24 07:21:55 +01:00
10dbedd1e8 add bush_classic default if no meta found 2023-07-23 19:10:24 +01:00
34e8c4a106 added bush_classics support 2023-07-23 18:57:09 +01:00
31cf1abfcd Merge remote-tracking branch 'upstream/master' 2023-06-11 15:06:48 +02:00
8b98f5e497 update readme (thx mckaygerhard) 2023-06-10 18:06:37 +01:00
ef937049d2 Bones must be cooked to give bonemeal, player bones craft into 2x bones. 2023-06-10 08:01:13 +01:00
6abbd5fb5e add basandra sapling 2023-06-08 16:00:18 +01:00
0a9668fff1 Merge remote-tracking branch 'upstream/master' 2023-06-05 22:55:07 +02:00
e57dc18818 only take item when used on bonemeal node 2023-05-11 07:11:23 +01:00
a93fc5da3d add Everness support (thx imre84) 2023-05-08 17:47:32 +01:00
a1e5d541c4 add rice seed 2023-04-28 09:18:11 +01:00
0c0f9d1e89 can bonemeal barley, hemp, rye, oat, mint, sunflower seeds 2023-04-28 08:56:49 +01:00
73082b9fac readme updated, thanks eschan145 2023-03-27 11:01:32 +01:00
2fdc3f09b7 code tidy 2023-03-10 14:46:38 +00:00
1935d348c1 add 'bonemeal.disable_deathbones_recipe' setting 2023-01-11 18:55:21 +00:00
8ccf4a591a add moretrees' poplar small sapling 2022-12-19 10:56:31 +00:00
30bd1d708c fix bonemeal take item on every use 2022-11-30 15:24:50 +00:00
b07c76c407 update license.txt 2022-11-28 09:23:40 +00:00
77fee3c7e1 change barley steps to 8 2022-11-14 18:06:20 +00:00
b9cf957dcc tidy helper function 2022-11-03 08:53:52 +00:00
9049dbfefa add helper function and new screenshot 2022-11-02 14:30:24 +00:00
757b85d02f add ginger 2022-10-28 12:21:42 +01:00
70c51d18bb update rhubarb and strawberry growth 2022-09-15 08:04:07 +01:00
d459c60d6d added farming's asparagus, spinach, eggplant 2022-09-13 12:24:23 +01:00
24 changed files with 530 additions and 322 deletions

214
README.md
View File

@ -1,38 +1,200 @@
Bonemeal mod [bonemeal]
minetest mod Bonemeal
=====================
FARM mod that helps and featured the farming to quickly grow samplings, crops, grass, etc
Information
-----------
Bonemeal is crushed from bones found in dirt or by using player bones, Mulch is
made from a tree trunk surrounded by leaves and Fertiliser is a mix of both,
each of which can be used to quickly grow saplings, crops and grass/decoration,
papyrus on top of dirt and cactus on sand.
Support for ethereal saplings/crops, farming redo crops and moretrees saplings are included.
![](screenshot.jpg)
## Technical info
This mod is named `bonemeal` and must be installed with such name.
This mod adds four new items into the game, bones which can be dug from normal
dirt which can be made into bonemeal, mulch which is is crafted using a tree and
8x leaves, and fertiliser which is a mixture of them both.
dirt which can be cooked into bonemeal, mulch which is is crafted using a tree
and 8x leaves, and fertiliser which is a mixture of them both.
Each item can be used on saplings and crops for a chance to grow them quicker as
well as dirt which will generate random grass, flowers or whichever decoration
is registered.
Each item can be used on saplings and crops for a chance to grow them quicker
as well as dirt which will generate random grass, flowers or whichever
decoration is registered.
Mulch has a strength of 1, Bonemeal 2 and Fertiliser 3 which means the stronger
Mulch has a strength of 1, Bonemeal 2 and Fertiliser 3. This means the stronger
the item, the more chance of growing saplings in low light, making crops sprout
quicker or simply decorate a larger area with grass and flowers.
The api.txt document shows how to add your own saplings, crops and grasses to
the list by using one of the 3 commands included and the mod.lua file gives you
many examples by using some of the popular mods available.
#### Dependencies
Dependencies: default
Optional Dependencies: farming, ethereal, moretrees, lucky_block, moretrees, flowers, dye, ferns, dryplants, df_trees, df_farming, df_primordial_items, everness
Lucky Blocks: 6
#### API
The [`api.txt`](api.txt) document shows how to add your own saplings,
crops and grasses to the list by using one of the 3 commands included and
the [`mod.lua`](mod.lua) file gives you many examples by using some of the
popular mods available.
https://forum.minetest.net/viewtopic.php?f=9&t=16446
Changelog:
#### Nodes
- 0.1 - Initial release
- 0.2 - Added global on_use function for bonemeal growth
- 0.3 - Added strength to on_use global for new items (mulch and fertiliser)
- 0.4 - Added Intllib support and fr.txt file
- 0.5 - Added support for default bush and acacia bush saplings
- 0.6 - Using newer functions, Minetest 0.4.16 and above needed to run
- 0.7 - Can be used on papyrus and cactus now, added coral recipe, api addition
- 0.8 - Added support for farming redo's new garlic, pepper and onion crops
- 0.9 - Added support for farming redo's pea and beetroot crops, checks for place_param
- 1.0 - add_deco() now adds to existing item list while set_deco() replaces item list (thanks h-v-smacker)
- 1.1 - Added {can_bonemeal=1} group for special nodes
- 1.2 - Added support for minetest 5.0 cactus seedling, blueberry bush sapling and emergent jungle tree saplings, additional flowers and pine bush sapling.
- 1.3 - Ability to craft dye from mulch, bonemeal and fertiliser (thanks orbea)
- 1.4 - Add support for fern saplings from plantlife mod (thanks nixnoxus)
| Node name | description | notes |
| ----------------------- | ------------ | --------------------------------------------------- |
| bonemeal:mulch | Mulch | fertilizer to make grow plants and seeds faster |
| bonemeal:bonemeal | Bone Meal | 2 x fertilizer to make grow plants and seeds faster |
| bonemeal:fertiliser | Fertiliser | 3 x fertilizer to make grow plants and seeds faster |
| bonemeal:bone | Bone | cook to made fertilizers, found into dirt rarelly |
| bone:bone | Player bones | cook to made fertilizers, found into dirt rarelly |
| bonemeal:gelatin_powder | Gelatin Powder | made from bones |
Lucky Blocks: 6
#### Crafts
* bonemeal:gelatin_powder 4
```
{"group:bone", "group:bone", "group:bone"},
{"bucket:bucket_water", "bucket:bucket_water", "bucket:bucket_water"},
{"bucket:bucket_water", "default:torch", "bucket:bucket_water"}
```
* bonemeal:bonemeal 2
```
{{"group:bone"}}
```
* bonemeal:bonemeal 4
```
{{"bones:bones"}}
```
* bonemeal:bonemeal 2
```
{{"default:coral_skeleton"}}
```
* bonemeal:mulch 4
```
{"group:tree", "group:leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"},
{"group:leaves", "group:leaves", "group:leaves"}
```
* bonemeal:mulch
```
{"group:seed", "group:seed", "group:seed"},
{"group:seed", "group:seed", "group:seed"},
{"group:seed", "group:seed", "group:seed"}
```
* fertiliser 2
```
{{"bonemeal:bonemeal", "bonemeal:mulch"}}
```
## Changelog
#### Version 0.1
* Initial release
#### Version 0.2
* Added global `on_use` function for bonemeal growth
#### Version 0.3
* Added strength to `on_use` global for new items (mulch and fertiliser)
#### Version 0.4
* Added `Intllib` support and `fr.txt` file for French translation.
#### Version 0.5
* Added support for default bush and acacia bush saplings
#### Version 0.6
* Using newer functions. This means Minetest 0.4.16 and above needed to run
#### Version 0.7
* Can be used on papyrus and cactus now
* Added coral recipe
* API addition
#### Version 0.8
* Added support for farming redo's new garlic
* Added pepper and onion crops
#### Version 0.9
* Added support for farming redo's pea and beetroot crops
* Checks for `place_param`
#### Version 1.0
* `add_deco()` now adds to existing item list while `set_deco()` replaces item
list (thanks `h-v-smacker`)
#### Version 1.1
* Added `{can_bonemeal=1}` group for special nodes
#### Version 1.2
* Added support for Minetest 5.0 cactus seedling, blueberry bush sapling and
emergent jungle tree saplings, additional flowers and pine bush sapling
#### Version 1.3
* Added ability to craft dye from mulch, bonemeal and fertiliser (thanks
`orbea`)
#### Version 1.4
* Added support for fern saplings from `plantlife` mod (thanks `nixnoxus`)
#### Version 1.5
* Added support for farming redo's asparagus, eggplant, spinach
#### Version 1.6
* Added helper function for position and protection check
* Added ginger support
* Added moretrees poplar sapling
#### Version 1.7
* Added farming redo's barley, hemp, rye, oat, mint, sunflower, rice seeds
* Added Everness saplings
* Update readme (thanks mckaygerhard)
* Recipe changes, player bones craft into 2x bones, bones must be cooked to
give bonemeal
* Added bushes_classic support
## LICENSE
Licence: Code is MIT, Media is CC0
(c) Tenplus1

View File

@ -1,14 +0,0 @@
default
intllib?
farming?
ethereal?
moretrees?
technic_worldgen?
lucky_block?
flowers?
dye?
ferns?
dryplants?
df_trees?
df_farming?
df_primordial_items?

View File

@ -1 +0,0 @@
Adds bone and bonemeal giving the ability to quickly grow plants and saplings.

285
init.lua
View File

@ -1,14 +1,31 @@
bonemeal = {}
bonemeal = {
item_list = {
bucket_water = "bucket:bucket_water",
bucket_empty = "bucket:bucket_empty",
dirt = "default:dirt",
torch = "default:torch",
coral = "default:coral_skeleton"
}
}
local a = bonemeal.item_list
if minetest.get_modpath("mcl_core") then
a.bucket_water = "mcl_buckets:bucket_water"
a.bucket_empty = "mcl_buckets:bucker_empty"
a.dirt = "mcl_core:dirt"
a.torch = "mcl_torches:torch"
a.coral = "mcl_ocean:dead_horn_coral_block"
end
local path = minetest.get_modpath("bonemeal")
local min, max, random = math.min, math.max, math.random
-- Load support for intllib.
local S = minetest.get_translator and minetest.get_translator("bonemeal") or
dofile(path .. "/intllib.lua")
-- translation support
local S = minetest.get_translator("bonemeal")
-- creative check
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
@ -16,103 +33,14 @@ function bonemeal.is_creative(name)
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
end
-- default crops
local crops = {
{"farming:cotton_", 8, "farming:seed_cotton"},
{"farming:wheat_", 8, "farming:seed_wheat"}
}
-- special pine check for nearby snow
local function pine_grow(pos)
if minetest.find_node_near(pos, 1,
{"default:snow", "default:snowblock", "default:dirt_with_snow"}) then
default.grow_new_snowy_pine_tree(pos)
else
default.grow_new_pine_tree(pos)
end
end
-- special function for cactus growth
local function cactus_grow(pos)
default.grow_cactus(pos, minetest.get_node(pos))
end
-- special function for papyrus growth
local function papyrus_grow(pos)
default.grow_papyrus(pos, minetest.get_node(pos))
end
-- default saplings
local saplings = {
{"default:sapling", default.grow_new_apple_tree, "soil"},
{"default:junglesapling", default.grow_new_jungle_tree, "soil"},
{"default:emergent_jungle_sapling", default.grow_new_emergent_jungle_tree, "soil"},
{"default:acacia_sapling", default.grow_new_acacia_tree, "soil"},
{"default:aspen_sapling", default.grow_new_aspen_tree, "soil"},
{"default:pine_sapling", pine_grow, "soil"},
{"default:bush_sapling", default.grow_bush, "soil"},
{"default:acacia_bush_sapling", default.grow_acacia_bush, "soil"},
{"default:large_cactus_seedling", default.grow_large_cactus, "sand"},
{"default:blueberry_bush_sapling", default.grow_blueberry_bush, "soil"},
{"default:pine_bush_sapling", default.grow_pine_bush, "soil"},
{"default:cactus", cactus_grow, "sand"},
{"default:papyrus", papyrus_grow, "soil"}
}
-- helper tables ( "" denotes a blank item )
local green_grass = {
"default:grass_2", "default:grass_3", "default:grass_4",
"default:grass_5", "", ""
}
local dry_grass = {
"default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4",
"default:dry_grass_5", "", ""
}
-- loads mods then add all in-game flowers except waterlily
local flowers = {}
minetest.after(0.1, function()
for node, def in pairs(minetest.registered_nodes) do
if def.groups
and def.groups.flower
and not node:find("waterlily")
and not node:find("xdecor:potted_")
and not node:find("df_farming:") then
flowers[#flowers + 1] = node
end
end
end)
-- default biomes deco
local deco = {
{"default:dirt", green_grass, flowers},
{"default:dirt_with_grass", green_grass, flowers},
{"default:dry_dirt", dry_grass, {}},
{"default:dry_dirt_with_dry_grass", dry_grass, {}},
{"default:dirt_with_dry_grass", dry_grass, flowers},
{"default:sand", {}, {"default:dry_shrub", "", "", ""} },
{"default:desert_sand", {}, {"default:dry_shrub", "", "", ""} },
{"default:silver_sand", {}, {"default:dry_shrub", "", "", ""} },
{"default:dirt_with_rainforest_litter", {}, {"default:junglegrass", "", "", ""}}
}
local crops = {}
local saplings = {}
local deco = {}
--
-- local functions
--
-- particles
local function particle_effect(pos)
@ -129,7 +57,8 @@ local function particle_effect(pos)
maxexptime = 1,
minsize = 1,
maxsize = 3,
texture = "bonemeal_particle.png"
texture = "bonemeal_particle.png",
glow = 5
})
end
@ -138,15 +67,18 @@ end
local function grow_tree(pos, object)
if type(object) == "table" and object.axiom then
-- grow L-system tree
minetest.remove_node(pos)
minetest.spawn_tree(pos, object)
elseif type(object) == "string" and minetest.registered_nodes[object] then
-- place node
minetest.set_node(pos, {name = object})
elseif type(object) == "function" then
-- function
object(pos)
end
@ -154,7 +86,7 @@ end
-- sapling check
local function check_sapling(pos, sapling_node, light_ok)
local function check_sapling(pos, sapling_node, strength, light_ok)
-- what is sapling placed on?
local under = minetest.get_node({
@ -196,7 +128,9 @@ local function check_sapling(pos, sapling_node, light_ok)
particle_effect(pos)
grow_tree(pos, saplings[n][2])
if math.random(5 - strength) == 1 then
grow_tree(pos, saplings[n][2])
end
return true
end
@ -288,15 +222,20 @@ local function check_soil(pos, nodename, strength)
for _, n in pairs(dirt) do
if random(5) == 5 then
if decor and #decor > 0 then
-- place random decoration (rare)
local dnum = #decor or 1
nod = decor[random(dnum)] or ""
end
else
if grass and #grass > 0 then
-- place random grass (common)
local dgra = #grass or 1
nod = #grass > 0 and grass[random(dgra)] or ""
end
end
@ -313,7 +252,9 @@ local function check_soil(pos, nodename, strength)
-- if param2 not preset then get from existing node
if not def then
local node = minetest.get_node_or_nil(pos2)
def = node and node.param2 or 0
end
@ -325,6 +266,39 @@ local function check_soil(pos, nodename, strength)
end
-- helper function
local function use_checks(user, pointed_thing)
-- make sure we use on node
if pointed_thing.type ~= "node" then
return false
end
-- get position and node info
local pos = pointed_thing.under
local node = minetest.get_node(pos)
local def = minetest.registered_items[node.name]
local dirt = def and def.groups
-- does node have groups set
if not dirt then
return false
end
-- if we're using on ground, move position up
if dirt.soil or dirt.sand or dirt.can_bonemeal then
pos = pointed_thing.above
end
-- check if protected
if minetest.is_protected(pos, user:get_player_name()) then
return false
end
return node
end
-- global functions
@ -425,9 +399,12 @@ function bonemeal:set_deco(list)
-- replace existing entry
if list[l][1] == deco[n][1] then
deco[n][2] = list[l][2]
deco[n][3] = list[l][3]
list[l] = false
break
end
end
@ -459,13 +436,25 @@ function bonemeal:on_use(pos, strength, node)
if node.name == "default:papyrus" then
default.grow_papyrus(pos, node)
particle_effect(pos)
return true
elseif node.name == "default:cactus" then
default.grow_cactus(pos, node)
particle_effect(pos)
return true
elseif node.name == "default:dry_dirt" and strength == 1 then
minetest.set_node(pos, {name = "default:dry_dirt_with_dry_grass"})
particle_effect(pos)
return true
end
@ -473,7 +462,9 @@ function bonemeal:on_use(pos, strength, node)
if minetest.get_item_group(node.name, "soil") > 0
or minetest.get_item_group(node.name, "sand") > 0
or minetest.get_item_group(node.name, "can_bonemeal") > 0 then
check_soil(pos, node.name, strength)
return true
end
@ -485,8 +476,7 @@ function bonemeal:on_use(pos, strength, node)
end
-- check for sapling growth
if random(5 - strength) == 1
and check_sapling(pos, node.name, light_ok) then
if check_sapling(pos, node.name, strength, light_ok) then
return true
end
@ -509,21 +499,16 @@ minetest.register_craftitem("bonemeal:mulch", {
on_use = function(itemstack, user, pointed_thing)
-- did we point at a node?
if pointed_thing.type ~= "node" then
return
end
-- use helper function to do checks and return position and node
local node = use_checks(user, pointed_thing)
-- is area protected?
if minetest.is_protected(pointed_thing.under, user:get_player_name()) then
return
end
if node then
-- call global on_use function with strength of 1
if bonemeal:on_use(pointed_thing.under, 1) then
-- call global on_use function with strength of 1
local used = bonemeal:on_use(pointed_thing.under, 1, node)
-- take item if not in creative
if not bonemeal.is_creative(user:get_player_name()) then
if used and not bonemeal.is_creative(user:get_player_name()) then
itemstack:take_item()
end
end
@ -540,21 +525,16 @@ minetest.register_craftitem("bonemeal:bonemeal", {
on_use = function(itemstack, user, pointed_thing)
-- did we point at a node?
if pointed_thing.type ~= "node" then
return
end
-- use helper function to do checks and return position and node
local node = use_checks(user, pointed_thing)
-- is area protected?
if minetest.is_protected(pointed_thing.under, user:get_player_name()) then
return
end
if node then
-- call global on_use function with strength of 2
if bonemeal:on_use(pointed_thing.under, 2) then
-- call global on_use function with strength of 2
local used = bonemeal:on_use(pointed_thing.under, 2, node)
-- take item if not in creative
if not bonemeal.is_creative(user:get_player_name()) then
if used and not bonemeal.is_creative(user:get_player_name()) then
itemstack:take_item()
end
end
@ -571,21 +551,16 @@ minetest.register_craftitem("bonemeal:fertiliser", {
on_use = function(itemstack, user, pointed_thing)
-- did we point at a node?
if pointed_thing.type ~= "node" then
return
end
-- use helper function to do checks and return position and node
local node = use_checks(user, pointed_thing)
-- is area protected?
if minetest.is_protected(pointed_thing.under, user:get_player_name()) then
return
end
if node then
-- call global on_use function with strength of 3
if bonemeal:on_use(pointed_thing.under, 3) then
-- call global on_use function with strength of 3
local used = bonemeal:on_use(pointed_thing.under, 3, node)
-- take item if not in creative
if not bonemeal.is_creative(user:get_player_name()) then
if used and not bonemeal.is_creative(user:get_player_name()) then
itemstack:take_item()
end
end
@ -614,36 +589,40 @@ minetest.register_craftitem("bonemeal:gelatin_powder", {
-- crafting recipes
--
-- gelatin powder
minetest.register_craft({
output = "bonemeal:gelatin_powder 4",
recipe = {
{"group:bone", "group:bone", "group:bone"},
{"bucket:bucket_water", "bucket:bucket_water", "bucket:bucket_water"},
{"bucket:bucket_water", "default:torch", "bucket:bucket_water"}
{a.bucket_water, a.bucket_water, a.bucket_water},
{a.bucket_water, a.torch, a.bucket_water}
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty 5"}
{a.bucket_water, a.bucket_empty .. " 5"}
}
})
-- bonemeal (from bone)
minetest.register_craft({
type = "cooking",
output = "bonemeal:bonemeal 2",
recipe = {{"group:bone"}}
recipe = "group:bone",
cooktime = 4
})
-- bonemeal (from player bones)
minetest.register_craft({
output = "bonemeal:bonemeal 4",
recipe = {{"bones:bones"}}
})
if minetest.settings:get_bool("bonemeal.disable_deathbones_recipe") ~= true then
minetest.register_craft({
output = "bonemeal:bone 2",
recipe = {{"bones:bones"}}
})
end
-- bonemeal (from coral skeleton)
minetest.register_craft({
output = "bonemeal:bonemeal 2",
recipe = {{"default:coral_skeleton"}}
recipe = {{a.coral}}
})
-- mulch
@ -671,8 +650,8 @@ minetest.register_craft({
recipe = {{"bonemeal:bonemeal", "bonemeal:mulch"}}
})
-- add bones to dirt
-- NALC: add bones to dirt but without overriding a previous drop definition
-- from other mods.
local drop = minetest.registered_items["default:dirt"].drop
if drop then
table.insert(drop.items, 1, {items = {"bonemeal:bone"}, rarity = 30})
@ -691,9 +670,13 @@ else
}
end
-- add support for other mods
-- add support for mods
dofile(path .. "/mods.lua")
dofile(path .. "/lucky_block.lua")
-- lucky block support
if minetest.get_modpath("lucky_block") then
dofile(path .. "/lucky_block.lua")
end
print ("[MOD] bonemeal loaded")
print ("[MOD] Bonemeal loaded")

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -19,3 +19,6 @@ 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.
Textures by TenPlus1 (CC0)

View File

@ -1,5 +1,4 @@
# textdomain:bonemeal
[MOD] bonemeal loaded=[MOD] bonemeal geladen
Bone=Knochen
Bone Meal=Knochenmehl
Fertiliser=Dünger

View File

@ -1,5 +1,4 @@
# textdomain:bonemeal
#[MOD] bonemeal loaded=
#Bone=
#Bone Meal=
#Fertiliser=

View File

@ -1,5 +1,4 @@
# textdomain:bonemeal
[MOD] bonemeal loaded=[MOD] bonemeal cargado
Bone=Hueso
Bone Meal=Comida de hueso
Fertiliser=Fertilizante

View File

@ -1,5 +1,4 @@
# textdomain:bonemeal
[MOD] bonemeal loaded=[MOD] bonemeal chargé
Bone=Os
Bone Meal=Poudre d'os
Fertiliser=Engrais

View File

@ -1,5 +1,4 @@
# textdomain:bonemeal
[MOD] bonemeal loaded=[MOD] bonemeal caricata
Bone=Ossa
Bone Meal=Pasto osseo
Fertiliser=Fertilizzante

View File

@ -1,5 +1,4 @@
# textdomain:bonemeal
[MOD] bonemeal loaded=[MOD] костная мука загружена
Bone=Кость
Bone Meal=Костная Мука
Fertiliser=Удобрение

10
locale/bonemeal.uk.tr Normal file
View File

@ -0,0 +1,10 @@
# textdomain: bonemeal
Bonemeal=Кісткове борошно
Adds bone and bonemeal giving the ability to quickly grow plants and saplings.=Додає кістки та кісткове борошно, що дає можливість швидко вирощувати рослини та саджанці.
Bone=Кістка
Bone Meal=Кісткове борошно
Fertiliser=Добриво
Gelatin Powder=Желатиновий порошок
Mulch=Мульча

View File

@ -1,7 +0,0 @@
# init.lua
Mulch = Mantillo
Bone Meal = Comida de hueso
Fertiliser = Fertilizante
Bone = Hueso
[MOD] bonemeal loaded = [MOD] bonemeal cargado

View File

@ -1,7 +0,0 @@
# init.lua
Mulch = Paillis
Bone Meal = Poudre d'os
Fertiliser = Engrais
Bone = Os
[MOD] bonemeal loaded = [MOD] bonemeal chargé

View File

@ -1,7 +0,0 @@
# init.lua
Mulch = Pacciame
Bone Meal = Pasto osseo
Fertiliser = Fertilizzante
Bone = Ossa
[MOD] bonemeal loaded = [MOD] bonemeal caricata

View File

@ -1,7 +0,0 @@
# init.lua
Mulch = Мульча
Bone Meal = Костная Мука
Fertiliser = Удобрение
Bone = Кость
[MOD] bonemeal loaded = [MOD] костная мука загружена

View File

@ -1,7 +0,0 @@
# init.lua
Mulch =
Bone Meal =
Fertiliser =
Bone =
[MOD] bonemeal loaded =

View File

@ -11,18 +11,15 @@ local function growy(pos, player)
end
if minetest.get_modpath("lucky_block") then
lucky_block:add_blocks({
{"lig"},
{"dro", {"bonemeal:mulch"}, 10},
{"dro", {"bonemeal:bonemeal"}, 10},
{"dro", {"bonemeal:fertiliser"}, 10},
{"cus", growy},
{"nod", "default:chest", 0, {
{name = "bonemeal:mulch", max = 20},
{name = "bonemeal:bonemeal", max = 15},
{name = "bonemeal:fertiliser", max = 10}
}}
})
end
lucky_block:add_blocks({
{"lig"},
{"dro", {"bonemeal:mulch"}, 10},
{"dro", {"bonemeal:bonemeal"}, 10},
{"dro", {"bonemeal:fertiliser"}, 10},
{"cus", growy},
{"nod", "default:chest", 0, {
{name = "bonemeal:mulch", max = 20},
{name = "bonemeal:bonemeal", max = 15},
{name = "bonemeal:fertiliser", max = 10}
}}
})

View File

@ -1,4 +1,4 @@
name = bonemeal
depends = default
optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye, ferns, dryplants, df_trees, df_farming, df_primordial_items
description = Adds bone and bonemeal giving the ability to quickly grow plants and saplings.
optional_depends = default, mcl_core, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye, ferns, dryplants, df_trees, df_farming, df_primordial_items, everness
min_minetest_version = 5.0

206
mods.lua
View File

@ -9,6 +9,99 @@ if minetest.get_modpath("animalmaterials") then
end
if minetest.get_modpath("default") then
-- saplings
local function pine_grow(pos)
if minetest.find_node_near(pos, 1,
{"default:snow", "default:snowblock", "default:dirt_with_snow"}) then
default.grow_new_snowy_pine_tree(pos)
else
default.grow_new_pine_tree(pos)
end
end
local function cactus_grow(pos)
default.grow_cactus(pos, minetest.get_node(pos))
end
local function papyrus_grow(pos)
default.grow_papyrus(pos, minetest.get_node(pos))
end
bonemeal:add_sapling({
{"default:sapling", default.grow_new_apple_tree, "soil"},
{"default:junglesapling", default.grow_new_jungle_tree, "soil"},
{"default:emergent_jungle_sapling", default.grow_new_emergent_jungle_tree, "soil"},
{"default:acacia_sapling", default.grow_new_acacia_tree, "soil"},
{"default:aspen_sapling", default.grow_new_aspen_tree, "soil"},
{"default:pine_sapling", pine_grow, "soil"},
{"default:bush_sapling", default.grow_bush, "soil"},
{"default:acacia_bush_sapling", default.grow_acacia_bush, "soil"},
{"default:large_cactus_seedling", default.grow_large_cactus, "sand"},
{"default:blueberry_bush_sapling", default.grow_blueberry_bush, "soil"},
{"default:pine_bush_sapling", default.grow_pine_bush, "soil"},
{"default:cactus", cactus_grow, "sand"},
{"default:papyrus", papyrus_grow, "soil"}
})
-- decoration
local green_grass = {
"default:grass_2", "default:grass_3", "default:grass_4",
"default:grass_5", "", ""
}
local dry_grass = {
"default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4",
"default:dry_grass_5", "", ""
}
local flowers = {}
minetest.after(0.1, function()
for node, def in pairs(minetest.registered_nodes) do
if def.groups
and def.groups.flower
and not node:find("waterlily")
and not node:find("seaweed")
and not node:find("xdecor:potted_")
and not node:find("df_farming:") then
flowers[#flowers + 1] = node
end
end
end)
bonemeal:add_deco({
{"default:dirt", bonemeal.green_grass, flowers},
{"default:dirt_with_grass", green_grass, flowers},
{"default:dry_dirt", dry_grass, {}},
{"default:dry_dirt_with_dry_grass", dry_grass, {}},
{"default:dirt_with_dry_grass", dry_grass, flowers},
{"default:sand", {}, {"default:dry_shrub", "", "", ""} },
{"default:desert_sand", {}, {"default:dry_shrub", "", "", ""} },
{"default:silver_sand", {}, {"default:dry_shrub", "", "", ""} },
{"default:dirt_with_rainforest_litter", {}, {"default:junglegrass", "", "", ""} },
{"default:dirt_with_coniferous_litter", {}, {"default:fern_1", "default:fern_2",
"default:fern_3", "", "", ""}}
})
end
if farming then
bonemeal:add_crop({
{"farming:cotton_", 8, "farming:seed_cotton"},
{"farming:wheat_", 8, "farming:seed_wheat"}
})
end
if farming and farming.mod and farming.mod == "redo" then
bonemeal:add_crop({
@ -25,9 +118,9 @@ if farming and farming.mod and farming.mod == "redo" then
{"farming:cucumber_", 4},
{"farming:potato_", 4},
{"farming:grapes_", 8},
{"farming:rhubarb_", 3},
{"farming:barley_", 7},
{"farming:hemp_", 8},
{"farming:rhubarb_", 4},
{"farming:barley_", 8, "farming:seed_barley"},
{"farming:hemp_", 8, "farming:seed_hemp"},
{"farming:chili_", 8},
{"farming:garlic_", 5},
{"farming:onion_", 5},
@ -35,10 +128,10 @@ if farming and farming.mod and farming.mod == "redo" then
{"farming:pineapple_", 8},
{"farming:pea_", 5},
{"farming:beetroot_", 5},
{"farming:rye_", 8},
{"farming:oat_", 8},
{"farming:rice_", 8},
{"farming:mint_", 4},
{"farming:rye_", 8, "farming:seed_rye"},
{"farming:oat_", 8, "farming:seed_oat"},
{"farming:rice_", 8, "farming:seed_rice"},
{"farming:mint_", 4, "farming:seed_mint"},
{"farming:cabbage_", 6},
{"farming:lettuce_", 5},
{"farming:blackberry_", 4},
@ -46,7 +139,12 @@ if farming and farming.mod and farming.mod == "redo" then
{"farming:soy_", 7},
{"farming:artichoke_", 5},
{"farming:parsley_", 3},
{"farming:sunflower_", 8}
{"farming:sunflower_", 8, "farming:seed_sunflower"},
{"farming:asparagus_", 5},
{"farming:eggplant_", 4},
{"farming:spinach_", 4},
{"farming:ginger_", 4},
{"ethereal:strawberry_", 8}
})
end
@ -66,6 +164,7 @@ if minetest.get_modpath("ethereal") then
{"ethereal:banana_tree_sapling", ethereal.grow_banana_tree, "soil"},
{"ethereal:frost_tree_sapling", ethereal.grow_frost_tree, "soil"},
{"ethereal:mushroom_sapling", ethereal.grow_mushroom_tree, "soil"},
{"ethereal:mushroom_brown_sapling", ethereal.grow_mushroom_brown_tree, "soil"},
{"ethereal:willow_sapling", ethereal.grow_willow_tree, "soil"},
{"ethereal:redwood_sapling", ethereal.grow_redwood_tree, "soil"},
{"ethereal:giant_redwood_sapling", ethereal.grow_giant_redwood_tree, "soil"},
@ -74,7 +173,8 @@ if minetest.get_modpath("ethereal") then
{"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"},
{"ethereal:sakura_sapling", ethereal.grow_sakura_tree, "soil"},
{"ethereal:lemon_tree_sapling", ethereal.grow_lemon_tree, "soil"},
{"ethereal:olive_tree_sapling", ethereal.grow_olive_tree, "soil"}
{"ethereal:olive_tree_sapling", ethereal.grow_olive_tree, "soil"},
{"ethereal:basandra_bush_sapling", ethereal.grow_basandra_bush, "soil"}
})
local grass = {"default:grass_3", "default:grass_4", "default:grass_5", ""}
@ -87,7 +187,8 @@ if minetest.get_modpath("ethereal") then
"flowers:tulip", "flowers:viola", "ethereal:strawberry_7"}},
{"ethereal:gray_dirt", {}, {"ethereal:snowygrass", "", ""}},
{"ethereal:cold_dirt", {}, {"ethereal:snowygrass", "", ""}},
{"ethereal:mushroom_dirt", {}, {"flowers:mushroom_red", "flowers:mushroom_brown", "", "", ""}},
{"ethereal:mushroom_dirt", {}, {"flowers:mushroom_red", "flowers:mushroom_brown",
"ethereal:spore_grass", "ethereal:spore_grass", "", "", ""}},
{"ethereal:jungle_dirt", grass, {"default:junglegrass", "", "", ""}},
{"ethereal:grove_dirt", grass, {"ethereal:fern", "", "", ""}},
{"ethereal:bamboo_dirt", grass, {}}
@ -122,6 +223,7 @@ if minetest.get_modpath("moretrees") then
{"moretrees:spruce_sapling", moretrees.grow_spruce, "soil"},
{"moretrees:cedar_sapling", moretrees.spawn_cedar_object, "soil"},
{"moretrees:poplar_sapling", moretrees.spawn_poplar_object, "soil"},
{"moretrees:poplar_small_sapling", moretrees.spawn_poplar_small_object, "soil"},
{"moretrees:willow_sapling", moretrees.spawn_willow_object, "soil"},
{"moretrees:rubber_tree_sapling", moretrees.spawn_rubber_tree_object, "soil"},
{"moretrees:fir_sapling", fir_grow, "soil"}
@ -177,8 +279,7 @@ end
if minetest.get_modpath("dye") then
local bonemeal_dyes = {
bonemeal = "white", fertiliser = "green", mulch = "brown"}
local bonemeal_dyes = {bonemeal = "white", fertiliser = "green", mulch = "brown"}
for mat, dye in pairs(bonemeal_dyes) do
@ -195,29 +296,42 @@ end
if minetest.get_modpath("df_trees") then
local function spore_tree_fix(pos)
minetest.set_node(pos, {name = "air"})
df_trees.spawn_spore_tree(pos)
minetest.remove_node(pos) ; df_trees.spawn_spore_tree(pos)
end
local function fungiwood_fix(pos)
minetest.set_node(pos, {name = "air"})
df_trees.spawn_fungiwood(pos)
minetest.remove_node(pos) ; df_trees.spawn_fungiwood(pos)
end
local function tunnel_fix(pos)
minetest.set_node(pos, {name = "air"})
df_trees.spawn_tunnel_tube(pos)
minetest.remove_node(pos) ; df_trees.spawn_tunnel_tube(pos)
end
local function black_cap_fix(pos)
minetest.remove_node(pos) ; df_trees.spawn_black_cap(pos)
end
local function goblin_cap_fix(pos)
minetest.remove_node(pos) ; df_trees.spawn_goblin_cap(pos)
end
local function tower_cap_fix(pos)
minetest.remove_node(pos) ; df_trees.spawn_tower_cap(pos)
end
local function nether_cap_fix(pos)
minetest.remove_node(pos) ; df_trees.spawn_nether_cap(pos)
end
bonemeal:add_sapling({
{"df_trees:black_cap_sapling", df_trees.spawn_black_cap, "soil", true},
{"df_trees:black_cap_sapling", black_cap_fix, "soil", true},
{"df_trees:fungiwood_sapling", fungiwood_fix, "soil", true},
{"df_trees:goblin_cap_sapling", df_trees.spawn_goblin_cap, "soil", true},
{"df_trees:goblin_cap_sapling", goblin_cap_fix, "soil", true},
{"df_trees:spore_tree_sapling", spore_tree_fix, "soil", true},
{"df_trees:tower_cap_sapling", df_trees.spawn_tower_cap, "soil", true},
{"df_trees:tower_cap_sapling", tower_cap_fix, "soil", true},
{"df_trees:tunnel_tube_sapling", tunnel_fix, "soil", true},
{"df_trees:nether_cap_sapling", df_trees.spawn_nether_cap, "group:nether_cap", true},
{"df_trees:nether_cap_sapling", df_trees.spawn_nether_cap, "group:cools_lava", true}
{"df_trees:nether_cap_sapling", nether_cap_fix, "group:nether_cap", true},
{"df_trees:nether_cap_sapling", nether_cap_fix, "group:cools_lava", true}
})
end
@ -240,14 +354,14 @@ if minetest.get_modpath("df_primordial_items") then
local function mush_fix(pos)
minetest.set_node(pos, {name = "air"})
mapgen_helper.place_schematic(pos,
df_primordial_items.get_primordial_mushroom(), (math.random(1,4)-1)*90)
df_primordial_items.get_primordial_mushroom(), (math.random(4) - 1) * 90)
end
local function fern_fix(pos)
minetest.set_node(pos, {name = "air"})
local rotations = {0, 90, 180, 270}
mapgen_helper.place_schematic(pos,
df_primordial_items.get_fern_schematic(), rotations[math.random(1,#rotations)])
df_primordial_items.get_fern_schematic(), rotations[math.random(#rotations)])
end
local function blood_fix(pos)
@ -256,9 +370,9 @@ if minetest.get_modpath("df_primordial_items") then
bonemeal:add_sapling({
{"df_primordial_items:jungle_mushroom_sapling",
df_primordial_items.spawn_jungle_mushroom, "soil", true},
df_primordial_items.spawn_jungle_mushroom, "soil", true},
{"df_primordial_items:jungletree_sapling",
df_primordial_items.spawn_jungle_tree, "soil", true},
df_primordial_items.spawn_jungle_tree, "soil", true},
{"df_primordial_items:mush_sapling", mush_fix, "soil", true},
{"df_primordial_items:fern_sapling", fern_fix, "soil", true},
{"df_trees:blood_thorn", blood_fix, "sand", true}
@ -302,3 +416,41 @@ if minetest.get_modpath("df_primordial_items") then
{"df_primordial_items:dirt_with_mycelium", fgrass, fdeco}
})
end
if minetest.get_modpath("everness") then
bonemeal:add_sapling({
{"everness:baobab_sapling", Everness.grow_baobab_tree, "soil"},
{"everness:coral_tree_bioluminescent_sapling",
Everness.coral_tree_bioluminescent, "soil"},
{"everness:coral_tree_sapling", Everness.grow_coral_tree, "soil"},
{"everness:crystal_bush_sapling", Everness.grow_crystal_bush, "soil"},
{"everness:crystal_tree_large_sapling", Everness.grow_crystal_large_tree, "soil"},
{"everness:crystal_tree_sapling", Everness.grow_crystal_tree, "soil"},
{"everness:cursed_bush_sapling", Everness.grow_cursed_bush, "soil"},
{"everness:cursed_dream_tree_sapling", Everness.grow_cursed_dream_tree, "soil"},
{"everness:dry_tree_sapling", Everness.grow_dry_tree, "soil"},
{"everness:sequoia_tree_sapling", Everness.grow_sequoia_tree, "soil"},
{"everness:willow_tree_sapling", Everness.grow_willow_tree, "soil"}
})
end
if minetest.get_modpath("bushes_classic") then
local function grow_bush(pos)
local meta = minetest.get_meta(pos)
local bush_name = meta:get_string("bush_type")
-- only change if meta found
if meta and bush_name then
minetest.swap_node(pos, {name = "bushes:" .. bush_name .. "_bush"})
end
end
bonemeal:add_sapling({
{"bushes:fruitless_bush", grow_bush, "soil"},
})
end

BIN
screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

2
settingtypes.txt Normal file
View File

@ -0,0 +1,2 @@
# Disable recipe for bones:bones to craft into bonemeal
bonemeal.disable_deathbones_recipe (Disable recipe for death bones into bonemeal) bool false