aboutsummaryrefslogtreecommitdiff
path: root/advtrains/signals.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-06-10 17:30:50 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-06-10 17:30:50 +0200
commit38d10acca24e5a34671a1a71f12923002d06253d (patch)
treea72aa02902af4dd37bbfa753bdb1ef651e72be88 /advtrains/signals.lua
parent3e29cba6af2e19909b6d143cecaec877aaf3a7bd (diff)
parent8d8e8c1553bc631b8f357005b506bc651de9a138 (diff)
downloadadvtrains-38d10acca24e5a34671a1a71f12923002d06253d.tar.gz
advtrains-38d10acca24e5a34671a1a71f12923002d06253d.tar.bz2
advtrains-38d10acca24e5a34671a1a71f12923002d06253d.zip
Merge branch 'master' of https://github.com/orwell96/advtrains
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,