about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-13 22:42:58 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-13 22:42:58 -0400
commit42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a (patch)
tree114361aa6c690468019b79c31b5d93685c810430
parenta80fefd0e99f5c0e0322c8338bc2c8c37429c9d9 (diff)
downloadlingo-archipelago-42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a.tar.gz
lingo-archipelago-42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a.tar.bz2
lingo-archipelago-42e1da049f6c3e84f9e6a8cfec29ee93c0d8401a.zip
Handle Progressive Orange Tower
-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)