From b5f6b762377cae4a30923ff09a82befba11d3f48 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Fri, 20 Nov 2015 16:51:16 +0100 Subject: [PATCH] [moreblocks & ferns] Fix double drops and global variables - Fix a global variable in mods/moreblocks/stairsplus/init.lua - Fix double drops of fern trunks and leaves (see #180) --- mods/moreblocks/stairsplus/init.lua | 2 +- mods/plantlife_modpack/ferns/treefern.lua | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mods/moreblocks/stairsplus/init.lua b/mods/moreblocks/stairsplus/init.lua index 2a959c01..44f59720 100755 --- a/mods/moreblocks/stairsplus/init.lua +++ b/mods/moreblocks/stairsplus/init.lua @@ -18,7 +18,7 @@ and minetest.setting_getbool("creative_mode") then end function stairsplus:prepare_groups(groups) - result = {} + local result = {} if groups then for k, v in pairs(groups) do if k ~= "wood" and k ~= "stone" then diff --git a/mods/plantlife_modpack/ferns/treefern.lua b/mods/plantlife_modpack/ferns/treefern.lua index 689c5d52..c7b79083 100755 --- a/mods/plantlife_modpack/ferns/treefern.lua +++ b/mods/plantlife_modpack/ferns/treefern.lua @@ -67,9 +67,9 @@ minetest.register_node("ferns:tree_fern_leaves", { { items = {"ferns:sapling_tree_fern"}, }, - { - items = {"ferns:tree_fern_leaves"}, - } +-- { +-- items = {"ferns:tree_fern_leaves"}, +-- } } }, sounds = default.node_sound_leaves_defaults(), @@ -98,9 +98,9 @@ minetest.register_node("ferns:tree_fern_leaves_02", { { items = {"ferns:sapling_tree_fern"}, }, - { - items = {"ferns:tree_fern_leaves"}, - } +-- { +-- items = {"ferns:tree_fern_leaves"}, +-- } } }, sounds = default.node_sound_leaves_defaults(), @@ -135,7 +135,6 @@ minetest.register_node("ferns:fern_trunk", { local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}) if node.name == "ferns:fern_trunk" then minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z}) - minetest.add_item(pos,"ferns:fern_trunk") end end, })