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

feat: show zone and asset statistics in modman

This commit is contained in:
Jan Laupetin
2025-10-21 23:44:59 +01:00
parent 2bfa4112fb
commit c9e6a1fc64
20 changed files with 261 additions and 25 deletions

View File

@@ -27,7 +27,7 @@ NLOHMANN_JSON_SERIALIZE_ENUM(CommonAssetType,
{CommonAssetType::LIGHT_DEF, "LIGHT_DEF" },
{CommonAssetType::UI_MAP, "UI_MAP" },
{CommonAssetType::FONT, "FONT" },
{CommonAssetType::MENULIST, "MENULIST" },
{CommonAssetType::MENU_LIST, "MENU_LIST" },
{CommonAssetType::MENU, "MENU" },
{CommonAssetType::LOCALIZE_ENTRY, "LOCALIZE_ENTRY" },
{CommonAssetType::WEAPON, "WEAPON" },

View File

@@ -5,6 +5,22 @@
#include "Json/JsonExtension.h"
NLOHMANN_JSON_SERIALIZE_ENUM(GameId,
{
{GameId::IW3, "IW3"},
{GameId::IW4, "IW4"},
{GameId::IW5, "IW5"},
{GameId::T5, "T5" },
{GameId::T6, "T6" },
});
NLOHMANN_JSON_SERIALIZE_ENUM(GamePlatform,
{
{GamePlatform::PC, "PC" },
{GamePlatform::XBOX, "XBOX"},
{GamePlatform::PS3, "PS3" },
});
namespace
{
class ZoneDto
@@ -12,9 +28,11 @@ namespace
public:
std::string name;
std::string filePath;
GameId game;
GamePlatform platform;
};
NLOHMANN_DEFINE_TYPE_EXTENSION(ZoneDto, name, filePath);
NLOHMANN_DEFINE_TYPE_EXTENSION(ZoneDto, name, filePath, game, platform);
class ZoneLoadProgressDto
{
@@ -46,6 +64,8 @@ namespace
return ZoneDto{
.name = loadedZone.m_zone->m_name,
.filePath = loadedZone.m_file_path,
.game = loadedZone.m_zone->m_game_id,
.platform = loadedZone.m_zone->m_platform,
};
}