From 4167eb064727556c48051656554c88819bdda9d0 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Mon, 11 Mar 2019 23:46:19 +0100 Subject: [PATCH] renamed obsolete functions to new name --- locked_doors.lua | 2 +- locked_elevator.lua | 10 +++++----- locked_travelnet.lua | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/locked_doors.lua b/locked_doors.lua index 74ef97a..9783386 100644 --- a/locked_doors.lua +++ b/locked_doors.lua @@ -12,7 +12,7 @@ locked_travelnet_doors_transform = function( pos, node, puncher, transform_into local olddata = locks:get_lockdata( pos ); - minetest.env:add_node(pos, {name = transform_into, param2 = node.param2}) + minetest.add_node(pos, {name = transform_into, param2 = node.param2}) locks:set_lockdata( pos, olddata ); end diff --git a/locked_elevator.lua b/locked_elevator.lua index eb77e71..b08b999 100644 --- a/locked_elevator.lua +++ b/locked_elevator.lua @@ -47,7 +47,7 @@ minetest.register_node("locked_travelnet:elevator", { light_source = 10, on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) --- prepare the lock of the travelnet locks:lock_init( pos, "size[12,10]".. @@ -59,7 +59,7 @@ minetest.register_node("locked_travelnet:elevator", { end, after_place_node = function(pos, placer, itemstack) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); meta:set_string("infotext", "Elevator (unconfigured)"); meta:set_string("station_name", ""); meta:set_string("station_network",""); @@ -68,7 +68,7 @@ minetest.register_node("locked_travelnet:elevator", { local p = {x=pos.x, y=pos.y+1, z=pos.z} local p2 = minetest.dir_to_facedir(placer:get_look_dir()) - minetest.env:add_node(p, {name="locked_travelnet:elevator_top", paramtype2="facedir", param2=p2}) + minetest.add_node(p, {name="locked_travelnet:elevator_top", paramtype2="facedir", param2=p2}) locks:lock_set_owner( pos, placer, "Shared locked elevator" ); end, @@ -111,7 +111,7 @@ minetest.register_node("locked_travelnet:elevator", { -- taken from VanessaEs homedecor fridge on_place = function(itemstack, placer, pointed_thing) local pos = pointed_thing.above; - local node = minetest.env: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}); -- leftover elevator_top nodes can be removed by placing a new elevator underneath if( node ~= nil and node.name ~= "air" and node.name ~= 'locked_travelnet:elevator_top') then minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place the travelnet box!' ) @@ -122,7 +122,7 @@ minetest.register_node("locked_travelnet:elevator", { on_destruct = function(pos) local p = {x=pos.x, y=pos.y+1, z=pos.z} - minetest.env:remove_node(p) + minetest.remove_node(p) end }) diff --git a/locked_travelnet.lua b/locked_travelnet.lua index 3962678..3665723 100644 --- a/locked_travelnet.lua +++ b/locked_travelnet.lua @@ -48,7 +48,7 @@ minetest.register_node("locked_travelnet:travelnet", { light_source = 10, on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) --- prepare the lock of the travelnet locks:lock_init( pos, "size[12,10]".. @@ -62,7 +62,7 @@ minetest.register_node("locked_travelnet:travelnet", { end, after_place_node = function(pos, placer, itemstack) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); meta:set_string("infotext", "Travelnet-box (unconfigured)"); meta:set_string("station_name", ""); meta:set_string("station_network",""); @@ -107,7 +107,7 @@ minetest.register_node("locked_travelnet:travelnet", { on_place = function(itemstack, placer, pointed_thing) local pos = pointed_thing.above; - if( minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" ) then + if( minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" ) then minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place the travelnet box!' ) return;