chore: only dump leaderboard values when they are relevant for the column

This commit is contained in:
Jan
2024-05-19 11:38:20 +02:00
parent 7ba5a616cd
commit 489e4d033e
4 changed files with 62 additions and 32 deletions

View File

@ -40,10 +40,10 @@ namespace IW4
std::string statName;
LbColType type;
int precision;
LbAggType agg;
LbAggType aggregationFunction;
};
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonColumnDef, name, id, propertyId, hidden, statName, type, precision, agg);
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonColumnDef, name, id, propertyId, hidden, statName, type, precision, aggregationFunction);
class JsonLeaderboardDef
{

View File

@ -55,17 +55,17 @@ namespace IW5
public:
std::string name;
int id;
int propertyId;
bool hidden;
std::string statName;
std::optional<int> propertyId;
std::optional<bool> hidden;
std::optional<std::string> statName;
LbColType type;
int precision;
LbAggType agg;
int uiCalColX;
int uiCalColY;
std::optional<int> precision;
LbAggType aggregationFunction;
std::optional<int> uiCalColX;
std::optional<int> uiCalColY;
};
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonColumnDef, name, id, propertyId, hidden, statName, type, precision, agg, uiCalColX, uiCalColY);
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonColumnDef, name, id, propertyId, hidden, statName, type, precision, aggregationFunction, uiCalColX, uiCalColY);
class JsonLeaderboardDef
{