From 448a99ca23419eb59b7c89f86805d3bc5c15b705 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 13 Jun 2021 17:24:16 -0700 Subject: [PATCH] Save showtrinkets to custom level quicksaves Since custom levels have gained the functionality to show trinkets on the minimap, it's nice to just save the showtrinkets variable directly to the save file, without having to make level makers handle it themselves. --- desktop_version/src/Game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 572fb019..eab2e396 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -5198,6 +5198,10 @@ void Game::customloadquick(std::string savfile) { disabletemporaryaudiopause = help.Int(pText); } + else if (SDL_strcmp(pKey, "showtrinkets") == 0) + { + map.showtrinkets = help.Int(pText); + } } @@ -5681,6 +5685,8 @@ bool Game::customsavequick(std::string savfile) xml::update_tag(msgs, "disabletemporaryaudiopause", (int) disabletemporaryaudiopause); + xml::update_tag(msgs, "showtrinkets", (int) map.showtrinkets); + std::string summary = savearea + ", " + timestring(); xml::update_tag(msgs, "summary", summary.c_str());