Advertisement
Choumiko

Untitled

Jul 23rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.17 KB | None | 0 0
  1. rail_data = {
  2.     ["straight-rail"] = {
  3.         [dir.north] = {
  4.             length = 2,
  5.             travel_to_rd = {
  6.                 [dir.north] = rd.front,
  7.                 [dir.south] = rd.back
  8.             },
  9.             rd_to_travel = {
  10.                 [rd.front] = dir.north,
  11.                 [rd.back] = dir.south
  12.             },
  13.             signals = {
  14.                     [rd.front] = {
  15.                         {x=1.5, y= 0.5, d=dir.south, stops=-1, starts=0},  -- Train stops 1 unit before this rail begins
  16.                         {x=1.5, y=-0.5, d=dir.south, stops=1, starts=2}
  17.                     },
  18.                     [rd.back] = {
  19.                         {x=-1.5, y=-0.5, d=dir.north, stops=-1, starts=0},
  20.                         {x=-1.5, y= 0.5, d=dir.north, stops=1, starts=2},
  21.                     },
  22.             },
  23.             next_rails = {
  24.                 [rd.front] = {
  25.                     [rcd.left] = {type = "curved-rail", direction = dir.north, position = {x = -1, y = -5}},
  26.                     [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = 0, y = -2}},
  27.                     [rcd.right] = {type = "curved-rail", direction = dir.northeast, position = {x = 1, y = -5}}
  28.                 },
  29.                 [rd.back] = {
  30.                     [rcd.left] = {type = "curved-rail", direction = dir.south, position = {x = 1, y = 5}},
  31.                     [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = 0, y = 2}},
  32.                     [rcd.right] = {type = "curved-rail", direction = dir.southwest, position = {x = -1, y = 5}}
  33.                 }
  34.             },
  35.         },
  36.         [dir.northeast] = {
  37.             length = sqrt2,
  38.             travel_to_rd = {
  39.                 [dir.northwest] = rd.front,
  40.                 [dir.southeast] = rd.back
  41.             },
  42.             rd_to_travel = {
  43.                 [rd.front] = dir.northwest,
  44.                 [rd.back] = dir.southeast
  45.             },
  46.             signals = {
  47.                 [rd.front] = {{x=1.5, y=-1.5, d=dir.southeast, stops=-1, starts=1}},
  48.                 [rd.back] = {{x=-0.5, y=0.5, d=dir.northwest, stops=0, starts=1}},
  49.             },
  50.             next_rails = {
  51.                 [rd.front] = {
  52.                     [rcd.left] = {type = "curved-rail", direction = dir.southeast, position = {x = -3, y = -3}},
  53.                     [rcd.straight] = {type = "straight-rail", direction = dir.southwest, position = {x = 0, y = -2}},
  54.                     [rcd.right] = nil--{type = "curved-rail", direction = dir.northeast, position = {x = 1, y = -5}}
  55.                 },
  56.                 [rd.back] = {
  57.                     [rcd.left] = nil, --{type = "curved-rail", direction = dir.south, position = {x = 1, y = 5}},
  58.                     [rcd.straight] = {type = "straight-rail", direction = dir.southwest, position = {x = 2, y = 0}},
  59.                     [rcd.right] = {type = "curved-rail", direction = dir.north, position = {x = 3, y = 3}}
  60.                 }
  61.             },
  62.         },
  63.     },
  64.     ["curved-rail"] = {
  65.         [dir.north] = {
  66.             length = curve_length,
  67.             travel_to_rd = {
  68.                 [dir.northwest] = rd.back,
  69.                 [dir.south] = rd.front
  70.             },
  71.             rd_to_travel = {
  72.                 [rd.front] = dir.south,
  73.                 [rd.back] = dir.northwest
  74.             },
  75.             signals = {
  76.                 [rd.front] = {
  77.                     {x=-2.5, y=-1.5, d=dir.northwest, stops=-1, starts=0},
  78.                     {x=-0.5, y=3.5, d=dir.north, stops=curve_length-1, starts=curve_length}
  79.                 },
  80.                 [rd.back] = {
  81.                     {x=2.5, y=3.5, d=dir.south, stops=-1, starts=0},
  82.                     {x=-0.5, y=-3.5, d=dir.southeast, stops=curve_length-1, starts=curve_length}
  83.                 },
  84.             },
  85.             next_rails = {
  86.                 [rd.front] = {
  87.                     [rcd.left] = {type = "curved-rail", direction = dir.south, position = {x = 2, y = 8}},
  88.                     [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = 1, y = 5}},
  89.                     [rcd.right] = {type = "curved-rail", direction = dir.southwest, position = {x = 0, y = 8}}
  90.                 },
  91.                 [rd.back] = {
  92.                     [rcd.left] = nil, --{type = "curved-rail", direction = dir.south, position = {x = 1, y = 5}},
  93.                     [rcd.straight] = {type = "straight-rail", direction = dir.northeast, position = {x = -3, y = -3}},
  94.                     [rcd.right] = {type = "curved-rail", direction = dir.south, position = {x = -4, y = -6}}
  95.                 }
  96.             },
  97.         },
  98.         [dir.northeast] = {
  99.             length = curve_length,
  100.             travel_to_rd = {
  101.                 [dir.northeast] = rd.back,
  102.                 [dir.south] = rd.front
  103.             },
  104.             rd_to_travel = {
  105.                 [rd.front] = dir.south,
  106.                 [rd.back] = dir.northeast
  107.             },
  108.             signals = {
  109.                 [rd.front] = {
  110.                     {x=0.5, y=-3.5, d=dir.northeast, stops=-1, starts=0},
  111.                     {x=-2.5, y=3.5, d=dir.north, stops=curve_length-1, starts=curve_length},
  112.                 },
  113.                 [rd.back] = {
  114.                     {x=0.5, y=3.5, d=dir.south, stops=-1, starts=0},
  115.                     {x=2.5, y=-1.5, d=dir.southwest, stops=curve_length-1, starts=curve_length},
  116.                 },
  117.             },
  118.             next_rails = {
  119.                 [rd.front] = {
  120.                     [rcd.left] = {type = "curved-rail", direction = dir.south, position = {x = 0, y = 8}},
  121.                     [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = -1, y = 5}},
  122.                     [rcd.right] = {type = "curved-rail", direction = dir.southwest, position = {x = -2, y = 8}}
  123.                 },
  124.                 [rd.back] = {
  125.                     [rcd.left] = {type = "curved-rail", direction = dir.southwest, position = {x = 4, y = -6}},
  126.                     [rcd.straight] = {type = "straight-rail", direction = dir.northwest, position = {x = 3, y = -3}},
  127.                     [rcd.right] = nil
  128.                 }
  129.             },
  130.         },
  131.     }
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement