mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-06 04:04:53 +01:00
Achievements support & inventory customization.
Added achievements support. Achievements are saved like real steam, see your inventory directory.(like items, uses a .json, tool can be used to dump achievements from steam public api). You will need a public apikey. (See https://steamcommunity.com/dev) Reworked item support to split inventory items to defined items.
This commit is contained in:
parent
46f2199cd2
commit
21e08ed220
9 changed files with 365 additions and 302 deletions
|
|
@ -21,18 +21,21 @@
|
|||
#ifndef LOCAL_STORAGE_INCLUDE
|
||||
#define LOCAL_STORAGE_INCLUDE
|
||||
|
||||
#define SETTINGS_STORAGE_FOLDER "settings"
|
||||
#define REMOTE_STORAGE_FOLDER "remote"
|
||||
#define STATS_STORAGE_FOLDER "stats"
|
||||
#define USER_DATA_FOLDER "local"
|
||||
|
||||
#define GAME_SETTINGS_FOLDER "steam_settings"
|
||||
|
||||
#include <string>
|
||||
#include "../json/json.hpp"
|
||||
|
||||
#define MAX_FILENAME_LENGTH 300
|
||||
|
||||
class Local_Storage {
|
||||
public:
|
||||
static constexpr auto inventory_storage_folder = "inventory";
|
||||
static constexpr auto settings_storage_folder = "settings";
|
||||
static constexpr auto remote_storage_folder = "remote";
|
||||
static constexpr auto stats_storage_folder = "stats";
|
||||
static constexpr auto user_data_storage = "local";
|
||||
static constexpr auto game_settings_folder = "steam_settings";
|
||||
|
||||
private:
|
||||
std::string save_directory;
|
||||
std::string appid;
|
||||
public:
|
||||
|
|
@ -56,9 +59,13 @@ public:
|
|||
bool file_delete(std::string folder, std::string file);
|
||||
uint64_t file_timestamp(std::string folder, std::string file);
|
||||
std::string get_global_settings_path();
|
||||
std::string get_global_inventory_path();
|
||||
std::string get_path(std::string folder);
|
||||
|
||||
bool update_save_filenames(std::string folder);
|
||||
|
||||
bool load_inventory_file(nlohmann::json &json, std::string const&file);
|
||||
bool write_inventory_file(nlohmann::json const& json, std::string const&file);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue