diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-26 22:28:05 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-26 22:28:05 -0400 |
commit | 14ef44e0d9233b651398c9b7c05d9133bd98be44 (patch) | |
tree | d0ec449d89787d08ca9e091fc224d914c4b940bb /Archipelago/client.gd | |
parent | 1ccce2870c776db26ef41f6e550bfe92799e79e1 (diff) | |
download | lingo-archipelago-14ef44e0d9233b651398c9b7c05d9133bd98be44.tar.gz lingo-archipelago-14ef44e0d9233b651398c9b7c05d9133bd98be44.tar.bz2 lingo-archipelago-14ef44e0d9233b651398c9b7c05d9133bd98be44.zip |
Fixed handshake failure from too-large data packages
The needed datapackages are requested one-by-one, now.
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 14 |
1 files changed, 11 insertions, 3 deletions
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 | |||
22 | var _initiated_disconnect = false | 22 | var _initiated_disconnect = false |
23 | 23 | ||
24 | var _datapackages = {} | 24 | var _datapackages = {} |
25 | var _pending_packages = [] | ||
25 | var _item_id_to_name = {} # All games | 26 | var _item_id_to_name = {} # All games |
26 | var _location_id_to_name = {} # All games | 27 | var _location_id_to_name = {} # All games |
27 | var _item_name_to_id = {} # LINGO only | 28 | var _item_name_to_id = {} # LINGO only |
@@ -159,7 +160,9 @@ func _on_data(): | |||
159 | needed_games.append(game) | 160 | needed_games.append(game) |
160 | 161 | ||
161 | if !needed_games.empty(): | 162 | if !needed_games.empty(): |
162 | requestDatapackages(needed_games) | 163 | _pending_packages = needed_games |
164 | var cur_needed = _pending_packages.pop_front() | ||
165 | requestDatapackages([cur_needed]) | ||
163 | else: | 166 | else: |
164 | connectToRoom() | 167 | connectToRoom() |
165 | 168 | ||
@@ -167,8 +170,13 @@ func _on_data(): | |||
167 | for game in message["data"]["games"].keys(): | 170 | for game in message["data"]["games"].keys(): |
168 | _datapackages[game] = message["data"]["games"][game] | 171 | _datapackages[game] = message["data"]["games"][game] |
169 | saveSettings() | 172 | saveSettings() |
170 | processDatapackages() | 173 | |
171 | connectToRoom() | 174 | if !_pending_packages.empty(): |
175 | var cur_needed = _pending_packages.pop_front() | ||
176 | requestDatapackages([cur_needed]) | ||
177 | else: | ||
178 | processDatapackages() | ||
179 | connectToRoom() | ||
172 | 180 | ||
173 | elif cmd == "Connected": | 181 | elif cmd == "Connected": |
174 | _authenticated = true | 182 | _authenticated = true |