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:
@@ -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);
|
||||
}
|
Reference in New Issue
Block a user