aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-01-12 14:40:24 +0100
committerorwell96 <orwell@bleipb.de>2021-01-12 14:40:24 +0100
commit6202c1cb009d24342a8f59a5500178c41d746489 (patch)
tree3a99933476f1b1c5807a13065c2990e666fdde49
parent0ba5874b4f5f1a7565df8bfd20c91c309647429a (diff)
downloadadvtrains-release-2.2.0.tar.gz
advtrains-release-2.2.0.tar.bz2
advtrains-release-2.2.0.zip
Fix removing stale TCB nodesrelease-2.2.0
-rw-r--r--advtrains_interlocking/database.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua
index e2c9edc..82c7e25 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -431,7 +431,9 @@ end
function ildb.remove_tcb(pos)
local pts = advtrains.roundfloorpts(pos)
- if not track_circuit_breaks[pts] then return end
+ if not track_circuit_breaks[pts] then
+ return true --FIX: not an error, because tcb is already removed
+ end
for connid=1,2 do
if not ildb.remove_from_interlocking({p=pos, s=connid}) then
return false