use set_node(), not add_node()

don't use minetest.env:* method (deprecated), use minetest.* instead
This commit is contained in:
Vanessa Ezekowitz
2014-08-15 19:34:15 -04:00
parent 985111d17c
commit b914e5395b
22 changed files with 261 additions and 261 deletions

View File

@ -182,14 +182,14 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
minetest.add_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
minetest.add_node(above_right_here, {name="bushes:BushLeaves"..leaf_type})
minetest.set_node(above_right_here, {name="bushes:BushLeaves"..leaf_type})
local chance_of_high_leaves = math.random(1,10)
if chance_of_high_leaves> 5 then
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
minetest.add_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type})
minetest.set_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type})
end
end
end
@ -228,12 +228,12 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
if height == 4 then
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
minetest.add_node(right_here, {name="bushes:youngtree2_bottom"})
minetest.add_node(above_right_here, {name="bushes:youngtree2_bottom"})
minetest.add_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
minetest.add_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
minetest.add_node(three_above_right_here, {name="bushes:BushLeaves1" })
minetest.add_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
minetest.set_node(right_here, {name="bushes:youngtree2_bottom"})
minetest.set_node(above_right_here, {name="bushes:youngtree2_bottom"})
minetest.set_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
minetest.set_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" })
minetest.set_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
end
end