Add a CLI flag 'router' to map actdev site name to the map name. For
@@ -91,6 +91,26 @@ pub fn main() {
let start_with_edits = args.optional("--edits");
let center_camera = args.optional("--cam");
+ if let Some(site) = args.optional("--actdev") {
+ // For integration with https://github.com/cyipt/actdev, the web version just takes the
+ // site as input. A/B Street's mapping of sites to MapName is a little convoluted and in
+ // flux, so just do the mapping here.
+ let name = match site.as_ref() {
+ "allerton-bywater" => MapName::new("allerton_bywater", "center"),
+ "bailrigg" => MapName::new("lancaster", "bailrigg"),
+ "chapelford" => MapName::new("cheshire", "chapelford"),
+ "didcot" => MapName::new("harwell", "didcot"),
+ "ebbsfleet" => MapName::new("dartford", "ebbsfleet"),
+ "great-kneighton" => MapName::new("cambridge", "great_kneighton"),
+ "handforth" => MapName::new("poynton", "handforth"),
+ "lcid" => MapName::new("leeds", "lcid"),
+ "long-marston" => MapName::new("stratford_upon_avon", "long_marston"),
+ _ => panic!("Unknown --actdev site name {}", site),
+ };
+ flags.sim_flags.load = name.path();
+ // TODO Also add --study_area automatically
+ }
+
args.done();
widgetry::run(settings, |ctx| {
