mirror of
https://codeberg.org/icewind/tf-asset-loader.git
synced 2026-06-03 16:44:10 +02:00
only use download folder if exists
This commit is contained in:
parent
4476c0f986
commit
e27296b857
3 changed files with 6 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -613,7 +613,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tf-asset-loader"
|
name = "tf-asset-loader"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"steamlocate",
|
"steamlocate",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tf-asset-loader"
|
name = "tf-asset-loader"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Utility for loading assets from tf2 data files"
|
description = "Utility for loading assets from tf2 data files"
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,13 @@ impl Loader {
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut sources = vec![
|
let mut sources = vec![
|
||||||
Arc::new(tf_dir) as Arc<dyn AssetSource + Send + Sync>,
|
Arc::new(tf_dir) as Arc<dyn AssetSource + Send + Sync>,
|
||||||
Arc::new(download),
|
|
||||||
Arc::new(hl_dir),
|
Arc::new(hl_dir),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if download.exists() {
|
||||||
|
sources.push(Arc::new(download));
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "vpk")]
|
#[cfg(feature = "vpk")]
|
||||||
sources.extend(vpks);
|
sources.extend(vpks);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue