Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rail_data = {
- ["straight-rail"] = {
- [dir.north] = {
- length = 2,
- travel_to_rd = {
- [dir.north] = rd.front,
- [dir.south] = rd.back
- },
- rd_to_travel = {
- [rd.front] = dir.north,
- [rd.back] = dir.south
- },
- signals = {
- [rd.front] = {
- {x=1.5, y= 0.5, d=dir.south, stops=-1, starts=0}, -- Train stops 1 unit before this rail begins
- {x=1.5, y=-0.5, d=dir.south, stops=1, starts=2}
- },
- [rd.back] = {
- {x=-1.5, y=-0.5, d=dir.north, stops=-1, starts=0},
- {x=-1.5, y= 0.5, d=dir.north, stops=1, starts=2},
- },
- },
- next_rails = {
- [rd.front] = {
- [rcd.left] = {type = "curved-rail", direction = dir.north, position = {x = -1, y = -5}},
- [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = 0, y = -2}},
- [rcd.right] = {type = "curved-rail", direction = dir.northeast, position = {x = 1, y = -5}}
- },
- [rd.back] = {
- [rcd.left] = {type = "curved-rail", direction = dir.south, position = {x = 1, y = 5}},
- [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = 0, y = 2}},
- [rcd.right] = {type = "curved-rail", direction = dir.southwest, position = {x = -1, y = 5}}
- }
- },
- },
- [dir.northeast] = {
- length = sqrt2,
- travel_to_rd = {
- [dir.northwest] = rd.front,
- [dir.southeast] = rd.back
- },
- rd_to_travel = {
- [rd.front] = dir.northwest,
- [rd.back] = dir.southeast
- },
- signals = {
- [rd.front] = {{x=1.5, y=-1.5, d=dir.southeast, stops=-1, starts=1}},
- [rd.back] = {{x=-0.5, y=0.5, d=dir.northwest, stops=0, starts=1}},
- },
- next_rails = {
- [rd.front] = {
- [rcd.left] = {type = "curved-rail", direction = dir.southeast, position = {x = -3, y = -3}},
- [rcd.straight] = {type = "straight-rail", direction = dir.southwest, position = {x = 0, y = -2}},
- [rcd.right] = nil--{type = "curved-rail", direction = dir.northeast, position = {x = 1, y = -5}}
- },
- [rd.back] = {
- [rcd.left] = nil, --{type = "curved-rail", direction = dir.south, position = {x = 1, y = 5}},
- [rcd.straight] = {type = "straight-rail", direction = dir.southwest, position = {x = 2, y = 0}},
- [rcd.right] = {type = "curved-rail", direction = dir.north, position = {x = 3, y = 3}}
- }
- },
- },
- },
- ["curved-rail"] = {
- [dir.north] = {
- length = curve_length,
- travel_to_rd = {
- [dir.northwest] = rd.back,
- [dir.south] = rd.front
- },
- rd_to_travel = {
- [rd.front] = dir.south,
- [rd.back] = dir.northwest
- },
- signals = {
- [rd.front] = {
- {x=-2.5, y=-1.5, d=dir.northwest, stops=-1, starts=0},
- {x=-0.5, y=3.5, d=dir.north, stops=curve_length-1, starts=curve_length}
- },
- [rd.back] = {
- {x=2.5, y=3.5, d=dir.south, stops=-1, starts=0},
- {x=-0.5, y=-3.5, d=dir.southeast, stops=curve_length-1, starts=curve_length}
- },
- },
- next_rails = {
- [rd.front] = {
- [rcd.left] = {type = "curved-rail", direction = dir.south, position = {x = 2, y = 8}},
- [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = 1, y = 5}},
- [rcd.right] = {type = "curved-rail", direction = dir.southwest, position = {x = 0, y = 8}}
- },
- [rd.back] = {
- [rcd.left] = nil, --{type = "curved-rail", direction = dir.south, position = {x = 1, y = 5}},
- [rcd.straight] = {type = "straight-rail", direction = dir.northeast, position = {x = -3, y = -3}},
- [rcd.right] = {type = "curved-rail", direction = dir.south, position = {x = -4, y = -6}}
- }
- },
- },
- [dir.northeast] = {
- length = curve_length,
- travel_to_rd = {
- [dir.northeast] = rd.back,
- [dir.south] = rd.front
- },
- rd_to_travel = {
- [rd.front] = dir.south,
- [rd.back] = dir.northeast
- },
- signals = {
- [rd.front] = {
- {x=0.5, y=-3.5, d=dir.northeast, stops=-1, starts=0},
- {x=-2.5, y=3.5, d=dir.north, stops=curve_length-1, starts=curve_length},
- },
- [rd.back] = {
- {x=0.5, y=3.5, d=dir.south, stops=-1, starts=0},
- {x=2.5, y=-1.5, d=dir.southwest, stops=curve_length-1, starts=curve_length},
- },
- },
- next_rails = {
- [rd.front] = {
- [rcd.left] = {type = "curved-rail", direction = dir.south, position = {x = 0, y = 8}},
- [rcd.straight] = {type = "straight-rail", direction = dir.north, position = {x = -1, y = 5}},
- [rcd.right] = {type = "curved-rail", direction = dir.southwest, position = {x = -2, y = 8}}
- },
- [rd.back] = {
- [rcd.left] = {type = "curved-rail", direction = dir.southwest, position = {x = 4, y = -6}},
- [rcd.straight] = {type = "straight-rail", direction = dir.northwest, position = {x = 3, y = -3}},
- [rcd.right] = nil
- }
- },
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement