Fix tile query
This commit is contained in:
parent
634115aa3d
commit
223df31478
1 changed files with 20 additions and 20 deletions
|
@ -160,10 +160,7 @@ impl Game {
|
|||
}
|
||||
|
||||
let game_settings = settings.core_settings.game.clone();
|
||||
|
||||
let lua_scripts = settings.core_settings.lua_scripts.clone();
|
||||
|
||||
let tile_directory = settings.core_settings.engine.tile_directory.full_path();
|
||||
let map_info = settings.core_settings.map_info();
|
||||
|
||||
#[allow(unused_mut)]
|
||||
|
@ -230,8 +227,22 @@ impl Game {
|
|||
}
|
||||
}
|
||||
|
||||
let game = {
|
||||
engine_create_info.gui_info.resource_directory = {
|
||||
let mut path = AssetPath::from(settings.data_path.as_str());
|
||||
path.assume_prefix_free();
|
||||
|
||||
path
|
||||
};
|
||||
engine_create_info.resource_base_path = settings.data_path.clone();
|
||||
|
||||
let engine = Engine::new(engine_create_info.clone())?;
|
||||
|
||||
// ----------------- tiles --------------------
|
||||
let tile_vector = search_dir_recursively(&tile_directory, ".png")?;
|
||||
let tile_vector = search_dir_recursively(
|
||||
engine.settings().tiles_directory().full_path().as_str(),
|
||||
".png",
|
||||
)?;
|
||||
let mut tile_map = HashMap::new();
|
||||
|
||||
for file in &tile_vector {
|
||||
|
@ -247,17 +258,6 @@ impl Game {
|
|||
}
|
||||
}
|
||||
|
||||
let game = {
|
||||
engine_create_info.gui_info.resource_directory = {
|
||||
let mut path = AssetPath::from(settings.data_path.as_str());
|
||||
path.assume_prefix_free();
|
||||
|
||||
path
|
||||
};
|
||||
engine_create_info.resource_base_path = settings.data_path.clone();
|
||||
|
||||
let engine = Engine::new(engine_create_info.clone())?;
|
||||
|
||||
let item_system = Promise::new({
|
||||
let engine = engine.clone();
|
||||
let item_settings = item_settings.clone();
|
||||
|
|
Loading…
Reference in a new issue