From abdb76c2a065d8d4391cd6802953bb527c83a010 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Jan 2021 10:09:44 +0100 Subject: [PATCH] Fix #942 --- mods/ITEMS/mcl_core/functions.lua | 7 +++++-- mods/ITEMS/mcl_core/nodes_base.lua | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 0d9a1f6011..2888288441 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1450,10 +1450,11 @@ end -- * tiles: Optional custom tiles -- * sounds: Optional custom sounds -- * clear_colorization: Optional. If true, will clear all paramtype2="color" related node def. fields +-- * desc: Item description -- -- The snowable nodes also MUST have _mcl_snowed defined to contain the name -- of the snowed node. -mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization) +mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization, desc) local def = table.copy(minetest.registered_nodes[itemstring_clear]) local create_doc_alias if def.description then @@ -1462,7 +1463,7 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti create_doc_alias = false end -- Just some group clearing - def.description = nil + def.description = desc def._doc_items_longdesc = nil def._doc_items_usagehelp = nil def._doc_items_create_entry = false @@ -1503,6 +1504,8 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti def.sounds = sounds end + def._mcl_silk_touch_drop = {itemstring_clear} + -- Register stuff minetest.register_node(itemstring_snowed, def) diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 82ce39e1ab..658b390814 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -380,7 +380,7 @@ minetest.register_node("mcl_core:dirt_with_grass", { _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, }) -mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true) +mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true, S("Dirt with Snow")) minetest.register_node("mcl_core:grass_path", { tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"}, @@ -424,7 +424,7 @@ minetest.register_node("mcl_core:mycelium", { _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, }) -mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium") +mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium", nil, nil, false, S("Mycelium with Snow")) minetest.register_node("mcl_core:podzol", { description = S("Podzol"), @@ -441,7 +441,7 @@ minetest.register_node("mcl_core:podzol", { _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, }) -mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol") +mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow")) minetest.register_node("mcl_core:dirt", { description = S("Dirt"), @@ -924,7 +924,7 @@ for i=1,8 do desc = S("Top Snow") tt_help = S("Stackable") longdesc = S("Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.").."\n"..S("Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height.") - usagehelp = S("This block can only be placed on full solid blocks and on another top snow (which increases its height).") + usagehelp = S("This block can only be placed on full solid blocks and on another top snow (which increases its height).") walkable = false else id = "mcl_core:snow_"..i