mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-05 16:27:27 +00:00
refactor: streamline weapon dumping
This commit is contained in:
16
src/ObjCommon/Weapon/AttachmentCommon.cpp
Normal file
16
src/ObjCommon/Weapon/AttachmentCommon.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "AttachmentCommon.h"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace attachment
|
||||
{
|
||||
std::string GetInfoStringFileNameForAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("attachment/{}", assetName);
|
||||
}
|
||||
|
||||
std::string GetJsonFileNameForAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("attachment/{}.json", assetName);
|
||||
}
|
||||
} // namespace attachment
|
9
src/ObjCommon/Weapon/AttachmentCommon.h
Normal file
9
src/ObjCommon/Weapon/AttachmentCommon.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace attachment
|
||||
{
|
||||
std::string GetInfoStringFileNameForAssetName(const std::string& assetName);
|
||||
std::string GetJsonFileNameForAssetName(const std::string& assetName);
|
||||
} // namespace attachment
|
11
src/ObjCommon/Weapon/AttachmentUniqueCommon.cpp
Normal file
11
src/ObjCommon/Weapon/AttachmentUniqueCommon.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "AttachmentUniqueCommon.h"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace attachment_unique
|
||||
{
|
||||
std::string GetFileNameForAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("attachmentunique/{}", assetName);
|
||||
}
|
||||
} // namespace attachment_unique
|
8
src/ObjCommon/Weapon/AttachmentUniqueCommon.h
Normal file
8
src/ObjCommon/Weapon/AttachmentUniqueCommon.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace attachment_unique
|
||||
{
|
||||
std::string GetFileNameForAssetName(const std::string& assetName);
|
||||
}
|
11
src/ObjCommon/Weapon/CamoCommon.cpp
Normal file
11
src/ObjCommon/Weapon/CamoCommon.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "WeaponCommon.h"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace camo
|
||||
{
|
||||
std::string GetJsonFileNameForAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("camo/{}.json", assetName);
|
||||
}
|
||||
} // namespace camo
|
8
src/ObjCommon/Weapon/CamoCommon.h
Normal file
8
src/ObjCommon/Weapon/CamoCommon.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace camo
|
||||
{
|
||||
std::string GetJsonFileNameForAssetName(const std::string& assetName);
|
||||
}
|
11
src/ObjCommon/Weapon/WeaponCommon.cpp
Normal file
11
src/ObjCommon/Weapon/WeaponCommon.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "WeaponCommon.h"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace weapon
|
||||
{
|
||||
std::string GetFileNameForAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("weapons/{}", assetName);
|
||||
}
|
||||
} // namespace weapon
|
8
src/ObjCommon/Weapon/WeaponCommon.h
Normal file
8
src/ObjCommon/Weapon/WeaponCommon.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace weapon
|
||||
{
|
||||
std::string GetFileNameForAssetName(const std::string& assetName);
|
||||
}
|
Reference in New Issue
Block a user