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.gd16
1 files changed, 10 insertions, 6 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 5bd6f0a..88a6a8b 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -95,6 +95,7 @@ var _held_locations = []
95var _last_new_item = -1 95var _last_new_item = -1
96var _progressive_progress = {} 96var _progressive_progress = {}
97var _has_colors = ["white"] 97var _has_colors = ["white"]
98var _received_indexes = []
98 99
99signal could_not_connect 100signal could_not_connect
100signal connect_status 101signal connect_status
@@ -324,12 +325,6 @@ func _on_data():
324 global._print(message) 325 global._print(message)
325 326
326 elif cmd == "ReceivedItems": 327 elif cmd == "ReceivedItems":
327 if message["index"] == 0:
328 # We are being sent all of our items, so lets reset any progress
329 # on progressive items.
330 _progressive_progress.clear()
331 _held_items = []
332
333 var i = 0 328 var i = 0
334 for item in message["items"]: 329 for item in message["items"]:
335 if _map_loaded: 330 if _map_loaded:
@@ -555,6 +550,8 @@ func completedGoal():
555 550
556func mapFinishedLoading(): 551func mapFinishedLoading():
557 if !_map_loaded: 552 if !_map_loaded:
553 _received_indexes.clear()
554 _progressive_progress.clear()
558 _has_colors = ["white"] 555 _has_colors = ["white"]
559 emit_signal("evaluate_solvability") 556 emit_signal("evaluate_solvability")
560 557
@@ -569,6 +566,13 @@ func mapFinishedLoading():
569 566
570 567
571func processItem(item, index, from, flags): 568func processItem(item, index, from, flags):
569 if index != null:
570 if _received_indexes.has(index):
571 # Do not re-process items.
572 return
573
574 _received_indexes.append(index)
575
572 global._print(item) 576 global._print(item)
573 577
574 var stringified = String(item) 578 var stringified = String(item)