summary refs log tree commit diff stats
path: root/client/Archipelago/manager.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/Archipelago/manager.gd')
-rw-r--r--client/Archipelago/manager.gd17
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
16var _localdata_file = "" 16var _localdata_file = ""
17var _received_indexes = [] 17var _received_indexes = []
18var _last_new_item = -1 18var _last_new_item = -1
19var _batch_locations = false
20var _held_locations = []
19 21
20signal could_not_connect 22signal could_not_connect
21signal connect_status 23signal connect_status
@@ -286,8 +288,21 @@ func _client_connected():
286 emit_signal("ap_connected") 288 emit_signal("ap_connected")
287 289
288 290
291func start_batching_locations():
292 _batch_locations = true
293
294
289func send_location(loc_id): 295func 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
302func stop_batching_locations():
303 _batch_locations = false
304 client.sendLocations(_held_locations)
305 _held_locations.clear()
291 306
292 307
293func colorForItemType(flags): 308func colorForItemType(flags):