Stop creating timesplits file on init, and gitignore it (#5933)

This commit is contained in:
Garrett Cox 2025-11-08 15:51:24 -06:00 committed by GitHub
parent 8073f96856
commit 5249cd89df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 11 deletions

1
.gitignore vendored
View File

@ -417,6 +417,7 @@ tags
shipofharkinian.ini
shipofharkinian.json
imgui.ini
timesplitdata.json
# Switch Stuff

View File

@ -948,16 +948,6 @@ void TimeSplitsDrawManageList() {
ImGui::EndChild();
}
void InitializeSplitDataFile() {
std::string filename = Ship::Context::GetPathRelativeToAppDirectory("timesplitdata.json");
if (!std::filesystem::exists(filename)) {
json j;
std::ofstream file(filename);
file << j.dump(4);
file.close();
}
}
void TimeSplitWindow::Draw() {
ImGui::PushStyleColor(ImGuiCol_WindowBg, windowColor);
GuiWindow::Draw();
@ -997,7 +987,6 @@ void TimeSplitWindow::InitElement() {
ImVec4(1, 1, 1, 1));
Color_RGBA8 defaultColour = { 0, 0, 0, 255 };
windowColor = VecFromRGBA8(CVarGetColor(CVAR_ENHANCEMENT("TimeSplits.WindowColor.Value"), defaultColour));
InitializeSplitDataFile();
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnTimestamp>([](u8 item) {
if (item != ITEM_SKULL_TOKEN) {