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

@ -124,7 +124,7 @@ void read_items_db()
void read_inventory_db()
{
// If we havn't got any inventory
if (!local_storage->load_inventory_file(user_items, items_user_file))
if (!local_storage->load_json_file("inventory", items_user_file, user_items))
{
// Try to load a default one
std::string items_db_path = Local_Storage::get_game_settings_path() + items_default_file;