mirror of
https://github.com/Sokomine/locked_travelnet.git
synced 2024-08-20 13:14:09 +02: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 );
|
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 );
|
locks:set_lockdata( pos, olddata );
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ minetest.register_node("locked_travelnet:elevator", {
|
|||||||
light_source = 10,
|
light_source = 10,
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
--- prepare the lock of the travelnet
|
--- prepare the lock of the travelnet
|
||||||
locks:lock_init( pos,
|
locks:lock_init( pos,
|
||||||
"size[12,10]"..
|
"size[12,10]"..
|
||||||
@ -59,7 +59,7 @@ minetest.register_node("locked_travelnet:elevator", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
after_place_node = function(pos, placer, itemstack)
|
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("infotext", "Elevator (unconfigured)");
|
||||||
meta:set_string("station_name", "");
|
meta:set_string("station_name", "");
|
||||||
meta:set_string("station_network","");
|
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 p = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
|
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" );
|
locks:lock_set_owner( pos, placer, "Shared locked elevator" );
|
||||||
end,
|
end,
|
||||||
@ -111,7 +111,7 @@ minetest.register_node("locked_travelnet:elevator", {
|
|||||||
-- taken from VanessaEs homedecor fridge
|
-- taken from VanessaEs homedecor fridge
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pos = pointed_thing.above;
|
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
|
-- 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
|
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!' )
|
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)
|
on_destruct = function(pos)
|
||||||
local p = {x=pos.x, y=pos.y+1, z=pos.z}
|
local p = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ minetest.register_node("locked_travelnet:travelnet", {
|
|||||||
light_source = 10,
|
light_source = 10,
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
--- prepare the lock of the travelnet
|
--- prepare the lock of the travelnet
|
||||||
locks:lock_init( pos,
|
locks:lock_init( pos,
|
||||||
"size[12,10]"..
|
"size[12,10]"..
|
||||||
@ -62,7 +62,7 @@ minetest.register_node("locked_travelnet:travelnet", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
after_place_node = function(pos, placer, itemstack)
|
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("infotext", "Travelnet-box (unconfigured)");
|
||||||
meta:set_string("station_name", "");
|
meta:set_string("station_name", "");
|
||||||
meta:set_string("station_network","");
|
meta:set_string("station_network","");
|
||||||
@ -107,7 +107,7 @@ minetest.register_node("locked_travelnet:travelnet", {
|
|||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
local pos = pointed_thing.above;
|
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!' )
|
minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place the travelnet box!' )
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user