Actually allow what manual promises (setting IP on non-assigned signals)
This commit is contained in:
parent
85d752df6b
commit
e04d84cb4c
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user