aboutsummaryrefslogtreecommitdiff
path: root/advtrains/tracks.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/tracks.lua')
-rw-r--r--advtrains/tracks.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua
index 4b2b17c..f31fef6 100644
--- a/advtrains/tracks.lua
+++ b/advtrains/tracks.lua
@@ -269,6 +269,7 @@ function advtrains.register_tracks(tracktype, def, preset)
groups = {
attached_node=1,
+ advtrains_track=1,
["advtrains_track_"..tracktype]=1,
save_in_at_nodedb=1,
dig_immediate=2,
@@ -309,7 +310,7 @@ function advtrains.register_tracks(tracktype, def, preset)
end
end
ndef.on_rightclick = function(pos, node, player)
- if minetest.check_player_privs(player:get_player_name(), {train_operator=true}) then
+ if advtrains.check_turnout_signal_protection(pos, player:get_player_name()) then
switchfunc(pos, node)
advtrains.log("Switch", player:get_player_name(), pos)
end