about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/ap_state.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 4a15db0..f245c2b 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -107,6 +107,7 @@ struct APState {
107 initialized = true; 107 initialized = true;
108 } 108 }
109 109
110 tracker_frame->SetStatusMessage("Connecting to Archipelago server....");
110 wxLogStatus("Connecting to Archipelago server (%s)...", server); 111 wxLogStatus("Connecting to Archipelago server (%s)...", server);
111 112
112 { 113 {
@@ -154,11 +155,12 @@ struct APState {
154 apclient->set_room_info_handler([this, player, password]() { 155 apclient->set_room_info_handler([this, player, password]() {
155 inventory.clear(); 156 inventory.clear();
156 157
157 wxLogStatus( 158 wxLogStatus("Connected to Archipelago server. Authenticating as %s %s",
159 player,
160 (password.empty() ? "without password"
161 : "with password " + password));
162 tracker_frame->SetStatusMessage(
158 "Connected to Archipelago server. Authenticating..."); 163 "Connected to Archipelago server. Authenticating...");
159 wxLogVerbose("Authenticating as %s %s", player,
160 (password.empty() ? "without password"
161 : "with password " + password));
162 164
163 apclient->ConnectSlot(player, password, ITEM_HANDLING, {"Tracker"}, 165 apclient->ConnectSlot(player, password, ITEM_HANDLING, {"Tracker"},
164 {AP_MAJOR, AP_MINOR, AP_REVISION}); 166 {AP_MAJOR, AP_MINOR, AP_REVISION});
@@ -175,11 +177,15 @@ struct APState {
175 }); 177 });
176 178
177 apclient->set_slot_disconnected_handler([this]() { 179 apclient->set_slot_disconnected_handler([this]() {
180 tracker_frame->SetStatusMessage(
181 "Disconnected from Archipelago. Attempting to reconnect...");
178 wxLogStatus( 182 wxLogStatus(
179 "Slot disconnected from Archipelago. Attempting to reconnect..."); 183 "Slot disconnected from Archipelago. Attempting to reconnect...");
180 }); 184 });
181 185
182 apclient->set_socket_disconnected_handler([this]() { 186 apclient->set_socket_disconnected_handler([this]() {
187 tracker_frame->SetStatusMessage(
188 "Disconnected from Archipelago. Attempting to reconnect...");
183 wxLogStatus( 189 wxLogStatus(
184 "Socket disconnected from Archipelago. Attempting to reconnect..."); 190 "Socket disconnected from Archipelago. Attempting to reconnect...");
185 }); 191 });
@@ -212,6 +218,7 @@ struct APState {
212 218
213 apclient->set_slot_connected_handler([this]( 219 apclient->set_slot_connected_handler([this](
214 const nlohmann::json& slot_data) { 220 const nlohmann::json& slot_data) {
221 tracker_frame->SetStatusMessage("Connected to Archipelago!");
215 wxLogStatus("Connected to Archipelago!"); 222 wxLogStatus("Connected to Archipelago!");
216 223
217 data_storage_prefix = 224 data_storage_prefix =
@@ -333,6 +340,7 @@ struct APState {
333 340
334 DestroyClient(); 341 DestroyClient();
335 342
343 tracker_frame->SetStatusMessage("Disconnected from Archipelago.");
336 wxLogStatus("Timeout while connecting to Archipelago server."); 344 wxLogStatus("Timeout while connecting to Archipelago server.");
337 wxMessageBox("Timeout while connecting to Archipelago server.", 345 wxMessageBox("Timeout while connecting to Archipelago server.",
338 "Connection failed", wxOK | wxICON_ERROR); 346 "Connection failed", wxOK | wxICON_ERROR);