mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 23:38:09 -05:00
23 lines
566 B
C++
23 lines
566 B
C++
#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);
|
|
}
|