about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
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 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
517std::string AP_GetSaveName() { return GetState().save_name; }
518
512bool AP_HasCheckedGameLocation(int location_id) { 519bool AP_HasCheckedGameLocation(int location_id) {
513 return GetState().HasCheckedGameLocation(location_id); 520 return GetState().HasCheckedGameLocation(location_id);
514} 521}