From 14ef44e0d9233b651398c9b7c05d9133bd98be44 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 26 Apr 2023 22:28:05 -0400 Subject: Fixed handshake failure from too-large data packages The needed datapackages are requested one-by-one, now. --- Archipelago/client.gd | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Archipelago/client.gd') diff --git a/Archipelago/client.gd b/Archipelago/client.gd index d7e100a..f2cddb6 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -22,6 +22,7 @@ var _should_process = false var _initiated_disconnect = false var _datapackages = {} +var _pending_packages = [] var _item_id_to_name = {} # All games var _location_id_to_name = {} # All games var _item_name_to_id = {} # LINGO only @@ -159,7 +160,9 @@ func _on_data(): needed_games.append(game) if !needed_games.empty(): - requestDatapackages(needed_games) + _pending_packages = needed_games + var cur_needed = _pending_packages.pop_front() + requestDatapackages([cur_needed]) else: connectToRoom() @@ -167,8 +170,13 @@ func _on_data(): for game in message["data"]["games"].keys(): _datapackages[game] = message["data"]["games"][game] saveSettings() - processDatapackages() - connectToRoom() + + if !_pending_packages.empty(): + var cur_needed = _pending_packages.pop_front() + requestDatapackages([cur_needed]) + else: + processDatapackages() + connectToRoom() elif cmd == "Connected": _authenticated = true -- cgit 1.4.1