mirror of
https://github.com/Sokomine/locked_travelnet.git
synced 2024-11-30 11:13:51 +01:00
renamed obsolete functions to new name
This commit is contained in:
parent
56dce81d27
commit
4167eb0647
@ -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
|
||||
|
||||
|
@ -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
|
||||
})
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user