From bb63a528f799b05877187d695f1e99410e8720c5 Mon Sep 17 00:00:00 2001 From: WALL OF JUSTICE <-> Date: Thu, 9 Jan 2025 12:24:46 +1100 Subject: [PATCH] * stop compendium reset after modded menu * add extra unlock write when receiving compendium stuff as client --- src/init_game.cpp | 7 +++++-- src/net.cpp | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/init_game.cpp b/src/init_game.cpp index 655ddb2c4..929d5eb21 100644 --- a/src/init_game.cpp +++ b/src/init_game.cpp @@ -106,8 +106,11 @@ void initGameDatafiles(bool moddedReload) CompendiumEntries.readMagicTranslationsFromFile(); Compendium_t::AchievementData_t::readContentsLang(); Compendium_t::Events_t::readEventsTranslations(); - Compendium_t::readUnlocksSaveData(); - Compendium_t::Events_t::loadItemsSaveData(); + if ( !moddedReload ) + { + Compendium_t::readUnlocksSaveData(); + Compendium_t::Events_t::loadItemsSaveData(); + } CompendiumEntries.readModelLimbsFromFile("monster"); CompendiumEntries.readModelLimbsFromFile("world"); CompendiumEntries.readModelLimbsFromFile("codex"); diff --git a/src/net.cpp b/src/net.cpp index 7ec1f06cf..44e9e9af3 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -5404,6 +5404,7 @@ static std::unordered_map clientPacketHandlers = { Compendium_t::Events_t::clientReceiveData.erase(clientSequence); Compendium_t::Events_t::writeItemsSaveData(); + Compendium_t::writeUnlocksSaveData(); // reply got packet strcpy((char*)net_packet->data, "CMPD");