diff options
author | orwell96 <orwell@bleipb.de> | 2018-10-17 17:37:03 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-10-17 17:37:03 +0200 |
commit | e04d84cb4c137d006587f932b149007bdbe6823a (patch) | |
tree | 7cb8953e87c823c9bfc967c58ddb3bba735d4ba5 | |
parent | 85d752df6b33e190be71cddeb7839fc482be1bda (diff) | |
download | advtrains-e04d84cb4c137d006587f932b149007bdbe6823a.tar.gz advtrains-e04d84cb4c137d006587f932b149007bdbe6823a.tar.bz2 advtrains-e04d84cb4c137d006587f932b149007bdbe6823a.zip |
Actually allow what manual promises (setting IP on non-assigned signals)
-rw-r--r-- | advtrains/signals.lua | 6 | ||||
-rw-r--r-- | advtrains_interlocking/route_prog.lua | 2 | ||||
-rw-r--r-- | advtrains_interlocking/signal_api.lua | 3 | ||||
-rw-r--r-- | assets/interlocking.html.LyXconv/interlocking.html | 2 | ||||
-rw-r--r-- | assets/interlocking.lyx | 2 | ||||
-rw-r--r-- | assets/interlocking.lyx~ | 4 |
6 files changed, 14 insertions, 5 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua index 669e825..135fae9 100644 --- a/advtrains/signals.lua +++ b/advtrains/signals.lua @@ -69,6 +69,8 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", local sigd = advtrains.interlocking and advtrains.interlocking.db.get_sigd_for_signal(pos) if sigd then advtrains.interlocking.show_signalling_form(sigd, pname) + elseif advtrains.interlocking and player:get_player_control().aux1 then + advtrains.interlocking.show_ip_form(pos, pname) elseif 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 @@ -124,6 +126,8 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", local sigd = advtrains.interlocking and advtrains.interlocking.db.get_sigd_for_signal(pos) if sigd then advtrains.interlocking.show_signalling_form(sigd, pname) + elseif advtrains.interlocking and player:get_player_control().aux1 then + advtrains.interlocking.show_ip_form(pos, pname) elseif advtrains.check_turnout_signal_protection(pos, player:get_player_name()) then advtrains.setstate(pos, f.als, node) end @@ -190,6 +194,8 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", local sigd = advtrains.interlocking and advtrains.interlocking.db.get_sigd_for_signal(pos) if sigd then advtrains.interlocking.show_signalling_form(sigd, pname) + elseif advtrains.interlocking and player:get_player_control().aux1 then + advtrains.interlocking.show_ip_form(pos, pname) elseif advtrains.check_turnout_signal_protection(pos, player:get_player_name()) then advtrains.setstate(pos, f.als, node) end diff --git a/advtrains_interlocking/route_prog.lua b/advtrains_interlocking/route_prog.lua index 2ec9375..70eceb8 100644 --- a/advtrains_interlocking/route_prog.lua +++ b/advtrains_interlocking/route_prog.lua @@ -239,7 +239,7 @@ end local function do_advance_route(pname, rp, sigd, tsname) table.insert(rp.route, {next = sigd, locks = rp.tmp_lcks}) rp.tmp_lcks = {} - chat(pname, "Added track section '"..tsname.."' to the route (revert with /at_rp_back)") + chat(pname, "Added track section '"..tsname.."' to the route.") end local function finishrpform(pname) 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 diff --git a/assets/interlocking.html.LyXconv/interlocking.html b/assets/interlocking.html.LyXconv/interlocking.html index e1e531d..f215fa1 100644 --- a/assets/interlocking.html.LyXconv/interlocking.html +++ b/assets/interlocking.html.LyXconv/interlocking.html @@ -320,7 +320,7 @@ should the driver (if even there is one) fail to recognize the instructions. behave as follows: <ul class="itemize1"> <li class="itemize">Static signals and all red-green light signals from core advtrains that are not assigned to a TCB can be configured by - holding the “Sneak” key and then right-clicking the signal + holding the “Use” key and then right-clicking the signal </li> <li class="itemize">All signals that are assigned to a TCB can be configured by first right-clicking them, then selecting “Influence Point” in the signalling formspec.</li></ul> diff --git a/assets/interlocking.lyx b/assets/interlocking.lyx index c5efca5..75b2ba0 100644 --- a/assets/interlocking.lyx +++ b/assets/interlocking.lyx @@ -692,7 +692,7 @@ Static signals and all red-green light signals from core advtrains that \begin_inset Quotes eld \end_inset -Sneak +Use \begin_inset Quotes erd \end_inset diff --git a/assets/interlocking.lyx~ b/assets/interlocking.lyx~ index 2f3e83a..c5efca5 100644 --- a/assets/interlocking.lyx~ +++ b/assets/interlocking.lyx~ @@ -615,8 +615,8 @@ Interlocking patterns \end_layout \begin_layout Standard -This section shows some examples on how you should set up track sections - on certain track configurations. +This section is supposed to show some examples on how you should set up + track sections on certain track configurations. \end_layout \begin_layout Section |