Rework inventory loading

More generic json loading allows to load a json from a specified folder rather than the "inventory" directory.
Also changed achievements location to <appid> root diectory
This commit is contained in:
Nemirtingas 2019-10-13 12:26:22 +02:00
parent f15b2b0458
commit 8c45ab2003
4 changed files with 26 additions and 15 deletions

View file

@ -93,7 +93,7 @@ void load_achievements_db()
void load_achievements()
{
local_storage->load_inventory_file(user_achievements, achievements_user_file);
local_storage->load_json_file("", achievements_user_file, user_achievements);
}
public:
@ -319,7 +319,7 @@ bool StoreStats()
PRINT_DEBUG("StoreStats\n");
std::lock_guard<std::recursive_mutex> lock(global_mutex);
local_storage->write_inventory_file(user_achievements, achievements_user_file);
local_storage->write_json_file("", achievements_user_file, user_achievements);
UserStatsStored_t data;
data.m_nGameID = settings->get_local_game_id().ToUint64();