aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authorBlockhead <jbis1337@hotmail.com>2020-08-16 02:39:58 +1000
committerGabriel PĂ©rez-Cerezo <gabriel@gpcf.eu>2020-08-21 16:02:02 +0200
commitb707f20ba20a7cd542b9ccc9c939f55a9b88400c (patch)
treee7b6b60a7edc41819dca1e2e9c43426afb60af14 /advtrains
parentb75752a3e08a02664a077892ff32e653589b9166 (diff)
downloadadvtrains-b707f20ba20a7cd542b9ccc9c939f55a9b88400c.tar.gz
advtrains-b707f20ba20a7cd542b9ccc9c939f55a9b88400c.tar.bz2
advtrains-b707f20ba20a7cd542b9ccc9c939f55a9b88400c.zip
Add two new sets of diamond crossing types
Add two new sets of diamond crossings in addition to the current set of perpendicular crossings. Also cleans up the inside edges on the perpendicular set models. All of these varieties have their mirror images, which was previously a problem with the 45/90 crossing. The naming convention for all of these rail types is this: when facing east and param2=0, the angle and direction of the two crossing rails is indicated. So 30l45r means 30 degrees left and 45 degrees right. The mirror image of that would be 30r45l. There is a recipe for each set of crossing types and the trackworker can change geometry within types with left cick, and rotate between two 90 degree rotations with right-click. When left-clicking, the angles move in an intuitive fashion like rotating rails. * The perpendicular set (already existing) has rails that cross at 90 degrees. * The 90+x set has 90 degree (straight, node aligned) rails plus a rail intersecting that at 30, 45 or 60 degrees. * The diagonal set has both rails not axis-aligned, for example 30r-45l, 60l60r. The latter is quite useful for scissors crossovers.
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/tracks.lua123
1 files changed, 118 insertions, 5 deletions
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua
index 00d0de8..8597dac 100644
--- a/advtrains/tracks.lua
+++ b/advtrains/tracks.lua
@@ -225,20 +225,133 @@ advtrains.ap.t_perpcrossing={
tpdefault="st",
rotation={"", "_30", "_45", "_60"},
}
-advtrains.ap.t_9045crossing={
+advtrains.ap.t_90plusx_crossing={
regstep = 1,
variant={
- st={
+ ["30l"]={
+ conns = { {c=0}, {c=8}, {c=1}, {c=9} },
+ desc = "30/90 degree crossing (left)",
+ tpdouble = true,
+ tpsingle = true,
+ trackworker = "45l"
+ },
+ ["45l"]={
conns = { {c=0}, {c=8}, {c=2}, {c=10} },
- desc = "45/90 degree crossing",
+ desc = "45/90 degree crossing (left)",
tpdouble = true,
tpsingle = true,
- trackworker = "st",
+ trackworker = "60l",
+ },
+ ["60l"]={
+ conns = { {c=0}, {c=8}, {c=3}, {c=11}},
+ desc = "60/90 degree crossing (left)",
+ tpdouble = true,
+ tpsingle = true,
+ trackworker = "60r",
+ },
+ ["60r"]={
+ conns = { {c=0}, {c=8}, {c=7}, {c=15} },
+ desc = "60/90 degree crossing (right)",
+ tpdouble = true,
+ tpsingle = true,
+ trackworker = "45r"
+ },
+ ["45r"]={
+ conns = { {c=0}, {c=8}, {c=6}, {c=14} },
+ desc = "45/90 degree crossing (right)",
+ tpdouble = true,
+ tpsingle = true,
+ trackworker = "30r",
+ },
+ ["30r"]={
+ conns = { {c=0}, {c=8}, {c=7}, {c=15}},
+ desc = "30/90 degree crossing (right)",
+ tpdouble = true,
+ tpsingle = true,
+ trackworker = "30l",
},
},
regtp=true,
- tpdefault="st",
+ tpdefault="30l",
rotation={""},
+ trackworker = {
+ ["30l"] = "45l",
+ ["45l"] = "60l",
+ ["60l"] = "60r",
+ ["60r"] = "45r",
+ ["45r"] = "30r",
+ ["30r"] = "30l",
+ }
+}
+
+advtrains.ap.t_diagonalcrossing = {
+ regstep=1,
+ variant={
+ ["30l45r"]={
+ conns = {{c=1}, {c=9}, {c=6}, {c=14}},
+ desc = "30left-45right diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="60l30l",
+ },
+ ["60l30l"]={
+ conns = {{c=3}, {c=11}, {c=1}, {c=9}},
+ desc = "30left-60right diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="60l45r"
+ },
+ ["60l45r"]={
+ conns = {{c=3}, {c=11}, {c=6}, {c=14}},
+ desc = "60left-45right diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="60l60r"
+ },
+ ["60l60r"]={
+ conns = {{c=3}, {c=11}, {c=5}, {c=13}},
+ desc = "60left-60right diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="60r45l",
+ },
+ --If 60l60r had a mirror image, it would be here, but it's symmetric.
+ -- 60l60r is also equivalent to 30l30r but rotated 90 degrees.
+ ["60r45l"]={
+ conns = {{c=5}, {c=13}, {c=2}, {c=10}},
+ desc = "60right-45left diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="60r30r",
+ },
+ ["60r30r"]={
+ conns = {{c=5}, {c=13}, {c=7}, {c=15}},
+ desc = "60right-30right diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="30r45l",
+ },
+ ["30r45l"]={
+ conns = {{c=7}, {c=15}, {c=2}, {c=10}},
+ desc = "30right-45left diagonal crossing",
+ tpdouble=true,
+ tpsingle=true,
+ trackworker="30l45r",
+ },
+
+ },
+ regtp=true,
+ tpdefault="30l45r",
+ rotation={""},
+ trackworker = {
+ ["30l45r"] = "60l30l",
+ ["60l30l"] = "60l45r",
+ ["60l45r"] = "60l60r",
+ ["60l60r"] = "60r45l",
+ ["60r45l"] = "60r30r",
+ ["60r30r"] = "30r45l",
+ ["30r45l"] = "30l45r",
+ }
}
advtrains.trackpresets = advtrains.ap