From 8855246dd40ae63041a4f5d1d0385557876d8f58 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 1 May 2022 16:16:28 +0200 Subject: [PATCH] Update to new bone meal API. * Update to use new mcl_bone_meal API: * Use new bone meal item and remove related comment. * Update mod depends in mod.conf * Spelling fixes: s/bonemeal/bone meal/g --- mods/ITEMS/mcl_composters/init.lua | 10 ++++------ mods/ITEMS/mcl_composters/locale/template.txt | 6 +++--- mods/ITEMS/mcl_composters/mod.conf | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/mods/ITEMS/mcl_composters/init.lua b/mods/ITEMS/mcl_composters/init.lua index efa08c75c..b635760ca 100644 --- a/mods/ITEMS/mcl_composters/init.lua +++ b/mods/ITEMS/mcl_composters/init.lua @@ -11,7 +11,7 @@ local composter_description = S( "Composter" ) local composter_longdesc = S( - "Composters can convert various organic items into bonemeal." + "Composters can convert various organic items into bone meal." ) local composter_usagehelp = S( "Use organic items on the composter to fill it with layers of compost. " .. @@ -97,7 +97,7 @@ function composter_progress_chance(pos, node, chance) -- get current compost level local level = registered_nodes[node.name]["_mcl_compost_level"] -- spawn green particles above new layer - mcl_dye.add_bone_meal_particle(vector_offset(pos, 0, level/8, 0)) + mcl_bone_meal.add_bone_meal_particle(vector_offset(pos, 0, level/8, 0)) -- update composter block if level < 7 then level = level + 1 @@ -114,9 +114,7 @@ function composter_progress_chance(pos, node, chance) -- the block will get updated by the node timer callback set in node reg def if level == 7 then local timer = get_node_timer(pos) - if not timer:is_started() then - timer:start(1) - end + timer:start(1) end end end @@ -203,7 +201,7 @@ end -- minetest.register_node("mcl_composters:composter", { description = composter_description, - _tt_help = S("Converts organic items into bonemeal"), + _tt_help = S("Converts organic items into bone meal"), _doc_items_longdesc = composter_longdesc, _doc_items_usagehelp = composter_usagehelp, paramtype = "light", diff --git a/mods/ITEMS/mcl_composters/locale/template.txt b/mods/ITEMS/mcl_composters/locale/template.txt index f3329719a..5d8df6fdb 100644 --- a/mods/ITEMS/mcl_composters/locale/template.txt +++ b/mods/ITEMS/mcl_composters/locale/template.txt @@ -1,7 +1,7 @@ # textdomain: mcl_composters Composter= -Composters can convert various organic items into bonemeal.= -Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter.= +Composters can convert various organic items into bone meal.= +Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter."= filled= ready for harvest= -Converts organic items into bonemeal= +Converts organic items into bone meal= diff --git a/mods/ITEMS/mcl_composters/mod.conf b/mods/ITEMS/mcl_composters/mod.conf index ed6119d3a..f7f229fbc 100644 --- a/mods/ITEMS/mcl_composters/mod.conf +++ b/mods/ITEMS/mcl_composters/mod.conf @@ -1,5 +1,5 @@ name = mcl_composters author = kabou description = Composters can convert various organic items into bonemeal. -depends = mcl_core, mcl_sounds, mcl_dye, mcl_hoppers +depends = mcl_core, mcl_sounds, mcl_bone_meal, mcl_hoppers optional_depends = doc