aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/init.lua2
-rw-r--r--advtrains_interlocking/lzb.lua2
-rw-r--r--advtrains_interlocking/train_sections.lua2
3 files changed, 5 insertions, 1 deletions
diff --git a/advtrains_interlocking/init.lua b/advtrains_interlocking/init.lua
index 7239674..f46ed65 100644
--- a/advtrains_interlocking/init.lua
+++ b/advtrains_interlocking/init.lua
@@ -3,6 +3,8 @@
advtrains.interlocking = {}
+advtrains.SHUNT_SPEED_MAX = 6
+
function advtrains.interlocking.sigd_equal(sigd, cmp)
return vector.equals(sigd.p, cmp.p) and sigd.s==cmp.s
end
diff --git a/advtrains_interlocking/lzb.lua b/advtrains_interlocking/lzb.lua
index 14c1741..11871f1 100644
--- a/advtrains_interlocking/lzb.lua
+++ b/advtrains_interlocking/lzb.lua
@@ -51,7 +51,7 @@ local ZONE_ROLL = 2
local ZONE_HOLD = 5 -- added on top of ZONE_ROLL
local ZONE_VSLOW = 3 -- When speed is <2, still allow accelerating
-local SHUNT_SPEED_MAX = 4
+local SHUNT_SPEED_MAX = advtrains.SHUNT_SPEED_MAX
local function look_ahead(id, train)
diff --git a/advtrains_interlocking/train_sections.lua b/advtrains_interlocking/train_sections.lua
index c0a911e..762fd5d 100644
--- a/advtrains_interlocking/train_sections.lua
+++ b/advtrains_interlocking/train_sections.lua
@@ -174,6 +174,8 @@ advtrains.te_register_on_create(function(id, train)
else
atwarn("ILDB corruption: TCB",origin," has invalid TS reference")
end
+ -- Make train a shunt move
+ train.is_shunt = true
elseif ts_id==nil then
atwarn("Train",id,": Unable to determine whether to block a track section!")
else