rust/lib-hedgewars-engine/src/instance.rs
changeset 15919 d52f5d8e75e6
parent 15831 c3971b38bbfa
child 15954 9502611bffc1
child 16040 52b51d92e88d
--- a/rust/lib-hedgewars-engine/src/instance.rs	Sat Nov 12 15:40:20 2022 +0100
+++ b/rust/lib-hedgewars-engine/src/instance.rs	Sat Nov 12 21:12:14 2022 +0100
@@ -7,6 +7,8 @@
 use integral_geometry::{Point, Rect, Size};
 use landgen::outline_template::OutlineTemplate;
 
+use std::path::Path;
+
 use super::{ipc::*, world::World};
 
 pub struct EngineInstance {
@@ -16,8 +18,8 @@
 }
 
 impl EngineInstance {
-    pub fn new() -> Self {
-        let mut world = World::new();
+    pub fn new(data_path: &Path) -> Self {
+        let mut world = World::new(data_path);
 
         fn template() -> OutlineTemplate {
             let mut template = OutlineTemplate::new(Size::new(4096 * 1, 2048 * 1));