Added dumptechset command - removed header function that did not exist anymore

This commit is contained in:
Louvenarde 2023-08-19 18:08:47 +02:00
parent 582b85958e
commit 4d2dcd426a
2 changed files with 23 additions and 1 deletions

View File

@ -51,6 +51,28 @@ namespace Assets
}
}
IMaterialTechniqueSet::IMaterialTechniqueSet()
{
Components::Command::Add("dumptechset", [](const Components::Command::Params* params)
{
if (params->size() < 2) return;
std::string techset = params->get(1);
const auto header = Game::DB_FindXAssetHeader(Game::XAssetType::ASSET_TYPE_TECHNIQUE_SET, techset.data());
if (header.data)
{
Components::ZoneBuilder::RefreshExporterWorkDirectory();
Components::ZoneBuilder::GetExporter()->write(Game::XAssetType::ASSET_TYPE_TECHNIQUE_SET, header.data);
}
else
{
Components::Logger::Print("Could not find techset {}!\n", techset);
}
}
);
}
void IMaterialTechniqueSet::mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
{
Game::MaterialTechniqueSet* asset = header.techniqueSet;

View File

@ -14,6 +14,6 @@ namespace Assets
void loadNative(Game::XAssetHeader* header, const std::string& name, Components::ZoneBuilder::Zone* builder);
void loadFromDisk(Game::XAssetHeader* header, const std::string& name, Components::ZoneBuilder::Zone* builder);
void loadTechniqueFromDisk(Game::MaterialTechnique** tech, const std::string& name, Components::ZoneBuilder::Zone* builder);
IMaterialTechniqueSet();
};
}