@@ -29,84 +29,6 @@ trait Onslope { this: RuleGenerator with Curve45Generator =>
2929 Rules += onslope | (Dirtroad ~> upper)~ EW // OST > upper
3030 Rules += rhw2Slope | upper~ EW | onslope | % // OST < upper
3131 Rules += (Dirtroad ~> lower)~ EW | onslope // lower < OST
32- Rules += onslope | (Dirtroad ~> upper)~ CW // OST > upper stub
33- Rules += (Dirtroad ~> lower)~ EC | onslope // lower stub < OST
34-
35- // adjacencies
36- for (minor <- (RhwNetworks - Rhw10c - L1Rhw10c - L2Rhw10c ) ++ (BaseNetworks - Subway ) ++ NwmNetworks ++ GlrNetworks + Str + Hsr + L2Hsr ) { // crossing network
37- if (intersectionAllowed(upper, minor)) {
38- if (hasRightShoulder(minor)) {
39- Rules += onslope | (Dirtroad ~> upper)~ EW & minor~ NS // OST > upper crossing minor
40- Rules += rhw2Slope | upper~ EW & minor~ NS | onslope | % // OST < upper crossing minor
41- }
42- if (hasLeftShoulder(minor)) {
43- Rules += onslope | (Dirtroad ~> upper)~ EW & minor~ SN // OST > upper crossing minor
44- Rules += rhw2Slope | upper~ EW & minor~ SN | onslope | % // OST < upper crossing minor
45- }
46- }
47- if (intersectionAllowed(lower, minor)) {
48- if (hasRightShoulder(minor)) {
49- Rules += (Dirtroad ~> lower)~ EW & minor~ SN | onslope // lower crossing minor < OST
50- Rules += lower~ EW & minor~ SN | rhw2Slope | % | onslope // lower crossing minor > OST
51- }
52- if (hasLeftShoulder(minor)) {
53- Rules += (Dirtroad ~> lower)~ EW & minor~ NS | onslope // lower crossing minor < OST
54- Rules += lower~ EW & minor~ NS | rhw2Slope | % | onslope // lower crossing minor > OST
55- }
56- }
57- }
58-
59- // OST adjacent to 45 degree curves
60- if (isSingleTile(main)) { // curves adjacent to OSTs only seem useful for tight setups with single-tilers
61- if (hasSharpCurveBase(upper, inside= false ) && hasSharpCurve(upper, inside= false )) {
62- Rules += onslope | (Dirtroad ~> upper)~ (+ 2 ,0 ,- 13 ,0 ) // OST > R0 upper
63- Rules += rhw2Slope | upper~ (+ 2 ,0 ,- 13 ,0 ) | onslope | % // OST < R0 upper
64- Rules += lower~ (+ 11 ,0 ,- 2 ,0 ) | rhw2Slope | % | onslope // R0 lower > OST
65- Rules += (Dirtroad ~> lower)~ (+ 11 ,0 ,- 2 ,0 ) | onslope // R0 lower < OST
66- }
67- if (hasSharpCurveBase(upper, inside= true ) && hasSharpCurve(upper, inside= true )) {
68- Rules += onslope | (Dirtroad ~> upper)~ (+ 2 ,0 ,- 11 ,0 ) // OST > R0 upper
69- Rules += rhw2Slope | upper~ (+ 2 ,0 ,- 11 ,0 ) | onslope | % // OST < R0 upper
70- Rules += lower~ (+ 13 ,0 ,- 2 ,0 ) | rhw2Slope | % | onslope // R0 lower > OST
71- Rules += (Dirtroad ~> lower)~ (+ 13 ,0 ,- 2 ,0 ) | onslope // R0 lower < OST
72- }
73- if (hasR1CurveBase(upper) && hasR1Curve(upper, inside= false )) {
74- Rules += onslope | (Dirtroad ~> upper)~ (+ 2 ,0 ,- 123 ,0 ) // OST > R1 upper
75- Rules += rhw2Slope | upper~ (+ 2 ,0 ,- 123 ,0 ) | onslope | % // OST < R1 upper
76- }
77- if (hasR1CurveBase(lower) && hasR1Curve(lower, inside= false )) {
78- Rules += lower~ (+ 121 ,0 ,- 2 ,0 ) | rhw2Slope | % | onslope // R1 lower > OST
79- Rules += (Dirtroad ~> lower)~ (+ 121 ,0 ,- 2 ,0 ) | onslope // R1 lower < OST
80- }
81- if (hasR1CurveBase(upper) && hasR1Curve(upper, inside= true )) {
82- Rules += onslope | (Dirtroad ~> upper)~ (+ 2 ,0 ,- 121 ,0 ) // OST > R1 upper
83- Rules += rhw2Slope | upper~ (+ 2 ,0 ,- 121 ,0 ) | onslope | % // OST < R1 upper
84- }
85- if (hasR1CurveBase(lower) && hasR1Curve(lower, inside= true )) {
86- Rules += lower~ (+ 123 ,0 ,- 2 ,0 ) | rhw2Slope | % | onslope // R1 lower > OST
87- Rules += (Dirtroad ~> lower)~ (+ 123 ,0 ,- 2 ,0 ) | onslope // R1 lower < OST
88- }
89- }
90- if (main == Mis || main == Rhw4 ) { // FlexFly curves
91- Rules += rhw2Slope | upper~ (+ 2 ,0 ,- 213 ,0 ) | onslope | % // OST < FlexFly upper
92- Rules += rhw2Slope | upper~ (+ 2 ,0 ,- 211 ,0 ) | onslope | % //
93- Rules += lower~ (+ 211 ,0 ,- 2 ,0 ) | rhw2Slope | % | onslope // FlexFly lower > OST
94- Rules += lower~ (+ 213 ,0 ,- 2 ,0 ) | rhw2Slope | % | onslope //
95- }
96-
97- // OST adjacent to OST
98- if (upper.height <= maxHeight - 1 ) {
99- // +L1
100- val onslopeUpL1 = (height+ levelDiff+ 1 )~ main~ EC & upper~ CW
101- Rules += onslope | rhw2SlopeL1 | % | onslopeUpL1 // lower > upper
102- Rules += rhw2Slope | onslopeUpL1 | onslope | % // lower < upper
103- }
104- if (upper.height <= maxHeight - 2 ) {
105- // +L2
106- val onslopeUpL2 = (height+ levelDiff+ 2 )~ main~ EC & upper~ CW
107- Rules += onslope | rhw2SlopeL2 | % | onslopeUpL2 // lower > upper
108- Rules += rhw2Slope | onslopeUpL2 | onslope | % // lower < upper
109- }
11032 }
11133 }
11234
0 commit comments