Phased out all deprecated minetest.env:* uses in favor of minetest.*

This commit is contained in:
Vanessa Ezekowitz
2013-06-30 23:55:07 -04:00
parent 9e2c0485f4
commit c277590fc2
3 changed files with 30 additions and 30 deletions

View File

@ -9,8 +9,8 @@ if moretrees.enable_leafdecay then
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, "moretrees:"..treename.."_trunk") then
minetest.env:remove_node(pos)
if not minetest.find_node_near(pos, moretrees.leafdecay_radius, "moretrees:"..treename.."_trunk") then
minetest.remove_node(pos)
nodeupdate(pos)
end
end
@ -23,8 +23,8 @@ if moretrees.enable_leafdecay then
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, {"default:jungletree", "moretrees:jungletree_trunk"}) then
minetest.env:remove_node(pos)
if not minetest.find_node_near(pos, moretrees.leafdecay_radius, {"default:jungletree", "moretrees:jungletree_trunk"}) then
minetest.remove_node(pos)
nodeupdate(pos)
end
end
@ -35,8 +35,8 @@ if moretrees.enable_leafdecay then
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, "moretrees:fir_trunk") then
minetest.env:remove_node(pos)
if not minetest.find_node_near(pos, moretrees.leafdecay_radius, "moretrees:fir_trunk") then
minetest.remove_node(pos)
nodeupdate(pos)
end
end
@ -47,8 +47,8 @@ if moretrees.enable_leafdecay then
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not minetest.env:find_node_near(pos, moretrees.palm_leafdecay_radius, "moretrees:palm_trunk") then
minetest.env:remove_node(pos)
if not minetest.find_node_near(pos, moretrees.palm_leafdecay_radius, "moretrees:palm_trunk") then
minetest.remove_node(pos)
nodeupdate(pos)
end
end
@ -61,8 +61,8 @@ if moretrees.enable_default_leafdecay then
interval = moretrees.default_leafdecay_delay,
chance = moretrees.default_leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if not minetest.env:find_node_near(pos, moretrees.default_leafdecay_radius, {"default:tree"}) then
minetest.env:remove_node(pos)
if not minetest.find_node_near(pos, moretrees.default_leafdecay_radius, {"default:tree"}) then
minetest.remove_node(pos)
nodeupdate(pos)
end
end