Changed deprecated add_node to set_node

master
TenPlus1 2015-09-16 14:49:45 +01:00
parent e2fdb1f31a
commit ea391e490e
2 changed files with 9 additions and 9 deletions

View File

@ -283,7 +283,7 @@ minetest.register_tool("ethereal:light_staff", {
if node then node = node.name else return end
if node == "default:stone" then
minetest.add_node(pos, {name="ethereal:glostone"})
minetest.set_node(pos, {name="ethereal:glostone"})
if not minetest.setting_getbool("creative_mode") then
itemstack:add_wear(65535 / 149) -- 150 uses
end
@ -312,11 +312,11 @@ minetest.register_on_generated(function(minp, maxp)
bpos = {x = pos.x, y = pos.y + 1, z = pos.z }
if minetest.get_node(bpos).name == "air" then
if bpos.y > -3000 and bpos.y < -2000 then
minetest.add_node(bpos, {name = "ethereal:illumishroom3"})
minetest.set_node(bpos, {name = "ethereal:illumishroom3"})
elseif bpos.y > -2000 and bpos.y < -1000 then
minetest.add_node(bpos, {name = "ethereal:illumishroom2"})
minetest.set_node(bpos, {name = "ethereal:illumishroom2"})
elseif bpos.y > -1000 and bpos.y < -30 then
minetest.add_node(bpos, {name = "ethereal:illumishroom"})
minetest.set_node(bpos, {name = "ethereal:illumishroom"})
end
end
end

View File

@ -46,7 +46,7 @@ minetest.register_abm({
interval = 30,
chance = 10,
action = function(pos, node)
minetest.add_node(pos, {name = "default:mossycobble"})
minetest.set_node(pos, {name = "default:mossycobble"})
end
})
@ -87,11 +87,11 @@ minetest.register_abm({
or node.name == "default:snowblock"
or node.name == "ethereal:icebrick"
or node.name == "ethereal:snowbrick" then
minetest.add_node(pos, {name = "default:water_source"})
minetest.set_node(pos, {name = "default:water_source"})
elseif node.name == "default:snow" then
minetest.add_node(pos, {name = "default:water_flowing"})
minetest.set_node(pos, {name = "default:water_flowing"})
elseif node.name == "default:dirt_with_snow" then
minetest.add_node(pos, {name = "default:dirt_with_grass"})
minetest.set_node(pos, {name = "default:dirt_with_grass"})
end
nodeupdate(pos)
end,
@ -104,7 +104,7 @@ minetest.register_abm({
interval = 15,
chance = 2,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.add_node(pos, {name = "default:dirt"})
minetest.set_node(pos, {name = "default:dirt"})
end,
})