mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-01 02:33:54 +03:00
start in scenario mode more intelligently from CLI
This commit is contained in:
parent
9591699463
commit
c53f6fdc97
@ -102,6 +102,14 @@ fn main() {
|
||||
sandbox::TutorialPointer::new(n - 1, 0),
|
||||
));
|
||||
}
|
||||
if mode.is_none() && flags.sim_flags.load.contains("scenarios/") {
|
||||
// TODO regex
|
||||
let parts = flags.sim_flags.load.split("/").collect::<Vec<_>>();
|
||||
let map_path = abstutil::path_map(parts[4]);
|
||||
let scenario = abstutil::basename(parts[5]);
|
||||
flags.sim_flags.load = map_path.clone();
|
||||
mode = Some(sandbox::GameplayMode::PlayScenario(map_path, scenario));
|
||||
}
|
||||
|
||||
args.done();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user