From 1d3e688af65eb632783c532dbaac8275579a4f86 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 26 May 2018 16:09:15 +0100 Subject: fix issue with mod names containing _ char --- init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8b0a8b2..fce9fbb 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 -- cgit v1.2.3 From c957e1043c45ea5a26f3bac0e5e98b83bd94f84b Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 31 May 2018 09:34:56 +0100 Subject: added gelatin powder --- init.lua | 19 +++++++++++++++++++ textures/bonemeal_gelatin_powder.png | Bin 0 -> 148 bytes 2 files changed, 19 insertions(+) create mode 100644 textures/bonemeal_gelatin_powder.png diff --git a/init.lua b/init.lua index fce9fbb..9938349 100644 --- a/init.lua +++ b/init.lua @@ -533,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({ diff --git a/textures/bonemeal_gelatin_powder.png b/textures/bonemeal_gelatin_powder.png new file mode 100644 index 0000000..0625cc2 Binary files /dev/null and b/textures/bonemeal_gelatin_powder.png differ -- cgit v1.2.3 From a0cb8657df797c36011ab61311ef2e15960d530b Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 3 Jul 2018 09:12:30 +0100 Subject: change loaded console message --- init.lua | 2 +- locale/fr.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 9938349..8a4aaeb 100644 --- a/init.lua +++ b/init.lua @@ -619,4 +619,4 @@ local path = minetest.get_modpath("bonemeal") dofile(path .. "/mods.lua") dofile(path .. "/lucky_block.lua") -print (S("[bonemeal] loaded")) +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é -- cgit v1.2.3