about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd12
1 files changed, 12 insertions, 0 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index bdd3905..2dcd375 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -5,6 +5,7 @@ var ap_user = ""
5var ap_pass = "" 5var ap_pass = ""
6 6
7const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} 7const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"}
8const orange_tower = ["Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh"]
8 9
9var _client = WebSocketClient.new() 10var _client = WebSocketClient.new()
10var _last_state = WebSocketPeer.STATE_CLOSED 11var _last_state = WebSocketPeer.STATE_CLOSED
@@ -33,6 +34,7 @@ var _panel_ids_by_location = {}
33var _map_loaded = false 34var _map_loaded = false
34var _held_items = [] 35var _held_items = []
35var _held_locations = [] 36var _held_locations = []
37var _tower_floors = 0
36 38
37signal client_connected 39signal client_connected
38 40
@@ -142,6 +144,11 @@ func _on_data():
142 global._print(message) 144 global._print(message)
143 145
144 elif cmd == "ReceivedItems": 146 elif cmd == "ReceivedItems":
147 if message["index"] == 0:
148 # We are being sent all of our items, so lets reset any progress
149 # on progressive items.
150 _tower_floors = 0
151
145 for item in message["items"]: 152 for item in message["items"]:
146 if _map_loaded: 153 if _map_loaded:
147 processItem(item["item"]) 154 processItem(item["item"])
@@ -251,6 +258,11 @@ func processItem(item):
251 for painting_id in _painting_ids_by_item[stringified]: 258 for painting_id in _painting_ids_by_item[stringified]:
252 paintingsNode.get_node(painting_id).movePainting() 259 paintingsNode.get_node(painting_id).movePainting()
253 260
261 # Handle progressively opening up the tower.
262 if _item_name_to_id["Progressive Orange Tower"] == item and _tower_floors < orange_tower.size():
263 processItem(_item_name_to_id["Orange Tower - %s Floor" % orange_tower[_tower_floors]])
264 _tower_floors += 1
265
254 266
255func doorIsVanilla(door): 267func doorIsVanilla(door):
256 return !_mentioned_doors.has(door) 268 return !_mentioned_doors.has(door)