diff options
Diffstat (limited to 'client/Archipelago/manager.gd')
-rw-r--r-- | client/Archipelago/manager.gd | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/client/Archipelago/manager.gd b/client/Archipelago/manager.gd index 60b447a..f83d0cc 100644 --- a/client/Archipelago/manager.gd +++ b/client/Archipelago/manager.gd | |||
@@ -16,6 +16,8 @@ var client | |||
16 | var _localdata_file = "" | 16 | var _localdata_file = "" |
17 | var _received_indexes = [] | 17 | var _received_indexes = [] |
18 | var _last_new_item = -1 | 18 | var _last_new_item = -1 |
19 | var _batch_locations = false | ||
20 | var _held_locations = [] | ||
19 | 21 | ||
20 | signal could_not_connect | 22 | signal could_not_connect |
21 | signal connect_status | 23 | signal connect_status |
@@ -286,8 +288,21 @@ func _client_connected(): | |||
286 | emit_signal("ap_connected") | 288 | emit_signal("ap_connected") |
287 | 289 | ||
288 | 290 | ||
291 | func start_batching_locations(): | ||
292 | _batch_locations = true | ||
293 | |||
294 | |||
289 | func send_location(loc_id): | 295 | func send_location(loc_id): |
290 | client.sendLocation(loc_id) | 296 | if _batch_locations: |
297 | _held_locations.append(loc_id) | ||
298 | else: | ||
299 | client.sendLocation(loc_id) | ||
300 | |||
301 | |||
302 | func stop_batching_locations(): | ||
303 | _batch_locations = false | ||
304 | client.sendLocations(_held_locations) | ||
305 | _held_locations.clear() | ||
291 | 306 | ||
292 | 307 | ||
293 | func colorForItemType(flags): | 308 | func colorForItemType(flags): |