1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-17 07:00:22 +02:00

Removing all the olds minetest.env calls

- All the minetest.env calls removed

It took me about 2 hours, but I did it, and it works!
This commit is contained in:
LeMagnesium
2014-11-08 18:36:57 +01:00
parent 28c92fbaa8
commit 27836d2835
57 changed files with 442 additions and 441 deletions

View File

@ -26,7 +26,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
},
on_construct = function(pos)
local node = minetest.env:get_node(pos)
local node = minetest.get_node(pos)
local param2 = node.param2
node.name = "lrfurn:coffeetable_front"
if param2 == 0 then
@ -38,13 +38,13 @@ minetest.register_node("lrfurn:coffeetable_back", {
elseif param2 == 3 then
pos.x = pos.x-1
end
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
minetest.env:set_node(pos, node)
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
minetest.set_node(pos, node)
end
end,
on_destruct = function(pos)
local node = minetest.env:get_node(pos)
local node = minetest.get_node(pos)
local param2 = node.param2
if param2 == 0 then
pos.z = pos.z+1
@ -55,9 +55,9 @@ minetest.register_node("lrfurn:coffeetable_back", {
elseif param2 == 3 then
pos.x = pos.x-1
end
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
minetest.env:remove_node(pos)
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
minetest.remove_node(pos)
end
end
end,