about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-07-24 09:40:22 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-07-24 09:40:22 -0400
commitc443acfd0b25b3e4f3446f795777b8dd18b00e2b (patch)
tree86340c00f1723310cbab02f0ebc496b25a780278 /src/ap_state.cpp
parent378766bcee3cad04256ada937f96b232aba85cf3 (diff)
parentab5206255603f6401d9c216ffce26607da16ad33 (diff)
downloadlingo-ap-tracker-c443acfd0b25b3e4f3446f795777b8dd18b00e2b.tar.gz
lingo-ap-tracker-c443acfd0b25b3e4f3446f795777b8dd18b00e2b.tar.bz2
lingo-ap-tracker-c443acfd0b25b3e4f3446f795777b8dd18b00e2b.zip
Merge branch 'main' into panels
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r--src/ap_state.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index d501e81..fbd8d12 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;
@@ -132,6 +134,7 @@ struct APState {
132 cert_store); 134 cert_store);
133 } 135 }
134 136
137 save_name.clear();
135 inventory.clear(); 138 inventory.clear();
136 checked_locations.clear(); 139 checked_locations.clear();
137 data_storage.clear(); 140 data_storage.clear();
@@ -230,6 +233,8 @@ struct APState {
230 fmt::format("Connected to Archipelago! ({}@{})", player, server)); 233 fmt::format("Connected to Archipelago! ({}@{})", player, server));
231 TrackerLog("Connected to Archipelago!"); 234 TrackerLog("Connected to Archipelago!");
232 235
236 save_name = fmt::format("zzAP_{}_{}.save", apclient->get_seed(),
237 apclient->get_player_number());
233 data_storage_prefix = 238 data_storage_prefix =
234 fmt::format("Lingo_{}_", apclient->get_player_number()); 239 fmt::format("Lingo_{}_", apclient->get_player_number());
235 door_shuffle_mode = slot_data["shuffle_doors"].get<DoorShuffleMode>(); 240 door_shuffle_mode = slot_data["shuffle_doors"].get<DoorShuffleMode>();
@@ -522,6 +527,8 @@ void AP_Connect(std::string server, std::string player, std::string password) {
522 GetState().Connect(server, player, password); 527 GetState().Connect(server, player, password);
523} 528}
524 529
530std::string AP_GetSaveName() { return GetState().save_name; }
531
525bool AP_HasCheckedGameLocation(int location_id) { 532bool AP_HasCheckedGameLocation(int location_id) {
526 return GetState().HasCheckedGameLocation(location_id); 533 return GetState().HasCheckedGameLocation(location_id);
527} 534}