about summary refs log tree commit diff stats
path: root/Archipelago/client.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r--Archipelago/client.gd13
1 files changed, 12 insertions, 1 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index a6a78e2..bb6d0a2 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -124,6 +124,11 @@ func _connected(_proto = ""):
124 global._print("Connected!") 124 global._print("Connected!")
125 125
126 126
127func disconnect_from_ap():
128 _initiated_disconnect = true
129 _client.disconnect_from_host()
130
131
127func _on_data(): 132func _on_data():
128 var packet = _client.get_peer(1).get_packet() 133 var packet = _client.get_peer(1).get_packet()
129 global._print("Got data from server: " + packet.get_string_from_utf8()) 134 global._print("Got data from server: " + packet.get_string_from_utf8())
@@ -388,7 +393,13 @@ func connectToServer():
388 var url = "ws://" + ap_server 393 var url = "ws://" + ap_server
389 var err = _client.connect_to_url(url) 394 var err = _client.connect_to_url(url)
390 if err != OK: 395 if err != OK:
391 emit_signal("could_not_connect", "Could not connect to Archipelago. Error code: %d." % err) 396 emit_signal(
397 "could_not_connect",
398 (
399 "Could not connect to Archipelago. Check that your server and port are correct. See the error log for more information. Error code: %d."
400 % err
401 )
402 )
392 global._print("Could not connect to AP: " + err) 403 global._print("Could not connect to AP: " + err)
393 return 404 return
394 _should_process = true 405 _should_process = true