mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 04:42:18 -05:00
Use gBuildVersion instead of sohStats.buildVersion for gameplay stats (#2913)
Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
parent
f4fbc79b5d
commit
b9c2640671
@ -434,7 +434,7 @@ void DrawGameplayStatsHeader() {
|
|||||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, { 4.0f, 4.0f });
|
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, { 4.0f, 4.0f });
|
||||||
ImGui::BeginTable("gameplayStatsHeader", 1, ImGuiTableFlags_BordersOuter);
|
ImGui::BeginTable("gameplayStatsHeader", 1, ImGuiTableFlags_BordersOuter);
|
||||||
ImGui::TableSetupColumn("stat", ImGuiTableColumnFlags_WidthStretch);
|
ImGui::TableSetupColumn("stat", ImGuiTableColumnFlags_WidthStretch);
|
||||||
GameplayStatsRow("Build Version:", gSaveContext.sohStats.buildVersion);
|
GameplayStatsRow("Build Version:", (char*) gBuildVersion);
|
||||||
if (gSaveContext.sohStats.rtaTiming) {
|
if (gSaveContext.sohStats.rtaTiming) {
|
||||||
GameplayStatsRow("Total Time (RTA):", formatTimestampGameplayStat(GAMEPLAYSTAT_TOTAL_TIME), gSaveContext.sohStats.gameComplete ? COLOR_GREEN : COLOR_WHITE);
|
GameplayStatsRow("Total Time (RTA):", formatTimestampGameplayStat(GAMEPLAYSTAT_TOTAL_TIME), gSaveContext.sohStats.gameComplete ? COLOR_GREEN : COLOR_WHITE);
|
||||||
} else {
|
} else {
|
||||||
@ -615,8 +615,8 @@ void DrawGameplayStatsOptionsTab() {
|
|||||||
|
|
||||||
void DrawStatsTracker(bool& open) {
|
void DrawStatsTracker(bool& open) {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
if (CVarGetInteger("gGameplayStatsEnabled", 0)) {
|
if (CVarGetInteger("gGameplayStats.Enabled", 0)) {
|
||||||
CVarClear("gGameplayStatsEnabled");
|
CVarClear("gGameplayStats.Enabled");
|
||||||
LUS::RequestCvarSaveOnNextTick();
|
LUS::RequestCvarSaveOnNextTick();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -844,6 +844,7 @@ extern "C" void InitStatTracker() {
|
|||||||
LUS::AddWindow("Enhancements", "Gameplay Stats", DrawStatsTracker, CVarGetInteger("gGameplayStats.Enabled", 0));
|
LUS::AddWindow("Enhancements", "Gameplay Stats", DrawStatsTracker, CVarGetInteger("gGameplayStats.Enabled", 0));
|
||||||
SetupDisplayNames();
|
SetupDisplayNames();
|
||||||
SetupDisplayColors();
|
SetupDisplayColors();
|
||||||
|
|
||||||
SaveManager::Instance->AddLoadFunction("sohStats", 1, LoadStatsVersion1);
|
SaveManager::Instance->AddLoadFunction("sohStats", 1, LoadStatsVersion1);
|
||||||
// Add main section save, no parent
|
// Add main section save, no parent
|
||||||
SaveManager::Instance->AddSaveFunction("sohStats", 1, SaveStats, true, SECTION_PARENT_NONE);
|
SaveManager::Instance->AddSaveFunction("sohStats", 1, SaveStats, true, SECTION_PARENT_NONE);
|
||||||
@ -851,4 +852,4 @@ extern "C" void InitStatTracker() {
|
|||||||
SaveManager::Instance->AddSaveFunction("entrances", 1, SaveStats, false, SECTION_ID_STATS);
|
SaveManager::Instance->AddSaveFunction("entrances", 1, SaveStats, false, SECTION_ID_STATS);
|
||||||
SaveManager::Instance->AddSaveFunction("scenes", 1, SaveStats, false, SECTION_ID_STATS);
|
SaveManager::Instance->AddSaveFunction("scenes", 1, SaveStats, false, SECTION_ID_STATS);
|
||||||
SaveManager::Instance->AddInitFunction(InitStats);
|
SaveManager::Instance->AddInitFunction(InitStats);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user