Skip to content

Commit

Permalink
send player back if a travelnet station no longer exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Sokomine committed Aug 30, 2016
1 parent a317132 commit 121f8f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions init.lua
Expand Up @@ -22,6 +22,8 @@
Please configure this mod in config.lua
Changelog:
30.08.16 - If the station the traveller just travelled to no longer exists, the player is sent back to the
station where he/she came from.
30.08.16 - Attaching a travelnet box to a non-existant network of another player is possible (requested by OldCoder).
Still requires the travelnet_attach-priv.
05.10.14 - Added an optional abm so that the travelnet network can heal itshelf in case of loss of the savefile.
Expand Down Expand Up @@ -563,6 +565,8 @@ travelnet.on_receive_fields = function(pos, formname, fields, player)
station_network = station_network }};
travelnet.remove_box( target_pos, nil, oldmetadata, 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_yaw ) then
Expand Down

1 comment on commit 121f8f6

@HybridDog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sokomine Man kann verhindern, dass der Spieler dorthin teleportiert wird, wenn sich node2 in einem nicht geladenen mapblock befindet, indem man mithilfe von vmanip den block lädt: https://github.com/HybridDog/mesecons-pack/blob/hversion/mesecons_mvps/init.lua#L56

Please sign in to comment.