1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 15:30:30 +01:00

[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)
This commit is contained in:
LeMagnesium 2015-11-20 16:51:16 +01:00
parent 58bfcadec6
commit b5f6b76237
2 changed files with 7 additions and 8 deletions

View File

@ -18,7 +18,7 @@ and minetest.setting_getbool("creative_mode") then
end end
function stairsplus:prepare_groups(groups) function stairsplus:prepare_groups(groups)
result = {} local result = {}
if groups then if groups then
for k, v in pairs(groups) do for k, v in pairs(groups) do
if k ~= "wood" and k ~= "stone" then if k ~= "wood" and k ~= "stone" then

View File

@ -67,9 +67,9 @@ minetest.register_node("ferns:tree_fern_leaves", {
{ {
items = {"ferns:sapling_tree_fern"}, items = {"ferns:sapling_tree_fern"},
}, },
{ -- {
items = {"ferns:tree_fern_leaves"}, -- items = {"ferns:tree_fern_leaves"},
} -- }
} }
}, },
sounds = default.node_sound_leaves_defaults(), 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:sapling_tree_fern"},
}, },
{ -- {
items = {"ferns:tree_fern_leaves"}, -- items = {"ferns:tree_fern_leaves"},
} -- }
} }
}, },
sounds = default.node_sound_leaves_defaults(), 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}) local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if node.name == "ferns:fern_trunk" then if node.name == "ferns:fern_trunk" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z}) minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
minetest.add_item(pos,"ferns:fern_trunk")
end end
end, end,
}) })