From 119a09b784ad3f3c6bfd327f32164cb099f47f10 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 30 Jan 2020 08:45:16 +0100 Subject: Simplify Signal Aspect Table (H#132) [breaks compatibility with signal API] --- advtrains_interlocking/approach.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'advtrains_interlocking/approach.lua') diff --git a/advtrains_interlocking/approach.lua b/advtrains_interlocking/approach.lua index 0894043..151f15a 100644 --- a/advtrains_interlocking/approach.lua +++ b/advtrains_interlocking/approach.lua @@ -73,17 +73,17 @@ advtrains.tnc_register_on_approach(function(pos, id, train, index, has_entered, --interpreting aspect and determining speed to proceed if travsht then --shunt move - if asp.shunt.free then + if asp.shunt then nspd = SHUNT_SPEED_MAX - elseif asp.shunt.proceed_as_main and asp.main.free then - nspd = asp.main.speed + elseif asp.shunt.proceed_as_main and asp.main != 0 then + nspd = asp.main travsht = false end else --train move - if asp.main.free then - nspd = asp.main.speed - elseif asp.shunt.free then + if asp.main != 0 then + nspd = asp.main + elseif asp.shunt then nspd = SHUNT_SPEED_MAX travsht = true end -- cgit v1.2.3