aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/routesetting.lua4
-rw-r--r--advtrains_interlocking/signal_api.lua14
-rwxr-xr-xadvtrains_interlocking/tcb_ts_ui.lua1
3 files changed, 9 insertions, 10 deletions
diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua
index f2a00cd..5d7357d 100644
--- a/advtrains_interlocking/routesetting.lua
+++ b/advtrains_interlocking/routesetting.lua
@@ -83,7 +83,7 @@ function ilrs.set_route(signal, route, try)
end_pkey = advtrains.encode_pos(c_rseg.next.p)
if c_ts.rs_cache[start_pkey] and c_ts.rs_cache[start_pkey][end_pkey] then
for lp,lst in pairs(c_ts.rs_cache[start_pkey][end_pkey]) do
- atdebug("Add lock from RSCache:",lp,"->",lst)
+ --atdebug("Add lock from RSCache:",lp,"->",lst)
c_locks[lp] = lst
end
elseif not try then
@@ -92,7 +92,7 @@ function ilrs.set_route(signal, route, try)
end
-- add all from locks, these override the rscache
for lpts,lst in pairs(c_rseg.locks) do
- atdebug("Add lock from Routedef:",lpts,"->",lst,"overrides",c_locks[lpts] or "none")
+ --atdebug("Add lock from Routedef:",lpts,"->",lst,"overrides",c_locks[lpts] or "none")
c_locks[lpts] = lst
end
diff --git a/advtrains_interlocking/signal_api.lua b/advtrains_interlocking/signal_api.lua
index 8347b1c..a7ef724 100644
--- a/advtrains_interlocking/signal_api.lua
+++ b/advtrains_interlocking/signal_api.lua
@@ -179,7 +179,7 @@ function signal.set_aspect(pos, main_asp, rem_pos, skip_dst_notify)
-- if remote has changed, unregister from old remote
if old_remote and old_remote~=new_remote and signal.distant_refs[old_remote] then
- atdebug("unregister old remote: ",old_remote,"from",main_pts)
+ --atdebug("unregister old remote: ",old_remote,"from",main_pts)
signal.distant_refs[old_remote][main_pts] = nil
end
@@ -231,12 +231,12 @@ end
-- Notify distant signals of main_pts of a change in the aspect of this signal
--
function signal.notify_distants_of(main_pts, limit)
- atdebug("notify_distants_of",advtrains.decode_pos(main_pts),"limit",limit)
+ --atdebug("notify_distants_of",advtrains.decode_pos(main_pts),"limit",limit)
if limit <= 0 then
return
end
local dstrefs = signal.distant_refs[main_pts]
- atdebug("dstrefs",dstrefs,"")
+ --atdebug("dstrefs",dstrefs,"")
if dstrefs then
for dst,_ in pairs(dstrefs) do
-- ensure that the backref is still valid
@@ -336,7 +336,7 @@ function signal.get_aspect_info(pos)
ai = ai(pos, masp)
end
if type(ai)=="table" then
- atdebug(pos,"aspectinfo",ai)
+ --atdebug(pos,"aspectinfo",ai)
return ai
else
error("For node "..node.name..": ndef.advtrains.get_aspect_info must be function or table")
@@ -355,7 +355,7 @@ end
function signal.reapply_aspect(pts)
-- get aspt
local aspt = signal.aspects[pts]
- atdebug("reapply_aspect",advtrains.decode_pos(pts),"aspt",aspt)
+ --atdebug("reapply_aspect",advtrains.decode_pos(pts),"aspt",aspt)
local pos = advtrains.decode_pos(pts)
-- resolve mainaspect table by name
local masp, remote, node, ndef = signal.get_aspect_internal(pos, aspt)
@@ -368,7 +368,7 @@ function signal.reapply_aspect(pts)
end
signal.distant_refs[remote][pts] = true
local rem_aspt = signal.aspects[remote]
- atdebug("resolving remote",advtrains.decode_pos(remote),"aspt",rem_aspt)
+ --atdebug("resolving remote",advtrains.decode_pos(remote),"aspt",rem_aspt)
local rem_pos = advtrains.decode_pos(remote)
rem_masp, _, _, rem_ndef = signal.get_aspect_internal(rem_pos, rem_aspt)
if rem_masp then
@@ -378,7 +378,7 @@ function signal.reapply_aspect(pts)
end
end
-- call into ndef
- atdebug("applying to",pos,": main_asp",masp,"rem_masp",rem_masp,"rem_aspi",rem_aspi)
+ --atdebug("applying to",pos,": main_asp",masp,"rem_masp",rem_masp,"rem_aspi",rem_aspi)
if ndef.advtrains and ndef.advtrains.apply_aspect then
ndef.advtrains.apply_aspect(pos, node, masp, rem_masp, rem_aspi)
end
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua
index 2b93234..54ffe9b 100755
--- a/advtrains_interlocking/tcb_ts_ui.lua
+++ b/advtrains_interlocking/tcb_ts_ui.lua
@@ -218,7 +218,6 @@ end)
-- (this is useful for buffers as they serve both as TCB and as an always-halt signal)
function advtrains.interlocking.self_tcb_make_after_place_callback(fail_silently_on_noprivs, auto_create_self_signal)
return function(pos, player, itemstack, pointed_thing)
- atdebug("selftcb apn ",pos, player, itemstack, pointed_thing)
local pname = player:get_player_name()
if not minetest.check_player_privs(pname, "interlocking") then
if not fail_silently_on_noprivs then