mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'christof/no_plugin_hotfix' into 'master'
fix compilation of voxygen without plugins See merge request veloren/veloren!4156
This commit is contained in:
commit
d690f25615
@ -14,10 +14,10 @@ wavefront = "0.2" # TODO: Use vertex-colors branch when we have models that have
|
|||||||
image = { workspace = true }
|
image = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
tar = { version = "0.4.37", optional = true }
|
tar = { version = "0.4.37", optional = true }
|
||||||
|
hashbrown = { workspace = true }
|
||||||
|
|
||||||
# asset tweak
|
# asset tweak
|
||||||
serde = { workspace = true, optional = true }
|
serde = { workspace = true, optional = true }
|
||||||
hashbrown = { workspace = true, optional = true }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
walkdir = "2.3.2"
|
walkdir = "2.3.2"
|
||||||
@ -25,4 +25,4 @@ walkdir = "2.3.2"
|
|||||||
[features]
|
[features]
|
||||||
hot-reloading = ["assets_manager/hot-reloading"]
|
hot-reloading = ["assets_manager/hot-reloading"]
|
||||||
asset_tweak = ["dep:serde", "hot-reloading"]
|
asset_tweak = ["dep:serde", "hot-reloading"]
|
||||||
plugins = ["dep:serde", "dep:tar", "dep:hashbrown"]
|
plugins = ["dep:serde", "dep:tar"]
|
||||||
|
@ -245,7 +245,6 @@ impl<V> Concatenate for Vec<V> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "plugins")]
|
|
||||||
impl<K: Eq + Hash, V, S: BuildHasher> Concatenate for hashbrown::HashMap<K, V, S> {
|
impl<K: Eq + Hash, V, S: BuildHasher> Concatenate for hashbrown::HashMap<K, V, S> {
|
||||||
fn concatenate(mut self, b: Self) -> Self {
|
fn concatenate(mut self, b: Self) -> Self {
|
||||||
self.extend(b);
|
self.extend(b);
|
||||||
@ -258,6 +257,7 @@ impl<T: Concatenate> Concatenate for Ron<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// This wrapper combines several RON files from multiple sources
|
/// This wrapper combines several RON files from multiple sources
|
||||||
|
#[cfg(feature = "plugins")]
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct MultiRon<T>(pub T);
|
pub struct MultiRon<T>(pub T);
|
||||||
|
|
||||||
@ -273,6 +273,10 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fallback
|
||||||
|
#[cfg(not(feature = "plugins"))]
|
||||||
|
pub use assets_manager::asset::Ron as MultiRon;
|
||||||
|
|
||||||
/// Return path to repository root by searching 10 directories back
|
/// Return path to repository root by searching 10 directories back
|
||||||
pub fn find_root() -> Option<PathBuf> {
|
pub fn find_root() -> Option<PathBuf> {
|
||||||
std::env::current_dir().map_or(None, |path| {
|
std::env::current_dir().map_or(None, |path| {
|
||||||
|
Loading…
Reference in New Issue
Block a user