diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-28 11:21:08 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-28 11:21:08 -0400 |
commit | 0ef9d820818c6768060eca0a692c87d29bea8f95 (patch) | |
tree | b050fa008263e0f38c657b43e4d41cefd7de5d9e /Archipelago/client.gd | |
parent | 1969ba557fcbf352f4ec546fd1c9467762291f08 (diff) | |
download | lingo-archipelago-0ef9d820818c6768060eca0a692c87d29bea8f95.tar.gz lingo-archipelago-0ef9d820818c6768060eca0a692c87d29bea8f95.tar.bz2 lingo-archipelago-0ef9d820818c6768060eca0a692c87d29bea8f95.zip |
Progressive Art Gallery and Hallway Room
Also, Art Gallery is now changed a little in doors mode. The backroom is always available so that you have access to the previous floors at all times. The paintings in the backroom do not appear until you have the floor unlocked. ORDER is also blocked off until you get the fifth floor.
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 46b9ff0..be65eb2 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -6,10 +6,35 @@ var ap_pass = "" | |||
6 | 6 | ||
7 | const my_version = "0.2.3" | 7 | const my_version = "0.2.3" |
8 | const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} | 8 | const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} |
9 | const orange_tower = ["Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh"] | ||
10 | const color_items = [ | 9 | const color_items = [ |
11 | "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" | 10 | "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" |
12 | ] | 11 | ] |
12 | const progressive_items = { | ||
13 | "Progressive Orange Tower": | ||
14 | [ | ||
15 | {"item": "Orange Tower - Second Floor", "display": "Second Floor"}, | ||
16 | {"item": "Orange Tower - Third Floor", "display": "Third Floor"}, | ||
17 | {"item": "Orange Tower - Fourth Floor", "display": "Fourth Floor"}, | ||
18 | {"item": "Orange Tower - Fifth Floor", "display": "Fifth Floor"}, | ||
19 | {"item": "Orange Tower - Sixth Floor", "display": "Sixth Floor"}, | ||
20 | {"item": "Orange Tower - Seventh Floor", "display": "Seventh Floor"}, | ||
21 | ], | ||
22 | "Progressive Art Gallery": | ||
23 | [ | ||
24 | {"item": "Art Gallery - Second Floor", "display": "Second Floor"}, | ||
25 | {"item": "Art Gallery - Third Floor", "display": "Third Floor"}, | ||
26 | {"item": "Art Gallery - Fourth Floor", "display": "Fourth Floor"}, | ||
27 | {"item": "Art Gallery - Fifth Floor", "display": "Fifth Floor"}, | ||
28 | {"item": "Art Gallery - Exit", "display": "Exit"}, | ||
29 | ], | ||
30 | "Progressive Hallway Room": | ||
31 | [ | ||
32 | {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"}, | ||
33 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, | ||
34 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, | ||
35 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, | ||
36 | ] | ||
37 | } | ||
13 | 38 | ||
14 | const kTHE_END = 0 | 39 | const kTHE_END = 0 |
15 | const kTHE_MASTER = 1 | 40 | const kTHE_MASTER = 1 |
@@ -61,7 +86,7 @@ var _map_loaded = false | |||
61 | var _held_items = [] | 86 | var _held_items = [] |
62 | var _held_locations = [] | 87 | var _held_locations = [] |
63 | var _last_new_item = -1 | 88 | var _last_new_item = -1 |
64 | var _tower_floors = 0 | 89 | var _progressive_progress = {} |
65 | var _has_colors = ["white"] | 90 | var _has_colors = ["white"] |
66 | 91 | ||
67 | signal could_not_connect | 92 | signal could_not_connect |
@@ -287,7 +312,7 @@ func _on_data(): | |||
287 | if message["index"] == 0: | 312 | if message["index"] == 0: |
288 | # We are being sent all of our items, so lets reset any progress | 313 | # We are being sent all of our items, so lets reset any progress |
289 | # on progressive items. | 314 | # on progressive items. |
290 | _tower_floors = 0 | 315 | _progressive_progress.clear() |
291 | _held_items = [] | 316 | _held_items = [] |
292 | 317 | ||
293 | var i = 0 | 318 | var i = 0 |
@@ -526,12 +551,20 @@ func processItem(item, index, from, flags): | |||
526 | if painting_node != null: | 551 | if painting_node != null: |
527 | painting_node.get_node("Script").movePainting() | 552 | painting_node.get_node("Script").movePainting() |
528 | 553 | ||
529 | # Handle progressively opening up the tower. | 554 | # Handle progressive items. |
530 | if _item_name_to_id["Progressive Orange Tower"] == item and _tower_floors < orange_tower.size(): | 555 | var item_name = "Unknown" |
531 | var subitem_name = "Orange Tower - %s Floor" % orange_tower[_tower_floors] | 556 | if _item_id_to_name.has(item): |
532 | global._print(subitem_name) | 557 | item_name = _item_id_to_name[item] |
533 | processItem(_item_name_to_id[subitem_name], null, null, null) | 558 | |
534 | _tower_floors += 1 | 559 | if item_name in progressive_items.keys(): |
560 | if not item_name in _progressive_progress: | ||
561 | _progressive_progress[item_name] = 0 | ||
562 | |||
563 | if _progressive_progress[item_name] < progressive_items[item_name].size(): | ||
564 | var subitem_name = progressive_items[item_name][_progressive_progress[item_name]]["item"] | ||
565 | global._print(subitem_name) | ||
566 | processItem(_item_name_to_id[subitem_name], null, null, null) | ||
567 | _progressive_progress[item_name] += 1 | ||
535 | 568 | ||
536 | if _color_shuffle and color_items.has(_item_id_to_name[item]): | 569 | if _color_shuffle and color_items.has(_item_id_to_name[item]): |
537 | var lcol = _item_id_to_name[item].to_lower() | 570 | var lcol = _item_id_to_name[item].to_lower() |
@@ -544,12 +577,9 @@ func processItem(item, index, from, flags): | |||
544 | _last_new_item = index | 577 | _last_new_item = index |
545 | saveLocaldata() | 578 | saveLocaldata() |
546 | 579 | ||
547 | var item_name = "Unknown" | 580 | if item_name in progressive_items: |
548 | if _item_id_to_name.has(item): | 581 | var subitem = progressive_items[item_name][_progressive_progress[item_name] - 1] |
549 | item_name = _item_id_to_name[item] | 582 | item_name += " (%s)" % subitem["display"] |
550 | |||
551 | if item_name == "Progressive Orange Tower": | ||
552 | item_name = "Progressive Orange Tower (%s Floor)" % orange_tower[_tower_floors - 1] | ||
553 | 583 | ||
554 | var player_name = "Unknown" | 584 | var player_name = "Unknown" |
555 | if _player_name_by_slot.has(from): | 585 | if _player_name_by_slot.has(from): |