Added logic to reset coins at startup

This commit is contained in:
dando92
2025-03-30 09:51:47 -07:00
committed by teejusb
parent d6636c235b
commit 2dc61769fc
4 changed files with 10 additions and 0 deletions
+7
View File
@@ -18,6 +18,13 @@ static const RString COINS_DAT = "Save/Coins.xml";
Bookkeeper::Bookkeeper()
{
// GameState resets the coin count, but once the Bookkeeper is initialized, the coin count is overwritten by the ReadFromDisk function.
// Resetting the CoinsFile before reloading allows the game to start without credits.
if (PREFSMAN->m_bResetCoinsAtStartup)
{
WriteCoinsFile(0);
}
ClearAll();
ReadFromDisk();
}