summaryrefslogtreecommitdiff
path: root/travelnet
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-03-10 19:44:56 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-03-10 19:44:56 -0400
commit18fc18b5aece7aae1caafd38a2c742af7974348c (patch)
tree460b6c6ab31c621cd437d04aa7443e5bb343d718 /travelnet
parentb21c3d368077aa3a1c42ff1582cda6263c018585 (diff)
downloaddreambuilder_modpack-18fc18b5aece7aae1caafd38a2c742af7974348c.tar
dreambuilder_modpack-18fc18b5aece7aae1caafd38a2c742af7974348c.tar.gz
dreambuilder_modpack-18fc18b5aece7aae1caafd38a2c742af7974348c.tar.bz2
dreambuilder_modpack-18fc18b5aece7aae1caafd38a2c742af7974348c.tar.xz
dreambuilder_modpack-18fc18b5aece7aae1caafd38a2c742af7974348c.zip
update cottages, digilines, locks, maptools, moreblocks, technic,
and travelnet
Diffstat (limited to 'travelnet')
-rw-r--r--travelnet/config.lua13
-rw-r--r--travelnet/etc/travelnet_bell.mmpzbin0 -> 2884 bytes
-rw-r--r--travelnet/etc/travelnet_bell.xml7
-rw-r--r--travelnet/etc/travelnet_travel.mmpzbin0 -> 2937 bytes
-rw-r--r--travelnet/etc/travelnet_travel.xml7
-rw-r--r--travelnet/init.lua208
-rw-r--r--travelnet/intllib.lua45
-rw-r--r--travelnet/locale/de.po326
-rw-r--r--travelnet/locale/de.txt94
-rw-r--r--travelnet/locale/ru.po377
-rw-r--r--travelnet/locale/template.pot372
-rw-r--r--travelnet/locale/template.txt94
-rw-r--r--travelnet/mod.conf1
-rw-r--r--travelnet/sounds/travelnet_bell.oggbin0 -> 19085 bytes
-rw-r--r--travelnet/sounds/travelnet_travel.oggbin0 -> 53124 bytes
-rw-r--r--travelnet/travelnet.lua4
16 files changed, 1278 insertions, 270 deletions
diff --git a/travelnet/config.lua b/travelnet/config.lua
index 519e66d..83115de 100644
--- a/travelnet/config.lua
+++ b/travelnet/config.lua
@@ -48,6 +48,7 @@ travelnet.travelnet_inventory_image = "travelnet_inv.png"
travelnet.elevator_inventory_image = "travelnet_elevator_inv.png"
if( minetest.registered_nodes["mcl_core:wood"]) then
+ local w_texture = "default_wood.png^[transformR90"; -- "mcl_doors_door_spruce_lower.png";
travelnet.travelnet_recipe = {
{"mcl_stairs:slab_wood", "mcl_stairs:slab_wood", "mcl_stairs:slab_wood",},
{"mesecons_torch:mesecon_torch_on", "mcl_chests:chest", "mesecons_torch:mesecon_torch_on"},
@@ -65,11 +66,11 @@ if( minetest.registered_nodes["mcl_core:wood"]) then
-- {"mcl_core:iron_ingot", "mcl_core:glass", "mcl_core:iron_ingot", }
}
travelnet.tiles_travelnet = {
- "default_wood.png^[transformR90", -- backward view
- "default_wood.png^[transformR90", -- front view
- "default_wood.png^[transformR90", -- sides :)
- "default_wood.png^[transformR90", -- view from top
- "default_wood.png^[transformR90", -- view from bottom
+ w_texture, -- backward view
+ w_texture, -- front view
+ w_texture, -- sides :)
+ w_texture, -- view from top
+ w_texture, -- view from bottom
}
travelnet.tiles_elevator = {
"mcl_core_planks_big_oak.png^[transformR90", -- front
@@ -118,3 +119,5 @@ travelnet.allow_travel = function( player_name, owner_name, network_name, statio
return true;
end
+
+travelnet.travelnet_sound_enabled = true
diff --git a/travelnet/etc/travelnet_bell.mmpz b/travelnet/etc/travelnet_bell.mmpz
new file mode 100644
index 0000000..161be57
--- /dev/null
+++ b/travelnet/etc/travelnet_bell.mmpz
Binary files differ
diff --git a/travelnet/etc/travelnet_bell.xml b/travelnet/etc/travelnet_bell.xml
new file mode 100644
index 0000000..e62bc89
--- /dev/null
+++ b/travelnet/etc/travelnet_bell.xml
@@ -0,0 +1,7 @@
+<tags>
+ <tag name="Software" value="LMMS (libsndfile-1.0.26pre5)"/>
+ <tag name="YEAR" value="2017-05-25"/>
+ <tag name="TITLE" value="travelnet bell"/>
+ <tag name="COMMENTS" value="CC-BY-SA 3.0 https://github.com/expertmm/travelnet"/>
+ <tag name="ARTIST" value="expertmm"/>
+</tags>
diff --git a/travelnet/etc/travelnet_travel.mmpz b/travelnet/etc/travelnet_travel.mmpz
new file mode 100644
index 0000000..a67a7df
--- /dev/null
+++ b/travelnet/etc/travelnet_travel.mmpz
Binary files differ
diff --git a/travelnet/etc/travelnet_travel.xml b/travelnet/etc/travelnet_travel.xml
new file mode 100644
index 0000000..d9ebb6e
--- /dev/null
+++ b/travelnet/etc/travelnet_travel.xml
@@ -0,0 +1,7 @@
+<tags>
+ <tag name="Software" value="LMMS (libsndfile-1.0.26pre5)"/>
+ <tag name="YEAR" value="2017-05-25"/>
+ <tag name="TITLE" value="travelnet travel"/>
+ <tag name="COMMENTS" value="CC-BY-SA 3.0 https://github.com/expertmm/travelnet"/>
+ <tag name="ARTIST" value="expertmm"/>
+</tags>
diff --git a/travelnet/init.lua b/travelnet/init.lua
index 7827a70..b1ceb6b 100644
--- a/travelnet/init.lua
+++ b/travelnet/init.lua
@@ -1,5 +1,5 @@
-
+
--[[
Teleporter networks that allow players to choose a destination out of a list
Copyright (C) 2013 Sokomine
@@ -17,11 +17,17 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
- Version: 2.2 (with optional abm for self-healing)
-
+ Version: 2.3 (click button to dig)
+
Please configure this mod in config.lua
Changelog:
+ 10.03.19 - Added the extra config buttons for locked_travelnet mod.
+ 09.03.19 - Several PRs merged (sound added, locale changed etc.)
+ Version bumped to 2.3
+ 26.02.19 - Removing a travelnet can now be done by clicking on a button (no need to
+ wield a diamond pick anymore)
+ 26.02.19 - Added compatibility with MineClone2
22.09.18 - Move up/move down no longer close the formspec.
22.09.18 - If in creative mode, wield a diamond pick to dig the station. This avoids
conflicts with too fast punches.
@@ -78,57 +84,65 @@
- target list is now centered if there are less than 9 targets
--]]
+-- Required to save the travelnet data properly in all cases
+if not minetest.safe_file_write then
+ error("[Mod travelnet] Your Minetest version is no longer supported. (version < 0.4.17)")
+end
travelnet = {};
travelnet.targets = {};
+travelnet.path = minetest.get_modpath(minetest.get_current_modname())
--- Boilerplate to support localized strings if intllib mod is installed.
-if minetest.get_modpath( "intllib" ) and intllib then
- travelnet.S = intllib.Getter()
-else
- travelnet.S = function(s) return s end
-end
-local S = travelnet.S;
+-- Intllib
+local S = dofile(travelnet.path .. "/intllib.lua")
+travelnet.S = S
+
minetest.register_privilege("travelnet_attach", { description = S("allows to attach travelnet boxes to travelnets of other players"), give_to_singleplayer = false});
minetest.register_privilege("travelnet_remove", { description = S("allows to dig travelnet boxes which belog to nets of other players"), give_to_singleplayer = false});
-- read the configuration
-dofile(minetest.get_modpath("travelnet").."/config.lua"); -- the normal, default travelnet
-
+dofile(travelnet.path.."/config.lua"); -- the normal, default travelnet
+travelnet.mod_data_path = minetest.get_worldpath().."/mod_travelnet.data"
-- TODO: save and restore ought to be library functions and not implemented in each individual mod!
-- called whenever a station is added or removed
travelnet.save_data = function()
-
+
local data = minetest.serialize( travelnet.targets );
- local path = minetest.get_worldpath().."/mod_travelnet.data";
- local file = io.open( path, "w" );
- if( file ) then
- file:write( data );
- file:close();
- else
- print(S("[Mod travelnet] Error: Savefile '%s' could not be written."):format(tostring(path)));
+ local success = minetest.safe_file_write( travelnet.mod_data_path, data );
+ if( not success ) then
+ print(S("[Mod travelnet] Error: Savefile '%s' could not be written.")
+ :format(travelnet.mod_data_path));
end
end
travelnet.restore_data = function()
-
- local path = minetest.get_worldpath().."/mod_travelnet.data";
- local file = io.open( path, "r" );
- if( file ) then
- local data = file:read("*all");
- travelnet.targets = minetest.deserialize( data );
- file:close();
- else
- print(S("[Mod travelnet] Error: Savefile '%s' not found."):format(tostring(path)));
+ local file = io.open( travelnet.mod_data_path, "r" );
+ if( not file ) then
+ print(S("[Mod travelnet] Error: Savefile '%s' not found.")
+ :format(travelnet.mod_data_path));
+ return;
end
+
+ local data = file:read("*all");
+ travelnet.targets = minetest.deserialize( data );
+
+ if( not travelnet.targets ) then
+ local backup_file = travelnet.mod_data_path..".bak"
+ print(S("[Mod travelnet] Error: Savefile '%s' is damaged. Saved the backup as '%s'.")
+ :format(travelnet.mod_data_path, backup_file));
+
+ minetest.safe_file_write( backup_file, data );
+ travelnet.targets = {};
+ end
+ file:close();
end
@@ -191,6 +205,9 @@ end
travelnet.form_input_handler = function( player, formname, fields)
if(formname == "travelnet:show" and fields and fields.pos2str) then
local pos = minetest.string_to_pos( fields.pos2str );
+ if( locks and (fields.locks_config or fields.locks_authorize)) then
+ return locks:lock_handle_input( pos, formname, fields, player )
+ end
-- back button leads back to the main menu
if( fields.back and fields.back ~= "" ) then
return travelnet.show_current_formspec( pos,
@@ -231,7 +248,7 @@ travelnet.reset_formspec = function( meta )
"field[0.3,2.8;9,0.9;station_network;"..S("Assign to Network:")..";"..
minetest.formspec_escape(station_network or "").."]"..
- "label[0.3,3.1;"..S("You can have more than one network. If unsure, use \"%s\""):format(tostring(station_network)).."\".]"..
+ "label[0.3,3.1;"..S("You can have more than one network. If unsure, use \"%s\""):format(tostring(station_network))..".]"..
"field[0.3,4.4;9,0.9;owner;"..S("Owned by:")..";]"..
"label[0.3,4.7;"..S("Unless you know what you are doing, leave this empty.").."]"..
"button_exit[1.3,5.3;1.7,0.7;station_help_setup;"..S("Help").."]"..
@@ -248,7 +265,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
if( this_node ~= nil and this_node.name == 'travelnet:elevator' ) then
is_elevator = true;
- end
+ end
if( not( meta )) then
return;
@@ -258,7 +275,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
local station_name = meta:get_string( "station_name" );
local station_network = meta:get_string( "station_network" );
- if( not( owner_name )
+ if( not( owner_name )
or not( station_name ) or station_network == ''
or not( station_network )) then
@@ -288,7 +305,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
if( not( travelnet.targets[ owner_name ] )) then
travelnet.targets[ owner_name ] = {};
end
-
+
-- first station on this network?
if( not( travelnet.targets[ owner_name ][ station_network ] )) then
travelnet.targets[ owner_name ][ station_network ] = {};
@@ -312,8 +329,10 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
-- add name of station + network + owner + update-button
local zusatzstr = "";
local trheight = "10";
- if( this_node and this_node.name=="locked_travelnet:travelnet" ) then
- zusatzstr = "field[0.3,11;6,0.7;locks_sent_lock_command;"..S("Locked travelnet. Type /help for help:")..";]";
+ if( this_node and this_node.name=="locked_travelnet:travelnet" and locks) then
+ zusatzstr = "field[0.3,11;6,0.7;locks_sent_lock_command;"..S("Locked travelnet. Type /help for help:")..";]"..
+ locks.get_authorize_button(10,"10.5")..
+ locks.get_config_button(11,"10.5")
trheight = "11.5";
end
local formspec = "size[12,"..trheight.."]"..
@@ -331,15 +350,15 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
-- collect all station names in a table
local stations = {};
-
+
for k,v in pairs( travelnet.targets[ owner_name ][ station_network ] ) do
table.insert( stations, k );
end
-- minetest.chat_send_player(puncher_name, "stations: "..minetest.serialize( stations ));
-
+
local ground_level = 1;
if( is_elevator ) then
- table.sort( stations, function(a,b) return travelnet.targets[ owner_name ][ station_network ][ a ].pos.y >
+ table.sort( stations, function(a,b) return travelnet.targets[ owner_name ][ station_network ][ a ].pos.y >
travelnet.targets[ owner_name ][ station_network ][ b ].pos.y end);
-- find ground level
local vgl_timestamp = 999999999999;
@@ -348,7 +367,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
travelnet.targets[ owner_name ][ station_network ][ k ].timestamp = os.time();
end
if( travelnet.targets[ owner_name ][ station_network ][ k ].timestamp < vgl_timestamp ) then
- vgl_timestamp = travelnet.targets[ owner_name ][ station_network ][ k ].timestamp;
+ vgl_timestamp = travelnet.targets[ owner_name ][ station_network ][ k ].timestamp;
ground_level = index;
end
end
@@ -359,10 +378,10 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
travelnet.targets[ owner_name ][ station_network ][ k ].nr = tostring( ground_level - index );
end
end
-
- else
+
+ else
-- sort the table according to the timestamp (=time the station was configured)
- table.sort( stations, function(a,b) return travelnet.targets[ owner_name ][ station_network ][ a ].timestamp <
+ table.sort( stations, function(a,b) return travelnet.targets[ owner_name ][ station_network ][ a ].timestamp <
travelnet.targets[ owner_name ][ station_network ][ b ].timestamp end);
end
@@ -400,9 +419,9 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
else
-- swap the actual data by which the stations are sorted
local old_timestamp = travelnet.targets[ owner_name ][ station_network ][ stations[swap_with_pos]].timestamp;
- travelnet.targets[ owner_name ][ station_network ][ stations[swap_with_pos]].timestamp =
+ travelnet.targets[ owner_name ][ station_network ][ stations[swap_with_pos]].timestamp =
travelnet.targets[ owner_name ][ station_network ][ stations[current_pos ]].timestamp;
- travelnet.targets[ owner_name ][ station_network ][ stations[current_pos ]].timestamp =
+ travelnet.targets[ owner_name ][ station_network ][ stations[current_pos ]].timestamp =
old_timestamp;
-- for elevators, only the "G"(round) marking is moved; no point in swapping stations
@@ -423,7 +442,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
x = 4;
end
- for index,k in ipairs( stations ) do
+ for index,k in ipairs( stations ) do
-- check if there is an elevator door in front that needs to be opened
local open_door_cmd = false;
@@ -431,7 +450,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
open_door_cmd = true;
end
- if( k ~= station_name or open_door_cmd) then
+ if( k ~= station_name or open_door_cmd) then
i = i+1;
-- new column
@@ -489,7 +508,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
if( this_node.name == 'travelnet:elevator' ) then
-- owner_name = '*'; -- the owner name is not relevant here
is_elevator = true;
- network_name = tostring( pos.x )..','..tostring( pos.z );
+ network_name = tostring( pos.x )..','..tostring( pos.z );
if( not( station_name ) or station_name == '' ) then
station_name = S('at %s m'):format(tostring( pos.y ));
end
@@ -531,7 +550,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
if( not( travelnet.targets[ owner_name ] )) then
travelnet.targets[ owner_name ] = {};
end
-
+
-- first station on this network?
if( not( travelnet.targets[ owner_name ][ network_name ] )) then
travelnet.targets[ owner_name ][ network_name ] = {};
@@ -558,7 +577,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
"Please choose a diffrent/new network name."):format(travelnet.MAX_STATIONS_PER_NETWORK));
return;
end
-
+
-- add this station
travelnet.targets[ owner_name ][ network_name ][ station_name ] = {pos=pos, timestamp=os.time() };
@@ -574,7 +593,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
meta:set_string( "owner", owner_name );
meta:set_int( "timestamp", travelnet.targets[ owner_name ][ network_name ][ station_name ].timestamp);
- meta:set_string("formspec",
+ meta:set_string("formspec",
"size[12,10]"..
"field[0.3,0.6;6,0.7;station_name;"..S("Station:")..";".. minetest.formspec_escape(meta:get_string("station_name")).."]"..
"field[0.3,3.6;6,0.7;station_network;"..S("Network:")..";"..minetest.formspec_escape(meta:get_string("station_network")).."]" );
@@ -592,7 +611,11 @@ end
-- allow doors to open
travelnet.open_close_door = function( pos, player, mode )
- local this_node = minetest.get_node( pos );
+ local this_node = minetest.get_node_or_nil( pos );
+ -- give up if the area is *still* not loaded
+ if( this_node == nil ) then
+ return
+ end
local pos2 = {x=pos.x,y=pos.y,z=pos.z};
if( this_node.param2 == 0 ) then pos2 = {x=pos.x,y=pos.y,z=(pos.z-1)};
@@ -609,20 +632,22 @@ travelnet.open_close_door = function( pos, player, mode )
-- do not close the elevator door if it is already closed
if( mode==1 and ( string.sub( door_node.name, -7 ) == '_closed'
-- handle doors that change their facedir
- or ( door_node.param2 == this_node.param2
+ or ( door_node.param2 == ((this_node.param2 + 2)%4)
and door_node.name ~= 'travelnet:elevator_door_glass_open'
+ and door_node.name ~= 'travelnet:elevator_door_tin_open'
and door_node.name ~= 'travelnet:elevator_door_steel_open'))) then
return;
end
-- do not open the doors if they are already open (works only on elevator-doors; not on doors in general)
if( mode==2 and ( string.sub( door_node.name, -5 ) == '_open'
-- handle doors that change their facedir
- or ( door_node.param2 ~= this_node.param2
+ or ( door_node.param2 ~= ((this_node.param2 + 2)%4)
and door_node.name ~= 'travelnet:elevator_door_glass_closed'
+ and door_node.name ~= 'travelnet:elevator_door_tin_closed'
and door_node.name ~= 'travelnet:elevator_door_steel_closed'))) then
return;
end
-
+
if( mode==2 ) then
minetest.after( 1, minetest.registered_nodes[ door_node.name ].on_rightclick, pos2, door_node, player );
else
@@ -645,6 +670,11 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
return;
end
+ -- show special locks buttons if needed
+ if( locks and (fields.locks_config or fields.locks_authorize)) then
+ return locks:lock_handle_input( pos, formname, fields, player )
+ end
+
-- show help text
if( fields and fields.station_help_setup and fields.station_help_setup ~= "") then
-- simulate right-click
@@ -667,6 +697,8 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
description = "travelnet box"
elseif( node and node.name and node.name == "travelnet:elevator") then
description = "elevator"
+ elseif( node and node.name and node.name == "locked_travelnet:travelnet") then
+ description = "locked travelnet"
else
minetest.chat_send_player(name, "Error: Unkown node.");
return
@@ -704,7 +736,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
-- if the box has not been configured yet
if( meta:get_string("station_network")=="" ) then
- travelnet.add_target( fields.station_name, fields.station_network, pos, name, meta, fields.owner_name );
+ travelnet.add_target( fields.station_name, fields.station_network, pos, name, meta, fields.owner );
return;
end
@@ -730,8 +762,8 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
local station_name = meta:get_string( "station_name" );
local station_network = meta:get_string( "station_network" );
- if( not( owner_name )
- or not( station_name )
+ if( not( owner_name )
+ or not( station_name )
or not( station_network )
or not( travelnet.targets[ owner_name ] )
or not( travelnet.targets[ owner_name ][ station_network ] )) then
@@ -766,7 +798,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
end
local this_node = minetest.get_node( pos );
- if( this_node ~= nil and this_node.name == 'travelnet:elevator' ) then
+ if( this_node ~= nil and this_node.name == 'travelnet:elevator' ) then
for k,v in pairs( travelnet.targets[ owner_name ][ station_network ] ) do
if( travelnet.targets[ owner_name ][ station_network ][ k ].nr --..' ('..tostring( travelnet.targets[ owner_name ][ station_network ][ k ].pos.y )..'m)'
== fields.target) then
@@ -794,9 +826,13 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
if( travelnet.travelnet_sound_enabled ) then
- minetest.sound_play("128590_7037-lq.mp3", {pos = pos, gain = 1.0, max_hear_distance = 10,})
+ if ( this_node.name == 'travelnet:elevator' ) then
+ minetest.sound_play("travelnet_bell", {pos = pos, gain = 0.75, max_hear_distance = 10,});
+ else
+ minetest.sound_play("travelnet_travel", {pos = pos, gain = 0.75, max_hear_distance = 10,});
+ end
end
- if( travelnet.travelnet_effect_enabled ) then
+ if( travelnet.travelnet_effect_enabled ) then
minetest.add_entity( {x=pos.x,y=pos.y+0.5,z=pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns
end
@@ -807,16 +843,13 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
local target_pos = travelnet.targets[ owner_name ][ station_network ][ fields.target ].pos;
player:moveto( target_pos, false);
- if( travelnet.travelnet_sound_enabled ) then
- minetest.sound_play("travelnet_travel.wav", {pos = target_pos, gain = 1.0, max_hear_distance = 10,})
- end
if( travelnet.travelnet_effect_enabled ) then
minetest.add_entity( {x=target_pos.x,y=target_pos.y+0.5,z=target_pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns
end
-- check if the box has at the other end has been removed.
- local node2 = minetest.get_node( target_pos );
+ local node2 = minetest.get_node_or_nil( target_pos );
if( node2 ~= nil and node2.name ~= 'ignore' and node2.name ~= 'travelnet:travelnet' and node2.name ~= 'travelnet:elevator' and node2.name ~= "locked_travelnet:travelnet" and node2.name ~= "travelnet:travelnet_private") then
-- provide information necessary to identify the removed box
@@ -828,9 +861,32 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
-- send the player back as there's no receiving travelnet
player:moveto( pos, false );
- -- do this only on servers where the function exists
- elseif( player.set_look_horizontal ) then
+ else
+ travelnet.rotate_player( target_pos, player, 0 )
+ end
+end
+travelnet.rotate_player = function( target_pos, player, tries )
+ -- try later when the box is loaded
+ local node2 = minetest.get_node_or_nil( target_pos );
+ if( node2 == nil ) then
+ if( tries < 30 ) then
+ minetest.after( 0, travelnet.rotate_player, target_pos, player, tries+1 )
+ end
+ return
+ end
+
+ -- play sound at the target position as well
+ if( travelnet.travelnet_sound_enabled ) then
+ if ( node2.name == 'travelnet:elevator' ) then
+ minetest.sound_play("travelnet_bell", {pos = target_pos, gain = 0.75, max_hear_distance = 10,});
+ else
+ minetest.sound_play("travelnet_travel", {pos = target_pos, gain = 0.75, max_hear_distance = 10,});
+ end
+ end
+
+ -- do this only on servers where the function exists
+ if( player.set_look_horizontal ) then
-- rotate the player so that he/she can walk straight out of the box
local yaw = 0;
local param2 = node2.param2;
@@ -843,7 +899,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
elseif( param2==3 ) then
yaw = 270;
end
-
+
player:set_look_horizontal( math.rad( yaw ));
player:set_look_vertical( math.rad( 0 ));
end
@@ -865,19 +921,19 @@ travelnet.remove_box = function( pos, oldnode, oldmetadata, digger )
local station_network = oldmetadata.fields[ "station_network" ];
-- station is not known? then just remove it
- if( not( owner_name )
- or not( station_name )
- or not( station_network )
+ if( not( owner_name )
+ or not( station_name )
+ or not( station_network )
or not( travelnet.targets[ owner_name ] )
or not( travelnet.targets[ owner_name ][ station_network ] )) then
-
+
minetest.chat_send_player( digger:get_player_name(), S("Error")..": "..
S("Could not find the station that is to be removed."));
return;
end
travelnet.targets[ owner_name ][ station_network ][ station_name ] = nil;
-
+
-- inform the owner
minetest.chat_send_player( owner_name, S("Station '%s'"):format(station_name ).." "..
S("has been REMOVED from the network '%s'."):format(station_network));
@@ -971,17 +1027,17 @@ end
if( travelnet.travelnet_enabled ) then
- dofile(minetest.get_modpath("travelnet").."/travelnet.lua"); -- the travelnet node definition
+ dofile(travelnet.path.."/travelnet.lua"); -- the travelnet node definition
end
if( travelnet.elevator_enabled ) then
- dofile(minetest.get_modpath("travelnet").."/elevator.lua"); -- allows up/down transfers only
+ dofile(travelnet.path.."/elevator.lua"); -- allows up/down transfers only
end
if( travelnet.doors_enabled ) then
- dofile(minetest.get_modpath("travelnet").."/doors.lua"); -- doors that open and close automaticly when the travelnet or elevator is used
+ dofile(travelnet.path.."/doors.lua"); -- doors that open and close automaticly when the travelnet or elevator is used
end
if( travelnet.abm_enabled ) then
- dofile(minetest.get_modpath("travelnet").."/restore_network_via_abm.lua"); -- restore travelnet data when players pass by broken networks
+ dofile(travelnet.path.."/restore_network_via_abm.lua"); -- restore travelnet data when players pass by broken networks
end
-- upon server start, read the savefile
diff --git a/travelnet/intllib.lua b/travelnet/intllib.lua
new file mode 100644
index 0000000..6669d72
--- /dev/null
+++ b/travelnet/intllib.lua
@@ -0,0 +1,45 @@
+
+-- Fallback functions for when `intllib` is not installed.
+-- Code released under Unlicense <http://unlicense.org>.
+
+-- Get the latest version of this file at:
+-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
+
+local function format(str, ...)
+ local args = { ... }
+ local function repl(escape, open, num, close)
+ if escape == "" then
+ local replacement = tostring(args[tonumber(num)])
+ if open == "" then
+ replacement = replacement..close
+ end
+ return replacement
+ else
+ return "@"..open..num..close
+ end
+ end
+ return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
+end
+
+local gettext, ngettext
+if minetest.get_modpath("intllib") then
+ if intllib.make_gettext_pair then
+ -- New method using gettext.
+ gettext, ngettext = intllib.make_gettext_pair()
+ else
+ -- Old method using text files.
+ gettext = intllib.Getter()
+ end
+end
+
+-- Fill in missing functions.
+
+gettext = gettext or function(msgid, ...)
+ return format(msgid, ...)
+end
+
+ngettext = ngettext or function(msgid, msgid_plural, n, ...)
+ return format(n==1 and msgid or msgid_plural, ...)
+end
+
+return gettext, ngettext
diff --git a/travelnet/locale/de.po b/travelnet/locale/de.po
new file mode 100644
index 0000000..f39db71
--- /dev/null
+++ b/travelnet/locale/de.po
@@ -0,0 +1,326 @@
+# German translation for the travelnet mod.
+# Copyright (C) 2018 Sokomine
+# This file is distributed under the same license as the travelnet package.
+# Sokomine, 2017
+# CodeXP <codexp@gmx.net>, 2018.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-03-24 01:31+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: CodeXP <codexp@gmx.net>\n"
+"Language-Team: \n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: init.lua
+msgid "allows to attach travelnet boxes to travelnets of other players"
+msgstr "erlaubt es, Stationen zu den Reisenetzwerken anderer Spieler hinzuzufügen"
+
+#: init.lua
+msgid "allows to dig travelnet boxes which belog to nets of other players"
+msgstr "erlaubt es, die Reisenetz-Stationen anderer Spieler zu entfernen"
+
+#: init.lua
+msgid "[Mod travelnet] Error: Savefile '%s' could not be written."
+msgstr "[Mod travelnet] Fehler: Sicherungsdatei '%s' konnte nicht geschrieben werden."
+
+#: init.lua
+msgid "[Mod travelnet] Error: Savefile '%s' not found."
+msgstr "[Mod travelnet] Fehler: Sicherungsdatei '%s' nicht gefunden."
+
+#: init.lua
+msgid "Back"
+msgstr "Zurück"
+
+#: init.lua
+msgid "Exit"
+msgstr "Ende"
+
+#: init.lua
+msgid "Travelnet-box (unconfigured)"
+msgstr "Reisenetz-Box (nicht konfiguriert)"
+
+#: init.lua
+msgid "Configure this travelnet station"
+msgstr "Konfiguration dieser Reisenetz-Box"
+
+#: init.lua
+msgid "Name of this station"
+msgstr "Name dieser Reisenetz-Box"
+
+#: init.lua
+msgid "How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"..."
+msgstr "Wie willst du diesen Ort nennen? Beispiel: \"mein erstes Haus\", \"Mine\", \"Laden\"..."
+
+#: init.lua
+msgid "Assign to Network:"
+msgstr "Station dem folgendem Netzwerk zuweisen:"
+
+#: init.lua
+msgid "You can have more than one network. If unsure, use \"%s\""
+msgstr "Du kannst mehrere Netzwerke anlegen. Falls du nicht weißt, was du tun sollst, wähle \"%s\""
+
+#: init.lua
+msgid "Owned by:"
+msgstr "Besitzer:"
+
+#: init.lua
+msgid "Unless you know what you are doing, leave this empty."
+msgstr "Wenn du nicht weißt, wozu dieses Feld dient, laß es leer."
+
+#: init.lua
+msgid "Help"
+msgstr "Hilfe"
+
+#: init.lua
+msgid "Save"
+msgstr "Speichern"
+
+#: init.lua
+msgid "Update failed! Resetting this box on the travelnet."
+msgstr "Aktualisierung gescheitert. Konfiguration der Reisenetz-Box wird zurückgesetzt."
+
+#: init.lua
+msgid "Station '%s'"
+msgstr "Station '%s'"
+
+#: init.lua
+msgid "has been reattached to the network '%s'."
+msgstr "wurde dem Netzwerk '%s' wieder hinzugefügt."
+
+#: init.lua
+msgid "Locked travelnet. Type /help for help:"
+msgstr "Abgeschlossene Reisenetz-Box. Tippe /help für Hilfe:"
+
+#: init.lua
+msgid "Punch box to update target list."
+msgstr "Reisenetz-Box mit Linksklick aktualisieren."
+
+#: init.lua
+msgid "Travelnet-Box"
+msgstr "Reisenetz-Box"
+
+#: init.lua
+msgid "Name of this station:"
+msgstr "Name dieser Station:"
+
+#: init.lua
+msgid "Assigned to Network:"
+msgstr "Zugehöriges Netzwerk:"
+
+#: init.lua
+msgid "Click on target to travel there:"
+msgstr "Klicke auf das Ziel um dorthin zu reisen:"
+
+#: init.lua
+msgid "G"
+msgstr "E"
+
+#: init.lua
+msgid "This station is already the first one on the list."
+msgstr "Diese Reisenetz-Box ist bereits die erste auf der Liste."
+
+#: init.lua
+msgid "This station is already the last one on the list."
+msgstr "Diese Reisenetz-Box ist bereits die letzte auf der Liste."
+
+#: init.lua
+msgid "Position in list:"
+msgstr "Listenposition:"
+
+#: init.lua
+msgid "move up"
+msgstr "hoch"
+
+#: init.lua
+msgid "move down"
+msgstr "runter"
+
+#: init.lua
+msgid "on travelnet '%s'"
+msgstr "im Reisenetzwerk '%s'"
+
+#: init.lua
+msgid "owned by %s"
+msgstr "Eigentum von %s"
+
+#: init.lua
+msgid "ready for usage. Right-click to travel, punch to update."
+msgstr "bereit für die Nutzung. Rechtsklick um zu Reisen, Linksklick für Update."
+
+#: init.lua
+msgid "at %s m"
+msgstr "in %s m Höhe"
+
+#: init.lua
+msgid "Error"
+msgstr "Fehler"
+
+#: init.lua
+msgid "Please provide a name for this station."
+msgstr "Bitte gib einen Namen für diese Reisenetz-Box an."
+
+#: init.lua
+msgid "Please provide the name of the network this station ought to be connected to."
+msgstr "Bitte gib einen Namen für das Netzwerk an zu dem diese Reisenetz-Box gehören soll."
+
+#: init.lua
+msgid "There is no player with interact privilege named '%s'. Aborting."
+msgstr "Es gibt keinen Spieler mit interact-Recht names '%s'. Abbruch."
+
+#: init.lua
+msgid "You do not have the travelnet_attach priv which is required to attach your box to the network of someone else. Aborting."
+msgstr "Dir fehlt das travelnet_attach-Recht, welches für das Hinzufügen von Reisenetz-Boxen zu Netzwerken nötig ist, die anderen Spielern gehören. Abbruch."
+
+#: init.lua
+msgid "A station named '%s' already exists on this network. Please choose a diffrent name!"
+msgstr "Eine Reisenetz-Box namens '%s' existiert bereits in diesem Netzwerk. Abbruch."
+
+#: init.lua
+msgid "Network '%s'"
+msgstr "Netzwerk '%s'"
+
+#: init.lua
+msgid "already contains the maximum number ("
+msgstr "%s) of allowed stations per network. Please choose a diffrent/new network name. = enthält bereits die maixmale Anzahl (=%s) erlaubert Stationen pro Netzwerk. Bitte wähle ein anderes bzw. neues Netzwerk."
+
+#: init.lua
+msgid "has been added to the network '%s'"
+msgstr "wurde an das Netzwerk '%s' angeschlossen."
+
+#: init.lua
+msgid ", which now consists of %s station(s)."
+msgstr ", das nun aus %s Station(en) besteht."
+
+#: init.lua
+msgid "Station:"
+msgstr "Station:"
+
+#: init.lua
+msgid "Network:"
+msgstr "Netzwerk:"
+
+#: init.lua
+msgid "No help available yet."
+msgstr "Noch keine Hilfe eingebaut."
+
+#: init.lua
+msgid "Please click on the target you want to travel to."
+msgstr "Bitte klicke auf das Ziel zu dem du reisen willst."
+
+#: init.lua
+msgid "There is something wrong with the configuration of this station."
+msgstr "Die Konfiguration dieser Reisenetz-Box ist fehlerhaft."
+
+#: init.lua
+msgid "This travelnet is lacking data and/or improperly configured."
+msgstr "Diese Reisenetz-Box ist fehlerhaft oder unvollständig konfiguriert."
+
+#: init.lua
+msgid "does not exist (anymore?) on this network."
+msgstr "gibt es nicht (mehr?) in diesem Netzwerk."
+
+#: init.lua
+msgid "Initiating transfer to station '%s'."
+msgstr "leite Reise zur Station '%s' ein."
+
+#: init.lua
+msgid "Could not find information about the station that is to be removed."
+msgstr "Konnte keine Informationen über die zu entfernende Station finden."
+
+#: init.lua
+msgid "Could not find the station that is to be removed."
+msgstr "Konnte die zu entfernende Station nicht finden."
+
+#: init.lua
+msgid "has been REMOVED from the network '%s'."
+msgstr "wurde vom Netzwerk '%s' ENTFERNT."
+
+#: init.lua
+msgid "This %s has not been configured yet. Please set it up first to claim it. Afterwards you can remove it because you are then the owner."
+msgstr "Diese Reisenetz-Box wurde noch nicht konfiguriert. Bitte konfiguriere sie um sie in Besitz zu nehmen. Anschließend kannst du sie auch wieder entfernen da du dann der Besitzer bist."
+
+#: init.lua
+msgid "This %s belongs to %s. You can't remove it."
+msgstr "Diese Reisenetz-Box gehört %s. Du kannst sie nicht entfernen."
+
+#: travelnet.lua
+msgid "Not enough vertical space to place the travelnet box!"
+msgstr "Nicht genug Platz (vertikal) um die Reisenetz-Box zu setzen!"
+
+#: elevator.lua
+msgid "Congratulations! This is your first elevator. You can build an elevator network by placing further elevators somewhere above or below this one. Just make sure that the x and z coordinate are the same."
+msgstr ""
+
+#: elevator.lua
+msgid "This elevator will automaticly connect to the other elevators you have placed at diffrent heights. Just enter a station name and click on \"store\" to set it up. Or just punch it to set the height as station name."
+msgstr "Dieser Aufzug wird sich automatisch mit anderen Aufzügen verbinden die du auf unterschiedlichen Höhen positioniert hast. Gib einfach einen Namen für diese Station hier ein und klicke auf \"Speichern\" um die Station einzurichten. Oder mache einen Linksklick um die Höhe als Stationsname zu setzen."
+
+#: elevator.lua
+msgid "Your nearest elevator network is located"
+msgstr "Dein nächstgelegenes Aufzugs-Netzwerk befindet sich"
+
+#: elevator.lua
+msgid "m behind this elevator and"
+msgstr "m hinter diesem Aufzug und"
+
+#: elevator.lua
+msgid "m in front of this elevator and"
+msgstr "m vor diesem Aufzug und"
+
+#: elevator.lua
+msgid "m to the left"
+msgstr "m links"
+
+#: elevator.lua
+msgid "m to the right"
+msgstr "m rechts"
+
+#: elevator.lua
+msgid ", located at x"
+msgstr ", an Position x"
+
+#: elevator.lua
+msgid "This elevator here will start a new shaft/network."
+msgstr "Dieser Aufzug hier wird einen neuen Schaft bzw. ein neues Netzwerk erstellen."
+
+#: elevator.lua
+msgid "This is your first elevator. It differs from travelnet networks by only allowing movement in vertical direction (up or down). All further elevators which you will place at the same x,z coordinates at differnt heights will be able to connect to this elevator."
+msgstr "Dies ist dein erster Aufzug. Der Aufzug unterscheidet sich von Reisenetz-Boxen insofern als daß er nur Reisen in vertikaler Richtung (hoch und runter) erlaubt. Alle folgenden Aufzüge, die du an die selben x,z Koordinaten auf verschiedenen Höhenpositionen setzen wirst, werden sich automatisch mit diesem Aufzug verbinden."
+
+#: elevator.lua
+msgid "Elevator"
+msgstr "Aufzug"
+
+#: elevator.lua
+msgid "Elevator (unconfigured)"
+msgstr "Aufzug (nicht konfiguriert)"
+
+#: doors.lua
+msgid "elevator door (open)"
+msgstr "Aufzugstür (offen)"
+
+#: doors.lua
+msgid "elevator door (closed)"
+msgstr "Aufzugstür (geschlossen)"
+
+#: init.lua
+#, lua-format
+msgid "Remove station"
+msgstr "Station entfernen"
+
+#: init.lua
+#, lua-format
+msgid "You do not have enough room in your inventory."
+msgstr "Du hast nicht genug Platz in deinem Inventar."
+
+#: init.lua
+#, lua-format
+msgid "[Mod travelnet] Error: Savefile '%s' is damaged. Saved the backup as '%s'."
+msgstr "[Mod travelnet] Fehler: Sicherungsdatei '%s' ist beschädigt. Backup wurde unter '%s' gespeichert."
diff --git a/travelnet/locale/de.txt b/travelnet/locale/de.txt
deleted file mode 100644
index e5f7642..0000000
--- a/travelnet/locale/de.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-# Template
-
-### config.lua ###
-
-### init.lua ###
-
-allows to attach travelnet boxes to travelnets of other players = erlaubt es, Stationen zu den Reisenetzwerken anderer Spieler hinzuzufügen
-allows to dig travelnet boxes which belog to nets of other players = erlaubt es, die Reisenetz-Stationen anderer Spieler zu entfernen
-
-[Mod travelnet] Error: Savefile '%s' could not be written. = [Mod travelnet] Fehler: Sicherungsdatei '%s' konnte nicht geschrieben werden.
-[Mod travelnet] Error: Savefile '%s' not found. = [Mod travelnet] Fehler: Sicherungsdatei '%s' nicht gefunden.
-
-Back = Zurück
-Exit = Ende
-
-Travelnet-box (unconfigured) = Reisenetz-Box (nicht konfiguriert)
-
-Configure this travelnet station = Konfiguration dieser Reisenetz-Box
-Name of this station = Name dieser Reisenetz-Box
-How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"... = Wie willst du diesen Ort nennen? Beispiel: \"mein erstes Haus\", \"Mine\", \"Laden\"...
-Assign to Network: = Station dem folgendem Netzwerk zuweisen:
-You can have more than one network. If unsure, use \"%s\" = Du kannst mehrere Netzwerke anlegen. Falls du nicht weißt, was du tun sollst, wähle \"%s\"
-Owned by: = Besitzer:
-Unless you know what you are doing, leave this empty. = Wenn du nicht weißt, wozu dieses Feld dient, laß es leer.
-Help = Hilfe
-Save = Speichern
-Remove station = Station entfernen
-You do not have enough room in your inventory. = Du hast nicht genug Platz in deinem Inventar.
-Update failed! Resetting this box on the travelnet. = Aktualisierung gescheitert. Konfiguration der Reisenetz-Box wird zurückgesetzt.
-Station '%s' = Station '%s'
-has been reattached to the network '%s'. = wurde dem Netzwerk '%s' wieder hinzugefügt.
-Locked travelnet. Type /help for help: = Abgeschlossene Reisenetz-Box. Tippe /help für Hilfe:
-Punch box to update target list. = Reisenetz-Box mit Linksklick aktualisieren.
-Travelnet-Box = Reisenetz-Box
-Name of this station: = Name dieser Station:
-Assigned to Network: = Zugehöriges Netzwerk:
-Click on target to travel there: = Klicke auf das Ziel um dorthin zu reisen:
-G = E
-This station is already the first one on the list. = Diese Reisenetz-Box ist bereits die erste auf der Liste.
-This station is already the last one on the list. = Diese Reisenetz-Box ist bereits die letzte auf der Liste.
-Position in list: = Listenposition:
-move up = hoch
-move down = runter
-on travelnet '%s' = im Reisenetzwerk '%s'
-owned by %s = Eigentum von %s
-ready for usage. Right-click to travel, punch to update. = bereit für die Nutzung. Rechtsklick um zu Reisen, Linksklick für Update.
-at %s m = in %s m Höhe
-Error = Fehler
-Please provide a name for this station. = Bitte gib einen Namen für diese Reisenetz-Box an.
-Please provide the name of the network this station ought to be connected to. = Bitte gib einen Namen für das Netzwerk an zu dem diese Reisenetz-Box gehören soll.
-There is no player with interact privilege named '%s'. Aborting. = Es gibt keinen Spieler mit interact-Recht names '%s'. Abbruch.
-You do not have the travelnet_attach priv which is required to attach your box to the network of someone else. Aborting. = Dir fehlt das travelnet_attach-Recht, welches für das Hinzufügen von Reisenetz-Boxen zu Netzwerken nötig ist, die anderen Spielern gehören. Abbruch.
-A station named '%s' already exists on this network. Please choose a diffrent name! = Eine Reisenetz-Box namens '%s' existiert bereits in diesem Netzwerk. Abbruch.
-Network '%s' = Netzwerk '%s'
-already contains the maximum number (=%s) of allowed stations per network. Please choose a diffrent/new network name. = enthält bereits die maixmale Anzahl (=%s) erlaubert Stationen pro Netzwerk. Bitte wähle ein anderes bzw. neues Netzwerk.
-has been added to the network '%s' = wurde an das Netzwerk '%s' angeschlossen.
-, which now consists of %s station(s). = , das nun aus %s Station(en) besteht.
-Station: = Station:
-Network: = Netzwerk:
-No help available yet. = Noch keine Hilfe eingebaut.
-Please click on the target you want to travel to. = Bitte klicke auf das Ziel zu dem du reisen willst.
-There is something wrong with the configuration of this station. = Die Konfiguration dieser Reisenetz-Box ist fehlerhaft.
-This travelnet is lacking data and/or improperly configured. = Diese Reisenetz-Box ist fehlerhaft oder unvollständig konfiguriert.
-does not exist (anymore?) on this network. = gibt es nicht (mehr?) in diesem Netzwerk.
-Initiating transfer to station '%s'. = leite Reise zur Station '%s' ein.
-Could not find information about the station that is to be removed. = Konnte keine Informationen über die zu entfernende Station finden.
-Could not find the station that is to be removed. = Konnte die zu entfernende Station nicht finden.
-has been REMOVED from the network '%s'. = wurde vom Netzwerk '%s' ENTFERNT.
-This %s has not been configured yet. Please set it up first to claim it. Afterwards you can remove it because you are then the owner. = Diese Reisenetz-Box wurde noch nicht konfiguriert. Bitte konfiguriere sie um sie in Besitz zu nehmen. Anschließend kannst du sie auch wieder entfernen da du dann der Besitzer bist.
-This %s belongs to %s. You can't remove it. = Diese Reisenetz-Box gehört %s. Du kannst sie nicht entfernen.
-
-
-### travelnet.lua ###
-Not enough vertical space to place the travelnet box! = Nicht genug Platz (vertikal) um die Reisenetz-Box zu setzen!
-
-
-### elevator.lua ###
-Congratulations! This is your first elevator. You can build an elevator network by placing further elevators somewhere above or below this one. Just make sure that the x and z coordinate are the same. =
-This elevator will automaticly connect to the other elevators you have placed at diffrent heights. Just enter a station name and click on \"store\" to set it up. Or just punch it to set the height as station name. = Dieser Aufzug wird sich automatisch mit anderen Aufzügen verbinden die du auf unterschiedlichen Höhen positioniert hast. Gib einfach einen Namen für diese Station hier ein und klicke auf \"Speichern\" um die Station einzurichten. Oder mache einen Linksklick um die Höhe als Stationsname zu setzen.
-Your nearest elevator network is located = Dein nächstgelegenes Aufzugs-Netzwerk befindet sich
-m behind this elevator and = m hinter diesem Aufzug und
-m in front of this elevator and = m vor diesem Aufzug und
-m to the left = m links
-m to the right = m rechts
-, located at x = , an Position x
-This elevator here will start a new shaft/network. = Dieser Aufzug hier wird einen neuen Schaft bzw. ein neues Netzwerk erstellen.
-This is your first elevator. It differs from travelnet networks by only allowing movement in vertical direction (up or down). All further elevators which you will place at the same x,z coordinates at differnt heights will be able to connect to this elevator. = Dies ist dein erster Aufzug. Der Aufzug unterscheidet sich von Reisenetz-Boxen insofern als daß er nur Reisen in vertikaler Richtung (hoch und runter) erlaubt. Alle folgenden Aufzüge, die du an die selben x,z Koordinaten auf verschiedenen Höhenpositionen setzen wirst, werden sich automatisch mit diesem Aufzug verbinden.
-Elevator = Aufzug
-Elevator (unconfigured) = Aufzug (nicht konfiguriert)
-
-
-### doors.lua ###
-elevator door (open) = Aufzugstür (offen)
-elevator door (closed) = Aufzugstür (geschlossen)
diff --git a/travelnet/locale/ru.po b/travelnet/locale/ru.po
new file mode 100644
index 0000000..004fe29
--- /dev/null
+++ b/travelnet/locale/ru.po
@@ -0,0 +1,377 @@
+# Russian translation for the travelnet mod.
+# Copyright (C) 2018 Sokomine
+# This file is distributed under the same license as the travelnet package.
+# CodeXP <codexp@gmx.net>, 2018.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: travelnet\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-04-05 14:30+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: CodeXP <codexp@gmx.net>\n"
+"Language-Team: \n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: doors.lua
+msgid "elevator door (open)"
+msgstr "дверь лифта (открыта)"
+
+#: doors.lua
+msgid "elevator door (closed)"
+msgstr "дверь лифта (закрыта)"
+
+#: elevator.lua
+msgid ""
+"Congratulations! This is your first elevator.You can build an elevator "
+"network by placing further elevators somewhere above or below this one. "
+"Just make sure that the x and z coordinate are the same."
+msgstr ""
+"Поздравляем! Это ваш первый лифт. Вы можете построить сеть лифтов, "
+"разместив дополнительные лифты выше или ниже этого лифта. "
+"Только убедитесь, что координаты x и z совпадают."
+
+#: elevator.lua
+msgid ""
+"This elevator will automaticly connect to the other elevators you have "
+"placed at diffrent heights. Just enter a station name and click on \"store\" "
+"to set it up. Or just punch it to set the height as station name."
+msgstr ""
+"Этот лифт будет автоматически подключен к другим лифтам, которые размещены "
+"на разных высотах. После установки можете ввести название лифта и нажать \"сохранить\". "
+"Или просто ударьте его, чтобы установить высоту в качестве названия лифта."
+
+#: elevator.lua
+msgid "Your nearest elevator network is located"
+msgstr "Ваша ближайшая сеть лифтов находится"
+
+#: elevator.lua
+msgid "m behind this elevator and"
+msgstr "м за этим лифтом"
+
+#: elevator.lua
+msgid "m in front of this elevator and"
+msgstr "м перед этим лифтом"
+
+#: elevator.lua
+msgid " ERROR"
+msgstr " ОЩИБКА"
+
+#: elevator.lua
+msgid "m to the left"
+msgstr "м с лева"
+
+#: elevator.lua
+msgid "m to the right"
+msgstr "м с права"
+
+#: elevator.lua
+msgid ", located at x"
+msgstr ", находится на x"
+
+#: elevator.lua
+msgid "This elevator here will start a new shaft/network."
+msgstr "Этот лифт составит новую сеть."
+
+#: elevator.lua
+msgid ""
+"This is your first elevator. It differs from travelnet networks by only "
+"allowing movement in vertical direction (up or down). All further elevators "
+"which you will place at the same x,z coordinates at differnt heights will be "
+"able to connect to this elevator."
+msgstr ""
+"Это ваш первый лифт. Он отличается от сети телепортов только тем что "
+"движение ограниченно в вертикальном направлении (вверх или вниз). "
+"Все дополнительные лифты, которые вы будете размещать в тех же координатах "
+"(x, z) на разных высотах, будут подключены к этому лифту."
+
+#: elevator.lua
+msgid "Elevator"
+msgstr "Лифт"
+
+#: elevator.lua
+msgid "Elevator (unconfigured)"
+msgstr "Лифт (без настройки)"
+
+#: elevator.lua init.lua
+msgid "Name of this station:"
+msgstr "Имя этой станции:"
+
+#: elevator.lua
+msgid "Store"
+msgstr "Сохранить"
+
+#: elevator.lua travelnet.lua
+msgid "Not enough vertical space to place the travelnet box!"
+msgstr "Недостаточно вертикального места, чтобы разместить телепорт!"
+
+#: init.lua
+msgid "allows to attach travelnet boxes to travelnets of other players"
+msgstr "позволяет присоеденять телепорты к сетям других игроков"
+
+#: init.lua
+msgid "allows to dig travelnet boxes which belog to nets of other players"
+msgstr "позволяет убирать телепорты других игроков"
+
+#: init.lua
+#, lua-format
+msgid "[Mod travelnet] Error: Savefile '%s' could not be written."
+msgstr "[MOD travelnet] Ошибка: Файл «%s» не может быть записан."
+
+#: init.lua
+#, lua-format
+msgid "[Mod travelnet] Error: Savefile '%s' not found."
+msgstr "[MOD travelnet] Ошибка: Файл «%s» не найден."
+
+#: init.lua
+msgid "Back"
+msgstr "Назад"
+
+#: init.lua
+msgid "Exit"
+msgstr "Выход"
+
+#: init.lua
+msgid "Travelnet-box (unconfigured)"
+msgstr "Телепорт (без настройки)"
+
+#: init.lua
+msgid "Configure this travelnet station"
+msgstr "НАСТРОЙКИ СТАНЦИИ"
+
+#: init.lua
+msgid "Name of this station"
+msgstr "Имя этой станции"
+
+#: init.lua
+msgid ""
+"How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"..."
+msgstr ""
+"Как вы назавёте это место? Пример: \"мой первый дом\", \"шахта\", \"магазин\"..."
+
+#: init.lua
+msgid "Assign to Network:"
+msgstr "Добавить в сеть:"
+
+#: init.lua
+#, lua-format
+msgid "You can have more than one network. If unsure, use \"%s\""
+msgstr "Вы можете иметь несколько сетей. Если вы не уверены, используйте \"%s\""
+
+#: init.lua
+msgid "Owned by:"
+msgstr "Пренадлежит:"
+
+#: init.lua
+msgid "Unless you know what you are doing, leave this empty."
+msgstr "Если вы не знаете для чего это, оставьте это пустым."
+
+#: init.lua
+msgid "Help"
+msgstr "Справка"
+
+#: init.lua
+msgid "Save"
+msgstr "Сохранить"
+
+#: init.lua
+msgid "Update failed! Resetting this box on the travelnet."
+msgstr "Обновление не выполнено! Нстройки телепорта сброшенны."
+
+#: init.lua
+#, lua-format
+msgid "Station '%s'"
+msgstr "Станция «%s»"
+
+#: init.lua
+#, lua-format
+msgid " has been reattached to the network '%s'."
+msgstr " присоеденён к сети «%s»."
+
+#: init.lua
+msgid "Locked travelnet. Type /help for help:"
+msgstr "Закрытый телепорт. Напишите /help для справки:"
+
+#: init.lua travelnet.lua
+msgid "Travelnet-Box"
+msgstr "Телепорт"
+
+#: init.lua
+msgid "Punch box to update target list."
+msgstr "Ударьте станцию для обновления целей."
+
+#: init.lua
+msgid "Assigned to Network:"
+msgstr "Присоеденён к сети:"
+
+#: init.lua
+msgid "Click on target to travel there:"
+msgstr "Выберите цель, чтобы переместится:"
+
+# (G)round floor
+#: init.lua
+msgid "G"
+msgstr "1"
+
+#: init.lua
+msgid "This station is already the first one on the list."
+msgstr "Эта станция уже первая в списке."
+
+#: init.lua
+msgid "This station is already the last one on the list."
+msgstr "Эта станция уже последнея в списке."
+
+#: init.lua
+msgid "Position in list:"
+msgstr "Позиция:"
+
+#: init.lua
+msgid "move up"
+msgstr "▲ вверх"
+
+#: init.lua
+msgid "move down"
+msgstr "▼ вниз"
+
+#: init.lua
+#, lua-format
+msgid "on travelnet '%s'"
+msgstr "на сети «%s»"
+
+#: init.lua
+#, lua-format
+msgid "(owned by %s)"
+msgstr "(пренадлежит %s)"
+
+#: init.lua
+msgid "ready for usage. Right-click to travel, punch to update."
+msgstr "готова к использованию. Правая кнопка для перемещения, ударить чтобы обновить."
+
+#: init.lua
+#, lua-format
+msgid "at %s m"
+msgstr "на %s м"
+
+#: init.lua
+msgid "Error"
+msgstr "Ошибка"
+
+#: init.lua
+msgid "Please provide a name for this station."
+msgstr "Укажите название этой станции."
+
+#: init.lua
+msgid ""
+"Please provide the name of the network this station ought to be connected to."
+msgstr ""
+"Укажите название сети, к которой добавить эту станцию."
+
+#: init.lua
+#, lua-format
+msgid "There is no player with interact privilege named '%s'. Aborting."
+msgstr "Нет игрока с привилегией «interact» по имени «%s». Отмена."
+
+#: init.lua
+msgid ""
+"You do not have the travelnet_attach priv which is required to attach your "
+"box to the network of someone else. Aborting."
+msgstr ""
+"У вас нет привилегии «travelnet_attach», которая необходима для добавки "
+"вашего телепорта в сеть другого игрока. Отмена."
+
+#: init.lua
+#, lua-format
+msgid ""
+"A station named '%s' already exists on this network. Please choose a "
+"diffrent name!"
+msgstr ""
+"Станция «%s» уже существует в этой сети. "
+"Попробуйте другое имя!"
+
+#: init.lua
+#, lua-format
+msgid "Network '%s',"
+msgstr "Сеть «%s»,"
+
+#: init.lua
+#, lua-format
+msgid ""
+"already contains the maximum number (=%s) of allowed stations per network. "
+"Please choose a diffrent/new network name."
+msgstr ""
+"уже содержит максимальное количество (=%s) разрешенных станций на сеть. "
+"Выберите друю сеть (иное имя сети)."
+
+#: init.lua
+#, lua-format
+msgid "has been added to the network '%s'"
+msgstr "была добавлена в сеть «%s»"
+
+#: init.lua
+#, lua-format
+msgid ", which now consists of %s station(s)."
+msgstr ", которая теперь состоит из %s станций."
+
+#: init.lua
+msgid "Station:"
+msgstr "Станция:"
+
+#: init.lua
+msgid "Network:"
+msgstr "Сеть:"
+
+#: init.lua
+msgid "No help available yet."
+msgstr "Пока нет справки."
+
+#: init.lua
+msgid "Please click on the target you want to travel to."
+msgstr "Пожалуйста, выберите цель, куда вы хотели бы попасть."
+
+#: init.lua
+msgid "There is something wrong with the configuration of this station."
+msgstr "С конфигурацией этой станции что-то не так."
+
+#: init.lua
+msgid "This travelnet is lacking data and/or improperly configured."
+msgstr "В этом телепорте отсутствуют данные или он неправильно настроен."
+
+#: init.lua
+msgid "does not exist (anymore?) on this network."
+msgstr "в этой сети (больше?) не существует."
+
+#: init.lua
+#, lua-format
+msgid "Initiating transfer to station '%s'."
+msgstr "Инициирование перехода на станцию «%s»."
+
+#: init.lua
+msgid "Could not find information about the station that is to be removed."
+msgstr "Не удалось найти информацию о станции, для удаления."
+
+#: init.lua
+msgid "Could not find the station that is to be removed."
+msgstr "Не удалось найти станцию, для удаления."
+
+#: init.lua
+#, lua-format
+msgid "has been REMOVED from the network '%s'."
+msgstr "УДАЛЕНА из сети «%s»."
+
+#: init.lua
+#, lua-format
+msgid ""
+"This %s has not been configured yet. Please set it up first to claim it. "
+"Afterwards you can remove it because you are then the owner."
+msgstr ""
+"Этот %s еще не настроен. Пожалуйста, сначала настройте его, чтобы перенять имущество. "
+"После этого вы можете удалить его, так как вы являетесь владельцем."
+
+#: init.lua
+#, lua-format
+msgid "This %s belongs to %s. You can't remove it."
+msgstr "Этот %s принадлежит %s."
diff --git a/travelnet/locale/template.pot b/travelnet/locale/template.pot
new file mode 100644
index 0000000..86e0e5c
--- /dev/null
+++ b/travelnet/locale/template.pot
@@ -0,0 +1,372 @@
+# LANGUAGE translation for the travelnet mod.
+# Copyright (C) 2018 Sokomine
+# This file is distributed under the same license as the travelnet package.
+# CodeXP <codexp@gmx.net>, 2018.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: travelnet\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-04-05 14:34+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: doors.lua
+msgid "elevator door (open)"
+msgstr ""
+
+#: doors.lua
+msgid "elevator door (closed)"
+msgstr ""
+
+#: elevator.lua
+msgid ""
+"Congratulations! This is your first elevator.You can build an elevator "
+"network by placing further elevators somewhere above or below this one. Just "
+"make sure that the x and z coordinate are the same."
+msgstr ""
+
+#: elevator.lua
+msgid ""
+"This elevator will automaticly connect to the other elevators you have "
+"placed at diffrent heights. Just enter a station name and click on \"store\" "
+"to set it up. Or just punch it to set the height as station name."
+msgstr ""
+
+#: elevator.lua
+msgid "Your nearest elevator network is located"
+msgstr ""
+
+#: elevator.lua
+msgid "m behind this elevator and"
+msgstr ""
+
+#: elevator.lua
+msgid "m in front of this elevator and"
+msgstr ""
+
+#: elevator.lua
+msgid " ERROR"
+msgstr ""
+
+#: elevator.lua
+msgid "m to the left"
+msgstr ""
+
+#: elevator.lua
+msgid "m to the right"
+msgstr ""
+
+#: elevator.lua
+msgid ", located at x"
+msgstr ""
+
+#: elevator.lua
+msgid "This elevator here will start a new shaft/network."
+msgstr ""
+
+#: elevator.lua
+msgid ""
+"This is your first elevator. It differs from travelnet networks by only "
+"allowing movement in vertical direction (up or down). All further elevators "
+"which you will place at the same x,z coordinates at differnt heights will be "
+"able to connect to this elevator."
+msgstr ""
+
+#: elevator.lua
+msgid "Elevator"
+msgstr ""
+
+#: elevator.lua
+msgid "Elevator (unconfigured)"
+msgstr ""
+
+#: elevator.lua init.lua
+msgid "Name of this station:"
+msgstr ""
+
+#: elevator.lua
+msgid "Store"
+msgstr ""
+
+#: elevator.lua travelnet.lua
+msgid "Not enough vertical space to place the travelnet box!"
+msgstr ""
+
+#: init.lua
+msgid "allows to attach travelnet boxes to travelnets of other players"
+msgstr ""
+
+#: init.lua
+msgid "allows to dig travelnet boxes which belog to nets of other players"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "[Mod travelnet] Error: Savefile '%s' could not be written."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "[Mod travelnet] Error: Savefile '%s' not found."
+msgstr ""
+
+#: init.lua
+msgid "Back"
+msgstr ""
+
+#: init.lua
+msgid "Exit"
+msgstr ""
+
+#: init.lua
+msgid "Travelnet-box (unconfigured)"
+msgstr ""
+
+#: init.lua
+msgid "Configure this travelnet station"
+msgstr ""
+
+#: init.lua
+msgid "Name of this station"
+msgstr ""
+
+#: init.lua
+msgid ""
+"How do you call this place here? Example: \"my first house\", \"mine\", "
+"\"shop\"..."
+msgstr ""
+
+#: init.lua
+msgid "Assign to Network:"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "You can have more than one network. If unsure, use \"%s\""
+msgstr ""
+
+#: init.lua
+msgid "Owned by:"
+msgstr ""
+
+#: init.lua
+msgid "Unless you know what you are doing, leave this empty."
+msgstr ""
+
+#: init.lua
+msgid "Help"
+msgstr ""
+
+#: init.lua
+msgid "Save"
+msgstr ""
+
+#: init.lua
+msgid "Update failed! Resetting this box on the travelnet."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "Station '%s'"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid " has been reattached to the network '%s'."
+msgstr ""
+
+#: init.lua
+msgid "Locked travelnet. Type /help for help:"
+msgstr ""
+
+#: init.lua travelnet.lua
+msgid "Travelnet-Box"
+msgstr ""
+
+#: init.lua
+msgid "Punch box to update target list."
+msgstr ""
+
+#: init.lua
+msgid "Assigned to Network:"
+msgstr ""
+
+#: init.lua
+msgid "Click on target to travel there:"
+msgstr ""
+
+#: init.lua
+msgid "G"
+msgstr ""
+
+#: init.lua
+msgid "This station is already the first one on the list."
+msgstr ""
+
+#: init.lua
+msgid "This station is already the last one on the list."
+msgstr ""
+
+#: init.lua
+msgid "Position in list:"
+msgstr ""
+
+#: init.lua
+msgid "move up"
+msgstr ""
+
+#: init.lua
+msgid "move down"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "on travelnet '%s'"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "(owned by %s)"
+msgstr ""
+
+#: init.lua
+msgid "ready for usage. Right-click to travel, punch to update."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "at %s m"
+msgstr ""
+
+#: init.lua
+msgid "Error"
+msgstr ""
+
+#: init.lua
+msgid "Please provide a name for this station."
+msgstr ""
+
+#: init.lua
+msgid ""
+"Please provide the name of the network this station ought to be connected to."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "There is no player with interact privilege named '%s'. Aborting."
+msgstr ""
+
+#: init.lua
+msgid ""
+"You do not have the travelnet_attach priv which is required to attach your "
+"box to the network of someone else. Aborting."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid ""
+"A station named '%s' already exists on this network. Please choose a "
+"diffrent name!"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "Network '%s',"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid ""
+"already contains the maximum number (=%s) of allowed stations per network. "
+"Please choose a diffrent/new network name."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "has been added to the network '%s'"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid ", which now consists of %s station(s)."
+msgstr ""
+
+#: init.lua
+msgid "Station:"
+msgstr ""
+
+#: init.lua
+msgid "Network:"
+msgstr ""
+
+#: init.lua
+msgid "No help available yet."
+msgstr ""
+
+#: init.lua
+msgid "Please click on the target you want to travel to."
+msgstr ""
+
+#: init.lua
+msgid "There is something wrong with the configuration of this station."
+msgstr ""
+
+#: init.lua
+msgid "This travelnet is lacking data and/or improperly configured."
+msgstr ""
+
+#: init.lua
+msgid "does not exist (anymore?) on this network."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "Initiating transfer to station '%s'."
+msgstr ""
+
+#: init.lua
+msgid "Could not find information about the station that is to be removed."
+msgstr ""
+
+#: init.lua
+msgid "Could not find the station that is to be removed."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "has been REMOVED from the network '%s'."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid ""
+"This %s has not been configured yet. Please set it up first to claim it. "
+"Afterwards you can remove it because you are then the owner."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "This %s belongs to %s. You can't remove it."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "Remove station"
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "You do not have enough room in your inventory."
+msgstr ""
+
+#: init.lua
+#, lua-format
+msgid "[Mod travelnet] Error: Savefile '%s' is damaged. Saved the backup as '%s'."
+msgstr ""
diff --git a/travelnet/locale/template.txt b/travelnet/locale/template.txt
deleted file mode 100644
index f247861..0000000
--- a/travelnet/locale/template.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-# Template
-
-### config.lua ###
-
-### init.lua ###
-
-allows to attach travelnet boxes to travelnets of other players =
-allows to dig travelnet boxes which belog to nets of other players =
-
-[Mod travelnet] Error: Savefile '%s' could not be written. =
-[Mod travelnet] Error: Savefile '%s' not found. =
-
-Back =
-Exit =
-
-Travelnet-box (unconfigured) =
-
-Configure this travelnet station =
-Name of this station =
-How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"... =
-Assign to Network: =
-You can have more than one network. If unsure, use \"%s\" =
-Owned by: =
-Unless you know what you are doing, leave this empty. =
-Help =
-Save =
-Remove station =
-You do not have enough room in your inventory. =
-Update failed! Resetting this box on the travelnet. =
-Station '%s' =
-has been reattached to the network '%s'. =
-Locked travelnet. Type /help for help: =
-Punch box to update target list. =
-Travelnet-Box =
-Name of this station: =
-Assigned to Network: =
-Click on target to travel there: =
-G =
-This station is already the first one on the list. =
-This station is already the last one on the list. =
-Position in list: =
-move up =
-move down =
-on travelnet '%s' =
-owned by %s =
-ready for usage. Right-click to travel, punch to update. =
-at %s m =
-Error =
-Please provide a name for this station. =
-Please provide the name of the network this station ought to be connected to. =
-There is no player with interact privilege named '%s'. Aborting. =
-You do not have the travelnet_attach priv which is required to attach your box to the network of someone else. Aborting. =
-A station named '%s' already exists on this network. Please choose a diffrent name! =
-Network '%s' =
-already contains the maximum number (=%s) of allowed stations per network. Please choose a diffrent/new network name. =
-has been added to the network '%s' =
-, which now consists of %s station(s). =
-Station: =
-Network: =
-No help available yet. =
-Please click on the target you want to travel to. =
-There is something wrong with the configuration of this station. =
-This travelnet is lacking data and/or improperly configured. =
-does not exist (anymore?) on this network. =
-Initiating transfer to station '%s'. =
-Could not find information about the station that is to be removed. =
-Could not find the station that is to be removed. =
-has been REMOVED from the network '%s'. =
-This %s has not been configured yet. Please set it up first to claim it. Afterwards you can remove it because you are then the owner. =
-This %s belongs to %s. You can't remove it. =
-
-
-### travelnet.lua ###
-Not enough vertical space to place the travelnet box! =
-
-
-### elevator.lua ###
-Congratulations! This is your first elevator. You can build an elevator network by placing further elevators somewhere above or below this one. Just make sure that the x and z coordinate are the same. =
-This elevator will automaticly connect to the other elevators you have placed at diffrent heights. Just enter a station name and click on \"store\" to set it up. Or just punch it to set the height as station name. =
-Your nearest elevator network is located =
-m behind this elevator and =
-m in front of this elevator and =
-m to the left =
-m to the right =
-, located at x =
-This elevator here will start a new shaft/network. =
-This is your first elevator. It differs from travelnet networks by only allowing movement in vertical direction (up or down). All further elevators which you will place at the same x,z coordinates at differnt heights will be able to connect to this elevator. =
-Elevator =
-Elevator (unconfigured) =
-
-
-### doors.lua ###
-elevator door (open) =
-elevator door (closed) =
diff --git a/travelnet/mod.conf b/travelnet/mod.conf
new file mode 100644
index 0000000..49fcb68
--- /dev/null
+++ b/travelnet/mod.conf
@@ -0,0 +1 @@
+name = travelnet
diff --git a/travelnet/sounds/travelnet_bell.ogg b/travelnet/sounds/travelnet_bell.ogg
new file mode 100644
index 0000000..994f649
--- /dev/null
+++ b/travelnet/sounds/travelnet_bell.ogg
Binary files differ
diff --git a/travelnet/sounds/travelnet_travel.ogg b/travelnet/sounds/travelnet_travel.ogg
new file mode 100644
index 0000000..b39be8f
--- /dev/null
+++ b/travelnet/sounds/travelnet_travel.ogg
Binary files differ
diff --git a/travelnet/travelnet.lua b/travelnet/travelnet.lua
index 56cbf35..9fba7fe 100644
--- a/travelnet/travelnet.lua
+++ b/travelnet/travelnet.lua
@@ -74,7 +74,9 @@ minetest.register_node("travelnet:travelnet", {
on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above;
- if( minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" ) then
+ local def = minetest.registered_nodes[
+ minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name]
+ if not def or not def.buildable_to then
minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!'))
return;