diff --git a/abstutil/src/lib.rs b/abstutil/src/lib.rs index b62ee504d5..bc5cc6dbd5 100644 --- a/abstutil/src/lib.rs +++ b/abstutil/src/lib.rs @@ -47,7 +47,6 @@ pub const AB_TESTS: &str = "ab_tests"; pub const AB_TEST_SAVES: &str = "ab_test_saves"; pub const EDITS: &str = "edits"; pub const NEIGHBORHOODS: &str = "neighborhoods"; -pub const POLYGONS: &str = "polygons"; pub const SAVE: &str = "save"; pub const SCENARIOS: &str = "scenarios"; pub const SHORTCUTS: &str = "shortcuts"; @@ -56,14 +55,6 @@ pub fn path1(map_name: &str, category: &str, dir: &str) -> String { format!("../data/{}/{}/{}", category, map_name, dir) } -pub fn path1_json(map_name: &str, category: &str, instance: &str) -> String { - format!("../data/{}/{}/{}.json", category, map_name, instance) -} - -pub fn path1_bin(map_name: &str, category: &str, instance: &str) -> String { - format!("../data/{}/{}/{}.bin", category, map_name, instance) -} - pub fn path2_dir(map_name: &str, category: &str, dir: &str) -> String { format!("../data/{}/{}/{}/", category, map_name, dir) } @@ -103,3 +94,11 @@ pub fn path_prebaked_results(map_name: &str) -> String { pub fn path_shortcut(name: &str) -> String { format!("../data/shortcuts/{}.json", name) } + +pub fn path_scenario(map_name: &str, scenario_name: &str) -> String { + format!("../data/scenarios/{}/{}.bin", map_name, scenario_name) +} + +pub fn path_edits(map_name: &str, edits_name: &str) -> String { + format!("../data/edits/{}/{}.json", map_name, edits_name) +} diff --git a/game/src/abtest/setup.rs b/game/src/abtest/setup.rs index c1ec3af9ff..ccdee73521 100644 --- a/game/src/abtest/setup.rs +++ b/game/src/abtest/setup.rs @@ -123,7 +123,7 @@ fn launch_test(test: &ABTest, ui: &mut UI, ctx: &mut EventCtx) -> ABTestMode { &format!("Launching A/B test {}", test.test_name), |ctx, mut timer| { let scenario: Scenario = abstutil::read_binary( - &abstutil::path1_bin(&test.map_name, abstutil::SCENARIOS, &test.scenario_name), + &abstutil::path_scenario(&test.map_name, &test.scenario_name), &mut timer, ); diff --git a/game/src/challenges.rs b/game/src/challenges.rs index 37a2d2b363..bb32086c70 100644 --- a/game/src/challenges.rs +++ b/game/src/challenges.rs @@ -213,11 +213,7 @@ pub fn prebake() { for map_name in vec!["montlake", "23rd"] { timer.start(&format!("run normal sim for {}", map_name)); let (map, mut sim, _) = SimFlags { - load: abstutil::path1_bin( - map_name, - abstutil::SCENARIOS, - "weekday_typical_traffic_from_psrc", - ), + load: abstutil::path_scenario(map_name, "weekday_typical_traffic_from_psrc"), use_map_fixes: true, rng_seed: Some(42), opts: SimOptions::new("prebaked"), diff --git a/game/src/mission/mod.rs b/game/src/mission/mod.rs index a408824216..a5ecc24225 100644 --- a/game/src/mission/mod.rs +++ b/game/src/mission/mod.rs @@ -69,7 +69,7 @@ fn load_scenario(wiz: &mut Wizard, ctx: &mut EventCtx, ui: &mut UI) -> Option