poikilos
6 years ago
committed by
Jacob Gustafson
5 changed files with 2378 additions and 677 deletions
@ -0,0 +1,399 @@ |
|||||
|
diff --git a/elevator.lua b/elevator.lua
|
||||
|
index a428845..b4f7a22 100644
|
||||
|
--- a/elevator.lua
|
||||
|
+++ b/elevator.lua
|
||||
|
@@ -20,8 +20,8 @@ travelnet.show_nearest_elevator = function( pos, owner_name, param2 )
|
||||
|
if( travelnet.targets[ owner_name ][ network_name ] |
||||
|
-- does the network have any members at all? |
||||
|
and next( travelnet.targets[ owner_name ][ network_name ], nil )) then |
||||
|
- minetest.chat_send_player( owner_name, S("This elevator will automaticly connect to the "..
|
||||
|
- "other elevators you have placed at diffrent heights. Just enter a station name "..
|
||||
|
+ minetest.chat_send_player( owner_name, S("This elevator will automatically connect to the "..
|
||||
|
+ "other elevators you have placed at different 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.")); |
||||
|
return; |
||||
|
@@ -106,11 +106,11 @@ minetest.register_node("travelnet:elevator", {
|
||||
|
fixed = { |
||||
|
|
||||
|
{ 0.48, -0.5,-0.5, 0.5, 0.5, 0.5}, |
||||
|
- {-0.5 , -0.5, 0.48, 0.48, 0.5, 0.5},
|
||||
|
+ {-0.5 , -0.5, 0.48, 0.48, 0.5, 0.5},
|
||||
|
{-0.5, -0.5,-0.5 ,-0.48, 0.5, 0.5}, |
||||
|
|
||||
|
--groundplate to stand on |
||||
|
- { -0.5,-0.5,-0.5,0.5,-0.48, 0.5},
|
||||
|
+ { -0.5,-0.5,-0.5,0.5,-0.48, 0.5},
|
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
@@ -128,7 +128,7 @@ minetest.register_node("travelnet:elevator", {
|
||||
|
meta:set_string("station_network",""); |
||||
|
meta:set_string("owner", placer:get_player_name() ); |
||||
|
-- request initial data |
||||
|
- meta:set_string("formspec",
|
||||
|
+ meta:set_string("formspec",
|
||||
|
"size[12,10]".. |
||||
|
"field[0.3,5.6;6,0.7;station_name;"..S("Name of this station:")..";]".. |
||||
|
-- "field[0.3,6.6;6,0.7;station_network;Assign to Network:;]".. |
||||
|
@@ -140,7 +140,7 @@ minetest.register_node("travelnet:elevator", {
|
||||
|
minetest.add_node(p, {name="travelnet:elevator_top", paramtype2="facedir", param2=p2}) |
||||
|
travelnet.show_nearest_elevator( pos, placer:get_player_name(), p2 ); |
||||
|
end, |
||||
|
-
|
||||
|
+
|
||||
|
on_receive_fields = travelnet.on_receive_fields, |
||||
|
on_punch = function(pos, node, puncher) |
||||
|
travelnet.update_formspec(pos, puncher:get_player_name()) |
||||
|
@@ -164,7 +164,7 @@ minetest.register_node("travelnet:elevator", {
|
||||
|
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 ~= 'travelnet:elevator_top') then |
||||
|
- minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!'))
|
||||
|
+ minetest.chat_send_player( placer:get_player_name(), S('There is not enough vertical space to place the travelnet box!'))
|
||||
|
return; |
||||
|
end |
||||
|
return minetest.item_place(itemstack, placer, pointed_thing); |
||||
|
diff --git a/init.lua b/init.lua
|
||||
|
index 46279bd..523333d 100644
|
||||
|
--- a/init.lua
|
||||
|
+++ b/init.lua
|
||||
|
@@ -64,7 +64,7 @@
|
||||
|
- removed nodes that are not intended for manual use from creative inventory |
||||
|
- improved naming of station levels for the elevator |
||||
|
21.06.13 - elevator stations are sorted by height instead of date of creation as is the case with travelnet boxes |
||||
|
- - elevator stations are named automaticly
|
||||
|
+ - elevator stations are named automatically
|
||||
|
20.06.13 - doors can be opened and closed from inside the travelnet box/elevator |
||||
|
- the elevator can only move vertically; the network name is defined by its x and z coordinate |
||||
|
13.06.13 - bugfix |
||||
|
@@ -78,7 +78,7 @@
|
||||
|
- beam effect is disabled by default |
||||
|
20.03.13 - added inventory image provided by VanessaE |
||||
|
- fixed bug that made it impossible to remove stations from the net |
||||
|
- - if the station a player beamed to no longer exists, the station will be removed automaticly
|
||||
|
+ - if the station a player beamed to no longer exists, the station will be removed automatically
|
||||
|
- with the travelnet_attach priv, you can now attach your box to the nets of other players |
||||
|
- in newer versions of Minetest, the players yaw is set so that he/she looks out of the receiving box |
||||
|
- target list is now centered if there are less than 9 targets |
||||
|
@@ -100,8 +100,8 @@ 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});
|
||||
|
+minetest.register_privilege("travelnet_attach", { description = S("allows attaching travelnet boxes to travelnets of other players"), give_to_singleplayer = false});
|
||||
|
+minetest.register_privilege("travelnet_remove", { description = S("allows breaking travelnet boxes which belong to networks of other players"), give_to_singleplayer = false});
|
||||
|
|
||||
|
-- read the configuration |
||||
|
dofile(travelnet.path.."/config.lua"); -- the normal, default travelnet |
||||
|
@@ -126,7 +126,7 @@ travelnet.restore_data = function()
|
||||
|
|
||||
|
local file = io.open( travelnet.mod_data_path, "r" ); |
||||
|
if( not file ) then |
||||
|
- print(S("[Mod travelnet] Error: Savefile '%s' not found.")
|
||||
|
+ print(S("[Mod travelnet] Error: Savefile '%s' was not found.")
|
||||
|
:format(travelnet.mod_data_path)); |
||||
|
return; |
||||
|
end |
||||
|
@@ -244,7 +244,7 @@ travelnet.reset_formspec = function( meta )
|
||||
|
"button_exit[8.0,0.0;2.2,0.7;station_dig;"..S("Remove station").."]".. |
||||
|
"field[0.3,1.2;9,0.9;station_name;"..S("Name of this station")..":;".. |
||||
|
minetest.formspec_escape(station_name or "").."]".. |
||||
|
- "label[0.3,1.5;"..S("How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"...").."]"..
|
||||
|
+ "label[0.3,1.5;"..S("Name of this location (Example: \"my first house\", \"mine\", \"shop\"):").."]"..
|
||||
|
|
||||
|
"field[0.3,2.8;9,0.9;station_network;"..S("Assign to Network:")..";".. |
||||
|
minetest.formspec_escape(station_network or "").."]".. |
||||
|
@@ -292,7 +292,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
|
||||
|
|
||||
|
|
||||
|
travelnet.reset_formspec( meta ); |
||||
|
- travelnet.show_message( pos, puncher_name, "Error", S("Update failed! Resetting this box on the travelnet."));
|
||||
|
+ travelnet.show_message( pos, puncher_name, "Error", S("Update failed! Resetting...."));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -490,7 +490,7 @@ travelnet.update_formspec = function( pos, puncher_name, fields )
|
||||
|
meta:set_string( "infotext", S("Station '%s'"):format(tostring( station_name )).." ".. |
||||
|
S("on travelnet '%s'"):format(tostring( station_network )).." ".. |
||||
|
S("(owned by %s)"):format(tostring( owner_name )).." ".. |
||||
|
- S("ready for usage. Right-click to travel, punch to update."));
|
||||
|
+ S("is ready. Right-click to travel, punch to update."));
|
||||
|
|
||||
|
-- show the player the updated formspec |
||||
|
travelnet.show_current_formspec( pos, meta, puncher_name ); |
||||
|
@@ -521,7 +521,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
|
||||
|
|
||||
|
if( network_name == "" or not( network_name )) then |
||||
|
travelnet.show_message( pos, player_name, S("Error"), |
||||
|
- S("Please provide the name of the network this station ought to be connected to."));
|
||||
|
+ S("Please provide a new or existing network to which this station should connect."));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -534,15 +534,15 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
|
||||
|
elseif( not( minetest.check_player_privs(player_name, {interact=true}))) then |
||||
|
|
||||
|
travelnet.show_message( pos, player_name, S("Error"), |
||||
|
- S("There is no player with interact privilege named '%s'. Aborting."):format(tostring( player_name )));
|
||||
|
+ S("Access has been denied. There is no player with interact privilege named '%s'."):format(tostring( player_name )));
|
||||
|
return; |
||||
|
|
||||
|
elseif( not( minetest.check_player_privs(player_name, {travelnet_attach=true})) |
||||
|
and not( travelnet.allow_attach( player_name, owner_name, network_name ))) then |
||||
|
|
||||
|
travelnet.show_message( pos, player_name, S("Error"), |
||||
|
- S("You do not have the travelnet_attach priv which is required to attach your box to "..
|
||||
|
- "the network of someone else. Aborting."));
|
||||
|
+ S("Access has been denied. You do not have the travelnet_attach priv which is required to attach your box to "..
|
||||
|
+ "the network of someone else."));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -562,7 +562,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
|
||||
|
|
||||
|
if( k == station_name ) then |
||||
|
travelnet.show_message( pos, player_name, S("Error"), |
||||
|
- S("A station named '%s' already exists on this network. Please choose a diffrent name!"):format(station_name));
|
||||
|
+ S("A station named '%s' already exists on this network. Please choose a different name!"):format(station_name));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -574,7 +574,7 @@ travelnet.add_target = function( station_name, network_name, pos, player_name, m
|
||||
|
travelnet.show_message( pos, player_name, S("Error"), |
||||
|
S("Network '%s',"):format(network_name).." ".. |
||||
|
S("already contains the maximum number (=%s) of allowed stations per network. ".. |
||||
|
- "Please choose a diffrent/new network name."):format(travelnet.MAX_STATIONS_PER_NETWORK));
|
||||
|
+ "Please choose a different/new network name."):format(travelnet.MAX_STATIONS_PER_NETWORK));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -752,7 +752,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
||||
|
end |
||||
|
|
||||
|
if( not( fields.target )) then |
||||
|
- minetest.chat_send_player(name, S("Please click on the target you want to travel to."));
|
||||
|
+ minetest.chat_send_player(name, S("Choose a destination."));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -912,7 +912,7 @@ travelnet.remove_box = function( pos, oldnode, oldmetadata, digger )
|
||||
|
|
||||
|
if( not( oldmetadata ) or oldmetadata=="nil" or not(oldmetadata.fields)) then |
||||
|
minetest.chat_send_player( digger:get_player_name(), S("Error")..": ".. |
||||
|
- S("Could not find information about the station that is to be removed."));
|
||||
|
+ S("Travelnet could not find information about the station that is to be removed."));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -928,7 +928,7 @@ travelnet.remove_box = function( pos, oldnode, oldmetadata, digger )
|
||||
|
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."));
|
||||
|
+ S("Travelnet could not find the station that is to be removed."));
|
||||
|
return; |
||||
|
end |
||||
|
|
||||
|
@@ -979,7 +979,7 @@ travelnet.can_dig_old = function( pos, player, description )
|
||||
|
end |
||||
|
|
||||
|
if( not( meta ) or not( owner) or owner=='') then |
||||
|
- minetest.chat_send_player(name, 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."):format(description));
|
||||
|
+ minetest.chat_send_player(name, S("This %s has not been configured yet. Please set it up first to claim it. You can only remove stations you own."):format(description));
|
||||
|
return false; |
||||
|
|
||||
|
elseif( owner ~= name ) then |
||||
|
@@ -1033,7 +1033,7 @@ if( travelnet.enable_elevator ) then
|
||||
|
dofile(travelnet.path.."/elevator.lua"); -- allows up/down transfers only |
||||
|
end |
||||
|
if( travelnet.enable_doors ) then |
||||
|
- dofile(travelnet.path.."/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 automatically when the travelnet or elevator is used
|
||||
|
end |
||||
|
|
||||
|
if( travelnet.enable_abm ) then |
||||
|
diff --git a/locale/template.pot b/locale/template.pot
|
||||
|
index 86e0e5c..f9052c9 100644
|
||||
|
--- a/locale/template.pot
|
||||
|
+++ b/locale/template.pot
|
||||
|
@@ -34,8 +34,8 @@ 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\" "
|
||||
|
+"This elevator will automatically connect to the other elevators you have "
|
||||
|
+"placed at different 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 "" |
||||
|
|
||||
|
@@ -96,15 +96,15 @@ msgid "Store"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: elevator.lua travelnet.lua |
||||
|
-msgid "Not enough vertical space to place the travelnet box!"
|
||||
|
+msgid "There is not enough vertical space to place the travelnet box!"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
-msgid "allows to attach travelnet boxes to travelnets of other players"
|
||||
|
+msgid "allows attaching travelnet boxes to travelnets of other players"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
-msgid "allows to dig travelnet boxes which belog to nets of other players"
|
||||
|
+msgid "allows breaking travelnet boxes which belong to networks of other players"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -114,7 +114,7 @@ msgstr ""
|
||||
|
|
||||
|
#: init.lua |
||||
|
#, lua-format |
||||
|
-msgid "[Mod travelnet] Error: Savefile '%s' not found."
|
||||
|
+msgid "[Mod travelnet] Error: Savefile '%s' was not found."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -139,8 +139,8 @@ msgstr ""
|
||||
|
|
||||
|
#: init.lua |
||||
|
msgid "" |
||||
|
-"How do you call this place here? Example: \"my first house\", \"mine\", "
|
||||
|
-"\"shop\"..."
|
||||
|
+"Name of this location (Example: \"my first house\", \"mine\", "
|
||||
|
+"\"shop\"):"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -169,7 +169,7 @@ msgid "Save"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
-msgid "Update failed! Resetting this box on the travelnet."
|
||||
|
+msgid "Update failed! Resetting...."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -237,7 +237,7 @@ msgid "(owned by %s)"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
-msgid "ready for usage. Right-click to travel, punch to update."
|
||||
|
+msgid "is ready. Right-click to travel, punch to update."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -255,25 +255,25 @@ msgstr ""
|
||||
|
|
||||
|
#: init.lua |
||||
|
msgid "" |
||||
|
-"Please provide the name of the network this station ought to be connected to."
|
||||
|
+"Please provide a new or existing network to which this station should connect."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
#, lua-format |
||||
|
-msgid "There is no player with interact privilege named '%s'. Aborting."
|
||||
|
+msgid "Access has been denied. There is no player with interact privilege named '%s'."
|
||||
|
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."
|
||||
|
+"Access has been denied. You do not have the travelnet_attach priv which is required to attach your "
|
||||
|
+"box to the network of someone else."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
#, lua-format |
||||
|
msgid "" |
||||
|
"A station named '%s' already exists on this network. Please choose a " |
||||
|
-"diffrent name!"
|
||||
|
+"different name!"
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -285,7 +285,7 @@ msgstr ""
|
||||
|
#, lua-format |
||||
|
msgid "" |
||||
|
"already contains the maximum number (=%s) of allowed stations per network. " |
||||
|
-"Please choose a diffrent/new network name."
|
||||
|
+"Please choose a different/new network name."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -311,7 +311,7 @@ msgid "No help available yet."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
-msgid "Please click on the target you want to travel to."
|
||||
|
+msgid "Choose a destination."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -332,11 +332,11 @@ msgid "Initiating transfer to station '%s'."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
-msgid "Could not find information about the station that is to be removed."
|
||||
|
+msgid "Travelnet 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."
|
||||
|
+msgid "Travelnet could not find the station that is to be removed."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
@@ -348,7 +348,7 @@ msgstr ""
|
||||
|
#, 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."
|
||||
|
+"You can only remove stations you own."
|
||||
|
msgstr "" |
||||
|
|
||||
|
#: init.lua |
||||
|
diff --git a/travelnet.lua b/travelnet.lua
|
||||
|
index 9fba7fe..4319d3e 100644
|
||||
|
--- a/travelnet.lua
|
||||
|
+++ b/travelnet.lua
|
||||
|
@@ -25,13 +25,13 @@ minetest.register_node("travelnet:travelnet", {
|
||||
|
fixed = { |
||||
|
|
||||
|
{ 0.45, -0.5,-0.5, 0.5, 1.45, 0.5}, |
||||
|
- {-0.5 , -0.5, 0.45, 0.45, 1.45, 0.5},
|
||||
|
+ {-0.5 , -0.5, 0.45, 0.45, 1.45, 0.5},
|
||||
|
{-0.5, -0.5,-0.5 ,-0.45, 1.45, 0.5}, |
||||
|
|
||||
|
--groundplate to stand on |
||||
|
- { -0.5,-0.5,-0.5,0.5,-0.45, 0.5},
|
||||
|
+ { -0.5,-0.5,-0.5,0.5,-0.45, 0.5},
|
||||
|
--roof |
||||
|
- { -0.5, 1.45,-0.5,0.5, 1.5, 0.5},
|
||||
|
+ { -0.5, 1.45,-0.5,0.5, 1.5, 0.5},
|
||||
|
|
||||
|
-- control panel |
||||
|
-- { -0.2, 0.6, 0.3, 0.2, 1.1, 0.5}, |
||||
|
@@ -52,7 +52,7 @@ minetest.register_node("travelnet:travelnet", {
|
||||
|
travelnet.reset_formspec( meta ); |
||||
|
meta:set_string("owner", placer:get_player_name() ); |
||||
|
end, |
||||
|
-
|
||||
|
+
|
||||
|
on_receive_fields = travelnet.on_receive_fields, |
||||
|
on_punch = function(pos, node, puncher) |
||||
|
travelnet.update_formspec(pos, puncher:get_player_name(), nil) |
||||
|
@@ -78,7 +78,7 @@ minetest.register_node("travelnet:travelnet", {
|
||||
|
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!'))
|
||||
|
+ minetest.chat_send_player( placer:get_player_name(), S('There is not enough vertical space to place the travelnet box!'))
|
||||
|
return; |
||||
|
end |
||||
|
return minetest.item_place(itemstack, placer, pointed_thing); |
@ -1,677 +0,0 @@ |
|||||
diff -r -u travelnet/config.lua /home/owner/git/travelnet/config.lua
|
|
||||
--- travelnet/config.lua 2019-06-21 08:40:37.406186997 -0400
|
|
||||
+++ /home/owner/git/travelnet/config.lua 2019-06-21 07:12:16.474634770 -0400
|
|
||||
@@ -1,22 +1,26 @@
|
|
||||
|
|
||||
-travelnet.MAX_STATIONS_PER_NETWORK = 24;
|
|
||||
+-- maximum travelnet stations per network
|
|
||||
+travelnet.MAX_STATIONS_PER_NETWORK = tonumber(minetest.settings:get("travelnet.MAX_STATIONS_PER_NETWORK")) or 24;
|
|
||||
|
|
||||
-- set this to true if you want a simulated beam effect |
|
||||
-travelnet.travelnet_effect_enabled = false;
|
|
||||
+travelnet.enable_travelnet_effect = minetest.settings:get_bool("travelnet.enable_travelnet_effect") or false;
|
|
||||
+
|
|
||||
-- set this to true if you want a sound to be played when the travelnet is used |
|
||||
-travelnet.travelnet_sound_enabled = false;
|
|
||||
+travelnet.enable_travelnet_sound = minetest.settings:get_bool("travelnet.enable_travelnet_sound") or true;
|
|
||||
|
|
||||
-- if you set this to false, travelnets cannot be created |
|
||||
-- (this may be useful if you want nothing but the elevators on your server) |
|
||||
-travelnet.travelnet_enabled = true;
|
|
||||
--- if you set travelnet.elevator_enabled to false, you will not be able to
|
|
||||
+travelnet.enable_travelnet = minetest.settings:get_bool("travelnet.enable_travelnet") or true;
|
|
||||
+
|
|
||||
+-- if you set travelnet.enable_elevator to false, you will not be able to
|
|
||||
-- craft, place or use elevators |
|
||||
-travelnet.elevator_enabled = true;
|
|
||||
+travelnet.enable_elevator = minetest.settings:get_bool("travelnet.enable_elevator") or true;
|
|
||||
+
|
|
||||
-- if you set this to false, doors will be disabled |
|
||||
-travelnet.doors_enabled = true;
|
|
||||
+travelnet.enable_doors = minetest.settings:get_bool("travelnet.enable_doors") or true;
|
|
||||
|
|
||||
-- starts an abm which re-adds travelnet stations to networks in case the savefile got lost |
|
||||
-travelnet.abm_enabled = false;
|
|
||||
+travelnet.enable_abm = minetest.settings:get_bool("travelnet.enable_abm") or false;
|
|
||||
|
|
||||
-- change these if you want other receipes for travelnet or elevator |
|
||||
travelnet.travelnet_recipe = { |
|
||||
@@ -90,7 +94,7 @@
|
|
||||
-- if you want to allow *everybody* to attach stations to all nets, let the |
|
||||
-- function always return true; |
|
||||
-- if the function returns false, players with the travelnet_attach priv |
|
||||
--- can still add stations to that network
|
|
||||
+-- can still add stations to that network
|
|
||||
|
|
||||
travelnet.allow_attach = function( player_name, owner_name, network_name ) |
|
||||
return false; |
|
||||
@@ -120,4 +124,3 @@
|
|
||||
return true; |
|
||||
end |
|
||||
|
|
||||
-travelnet.travelnet_sound_enabled = true
|
|
||||
diff -r -u travelnet/elevator.lua /home/owner/git/travelnet/elevator.lua
|
|
||||
--- travelnet/elevator.lua 2019-06-21 08:40:37.406186997 -0400
|
|
||||
+++ /home/owner/git/travelnet/elevator.lua 2019-06-21 08:04:04.738329200 -0400
|
|
||||
@@ -20,8 +20,8 @@
|
|
||||
if( travelnet.targets[ owner_name ][ network_name ] |
|
||||
-- does the network have any members at all? |
|
||||
and next( travelnet.targets[ owner_name ][ network_name ], nil )) then |
|
||||
- minetest.chat_send_player( owner_name, S("This elevator will automaticly connect to the "..
|
|
||||
- "other elevators you have placed at diffrent heights. Just enter a station name "..
|
|
||||
+ minetest.chat_send_player( owner_name, S("This elevator will automatically connect to the "..
|
|
||||
+ "other elevators you have placed at different 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.")); |
|
||||
return; |
|
||||
@@ -106,11 +106,11 @@
|
|
||||
fixed = { |
|
||||
|
|
||||
{ 0.48, -0.5,-0.5, 0.5, 0.5, 0.5}, |
|
||||
- {-0.5 , -0.5, 0.48, 0.48, 0.5, 0.5},
|
|
||||
+ {-0.5 , -0.5, 0.48, 0.48, 0.5, 0.5},
|
|
||||
{-0.5, -0.5,-0.5 ,-0.48, 0.5, 0.5}, |
|
||||
|
|
||||
--groundplate to stand on |
|
||||
- { -0.5,-0.5,-0.5,0.5,-0.48, 0.5},
|
|
||||
+ { -0.5,-0.5,-0.5,0.5,-0.48, 0.5},
|
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
@@ -128,7 +128,7 @@
|
|
||||
meta:set_string("station_network",""); |
|
||||
meta:set_string("owner", placer:get_player_name() ); |
|
||||
-- request initial data |
|
||||
- meta:set_string("formspec",
|
|
||||
+ meta:set_string("formspec",
|
|
||||
"size[12,10]".. |
|
||||
"field[0.3,5.6;6,0.7;station_name;"..S("Name of this station:")..";]".. |
|
||||
-- "field[0.3,6.6;6,0.7;station_network;Assign to Network:;]".. |
|
||||
@@ -140,7 +140,7 @@
|
|
||||
minetest.add_node(p, {name="travelnet:elevator_top", paramtype2="facedir", param2=p2}) |
|
||||
travelnet.show_nearest_elevator( pos, placer:get_player_name(), p2 ); |
|
||||
end, |
|
||||
-
|
|
||||
+
|
|
||||
on_receive_fields = travelnet.on_receive_fields, |
|
||||
on_punch = function(pos, node, puncher) |
|
||||
travelnet.update_formspec(pos, puncher:get_player_name()) |
|
||||
@@ -164,7 +164,7 @@
|
|
||||
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 ~= 'travelnet:elevator_top') then |
|
||||
- minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!'))
|
|
||||
+ minetest.chat_send_player( placer:get_player_name(), S('There is not enough vertical space to place the travelnet box!'))
|
|
||||
return; |
|
||||
end |
|
||||
return minetest.item_place(itemstack, placer, pointed_thing); |
|
||||
Only in travelnet: etc |
|
||||
Only in /home/owner/git/travelnet/.git: COMMIT_EDITMSG |
|
||||
diff -r -u travelnet/.git/config /home/owner/git/travelnet/.git/config
|
|
||||
--- travelnet/.git/config 2019-06-21 08:40:37.399520197 -0400
|
|
||||
+++ /home/owner/git/travelnet/.git/config 2019-06-21 08:04:58.639452355 -0400
|
|
||||
@@ -4,8 +4,17 @@
|
|
||||
bare = false |
|
||||
logallrefupdates = true |
|
||||
[remote "origin"] |
|
||||
- url = https://github.com/Sokomine/travelnet.git
|
|
||||
+ url = https://github.com/poikilos/travelnet.git
|
|
||||
fetch = +refs/heads/*:refs/remotes/origin/* |
|
||||
[branch "master"] |
|
||||
remote = origin |
|
||||
merge = refs/heads/master |
|
||||
+[branch "use-mt4-playermodel-origin"]
|
|
||||
+ remote = origin
|
|
||||
+ merge = refs/heads/use-mt4-playermodel-origin
|
|
||||
+[branch "english-corrections-vs-9795b8d"]
|
|
||||
+ remote = origin
|
|
||||
+ merge = refs/heads/english-corrections-vs-9795b8d
|
|
||||
+[branch "texture-improvements"]
|
|
||||
+ remote = origin
|
|
||||
+ merge = refs/heads/texture-improvements
|
|
||||
Only in /home/owner/git/travelnet/.git: FETCH_HEAD |
|
||||
Only in /home/owner/git/travelnet/.git: GIT_COLA_MSG |
|
||||
Binary files travelnet/.git/index and /home/owner/git/travelnet/.git/index differ |
|
||||
diff -r -u travelnet/.git/logs/HEAD /home/owner/git/travelnet/.git/logs/HEAD
|
|
||||
--- travelnet/.git/logs/HEAD 2019-06-21 08:40:37.399520197 -0400
|
|
||||
+++ /home/owner/git/travelnet/.git/logs/HEAD 2019-06-21 08:36:05.044072793 -0400
|
|
||||
@@ -1 +1,17 @@
|
|
||||
-0000000000000000000000000000000000000000 9f2bbc617ec5b9569eccad3f49d701a9bd204456 poikilos <7557867+poikilos@users.noreply.github.com> 1561120837 -0400 clone: from https://github.com/Sokomine/travelnet.git
|
|
||||
+0000000000000000000000000000000000000000 9795b8d9b012403af757289ac34f2d9393cdc6e7 poikilos <7557867+poikilos@users.noreply.github.com> 1561115536 -0400 clone: from https://github.com/poikilos/travelnet.git
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 9795b8d9b012403af757289ac34f2d9393cdc6e7 poikilos <7557867+poikilos@users.noreply.github.com> 1561115544 -0400 checkout: moving from master to use-mt4-playermodel-origin
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 313a425aa8c6962be3aa080a63751341636a2a7f poikilos <7557867+poikilos@users.noreply.github.com> 1561115828 -0400 commit: Use MT 4 player model y offset--works in 5 too
|
|
||||
+313a425aa8c6962be3aa080a63751341636a2a7f 9795b8d9b012403af757289ac34f2d9393cdc6e7 poikilos <7557867+poikilos@users.noreply.github.com> 1561117319 -0400 checkout: moving from use-mt4-playermodel-origin to english-corrections-vs-9795b8d
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 85fcf6e0045f4d73ba97d2ef3ca4b6ecef443b2e poikilos <7557867+poikilos@users.noreply.github.com> 1561118216 -0400 commit: Correct English spelling and grammar.
|
|
||||
+85fcf6e0045f4d73ba97d2ef3ca4b6ecef443b2e 9795b8d9b012403af757289ac34f2d9393cdc6e7 poikilos <7557867+poikilos@users.noreply.github.com> 1561118636 -0400 checkout: moving from english-corrections-vs-9795b8d to master
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 ac7d10e76fe09a26c4da68105ac09c3034d318ad poikilos <7557867+poikilos@users.noreply.github.com> 1561118644 -0400 pull: Fast-forward
|
|
||||
+ac7d10e76fe09a26c4da68105ac09c3034d318ad ac7d10e76fe09a26c4da68105ac09c3034d318ad poikilos <7557867+poikilos@users.noreply.github.com> 1561118698 -0400 checkout: moving from master to texture-improvements
|
|
||||
+ac7d10e76fe09a26c4da68105ac09c3034d318ad 5ce38fc4844df047ad27c6f6db5ee3a14672f643 poikilos <7557867+poikilos@users.noreply.github.com> 1561119975 -0400 commit: improve textures and mv etc src
|
|
||||
+5ce38fc4844df047ad27c6f6db5ee3a14672f643 ac7d10e76fe09a26c4da68105ac09c3034d318ad poikilos <7557867+poikilos@users.noreply.github.com> 1561120118 -0400 checkout: moving from texture-improvements to master
|
|
||||
+ac7d10e76fe09a26c4da68105ac09c3034d318ad 38af7ed9c5c2ca32ee54b84cf9a8d69805688dec poikilos <7557867+poikilos@users.noreply.github.com> 1561120123 -0400 pull: Fast-forward
|
|
||||
+38af7ed9c5c2ca32ee54b84cf9a8d69805688dec 5ce38fc4844df047ad27c6f6db5ee3a14672f643 poikilos <7557867+poikilos@users.noreply.github.com> 1561120369 -0400 checkout: moving from master to texture-improvements
|
|
||||
+5ce38fc4844df047ad27c6f6db5ee3a14672f643 38af7ed9c5c2ca32ee54b84cf9a8d69805688dec poikilos <7557867+poikilos@users.noreply.github.com> 1561120378 -0400 checkout: moving from texture-improvements to master
|
|
||||
+38af7ed9c5c2ca32ee54b84cf9a8d69805688dec 5ce38fc4844df047ad27c6f6db5ee3a14672f643 poikilos <7557867+poikilos@users.noreply.github.com> 1561120391 -0400 checkout: moving from master to texture-improvements
|
|
||||
+5ce38fc4844df047ad27c6f6db5ee3a14672f643 9c20e76c26856520d4acdc29b7c11b488ccbb93b poikilos <7557867+poikilos@users.noreply.github.com> 1561120423 -0400 commit: add missing author info for improved textures
|
|
||||
+9c20e76c26856520d4acdc29b7c11b488ccbb93b 38af7ed9c5c2ca32ee54b84cf9a8d69805688dec poikilos <7557867+poikilos@users.noreply.github.com> 1561120560 -0400 checkout: moving from texture-improvements to master
|
|
||||
+38af7ed9c5c2ca32ee54b84cf9a8d69805688dec 542fbf1e1f6de988257372f76d03195a7f381474 poikilos <7557867+poikilos@users.noreply.github.com> 1561120565 -0400 pull: Fast-forward
|
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/heads: english-corrections-vs-9795b8d |
|
||||
diff -r -u travelnet/.git/logs/refs/heads/master /home/owner/git/travelnet/.git/logs/refs/heads/master
|
|
||||
--- travelnet/.git/logs/refs/heads/master 2019-06-21 08:40:37.399520197 -0400
|
|
||||
+++ /home/owner/git/travelnet/.git/logs/refs/heads/master 2019-06-21 08:36:05.044072793 -0400
|
|
||||
@@ -1 +1,4 @@
|
|
||||
-0000000000000000000000000000000000000000 9f2bbc617ec5b9569eccad3f49d701a9bd204456 poikilos <7557867+poikilos@users.noreply.github.com> 1561120837 -0400 clone: from https://github.com/Sokomine/travelnet.git
|
|
||||
+0000000000000000000000000000000000000000 9795b8d9b012403af757289ac34f2d9393cdc6e7 poikilos <7557867+poikilos@users.noreply.github.com> 1561115536 -0400 clone: from https://github.com/poikilos/travelnet.git
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 ac7d10e76fe09a26c4da68105ac09c3034d318ad poikilos <7557867+poikilos@users.noreply.github.com> 1561118644 -0400 pull: Fast-forward
|
|
||||
+ac7d10e76fe09a26c4da68105ac09c3034d318ad 38af7ed9c5c2ca32ee54b84cf9a8d69805688dec poikilos <7557867+poikilos@users.noreply.github.com> 1561120123 -0400 pull: Fast-forward
|
|
||||
+38af7ed9c5c2ca32ee54b84cf9a8d69805688dec 542fbf1e1f6de988257372f76d03195a7f381474 poikilos <7557867+poikilos@users.noreply.github.com> 1561120565 -0400 pull: Fast-forward
|
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/heads: texture-improvements |
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/heads: use-mt4-playermodel-origin |
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/remotes/origin: english-corrections-vs-9795b8d |
|
||||
diff -r -u travelnet/.git/logs/refs/remotes/origin/HEAD /home/owner/git/travelnet/.git/logs/refs/remotes/origin/HEAD
|
|
||||
--- travelnet/.git/logs/refs/remotes/origin/HEAD 2019-06-21 08:40:37.399520197 -0400
|
|
||||
+++ /home/owner/git/travelnet/.git/logs/refs/remotes/origin/HEAD 2019-06-21 07:12:16.467968119 -0400
|
|
||||
@@ -1 +1 @@
|
|
||||
-0000000000000000000000000000000000000000 9f2bbc617ec5b9569eccad3f49d701a9bd204456 poikilos <7557867+poikilos@users.noreply.github.com> 1561120837 -0400 clone: from https://github.com/Sokomine/travelnet.git
|
|
||||
+0000000000000000000000000000000000000000 9795b8d9b012403af757289ac34f2d9393cdc6e7 poikilos <7557867+poikilos@users.noreply.github.com> 1561115536 -0400 clone: from https://github.com/poikilos/travelnet.git
|
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/remotes/origin: master |
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/remotes/origin: texture-improvements |
|
||||
Only in /home/owner/git/travelnet/.git/logs/refs/remotes/origin: use-mt4-playermodel-origin |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 08 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 09 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 17 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 2a |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 31 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 38 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 3e |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 41 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 52 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 54 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 5c |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 5f |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 75 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 77 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 85 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 91 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 97 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 9a |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 9b |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 9c |
|
||||
Only in /home/owner/git/travelnet/.git/objects: 9d |
|
||||
Only in /home/owner/git/travelnet/.git/objects: a9 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: aa |
|
||||
Only in /home/owner/git/travelnet/.git/objects: ac |
|
||||
Only in /home/owner/git/travelnet/.git/objects: b5 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: c4 |
|
||||
Only in /home/owner/git/travelnet/.git/objects: ce |
|
||||
Only in /home/owner/git/travelnet/.git/objects: f9 |
|
||||
Only in travelnet/.git/objects/pack: pack-87f23a5f28fe44900f8493f0852f43f2302bbb57.idx |
|
||||
Only in travelnet/.git/objects/pack: pack-87f23a5f28fe44900f8493f0852f43f2302bbb57.pack |
|
||||
Only in /home/owner/git/travelnet/.git/objects/pack: pack-b2d3ee0ec36e71d0adf2c940853e3b117b4dee71.idx |
|
||||
Only in /home/owner/git/travelnet/.git/objects/pack: pack-b2d3ee0ec36e71d0adf2c940853e3b117b4dee71.pack |
|
||||
Only in /home/owner/git/travelnet/.git: ORIG_HEAD |
|
||||
diff -r -u travelnet/.git/packed-refs /home/owner/git/travelnet/.git/packed-refs
|
|
||||
--- travelnet/.git/packed-refs 2019-06-21 08:40:37.399520197 -0400
|
|
||||
+++ /home/owner/git/travelnet/.git/packed-refs 2019-06-21 07:12:16.464634793 -0400
|
|
||||
@@ -1,4 +1,7 @@
|
|
||||
# pack-refs with: peeled fully-peeled sorted |
|
||||
-9f2bbc617ec5b9569eccad3f49d701a9bd204456 refs/remotes/origin/master
|
|
||||
+906d0bf836dafe5400ced7d1a6716b84b422a479 refs/remotes/origin/english-corrections
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 refs/remotes/origin/master
|
|
||||
+aae31665f3158dce5188e4ebcba8f37e2be2758e refs/remotes/origin/use-minetest-conf
|
|
||||
+9795b8d9b012403af757289ac34f2d9393cdc6e7 refs/remotes/origin/use-mt4-playermodel-origin
|
|
||||
4331483c72e3ce567f7a076ed9da3cb830f2dbfe refs/tags/2.3 |
|
||||
cc1e2eade3e43449e8df56128cf42c1dec19fdcb refs/tags/2.3.1 |
|
||||
Only in /home/owner/git/travelnet/.git/refs/heads: english-corrections-vs-9795b8d |
|
||||
diff -r -u travelnet/.git/refs/heads/master /home/owner/git/travelnet/.git/refs/heads/master
|
|
||||
--- travelnet/.git/refs/heads/master 2019-06-21 08:40:37.399520197 -0400
|
|
||||
+++ /home/owner/git/travelnet/.git/refs/heads/master 2019-06-21 08:36:05.044072793 -0400
|
|
||||
@@ -1 +1 @@
|
|
||||
-9f2bbc617ec5b9569eccad3f49d701a9bd204456
|
|
||||
+542fbf1e1f6de988257372f76d03195a7f381474
|
|
||||
Only in /home/owner/git/travelnet/.git/refs/heads: texture-improvements |
|
||||
Only in /home/owner/git/travelnet/.git/refs/heads: use-mt4-playermodel-origin |
|
||||
Only in /home/owner/git/travelnet/.git/refs/remotes/origin: english-corrections-vs-9795b8d |
|
||||
Only in /home/owner/git/travelnet/.git/refs/remotes/origin: master |
|
||||
Only in /home/owner/git/travelnet/.git/refs/remotes/origin: texture-improvements |
|
||||
Only in /home/owner/git/travelnet/.git/refs/remotes/origin: use-mt4-playermodel-origin |
|
||||
diff -r -u travelnet/init.lua /home/owner/git/travelnet/init.lua
|
|
||||
--- travelnet/init.lua 2019-06-21 08:40:37.406186997 -0400
|
|
||||
+++ /home/owner/git/travelnet/init.lua 2019-06-21 08:04:04.741662602 -0400
|
|
||||
@@ -64,7 +64,7 @@
|
|
||||
- removed nodes that are not intended for manual use from creative inventory |
|
||||
- improved naming of station levels for the elevator |
|
||||
21.06.13 - elevator stations are sorted by height instead of date of creation as is the case with travelnet boxes |
|
||||
- - elevator stations are named automaticly
|
|
||||
+ - elevator stations are named automatically
|
|
||||
20.06.13 - doors can be opened and closed from inside the travelnet box/elevator |
|
||||
- the elevator can only move vertically; the network name is defined by its x and z coordinate |
|
||||
13.06.13 - bugfix |
|
||||
@@ -78,7 +78,7 @@
|
|
||||
- beam effect is disabled by default |
|
||||
20.03.13 - added inventory image provided by VanessaE |
|
||||
- fixed bug that made it impossible to remove stations from the net |
|
||||
- - if the station a player beamed to no longer exists, the station will be removed automaticly
|
|
||||
+ - if the station a player beamed to no longer exists, the station will be removed automatically
|
|
||||
- with the travelnet_attach priv, you can now attach your box to the nets of other players |
|
||||
- in newer versions of Minetest, the players yaw is set so that he/she looks out of the receiving box |
|
||||
- target list is now centered if there are less than 9 targets |
|
||||
@@ -100,8 +100,8 @@
|
|
||||
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});
|
|
||||
+minetest.register_privilege("travelnet_attach", { description = S("allows attaching travelnet boxes to travelnets of other players"), give_to_singleplayer = false});
|
|
||||
+minetest.register_privilege("travelnet_remove", { description = S("allows breaking travelnet boxes which belong to networks of other players"), give_to_singleplayer = false});
|
|
||||
|
|
||||
-- read the configuration |
|
||||
dofile(travelnet.path.."/config.lua"); -- the normal, default travelnet |
|
||||
@@ -123,10 +123,10 @@
|
|
||||
|
|
||||
|
|
||||
travelnet.restore_data = function() |
|
||||
-
|
|
||||
+
|
|
||||
local file = io.open( travelnet.mod_data_path, "r" ); |
|
||||
if( not file ) then |
|
||||
- print(S("[Mod travelnet] Error: Savefile '%s' not found.")
|
|
||||
+ print(S("[Mod travelnet] Error: Savefile '%s' was not found.")
|
|
||||
:format(travelnet.mod_data_path)); |
|
||||
return; |
|
||||
end |
|
||||
@@ -244,7 +244,7 @@
|
|
||||
"button_exit[8.0,0.0;2.2,0.7;station_dig;"..S("Remove station").."]".. |
|
||||
"field[0.3,1.2;9,0.9;station_name;"..S("Name of this station")..":;".. |
|
||||
minetest.formspec_escape(station_name or "").."]".. |
|
||||
- "label[0.3,1.5;"..S("How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"...").."]"..
|
|
||||
+ "label[0.3,1.5;"..S("Name of this location (Example: \"my first house\", \"mine\", \"shop\"):").."]"..
|
|
||||
|
|
||||
"field[0.3,2.8;9,0.9;station_network;"..S("Assign to Network:")..";".. |
|
||||
minetest.formspec_escape(station_network or "").."]".. |
|
||||
@@ -292,7 +292,7 @@
|
|
||||
|
|
||||
|
|
||||
travelnet.reset_formspec( meta ); |
|
||||
- travelnet.show_message( pos, puncher_name, "Error", S("Update failed! Resetting this box on the travelnet."));
|
|
||||
+ travelnet.show_message( pos, puncher_name, "Error", S("Update failed! Resetting...."));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -490,7 +490,7 @@
|
|
||||
meta:set_string( "infotext", S("Station '%s'"):format(tostring( station_name )).." ".. |
|
||||
S("on travelnet '%s'"):format(tostring( station_network )).." ".. |
|
||||
S("(owned by %s)"):format(tostring( owner_name )).." ".. |
|
||||
- S("ready for usage. Right-click to travel, punch to update."));
|
|
||||
+ S("is ready. Right-click to travel, punch to update."));
|
|
||||
|
|
||||
-- show the player the updated formspec |
|
||||
travelnet.show_current_formspec( pos, meta, puncher_name ); |
|
||||
@@ -521,7 +521,7 @@
|
|
||||
|
|
||||
if( network_name == "" or not( network_name )) then |
|
||||
travelnet.show_message( pos, player_name, S("Error"), |
|
||||
- S("Please provide the name of the network this station ought to be connected to."));
|
|
||||
+ S("Please provide a new or existing network to which this station should connect."));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -534,15 +534,15 @@
|
|
||||
elseif( not( minetest.check_player_privs(player_name, {interact=true}))) then |
|
||||
|
|
||||
travelnet.show_message( pos, player_name, S("Error"), |
|
||||
- S("There is no player with interact privilege named '%s'. Aborting."):format(tostring( player_name )));
|
|
||||
+ S("Access has been denied. There is no player with interact privilege named '%s'."):format(tostring( player_name )));
|
|
||||
return; |
|
||||
|
|
||||
elseif( not( minetest.check_player_privs(player_name, {travelnet_attach=true})) |
|
||||
and not( travelnet.allow_attach( player_name, owner_name, network_name ))) then |
|
||||
|
|
||||
travelnet.show_message( pos, player_name, S("Error"), |
|
||||
- S("You do not have the travelnet_attach priv which is required to attach your box to "..
|
|
||||
- "the network of someone else. Aborting."));
|
|
||||
+ S("Access has been denied. You do not have the travelnet_attach priv which is required to attach your box to "..
|
|
||||
+ "the network of someone else."));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -562,7 +562,7 @@
|
|
||||
|
|
||||
if( k == station_name ) then |
|
||||
travelnet.show_message( pos, player_name, S("Error"), |
|
||||
- S("A station named '%s' already exists on this network. Please choose a diffrent name!"):format(station_name));
|
|
||||
+ S("A station named '%s' already exists on this network. Please choose a different name!"):format(station_name));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -574,7 +574,7 @@
|
|
||||
travelnet.show_message( pos, player_name, S("Error"), |
|
||||
S("Network '%s',"):format(network_name).." ".. |
|
||||
S("already contains the maximum number (=%s) of allowed stations per network. ".. |
|
||||
- "Please choose a diffrent/new network name."):format(travelnet.MAX_STATIONS_PER_NETWORK));
|
|
||||
+ "Please choose a different/new network name."):format(travelnet.MAX_STATIONS_PER_NETWORK));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -752,7 +752,7 @@
|
|
||||
end |
|
||||
|
|
||||
if( not( fields.target )) then |
|
||||
- minetest.chat_send_player(name, S("Please click on the target you want to travel to."));
|
|
||||
+ minetest.chat_send_player(name, S("Choose a destination."));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -825,14 +825,14 @@
|
|
||||
|
|
||||
|
|
||||
|
|
||||
- if( travelnet.travelnet_sound_enabled ) then
|
|
||||
+ if( travelnet.enable_travelnet_sound ) then
|
|
||||
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.enable_travelnet_effect ) then
|
|
||||
minetest.add_entity( {x=pos.x,y=pos.y+0.5,z=pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns |
|
||||
end |
|
||||
|
|
||||
@@ -840,10 +840,12 @@
|
|
||||
travelnet.open_close_door( pos, player, 1 ); |
|
||||
|
|
||||
-- transport the player to the target location |
|
||||
+ local player_model_bottom = tonumber(minetest.settings:get("player_model_bottom")) or -.5; -- may be 0.0 for some versions of MT 5 player model
|
|
||||
+ local player_model_vec = vector.new(0, player_model_bottom, 0);
|
|
||||
local target_pos = travelnet.targets[ owner_name ][ station_network ][ fields.target ].pos; |
|
||||
- player:move_to( target_pos, false);
|
|
||||
+ player:move_to( vector.add(target_pos, player_model_vec), false);
|
|
||||
|
|
||||
- if( travelnet.travelnet_effect_enabled ) then
|
|
||||
+ if( travelnet.enable_travelnet_effect ) 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 |
|
||||
|
|
||||
@@ -859,7 +861,7 @@
|
|
||||
|
|
||||
travelnet.remove_box( target_pos, nil, oldmetadata, player ); |
|
||||
-- send the player back as there's no receiving travelnet |
|
||||
- player:move_to( pos, false );
|
|
||||
+ player:move_to( vector.add(pos, player_model_vec), false );
|
|
||||
|
|
||||
else |
|
||||
travelnet.rotate_player( target_pos, player, 0 ) |
|
||||
@@ -877,7 +879,7 @@
|
|
||||
end |
|
||||
|
|
||||
-- play sound at the target position as well |
|
||||
- if( travelnet.travelnet_sound_enabled ) then
|
|
||||
+ if( travelnet.enable_travelnet_sound ) then
|
|
||||
if ( node2.name == 'travelnet:elevator' ) then |
|
||||
minetest.sound_play("travelnet_bell", {pos = target_pos, gain = 0.75, max_hear_distance = 10,}); |
|
||||
else |
|
||||
@@ -912,7 +914,7 @@
|
|
||||
|
|
||||
if( not( oldmetadata ) or oldmetadata=="nil" or not(oldmetadata.fields)) then |
|
||||
minetest.chat_send_player( digger:get_player_name(), S("Error")..": ".. |
|
||||
- S("Could not find information about the station that is to be removed."));
|
|
||||
+ S("Travelnet could not find information about the station that is to be removed."));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -928,7 +930,7 @@
|
|
||||
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."));
|
|
||||
+ S("Travelnet could not find the station that is to be removed."));
|
|
||||
return; |
|
||||
end |
|
||||
|
|
||||
@@ -979,7 +981,7 @@
|
|
||||
end |
|
||||
|
|
||||
if( not( meta ) or not( owner) or owner=='') then |
|
||||
- minetest.chat_send_player(name, 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."):format(description));
|
|
||||
+ minetest.chat_send_player(name, S("This %s has not been configured yet. Please set it up first to claim it. You can only remove stations you own."):format(description));
|
|
||||
return false; |
|
||||
|
|
||||
elseif( owner ~= name ) then |
|
||||
@@ -993,7 +995,7 @@
|
|
||||
|
|
||||
|
|
||||
|
|
||||
-if( travelnet.travelnet_effect_enabled ) then
|
|
||||
+if( travelnet.enable_travelnet_effect ) then
|
|
||||
minetest.register_entity( 'travelnet:effect', { |
|
||||
|
|
||||
hp_max = 1, |
|
||||
@@ -1026,17 +1028,17 @@
|
|
||||
end |
|
||||
|
|
||||
|
|
||||
-if( travelnet.travelnet_enabled ) then
|
|
||||
+if( travelnet.enable_travelnet ) then
|
|
||||
dofile(travelnet.path.."/travelnet.lua"); -- the travelnet node definition |
|
||||
end |
|
||||
-if( travelnet.elevator_enabled ) then
|
|
||||
+if( travelnet.enable_elevator ) then
|
|
||||
dofile(travelnet.path.."/elevator.lua"); -- allows up/down transfers only |
|
||||
end |
|
||||
-if( travelnet.doors_enabled ) then
|
|
||||
- dofile(travelnet.path.."/doors.lua"); -- doors that open and close automaticly when the travelnet or elevator is used
|
|
||||
+if( travelnet.enable_doors ) then
|
|
||||
+ dofile(travelnet.path.."/doors.lua"); -- doors that open and close automatically when the travelnet or elevator is used
|
|
||||
end |
|
||||
|
|
||||
-if( travelnet.abm_enabled ) then
|
|
||||
+if( travelnet.enable_abm ) then
|
|
||||
dofile(travelnet.path.."/restore_network_via_abm.lua"); -- restore travelnet data when players pass by broken networks |
|
||||
end |
|
||||
|
|
||||
diff -r -u travelnet/locale/template.pot /home/owner/git/travelnet/locale/template.pot
|
|
||||
--- travelnet/locale/template.pot 2019-06-21 08:40:37.406186997 -0400
|
|
||||
+++ /home/owner/git/travelnet/locale/template.pot 2019-06-21 08:04:04.741662602 -0400
|
|
||||
@@ -34,8 +34,8 @@
|
|
||||
|
|
||||
#: 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\" "
|
|
||||
+"This elevator will automatically connect to the other elevators you have "
|
|
||||
+"placed at different 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 "" |
|
||||
|
|
||||
@@ -96,15 +96,15 @@
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: elevator.lua travelnet.lua |
|
||||
-msgid "Not enough vertical space to place the travelnet box!"
|
|
||||
+msgid "There is not enough vertical space to place the travelnet box!"
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
-msgid "allows to attach travelnet boxes to travelnets of other players"
|
|
||||
+msgid "allows attaching travelnet boxes to travelnets of other players"
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
-msgid "allows to dig travelnet boxes which belog to nets of other players"
|
|
||||
+msgid "allows breaking travelnet boxes which belong to networks of other players"
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -114,7 +114,7 @@
|
|
||||
|
|
||||
#: init.lua |
|
||||
#, lua-format |
|
||||
-msgid "[Mod travelnet] Error: Savefile '%s' not found."
|
|
||||
+msgid "[Mod travelnet] Error: Savefile '%s' was not found."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -139,8 +139,8 @@
|
|
||||
|
|
||||
#: init.lua |
|
||||
msgid "" |
|
||||
-"How do you call this place here? Example: \"my first house\", \"mine\", "
|
|
||||
-"\"shop\"..."
|
|
||||
+"Name of this location (Example: \"my first house\", \"mine\", "
|
|
||||
+"\"shop\"):"
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -169,7 +169,7 @@
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
-msgid "Update failed! Resetting this box on the travelnet."
|
|
||||
+msgid "Update failed! Resetting...."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -237,7 +237,7 @@
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
-msgid "ready for usage. Right-click to travel, punch to update."
|
|
||||
+msgid "is ready. Right-click to travel, punch to update."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -255,25 +255,25 @@
|
|
||||
|
|
||||
#: init.lua |
|
||||
msgid "" |
|
||||
-"Please provide the name of the network this station ought to be connected to."
|
|
||||
+"Please provide a new or existing network to which this station should connect."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
#, lua-format |
|
||||
-msgid "There is no player with interact privilege named '%s'. Aborting."
|
|
||||
+msgid "Access has been denied. There is no player with interact privilege named '%s'."
|
|
||||
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."
|
|
||||
+"Access has been denied. You do not have the travelnet_attach priv which is required to attach your "
|
|
||||
+"box to the network of someone else."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
#, lua-format |
|
||||
msgid "" |
|
||||
"A station named '%s' already exists on this network. Please choose a " |
|
||||
-"diffrent name!"
|
|
||||
+"different name!"
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -285,7 +285,7 @@
|
|
||||
#, lua-format |
|
||||
msgid "" |
|
||||
"already contains the maximum number (=%s) of allowed stations per network. " |
|
||||
-"Please choose a diffrent/new network name."
|
|
||||
+"Please choose a different/new network name."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -311,7 +311,7 @@
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
-msgid "Please click on the target you want to travel to."
|
|
||||
+msgid "Choose a destination."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -332,11 +332,11 @@
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
-msgid "Could not find information about the station that is to be removed."
|
|
||||
+msgid "Travelnet 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."
|
|
||||
+msgid "Travelnet could not find the station that is to be removed."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
@@ -348,7 +348,7 @@
|
|
||||
#, 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."
|
|
||||
+"You can only remove stations you own."
|
|
||||
msgstr "" |
|
||||
|
|
||||
#: init.lua |
|
||||
diff -r -u travelnet/README.md /home/owner/git/travelnet/README.md
|
|
||||
--- travelnet/README.md 2019-06-21 08:40:37.406186997 -0400
|
|
||||
+++ /home/owner/git/travelnet/README.md 2019-06-21 08:36:05.044072793 -0400
|
|
||||
@@ -1,6 +1,6 @@
|
|
||||
# TravelNet |
|
||||
|
|
||||
-How this works:
|
|
||||
+How this works:
|
|
||||
|
|
||||
- craft it by filling the right and left row with glass; place in the middle row (from top to bottom): steel, mese, steel |
|
||||
- place the travelnet box somewhere |
|
||||
@@ -16,5 +16,5 @@
|
|
||||
The mod was written by me, Sokomine, and includes small contributions from other contributors. |
|
||||
License: GPLv3 (see file LICENSE) |
|
||||
|
|
||||
-The models and textures as found in the textures/ and models/ folders where created by VanessaE
|
|
||||
+The models and textures as found in the textures/ and models/ folders where created by VanessaE, modified by Poikilos,
|
|
||||
and are provided under the CC0 license. |
|
||||
Only in /home/owner/git/travelnet: settingtypes.txt |
|
||||
Only in /home/owner/git/travelnet: src |
|
||||
Binary files travelnet/textures/travelnet_inv.png and /home/owner/git/travelnet/textures/travelnet_inv.png differ |
|
||||
Binary files travelnet/textures/travelnet_travelnet_back.png and /home/owner/git/travelnet/textures/travelnet_travelnet_back.png differ |
|
||||
Binary files travelnet/textures/travelnet_travelnet_front.png and /home/owner/git/travelnet/textures/travelnet_travelnet_front.png differ |
|
||||
Binary files travelnet/textures/travelnet_travelnet_side.png and /home/owner/git/travelnet/textures/travelnet_travelnet_side.png differ |
|
||||
diff -r -u travelnet/travelnet.lua /home/owner/git/travelnet/travelnet.lua
|
|
||||
--- travelnet/travelnet.lua 2019-06-21 08:40:37.409520396 -0400
|
|
||||
+++ /home/owner/git/travelnet/travelnet.lua 2019-06-21 08:04:04.741662602 -0400
|
|
||||
@@ -25,13 +25,13 @@
|
|
||||
fixed = { |
|
||||
|
|
||||
{ 0.45, -0.5,-0.5, 0.5, 1.45, 0.5}, |
|
||||
- {-0.5 , -0.5, 0.45, 0.45, 1.45, 0.5},
|
|
||||
+ {-0.5 , -0.5, 0.45, 0.45, 1.45, 0.5},
|
|
||||
{-0.5, -0.5,-0.5 ,-0.45, 1.45, 0.5}, |
|
||||
|
|
||||
--groundplate to stand on |
|
||||
- { -0.5,-0.5,-0.5,0.5,-0.45, 0.5},
|
|
||||
+ { -0.5,-0.5,-0.5,0.5,-0.45, 0.5},
|
|
||||
--roof |
|
||||
- { -0.5, 1.45,-0.5,0.5, 1.5, 0.5},
|
|
||||
+ { -0.5, 1.45,-0.5,0.5, 1.5, 0.5},
|
|
||||
|
|
||||
-- control panel |
|
||||
-- { -0.2, 0.6, 0.3, 0.2, 1.1, 0.5}, |
|
||||
@@ -52,7 +52,7 @@
|
|
||||
travelnet.reset_formspec( meta ); |
|
||||
meta:set_string("owner", placer:get_player_name() ); |
|
||||
end, |
|
||||
-
|
|
||||
+
|
|
||||
on_receive_fields = travelnet.on_receive_fields, |
|
||||
on_punch = function(pos, node, puncher) |
|
||||
travelnet.update_formspec(pos, puncher:get_player_name(), nil) |
|
||||
@@ -78,7 +78,7 @@
|
|
||||
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!'))
|
|
||||
+ minetest.chat_send_player( placer:get_player_name(), S('There is not enough vertical space to place the travelnet box!'))
|
|
||||
return; |
|
||||
end |
|
||||
return minetest.item_place(itemstack, placer, pointed_thing); |
|
@ -0,0 +1,143 @@ |
|||||
|
diff --git a/config.lua b/config.lua
|
||||
|
index 040dbe9..8df6227 100644
|
||||
|
--- a/config.lua
|
||||
|
+++ b/config.lua
|
||||
|
@@ -3,24 +3,24 @@
|
||||
|
travelnet.MAX_STATIONS_PER_NETWORK = tonumber(minetest.settings:get("travelnet.MAX_STATIONS_PER_NETWORK")) or 24; |
||||
|
|
||||
|
-- set this to true if you want a simulated beam effect |
||||
|
-travelnet.travelnet_effect_enabled = minetest.settings:get_bool("travelnet.travelnet_effect_enabled") or false;
|
||||
|
+travelnet.enable_travelnet_effect = minetest.settings:get_bool("travelnet.enable_travelnet_effect") or false;
|
||||
|
|
||||
|
-- set this to true if you want a sound to be played when the travelnet is used |
||||
|
-travelnet.travelnet_sound_enabled = minetest.settings:get_bool("travelnet.travelnet_sound_enabled") or true;
|
||||
|
+travelnet.enable_travelnet_sound = minetest.settings:get_bool("travelnet.enable_travelnet_sound") or true;
|
||||
|
|
||||
|
-- if you set this to false, travelnets cannot be created |
||||
|
-- (this may be useful if you want nothing but the elevators on your server) |
||||
|
-travelnet.travelnet_enabled = minetest.settings:get_bool("travelnet.travelnet_enabled") or true;
|
||||
|
+travelnet.enable_travelnet = minetest.settings:get_bool("travelnet.enable_travelnet") or true;
|
||||
|
|
||||
|
--- if you set travelnet.elevator_enabled to false, you will not be able to
|
||||
|
+-- if you set travelnet.enable_elevator to false, you will not be able to
|
||||
|
-- craft, place or use elevators |
||||
|
-travelnet.elevator_enabled = minetest.settings:get_bool("travelnet.elevator_enabled") or true;
|
||||
|
+travelnet.enable_elevator = minetest.settings:get_bool("travelnet.enable_elevator") or true;
|
||||
|
|
||||
|
-- if you set this to false, doors will be disabled |
||||
|
-travelnet.doors_enabled = minetest.settings:get_bool("travelnet.doors_enabled") or true;
|
||||
|
+travelnet.enable_doors = minetest.settings:get_bool("travelnet.enable_doors") or true;
|
||||
|
|
||||
|
-- starts an abm which re-adds travelnet stations to networks in case the savefile got lost |
||||
|
-travelnet.abm_enabled = minetest.settings:get_bool("travelnet.abm_enabled") or false;
|
||||
|
+travelnet.enable_abm = minetest.settings:get_bool("travelnet.enable_abm") or false;
|
||||
|
|
||||
|
-- change these if you want other receipes for travelnet or elevator |
||||
|
travelnet.travelnet_recipe = { |
||||
|
@@ -94,7 +94,7 @@ end
|
||||
|
-- if you want to allow *everybody* to attach stations to all nets, let the |
||||
|
-- function always return true; |
||||
|
-- if the function returns false, players with the travelnet_attach priv |
||||
|
--- can still add stations to that network
|
||||
|
+-- can still add stations to that network
|
||||
|
|
||||
|
travelnet.allow_attach = function( player_name, owner_name, network_name ) |
||||
|
return false; |
||||
|
diff --git a/init.lua b/init.lua
|
||||
|
index edc083e..46279bd 100644
|
||||
|
--- a/init.lua
|
||||
|
+++ b/init.lua
|
||||
|
@@ -123,7 +123,7 @@ end
|
||||
|
|
||||
|
|
||||
|
travelnet.restore_data = function() |
||||
|
-
|
||||
|
+
|
||||
|
local file = io.open( travelnet.mod_data_path, "r" ); |
||||
|
if( not file ) then |
||||
|
print(S("[Mod travelnet] Error: Savefile '%s' not found.") |
||||
|
@@ -825,14 +825,14 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
||||
|
|
||||
|
|
||||
|
|
||||
|
- if( travelnet.travelnet_sound_enabled ) then
|
||||
|
+ if( travelnet.enable_travelnet_sound ) then
|
||||
|
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.enable_travelnet_effect ) then
|
||||
|
minetest.add_entity( {x=pos.x,y=pos.y+0.5,z=pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns |
||||
|
end |
||||
|
|
||||
|
@@ -843,7 +843,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
||||
|
local target_pos = travelnet.targets[ owner_name ][ station_network ][ fields.target ].pos; |
||||
|
player:move_to( target_pos, false); |
||||
|
|
||||
|
- if( travelnet.travelnet_effect_enabled ) then
|
||||
|
+ if( travelnet.enable_travelnet_effect ) 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 |
||||
|
|
||||
|
@@ -877,7 +877,7 @@ travelnet.rotate_player = function( target_pos, player, tries )
|
||||
|
end |
||||
|
|
||||
|
-- play sound at the target position as well |
||||
|
- if( travelnet.travelnet_sound_enabled ) then
|
||||
|
+ if( travelnet.enable_travelnet_sound ) then
|
||||
|
if ( node2.name == 'travelnet:elevator' ) then |
||||
|
minetest.sound_play("travelnet_bell", {pos = target_pos, gain = 0.75, max_hear_distance = 10,}); |
||||
|
else |
||||
|
@@ -993,7 +993,7 @@ end
|
||||
|
|
||||
|
|
||||
|
|
||||
|
-if( travelnet.travelnet_effect_enabled ) then
|
||||
|
+if( travelnet.enable_travelnet_effect ) then
|
||||
|
minetest.register_entity( 'travelnet:effect', { |
||||
|
|
||||
|
hp_max = 1, |
||||
|
@@ -1026,17 +1026,17 @@ if( travelnet.travelnet_effect_enabled ) then
|
||||
|
end |
||||
|
|
||||
|
|
||||
|
-if( travelnet.travelnet_enabled ) then
|
||||
|
+if( travelnet.enable_travelnet ) then
|
||||
|
dofile(travelnet.path.."/travelnet.lua"); -- the travelnet node definition |
||||
|
end |
||||
|
-if( travelnet.elevator_enabled ) then
|
||||
|
+if( travelnet.enable_elevator ) then
|
||||
|
dofile(travelnet.path.."/elevator.lua"); -- allows up/down transfers only |
||||
|
end |
||||
|
-if( travelnet.doors_enabled ) then
|
||||
|
+if( travelnet.enable_doors ) then
|
||||
|
dofile(travelnet.path.."/doors.lua"); -- doors that open and close automaticly when the travelnet or elevator is used |
||||
|
end |
||||
|
|
||||
|
-if( travelnet.abm_enabled ) then
|
||||
|
+if( travelnet.enable_abm ) then
|
||||
|
dofile(travelnet.path.."/restore_network_via_abm.lua"); -- restore travelnet data when players pass by broken networks |
||||
|
end |
||||
|
|
||||
|
diff --git a/settingtypes.txt b/settingtypes.txt
|
||||
|
index 575390c..b6e4146 100644
|
||||
|
--- a/settingtypes.txt
|
||||
|
+++ b/settingtypes.txt
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
-travelnet.MAX_STATIONS_PER_NETWORK (Maximum travelnet stations per network) float 24
|
||||
|
-travelnet.travelnet_effect_enabled (Travelnet visual beam effect) bool false
|
||||
|
-travelnet.travelnet_sound_enabled (Travelnet sound effect) bool true
|
||||
|
-travelnet.travelnet_enabled (Allow travelnets) bool true
|
||||
|
-travelnet.elevator_enabled (Allow travelnet elevators) bool true
|
||||
|
-travelnet.doors_enabled (Travelnet elevator doors) bool true
|
||||
|
-travelnet.abm_enabled (Reconnect travelnets automatically via ABM) bool false
|
||||
|
+travelnet.MAX_STATIONS_PER_NETWORK (Maximum travelnet stations per network) int 24
|
||||
|
+travelnet.enable_travelnet_effect (Travelnet visual beam effect) bool false
|
||||
|
+travelnet.enable_travelnet_sound (Travelnet sound effect) bool true
|
||||
|
+travelnet.enable_travelnet (Allow travelnets) bool true
|
||||
|
+travelnet.enable_elevator (Allow travelnet elevators) bool true
|
||||
|
+travelnet.enable_doors (Travelnet elevator doors) bool true
|
||||
|
+travelnet.enable_abm (Reconnect travelnets automatically via ABM) bool false
|
File diff suppressed because it is too large
@ -0,0 +1,25 @@ |
|||||
|
diff --git a/init.lua b/init.lua
|
||||
|
index 46279bd..c401f4a 100644
|
||||
|
--- a/init.lua
|
||||
|
+++ b/init.lua
|
||||
|
@@ -840,8 +840,10 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
||||
|
travelnet.open_close_door( pos, player, 1 ); |
||||
|
|
||||
|
-- transport the player to the target location |
||||
|
+ local player_model_bottom = tonumber(minetest.settings:get("player_model_bottom")) or -.5; -- may be 0.0 for some versions of MT 5 player model
|
||||
|
+ local player_model_vec = vector.new(0, player_model_bottom, 0);
|
||||
|
local target_pos = travelnet.targets[ owner_name ][ station_network ][ fields.target ].pos; |
||||
|
- player:move_to( target_pos, false);
|
||||
|
+ player:move_to( vector.add(target_pos, player_model_vec), false);
|
||||
|
|
||||
|
if( travelnet.enable_travelnet_effect ) 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 |
||||
|
@@ -859,7 +861,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
|
||||
|
|
||||
|
travelnet.remove_box( target_pos, nil, oldmetadata, player ); |
||||
|
-- send the player back as there's no receiving travelnet |
||||
|
- player:move_to( pos, false );
|
||||
|
+ player:move_to( vector.add(pos, player_model_vec), false );
|
||||
|
|
||||
|
else |
||||
|
travelnet.rotate_player( target_pos, player, 0 ) |
Loading…
Reference in new issue