aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/signal_api.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-10-17 17:37:03 +0200
committerorwell96 <orwell@bleipb.de>2018-10-17 17:37:03 +0200
commite04d84cb4c137d006587f932b149007bdbe6823a (patch)
tree7cb8953e87c823c9bfc967c58ddb3bba735d4ba5 /advtrains_interlocking/signal_api.lua
parent85d752df6b33e190be71cddeb7839fc482be1bda (diff)
downloadadvtrains-e04d84cb4c137d006587f932b149007bdbe6823a.tar.gz
advtrains-e04d84cb4c137d006587f932b149007bdbe6823a.tar.bz2
advtrains-e04d84cb4c137d006587f932b149007bdbe6823a.zip
Actually allow what manual promises (setting IP on non-assigned signals)
Diffstat (limited to 'advtrains_interlocking/signal_api.lua')
-rw-r--r--advtrains_interlocking/signal_api.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/advtrains_interlocking/signal_api.lua b/advtrains_interlocking/signal_api.lua
index 3a042c0..3bc2705 100644
--- a/advtrains_interlocking/signal_api.lua
+++ b/advtrains_interlocking/signal_api.lua
@@ -230,6 +230,9 @@ local players_assign_ip = {}
-- shows small info form for signal IP state/assignment
-- only_notset: show only if it is not set yet (used by signal tcb assignment)
function advtrains.interlocking.show_ip_form(pos, pname, only_notset)
+ if not minetest.check_player_privs(pname, "interlocking") then
+ return
+ end
local form = "size[7,5]label[0.5,0.5;Signal at "..minetest.pos_to_string(pos).."]"
local pts, connid = advtrains.interlocking.db.get_ip_by_signalpos(pos)
if pts then