chore: write game into dumped jsons to prevent mixup of incompatible formats

This commit is contained in:
Jan
2025-06-24 19:50:24 +01:00
parent ab25121cef
commit 308816a38e
9 changed files with 19 additions and 1 deletions

View File

@ -28,6 +28,7 @@ namespace
jRoot["_type"] = "leaderboard";
jRoot["_version"] = 1;
jRoot["_game"] = "iw4";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -28,6 +28,7 @@ namespace
jRoot["_type"] = "leaderboard";
jRoot["_version"] = 1;
jRoot["_game"] = "iw5";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -29,8 +29,8 @@ namespace
json jRoot = jsonMaterial;
jRoot["_type"] = "material";
jRoot["_game"] = "iw5";
jRoot["_version"] = 1;
jRoot["_game"] = "iw5";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -27,6 +27,7 @@ namespace
jRoot["_type"] = "attachment";
jRoot["_version"] = 1;
jRoot["_game"] = "iw5";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -28,6 +28,7 @@ namespace
jRoot["_type"] = "leaderboard";
jRoot["_version"] = 1;
jRoot["_game"] = "t6";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -29,6 +29,7 @@ namespace
jRoot["_type"] = "material";
jRoot["_version"] = 1;
jRoot["_game"] = "t6";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -27,6 +27,7 @@ namespace
jRoot["_type"] = "weaponCamo";
jRoot["_version"] = 1;
jRoot["_game"] = "t6";
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -8,12 +8,19 @@
#if GAME == "IW5"
#define FEATURE_IW5
#define GAME_LOWER "iw5"
#elif GAME == "T5"
#define FEATURE_T5
#define GAME_LOWER "t5"
#elif GAME == "T6"
#define FEATURE_T6
#define GAME_LOWER "t6"
#endif
// This file was templated.
// See XModelDumper.cpp.template.
// Do not modify, changes will be lost.
#include DUMPER_HEADER
#include COMMON_HEADER
@ -664,6 +671,7 @@ namespace
jRoot["_type"] = "xmodel";
jRoot["_version"] = 1;
jRoot["_game"] = GAME_LOWER;
m_stream << std::setw(4) << jRoot << "\n";
}

View File

@ -4,6 +4,10 @@
#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\""
// This file was templated.
// See XModelDumper.h.template.
// Do not modify, changes will be lost.
#pragma once
#include "Dumping/AssetDumpingContext.h"