2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-04 07:47:25 +00:00

refactor: move iw3,iw4,iw5,t5 dumpers into seperate folders

This commit is contained in:
Jan Laupetin
2025-07-25 21:23:49 +01:00
parent 64bd89dc46
commit 39fe9965d1
143 changed files with 70 additions and 69 deletions

View File

@@ -0,0 +1,22 @@
#include "AssetDumperWeaponAttachment.h"
#include "Game/IW5/Weapon/JsonWeaponAttachmentWriter.h"
#include <format>
using namespace IW5;
bool AssetDumperWeaponAttachment::ShouldDump(XAssetInfo<WeaponAttachment>* asset)
{
return true;
}
void AssetDumperWeaponAttachment::DumpAsset(AssetDumpingContext& context, XAssetInfo<WeaponAttachment>* asset)
{
const auto assetFile = context.OpenAssetFile(std::format("attachment/{}.json", asset->m_name));
if (!assetFile)
return;
DumpWeaponAttachmentAsJson(*assetFile, asset->Asset(), context);
}