Skip to content

Commit

Permalink
Trains: connected lab depot and subway, vehicle spawns for subway and…
Browse files Browse the repository at this point in the history
… lab depot. (#30540)

* Trains: made lab_depot layout compitible with subway

* Trains: further improvement of lab depot, added draisines to spawn

* Trains: added vehicle spawn for subway deadends

* Trains: subway gen allows only 1 connection to train depot now

* Trains: Allow trains to spawn in lab depots

* Trains: remove nested mapgen two-way connections for train depot
  • Loading branch information
egorzaderiy authored and ZhilkinSerg committed May 18, 2019
1 parent 8594781 commit 258b2e8
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 138 deletions.
218 changes: 117 additions & 101 deletions data/json/mapgen/lab/lab_trains.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,35 @@
"mapgensize": [ 24, 24 ],
"rows": [
" .",
" ^^|^^|^^|^^|^^|^",
" XXxXXxXXxXXxXXxX",
" ^^|^^|^^|^^|^^|^",
" ^^|^^|^^|^^|^^|^",
" ^^|^^|^^|^^|^^|^",
" XXxXXxXXxXXxXXxX",
" ^^|^^|^^|^^|^^|^",
" .",
" .",
" #",
" #",
" #",
" #",
" .",
" .",
" ^^|^^|^^|^^|^^|^",
" XXxXXxXXxXXxXXxX",
" ^^|^^|^^|^^|^^|^",
" ^^|^^|^^|^^|^^|^",
" ^^|^^|^^|^^|^^|^",
" XXxXXxXXxXXxXXxX",
" ^^|^^|^^|^^|^^|^",
" ........",
" ........",
" ^^^|^^|^^|^^|^",
" SXXxXXxXXxXXxX",
" ^^^|^^|^^|^^|^",
" ^^^|^^|^^|^^|^",
" ^^^|^^|^^|^^|^",
" SXXxXXxXXxXXxX",
" ^^^|^^|^^|^^|^",
" ........",
" ........",
" ........",
" ........",
" ^^^|^^|^^|^^|^",
" SXXxXXxXXxXXxX",
" ^^^|^^|^^|^^|^",
" ^^^|^^|^^|^^|^",
" ^^^|^^|^^|^^|^",
" SXXxXXxXXxXXxX",
" ^^^|^^|^^|^^|^",
" ........",
" ........",
" ."
],
"palettes": [ "subway_underground" ]
"palettes": [ "subway_underground" ],
"place_vehicles": [
{ "vehicle": "trains_draisine", "x": [ 12, 17 ], "y": 7, "chance": 3, "rotation": 180 },
{ "vehicle": "trains_draisine", "x": [ 16, 21 ], "y": 16, "chance": 3, "rotation": 0 }
]
}
},
{
Expand All @@ -107,31 +111,35 @@
"mapgensize": [ 24, 24 ],
"rows": [
". ",
"^|^^|^^|^^|^^|^^ ",
"XxXXxXXxXXxXXxXX ",
"^|^^|^^|^^|^^|^^ ",
"^|^^|^^|^^|^^|^^ ",
"^|^^|^^|^^|^^|^^ ",
"XxXXxXXxXXxXXxXX ",
"^|^^|^^|^^|^^|^^ ",
". ",
". ",
"# ",
"# ",
"# ",
"# ",
". ",
". ",
"^|^^|^^|^^|^^|^^ ",
"XxXXxXXxXXxXXxXX ",
"^|^^|^^|^^|^^|^^ ",
"^|^^|^^|^^|^^|^^ ",
"^|^^|^^|^^|^^|^^ ",
"XxXXxXXxXXxXXxXX ",
"^|^^|^^|^^|^^|^^ ",
"....... ",
"....... ",
"^|^^|^^|^^|^^^ ",
"XxXXxXXxXXxXXS ",
"^|^^|^^|^^|^^^ ",
"^|^^|^^|^^|^^^ ",
"^|^^|^^|^^|^^^ ",
"XxXXxXXxXXxXXS ",
"^|^^|^^|^^|^^^ ",
"....... ",
"....... ",
"....... ",
"....... ",
"^|^^|^^|^^|^^^ ",
"XxXXxXXxXXxXXS ",
"^|^^|^^|^^|^^^ ",
"^|^^|^^|^^|^^^ ",
"^|^^|^^|^^|^^^ ",
"XxXXxXXxXXxXXS ",
"^|^^|^^|^^|^^^ ",
"....... ",
"....... ",
". "
],
"palettes": [ "subway_underground" ]
"palettes": [ "subway_underground" ],
"place_vehicles": [
{ "vehicle": "trains_draisine", "x": [ 1, 7 ], "y": 7, "chance": 3, "rotation": 180 },
{ "vehicle": "trains_draisine", "x": [ 6, 11 ], "y": 16, "chance": 3, "rotation": 0 }
]
}
},
{
Expand All @@ -141,22 +149,22 @@
"object": {
"mapgensize": [ 24, 24 ],
"rows": [
".^X^^^X^..####..^X^^^X^.",
" -x---x- -x---x- ",
" xXXxXXx xXXxXXx ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" xXXxXXx xXXxXXx ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
"...^X^^^X^....^X^^^X^...",
" ..-x---x-....-x---x-.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..-x---x-....-x---x-.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..^X^^^X^....^X^^^X^.. ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" ^S^^^S^ ^S^^^S^ ",
" ",
" ",
" ",
" ",
" ",
Expand All @@ -166,7 +174,11 @@
" ",
" "
],
"palettes": [ "subway_underground" ]
"palettes": [ "subway_underground" ],
"place_vehicles": [
{ "vehicle": "trains_draisine", "x": 7, "y": [ 6, 11 ], "chance": 3, "rotation": 90 },
{ "vehicle": "trains_draisine", "x": 16, "y": [ 2, 7 ], "chance": 3, "rotation": 270 }
]
}
},
{
Expand All @@ -184,24 +196,28 @@
" ",
" ",
" ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" xXXxXXx xXXxXXx ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" xXXxXXx xXXxXXx ",
" -x---x- -x---x- ",
".^X^^^X^..####..^X^^^X^."
" ",
" ",
" ^S^^^S^ ^S^^^S^ ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" -x---x- -x---x- ",
" ^X^^^X^ ^X^^^X^ ",
" ^X^^^X^ ^X^^^X^ ",
" ..-x---x-....-x---x-.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..-x---x-....-x---x-.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..^X^^^X^....^X^^^X^.. ",
" ..-x---x-....-x---x-.. ",
"...^X^^^X^....^X^^^X^..."
],
"palettes": [ "subway_underground" ]
"palettes": [ "subway_underground" ],
"place_vehicles": [
{ "vehicle": "trains_draisine", "x": 16, "y": [ 12, 17 ], "chance": 3, "rotation": 270 },
{ "vehicle": "trains_draisine", "x": 7, "y": [ 16, 21 ], "chance": 3, "rotation": 90 }
]
}
},
{
Expand All @@ -211,16 +227,16 @@
"object": {
"mapgensize": [ 24, 24 ],
"rows": [
" .|....|. ",
" |....| ",
" .|....|. ",
" .|....|. ",
" .|....|. ",
" .|....|. ",
" .|....|. ",
" .--MM--. ",
" ........ ",
" ",
" ",
" ........ ",
" .... ",
" ",
" ",
" ",
Expand Down Expand Up @@ -261,8 +277,8 @@
" ",
" ",
" ",
" ",
" ",
" .... ",
" ........ ",
" ........ ",
" .--MM--. ",
" .|....|. ",
Expand Down Expand Up @@ -291,14 +307,14 @@
" |",
" |",
" |",
" .......|",
" .------|",
" .|.....|",
" .M.....M",
" .M.....M",
" .|.....|",
" .------|",
" .......|",
" .........|",
" ..|------|",
" ...|......|",
" ...M......M",
" ...M......M",
" ...|......|",
" ..|------|",
" .........|",
" |",
" |",
" |",
Expand Down Expand Up @@ -327,14 +343,14 @@
" ",
" ",
" ",
"........ ",
"-------. ",
"......|. ",
"......M. ",
"......M. ",
"......|. ",
"-------. ",
"........ ",
" ........ ",
"------|.. ",
"......|... ",
"......M... ",
"......M... ",
"......|... ",
"------|.. ",
" ........ ",
" ",
" ",
" ",
Expand Down
3 changes: 2 additions & 1 deletion data/json/mapgen_palettes/subway.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"x": "t_railroad_track_on_tie",
"h": "t_railroad_track_h_on_tie",
"v": "t_railroad_track_v_on_tie",
"d": "t_railroad_track_d_on_tie"
"d": "t_railroad_track_d_on_tie",
"S": "t_buffer_stop"
},
"furniture": { "&": "f_trashcan", "b": "f_bench" }
}
Expand Down
17 changes: 17 additions & 0 deletions data/json/road_vehicles.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
"id": "highway",
"locations": [ { "x": [ 10, 12 ], "y": [ 10, 12 ], "facing": [ 90, 270 ] } ]
},
{
"type": "vehicle_placement",
"id": "subway_deadend",
"locations": [ { "x": 16, "y": [ 3, 13 ], "facing": 270 }, { "x": 7, "y": [ 7, 17 ], "facing": 90 } ]
},
{
"type": "vehicle_spawn",
"id": "default_city",
Expand Down Expand Up @@ -184,5 +189,17 @@
"type": "vehicle_spawn",
"id": "default_parkinglot",
"spawn_types": [ { "description": "Parking lot with vehicles", "weight": 100, "vehicle_function": "parkinglot" } ]
},
{
"type": "vehicle_spawn",
"id": "default_subway_deadend",
"spawn_types": [
{ "description": "Clear section of subway", "weight": 100, "vehicle_function": "no_vehicles" },
{
"description": "Vehicle on the subway",
"weight": 100,
"vehicle_json": { "vehicle": "trains_draisine", "placement": "subway_deadend", "number": [ 1, 2 ], "fuel": -1, "status": -1 }
}
]
}
]
5 changes: 5 additions & 0 deletions data/json/vehicle_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,10 @@
[ "car_sports", 30 ],
[ "car_sports_atomic", 5 ]
]
},
{
"type": "vehicle_group",
"id": "trains_draisine",
"vehicles": [ [ "motorized_draisine_6seats", 500 ], [ "motorized_draisine_2seats", 2000 ] ]
}
]
Loading

0 comments on commit 258b2e8

Please sign in to comment.