fixed fomod plugin type deps
This commit is contained in:
@@ -118,6 +118,7 @@ pub enum PluginTypeDescriptorEnum {
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct DependencyPluginType {
|
||||
#[serde(rename = "defaultType")]
|
||||
pub default_type: PluginType,
|
||||
pub patterns: DependencyPatternList,
|
||||
}
|
||||
@@ -129,7 +130,7 @@ pub struct DependencyPatternList {
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct DependencyPattern {
|
||||
pub dependencies: CompositeDependency,
|
||||
pub dependencies: Vec<CompositeDependency>,
|
||||
#[serde(rename = "type")]
|
||||
pub typ: PluginType,
|
||||
}
|
||||
|
||||
@@ -176,7 +176,11 @@ fn resolve_plugin_type(
|
||||
PluginTypeDescriptorEnum::PluginType(plugin_type) => plugin_type.name,
|
||||
PluginTypeDescriptorEnum::DependencyType(dependency_plugin_type) => {
|
||||
for dep in &dependency_plugin_type.patterns.pattern {
|
||||
if evaluate_dependency(&dep.dependencies, state, installed_plugins) {
|
||||
if dep
|
||||
.dependencies
|
||||
.iter()
|
||||
.all(|e| evaluate_dependency(e, state, installed_plugins))
|
||||
{
|
||||
return dep.typ.name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user