diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-07-19 03:51:23 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-07-19 03:51:23 -0400 |
commit | 8c5b719469bc61e33a451d9b3aeb66c7b0a6d68e (patch) | |
tree | 1f452dc8a601630a1fd50f4ee3f8ea25aed7b315 /src/ap_state.cpp | |
parent | b80e1b888a7203312119e5bfad9e26c2c17d9b9f (diff) | |
download | lingo-ap-tracker-8c5b719469bc61e33a451d9b3aeb66c7b0a6d68e.tar.gz lingo-ap-tracker-8c5b719469bc61e33a451d9b3aeb66c7b0a6d68e.tar.bz2 lingo-ap-tracker-8c5b719469bc61e33a451d9b3aeb66c7b0a6d68e.zip |
Added savedata analyzer
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r-- | src/ap_state.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index ebc5fc9..f8d4ee0 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp | |||
@@ -52,6 +52,8 @@ struct APState { | |||
52 | std::list<std::string> tracked_data_storage_keys; | 52 | std::list<std::string> tracked_data_storage_keys; |
53 | std::string victory_data_storage_key; | 53 | std::string victory_data_storage_key; |
54 | 54 | ||
55 | std::string save_name; | ||
56 | |||
55 | std::map<int64_t, int> inventory; | 57 | std::map<int64_t, int> inventory; |
56 | std::set<int64_t> checked_locations; | 58 | std::set<int64_t> checked_locations; |
57 | std::map<std::string, std::any> data_storage; | 59 | std::map<std::string, std::any> data_storage; |
@@ -131,6 +133,7 @@ struct APState { | |||
131 | cert_store); | 133 | cert_store); |
132 | } | 134 | } |
133 | 135 | ||
136 | save_name.clear(); | ||
134 | inventory.clear(); | 137 | inventory.clear(); |
135 | checked_locations.clear(); | 138 | checked_locations.clear(); |
136 | data_storage.clear(); | 139 | data_storage.clear(); |
@@ -228,6 +231,8 @@ struct APState { | |||
228 | fmt::format("Connected to Archipelago! ({}@{})", player, server)); | 231 | fmt::format("Connected to Archipelago! ({}@{})", player, server)); |
229 | TrackerLog("Connected to Archipelago!"); | 232 | TrackerLog("Connected to Archipelago!"); |
230 | 233 | ||
234 | save_name = fmt::format("zzAP_{}_{}.save", apclient->get_seed(), | ||
235 | apclient->get_player_number()); | ||
231 | data_storage_prefix = | 236 | data_storage_prefix = |
232 | fmt::format("Lingo_{}_", apclient->get_player_number()); | 237 | fmt::format("Lingo_{}_", apclient->get_player_number()); |
233 | door_shuffle_mode = slot_data["shuffle_doors"].get<DoorShuffleMode>(); | 238 | door_shuffle_mode = slot_data["shuffle_doors"].get<DoorShuffleMode>(); |
@@ -509,6 +514,8 @@ void AP_Connect(std::string server, std::string player, std::string password) { | |||
509 | GetState().Connect(server, player, password); | 514 | GetState().Connect(server, player, password); |
510 | } | 515 | } |
511 | 516 | ||
517 | std::string AP_GetSaveName() { return GetState().save_name; } | ||
518 | |||
512 | bool AP_HasCheckedGameLocation(int location_id) { | 519 | bool AP_HasCheckedGameLocation(int location_id) { |
513 | return GetState().HasCheckedGameLocation(location_id); | 520 | return GetState().HasCheckedGameLocation(location_id); |
514 | } | 521 | } |