diff options
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 74 |
1 files changed, 17 insertions, 57 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 2229916..853be2d 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -25,56 +25,15 @@ const color_items = [ | |||
25 | ] | 25 | ] |
26 | const progressive_items = { | 26 | const progressive_items = { |
27 | "Progressive Orange Tower": | 27 | "Progressive Orange Tower": |
28 | [ | 28 | ["Second Floor", "Third Floor", "Fourth Floor", "Fifth Floor", "Sixth Floor", "Seventh Floor"], |
29 | {"item": "Orange Tower - Second Floor", "display": "Second Floor"}, | ||
30 | {"item": "Orange Tower - Third Floor", "display": "Third Floor"}, | ||
31 | {"item": "Orange Tower - Fourth Floor", "display": "Fourth Floor"}, | ||
32 | {"item": "Orange Tower - Fifth Floor", "display": "Fifth Floor"}, | ||
33 | {"item": "Orange Tower - Sixth Floor", "display": "Sixth Floor"}, | ||
34 | {"item": "Orange Tower - Seventh Floor", "display": "Seventh Floor"}, | ||
35 | ], | ||
36 | "Progressive Art Gallery": | 29 | "Progressive Art Gallery": |
37 | [ | 30 | ["Second Floor", "Third Floor", "Fourth Floor", "Fifth Floor", "Exit"], |
38 | {"item": "Art Gallery - Second Floor", "display": "Second Floor"}, | 31 | "Progressive Hallway Room": ["First Door", "Second Door", "Third Door", "Fourth Door"], |
39 | {"item": "Art Gallery - Third Floor", "display": "Third Floor"}, | 32 | "Progressive Fearless": ["Second Floor", "Third Floor"], |
40 | {"item": "Art Gallery - Fourth Floor", "display": "Fourth Floor"}, | ||
41 | {"item": "Art Gallery - Fifth Floor", "display": "Fifth Floor"}, | ||
42 | {"item": "Art Gallery - Exit", "display": "Exit"}, | ||
43 | ], | ||
44 | "Progressive Hallway Room": | ||
45 | [ | ||
46 | {"item": "Hallway Room (1) - Exit", "display": "First Door"}, | ||
47 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, | ||
48 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, | ||
49 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, | ||
50 | ], | ||
51 | "Progressive Fearless": | ||
52 | [ | ||
53 | {"item": "The Fearless (First Floor) - Second Floor", "display": "Second Floor"}, | ||
54 | {"item": "The Fearless (Second Floor) - Third Floor", "display": "Third Floor"}, | ||
55 | ], | ||
56 | "Progressive Colorful": | 33 | "Progressive Colorful": |
57 | [ | 34 | ["White", "Black", "Red", "Yellow", "Blue", "Purple", "Orange", "Green", "Brown", "Gray"], |
58 | {"item": "The Colorful - White Door", "display": "White"}, | ||
59 | {"item": "The Colorful - Black Door", "display": "Black"}, | ||
60 | {"item": "The Colorful - Red Door", "display": "Red"}, | ||
61 | {"item": "The Colorful - Yellow Door", "display": "Yellow"}, | ||
62 | {"item": "The Colorful - Blue Door", "display": "Blue"}, | ||
63 | {"item": "The Colorful - Purple Door", "display": "Purple"}, | ||
64 | {"item": "The Colorful - Orange Door", "display": "Orange"}, | ||
65 | {"item": "The Colorful - Green Door", "display": "Green"}, | ||
66 | {"item": "The Colorful - Brown Door", "display": "Brown"}, | ||
67 | {"item": "The Colorful - Gray Door", "display": "Gray"}, | ||
68 | ], | ||
69 | "Progressive Pilgrimage": | 35 | "Progressive Pilgrimage": |
70 | [ | 36 | ["1 Sunwarp", "2 Sunwarp", "3 Sunwarp", "4 Sunwarp", "5 Sunwarp", "6 Sunwarp"] |
71 | {"item": "1 Sunwarp", "display": "1 Sunwarp"}, | ||
72 | {"item": "2 Sunwarp", "display": "2 Sunwarp"}, | ||
73 | {"item": "3 Sunwarp", "display": "3 Sunwarp"}, | ||
74 | {"item": "4 Sunwarp", "display": "4 Sunwarp"}, | ||
75 | {"item": "5 Sunwarp", "display": "5 Sunwarp"}, | ||
76 | {"item": "6 Sunwarp", "display": "6 Sunwarp"}, | ||
77 | ] | ||
78 | } | 37 | } |
79 | 38 | ||
80 | const kTHE_END = 0 | 39 | const kTHE_END = 0 |
@@ -741,15 +700,16 @@ func processItem(item, index, from, flags): | |||
741 | warpsNode.get_node(warp_id).unlock_warp() | 700 | warpsNode.get_node(warp_id).unlock_warp() |
742 | 701 | ||
743 | # Handle progressive items. | 702 | # Handle progressive items. |
744 | if item_name in progressive_items.keys(): | 703 | if int(item) in gamedata.items_by_progressive_id.keys(): |
745 | if not item_name in _progressive_progress: | 704 | if not int(item) in _progressive_progress: |
746 | _progressive_progress[item_name] = 0 | 705 | _progressive_progress[int(item)] = 0 |
747 | 706 | ||
748 | if _progressive_progress[item_name] < progressive_items[item_name].size(): | 707 | if _progressive_progress[int(item)] < gamedata.items_by_progressive_id[int(item)].size(): |
749 | var subitem_name = progressive_items[item_name][_progressive_progress[item_name]]["item"] | 708 | var subitems = gamedata.items_by_progressive_id[int(item)] |
750 | global._print(subitem_name) | 709 | var subitem_id = subitems[_progressive_progress[int(item)]] |
751 | processItem(_item_name_to_id[subitem_name], null, null, null) | 710 | global._print("Subitem: %d" % subitem_id) |
752 | _progressive_progress[item_name] += 1 | 711 | processItem(subitem_id, null, null, null) |
712 | _progressive_progress[int(item)] += 1 | ||
753 | 713 | ||
754 | if _color_shuffle and color_items.has(_item_id_to_name[item]): | 714 | if _color_shuffle and color_items.has(_item_id_to_name[item]): |
755 | var lcol = _item_id_to_name[item].to_lower() | 715 | var lcol = _item_id_to_name[item].to_lower() |
@@ -763,8 +723,8 @@ func processItem(item, index, from, flags): | |||
763 | saveLocaldata() | 723 | saveLocaldata() |
764 | 724 | ||
765 | if item_name in progressive_items: | 725 | if item_name in progressive_items: |
766 | var subitem = progressive_items[item_name][_progressive_progress[item_name] - 1] | 726 | var subitem = progressive_items[item_name][_progressive_progress[int(item)] - 1] |
767 | item_name += " (%s)" % subitem["display"] | 727 | item_name += " (%s)" % subitem |
768 | 728 | ||
769 | var player_name = "Unknown" | 729 | var player_name = "Unknown" |
770 | if _player_name_by_slot.has(from): | 730 | if _player_name_by_slot.has(from): |