aboutsummaryrefslogtreecommitdiff
path: root/advtrains/tracks.lua
diff options
context:
space:
mode:
authorBlockhead <jbis1337@hotmail.com>2020-09-11 17:18:45 +1000
committerBlockhead <jbis1337@hotmail.com>2020-09-11 17:19:23 +1000
commit487ca4e38cddcb5245b2d42134ee15390b0c1dda (patch)
tree4d9b25686b5ed6417daba1d5e9c60f6ef465dc26 /advtrains/tracks.lua
parent1d224d6b4c714ff63f98d3f935ccbd9f697fb1d9 (diff)
downloadadvtrains-487ca4e38cddcb5245b2d42134ee15390b0c1dda.tar.gz
advtrains-487ca4e38cddcb5245b2d42134ee15390b0c1dda.tar.bz2
advtrains-487ca4e38cddcb5245b2d42134ee15390b0c1dda.zip
Enable three-way turnouts with proper conns support on all sides
I chose to make three-way turnouts have 5 conns (last one is not used) so that they can be distinguished from crossings easily without refactoring the code. Three-ways should have their last entry with {["3"]=0} instead as a sort of internal mark.
Diffstat (limited to 'advtrains/tracks.lua')
-rw-r--r--advtrains/tracks.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua
index a9118fc..26d7b4b 100644
--- a/advtrains/tracks.lua
+++ b/advtrains/tracks.lua
@@ -124,8 +124,7 @@ advtrains.ap.t_s3way={
regstep=1,
variant={
l={
- --conns = conns6(0,7,0,8,0,9),
- conns = conns3(0,7,8),
+ conns = { {c=0}, {c=7}, {c=8}, {c=9}, {["3"]=0} },
desc = "3-way turnout (left)",
switchalt = "s",
--switchalt2 = ,
@@ -133,16 +132,14 @@ advtrains.ap.t_s3way={
switchst="l",
},
s={
- --conns = conns6(0,8,0,7,0,9),
- conns = conns3(0,8,7),
+ conns = { {c=0}, {c=8}, {c=7}, {c=9}, {["3"]=0} },
desc = "3-way turnout (straight)",
switchalt ="r",
--switchmc = "on",
switchst = "s",
},
r={
- --conns = conns6(0,9,0,8,0,7),
- conns = conns3(0,9,8),
+ conns = { {c=0}, {c=9}, {c=8}, {c=7}, {["3"]=0} },
desc = "3-way turnout (right)",
switchalt = "l",
switchst="r"