Fixed performance on modding factories

This commit is contained in:
KiritoDv
2024-03-15 09:16:22 -06:00
parent a6face7240
commit 02f2c2f03c
+7 -7
View File
@@ -134,7 +134,6 @@ void Companion::ParseEnums(std::string& header) {
enumIndex++;
this->gEnums[enumName][enumIndex] = line;
}
}
}
@@ -159,8 +158,15 @@ void Companion::ExtractNode(YAML::Node& node, std::string& name, SWrapper* binar
return;
}
auto impl = factory->get();
auto exporter = impl->GetExporter(this->gConfig.exporterType);
if(!exporter.has_value()){
SPDLOG_WARN("No exporter found for {}", name);
return;
}
std::optional<std::shared_ptr<IParsedData>> result;
if(this->gConfig.modding) {
if(impl->SupportModdedAssets() && this->gModdedAssetPaths.contains(name)) {
@@ -187,12 +193,6 @@ void Companion::ExtractNode(YAML::Node& node, std::string& name, SWrapper* binar
return;
}
auto exporter = factory->get()->GetExporter(this->gConfig.exporterType);
if(!exporter.has_value()){
SPDLOG_WARN("No exporter found for {}", name);
return;
}
for (auto [fst, snd] : this->gAssetDependencies[this->gCurrentFile]) {
if(snd.second) {
continue;