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.gd14
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
22var _initiated_disconnect = false 22var _initiated_disconnect = false
23 23
24var _datapackages = {} 24var _datapackages = {}
25var _pending_packages = []
25var _item_id_to_name = {} # All games 26var _item_id_to_name = {} # All games
26var _location_id_to_name = {} # All games 27var _location_id_to_name = {} # All games
27var _item_name_to_id = {} # LINGO only 28var _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