rust/lib-hedgewars-engine/src/world.rs
changeset 15919 d52f5d8e75e6
parent 15918 8a6a2d931bae
child 15954 9502611bffc1
child 16046 e8afb1bf2779
--- a/rust/lib-hedgewars-engine/src/world.rs	Sat Nov 12 15:40:20 2022 +0100
+++ b/rust/lib-hedgewars-engine/src/world.rs	Sat Nov 12 21:12:14 2022 +0100
@@ -39,7 +39,7 @@
 }
 
 impl World {
-    pub fn new() -> Self {
+    pub fn new(data_path: &Path) -> Self {
         Self {
             random_numbers_gen: LaggedFibonacciPRNG::new(&[]),
             feature_size: 5,
@@ -49,7 +49,7 @@
             gear_renderer: None,
             camera: Camera::new(),
             gear_entries: vec![],
-            data_path: PathBuf::from("../../share/hedgewars/Data"),
+            data_path: data_path.to_owned(),
         }
     }