aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/database.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-22 17:47:43 +0100
committerorwell96 <orwell@bleipb.de>2019-01-22 17:47:43 +0100
commit0617a6a1bd936f3553d027e248b5bb10f0d6d65f (patch)
tree6cd48f7afd3d1442d7be9e0aac1487cc23fb6a2b /advtrains_interlocking/database.lua
parent6c18d5b89a8a043047fc5e722c1fdcb4a7eaebd7 (diff)
downloadadvtrains-0617a6a1bd936f3553d027e248b5bb10f0d6d65f.tar.gz
advtrains-0617a6a1bd936f3553d027e248b5bb10f0d6d65f.tar.bz2
advtrains-0617a6a1bd936f3553d027e248b5bb10f0d6d65f.zip
Fix may_modify_section on newly created sections
Diffstat (limited to 'advtrains_interlocking/database.lua')
-rw-r--r--advtrains_interlocking/database.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua
index af20bea..4aaa4c4 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -447,7 +447,7 @@ end
-- - merging and dissolving sections
-- As of now the action will be denied if a route is set or if a train is in the section.
function ildb.may_modify_ts(ts)
- if ts.route or ts.route_post or #ts.trains>0 then
+ if ts.route or ts.route_post or (ts.trains and #ts.trains>0) then
return false
end
return true