diff options
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 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 | ||
530 | std::string AP_GetSaveName() { return GetState().save_name; } | ||
531 | |||
525 | bool AP_HasCheckedGameLocation(int location_id) { | 532 | bool AP_HasCheckedGameLocation(int location_id) { |
526 | return GetState().HasCheckedGameLocation(location_id); | 533 | return GetState().HasCheckedGameLocation(location_id); |
527 | } | 534 | } |