aboutsummaryrefslogtreecommitdiff
path: root/advtrains/tracks.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-03-14 20:57:07 +0100
committerorwell96 <orwell@bleipb.de>2018-03-14 20:57:07 +0100
commit8b576357ef1d2346e9af112e115ac92a5f4d222d (patch)
treedca625bf3b98205202b2127b618bd884ca1f2ae8 /advtrains/tracks.lua
parent481f6218a8b377a0826b7e080046b5a890702e12 (diff)
downloadadvtrains-8b576357ef1d2346e9af112e115ac92a5f4d222d.tar.gz
advtrains-8b576357ef1d2346e9af112e115ac92a5f4d222d.tar.bz2
advtrains-8b576357ef1d2346e9af112e115ac92a5f4d222d.zip
Rework the privilege system completely
See privilege_guide.txt for information
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