aboutsummaryrefslogtreecommitdiff
path: root/advtrains/signals.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/signals.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/signals.lua')
-rw-r--r--advtrains/signals.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index b01314e..53145f5 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -41,7 +41,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
end
}},
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
advtrains.ndb.swap_node(pos, {name = "advtrains:retrosignal_"..f.as..rotation, param2 = node.param2}, true)
end
end,
@@ -84,7 +84,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
end,
},
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
advtrains.ndb.swap_node(pos, {name = "advtrains:signal_"..f.as..rotation, param2 = node.param2}, true)
end
end,
@@ -133,7 +133,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
end,
},
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
advtrains.ndb.swap_node(pos, {name = "advtrains:signal_wall_"..loc.."_"..f.as, param2 = node.param2}, true)
end
end,
@@ -179,7 +179,7 @@ minetest.register_node("advtrains:across_off", {
end,
},
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
advtrains.ndb.swap_node(pos, {name = "advtrains:across_on", param2 = node.param2}, true)
end
end,
@@ -220,7 +220,7 @@ minetest.register_node("advtrains:across_on", {
end,
},
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
advtrains.ndb.swap_node(pos, {name = "advtrains:across_off", param2 = node.param2}, true)
end
end,