diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-13 22:42:58 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-13 22:42:58 -0400 |
commit | 42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a (patch) | |
tree | 114361aa6c690468019b79c31b5d93685c810430 /Archipelago/client.gd | |
parent | a80fefd0e99f5c0e0322c8338bc2c8c37429c9d9 (diff) | |
download | lingo-archipelago-42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a.tar.gz lingo-archipelago-42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a.tar.bz2 lingo-archipelago-42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a.zip |
Handle Progressive Orange Tower
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 12 |
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 = "" | |||
5 | var ap_pass = "" | 5 | var ap_pass = "" |
6 | 6 | ||
7 | const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} | 7 | const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} |
8 | const orange_tower = ["Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh"] | ||
8 | 9 | ||
9 | var _client = WebSocketClient.new() | 10 | var _client = WebSocketClient.new() |
10 | var _last_state = WebSocketPeer.STATE_CLOSED | 11 | var _last_state = WebSocketPeer.STATE_CLOSED |
@@ -33,6 +34,7 @@ var _panel_ids_by_location = {} | |||
33 | var _map_loaded = false | 34 | var _map_loaded = false |
34 | var _held_items = [] | 35 | var _held_items = [] |
35 | var _held_locations = [] | 36 | var _held_locations = [] |
37 | var _tower_floors = 0 | ||
36 | 38 | ||
37 | signal client_connected | 39 | signal 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 | ||
255 | func doorIsVanilla(door): | 267 | func doorIsVanilla(door): |
256 | return !_mentioned_doors.has(door) | 268 | return !_mentioned_doors.has(door) |