rust/lib-hwengine-future/src/lib.rs
branchtransitional_engine
changeset 15922 da6b67f13c12
parent 15921 5f00829c55ec
child 15923 d46ad15c6dec
--- a/rust/lib-hwengine-future/src/lib.rs	Mon Feb 13 11:00:12 2023 +0100
+++ b/rust/lib-hwengine-future/src/lib.rs	Mon Feb 13 12:31:30 2023 +0100
@@ -1,6 +1,11 @@
 use integral_geometry::{Point, Size};
 use land2d;
-use landgen::{outline_template_based::template_based::TemplatedLandGenerator, LandGenerationParameters, LandGenerator};
+use landgen::{
+    outline_template_based::{
+        outline_template::OutlineTemplate, template_based::TemplatedLandGenerator,
+    },
+    LandGenerationParameters, LandGenerator,
+};
 use lfprng::LaggedFibonacciPRNG;
 use mapgen::{theme::Theme, MapGenerator};
 use std::fs;
@@ -59,7 +64,7 @@
     let yaml_templates =
         fs::read_to_string(data_path.join(Path::new("map_templates.yaml")).as_path())
             .expect("Error reading map templates file");
-    let mut map_gen = MapGenerator::new();
+    let mut map_gen = MapGenerator::<OutlineTemplate>::new();
     map_gen.import_yaml_templates(&yaml_templates);
 
     let distance_divisor = feature_size.pow(2) / 8 + 10;
@@ -91,7 +96,7 @@
     let data_path = Path::new(&data_path);
 
     let theme_name: &str = unsafe { CStr::from_ptr(theme_name) }.to_str().unwrap();
-    let map_gen = MapGenerator::new();
+    let map_gen = MapGenerator::<()>::new();
 
     let theme = Theme::load(
         data_path