summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@linux-forks.de>2018-09-14 17:02:08 +0200
committerroot <root@linux-forks.de>2018-09-14 17:02:08 +0200
commiteed69a53d40c1e9d0608a227f80741b3e109f9f2 (patch)
tree5ee94b796a46f7d390f12e8b71e6ad013ea1266b
parentd14339069d6cee29ad74e7d9fd50c69b6fb2b4ec (diff)
parenta0cb8657df797c36011ab61311ef2e15960d530b (diff)
Merge branch 'master' of https://notabug.org/TenPlus1/bonemeal
-rw-r--r--init.lua29
-rw-r--r--locale/fr.txt2
-rw-r--r--textures/bonemeal_gelatin_powder.pngbin0 -> 148 bytes
3 files changed, 27 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index 1bb3917..8a4aaeb 100644
--- a/init.lua
+++ b/init.lua
@@ -176,7 +176,7 @@ end
-- crops check
local function check_crops(pos, nodename, strength)
- local stage, nod, def
+ local mod, crop, stage, nod, def
-- grow registered crops
for n = 1, #crops do
@@ -184,8 +184,12 @@ local function check_crops(pos, nodename, strength)
if string.find(nodename, crops[n][1])
or nodename == crops[n][3] then
+ -- separate mod and node name
+ mod = nodename:split(":")[1] .. ":"
+ crop = nodename:split(":")[2]
+
-- get stage number or set to 0 for seed
- stage = tonumber( nodename:split("_")[2] ) or 0
+ stage = tonumber( crop:split("_")[2] ) or 0
stage = math.min(stage + strength, crops[n][2])
-- check for place_param setting
@@ -529,9 +533,28 @@ minetest.register_craftitem("bonemeal:bone", {
inventory_image = "bonemeal_bone.png",
})
+-- gelatin powder
+minetest.register_craftitem("bonemeal:gelatin_powder", {
+ description = S("Gelatin Powder"),
+ inventory_image = "bonemeal_gelatin_powder.png",
+ groups = {food_gelatin = 1, flammable = 2},
+})
+
--- crafting recipes
+-- gelatin powder
+minetest.register_craft({
+ output = "bonemeal:gelatin_powder 4",
+ recipe = {
+ {"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"},
+ {"bucket:bucket_water", "bucket:bucket_water", "bucket:bucket_water"},
+ {"bucket:bucket_water", "default:torch", "bucket:bucket_water"},
+ },
+ replacements = {
+ {"bucket:bucket_water", "bucket:bucket_empty 5"},
+ },
+})
-- bonemeal (from bone)
minetest.register_craft({
@@ -596,4 +619,4 @@ local path = minetest.get_modpath("bonemeal")
dofile(path .. "/mods.lua")
dofile(path .. "/lucky_block.lua")
-print (S("[bonemeal] loaded")) \ No newline at end of file
+print (S("[MOD] bonemeal loaded"))
diff --git a/locale/fr.txt b/locale/fr.txt
index 874b106..24475c8 100644
--- a/locale/fr.txt
+++ b/locale/fr.txt
@@ -4,4 +4,4 @@ Mulch = Paillis
Bone Meal = Poudre d'os
Fertiliser = Engrais
Bone = Os
-[bonemeal] loaded = [bonemeal] chargé
+[MOD] bonemeal loaded = [MOD] bonemeal chargé
diff --git a/textures/bonemeal_gelatin_powder.png b/textures/bonemeal_gelatin_powder.png
new file mode 100644
index 0000000..0625cc2
--- /dev/null
+++ b/textures/bonemeal_gelatin_powder.png
Binary files differ