about summary refs log tree commit diff stats
path: root/Archipelago/load.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-20 19:58:46 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-20 19:58:46 -0400
commitcc45280174e9c52eb83d85ae9fb06149dfb17f66 (patch)
treea43e3df6c715d4d600af3b8827b78c2a8d9ff9c2 /Archipelago/load.gd
parent6abbf98ea15d80a0870d4b14fa5707a7992ab485 (diff)
downloadlingo-archipelago-cc45280174e9c52eb83d85ae9fb06149dfb17f66.tar.gz
lingo-archipelago-cc45280174e9c52eb83d85ae9fb06149dfb17f66.tar.bz2
lingo-archipelago-cc45280174e9c52eb83d85ae9fb06149dfb17f66.zip
Show error message if failure to connect
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r--Archipelago/load.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 9632d61..a83d055 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -205,6 +205,9 @@ func _load():
205 messages.set_name("AP_Messages") 205 messages.set_name("AP_Messages")
206 self.add_child(messages) 206 self.add_child(messages)
207 207
208 # Hook up the scene to be able to handle connection failures.
209 apclient.connect("could_not_connect", self, "archipelago_disconnected")
210
208 # Proceed with the rest of the load. 211 # Proceed with the rest of the load.
209 global._print("Hooked Load End") 212 global._print("Hooked Load End")
210 ._load() 213 ._load()
@@ -256,3 +259,8 @@ func instantiate_painting(name, scene):
256 new_painting.add_child(mps_inst) 259 new_painting.add_child(mps_inst)
257 old_painting.queue_free() 260 old_painting.queue_free()
258 return mps_inst 261 return mps_inst
262
263
264func archipelago_disconnected(reason):
265 var messages_node = self.get_node("AP_Messages")
266 messages_node.show_message(reason)