diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-04-18 17:42:35 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-04-18 17:42:35 -0400 |
commit | 139ecb09dcb49177d1fa39baaf8e378e3009fc76 (patch) | |
tree | 96aa935f8b1d88467269b00a9fadb5a9aadea278 /Archipelago/client.gd | |
parent | 6aad55fa66eb9caa668bb09289391e6b39eee7da (diff) | |
download | lingo-archipelago-139ecb09dcb49177d1fa39baaf8e378e3009fc76.tar.gz lingo-archipelago-139ecb09dcb49177d1fa39baaf8e378e3009fc76.tar.bz2 lingo-archipelago-139ecb09dcb49177d1fa39baaf8e378e3009fc76.zip |
Reapply "Added support for warp items (including sunwarps)"
This reverts commit 17572f8cd5945536eccffbbe832517d75993c03f.
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 8abc42c..d93b2ed 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -64,6 +64,15 @@ const progressive_items = { | |||
64 | {"item": "The Colorful - Green Door", "display": "Green"}, | 64 | {"item": "The Colorful - Green Door", "display": "Green"}, |
65 | {"item": "The Colorful - Brown Door", "display": "Brown"}, | 65 | {"item": "The Colorful - Brown Door", "display": "Brown"}, |
66 | {"item": "The Colorful - Gray Door", "display": "Gray"}, | 66 | {"item": "The Colorful - Gray Door", "display": "Gray"}, |
67 | ], | ||
68 | "Progressive Pilgrimage": | ||
69 | [ | ||
70 | {"item": "Hub Room - 1 Sunwarp", "display": "1 Sunwarp"}, | ||
71 | {"item": "Orange Tower Fourth Floor - 2 Sunwarp", "display": "2 Sunwarp"}, | ||
72 | {"item": "Orange Tower Third Floor - 3 Sunwarp", "display": "3 Sunwarp"}, | ||
73 | {"item": "Orange Tower First Floor - 4 Sunwarp", "display": "4 Sunwarp"}, | ||
74 | {"item": "Orange Tower Fourth Floor - 5 Sunwarp", "display": "5 Sunwarp"}, | ||
75 | {"item": "Outside The Agreeable - 6 Sunwarp", "display": "6 Sunwarp"}, | ||
67 | ] | 76 | ] |
68 | } | 77 | } |
69 | 78 | ||
@@ -82,6 +91,11 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0 | |||
82 | const kCLASSIFICATION_REMOTE_REDUCED = 1 | 91 | const kCLASSIFICATION_REMOTE_REDUCED = 1 |
83 | const kCLASSIFICATION_REMOTE_INSANITY = 2 | 92 | const kCLASSIFICATION_REMOTE_INSANITY = 2 |
84 | 93 | ||
94 | const kSUNWARP_ACCESS_NORMAL = 0 | ||
95 | const kSUNWARP_ACCESS_DISABLED = 1 | ||
96 | const kSUNWARP_ACCESS_UNLOCK = 2 | ||
97 | const kSUNWARP_ACCESS_PROGRESSIVE = 3 | ||
98 | |||
85 | var _client = WebSocketClient.new() | 99 | var _client = WebSocketClient.new() |
86 | var _should_process = false | 100 | var _should_process = false |
87 | var _initiated_disconnect = false | 101 | var _initiated_disconnect = false |
@@ -114,6 +128,7 @@ var _door_shuffle = false | |||
114 | var _color_shuffle = false | 128 | var _color_shuffle = false |
115 | var _panel_shuffle = 0 # none, rearrange | 129 | var _panel_shuffle = 0 # none, rearrange |
116 | var _painting_shuffle = false | 130 | var _painting_shuffle = false |
131 | var _sunwarp_access = 0 # normal, disabled, unlock, progressive | ||
117 | var _mastery_achievements = 21 | 132 | var _mastery_achievements = 21 |
118 | var _level_2_requirement = 223 | 133 | var _level_2_requirement = 223 |
119 | var _location_classification_bit = 0 | 134 | var _location_classification_bit = 0 |
@@ -288,6 +303,8 @@ func _on_data(): | |||
288 | _painting_shuffle = _slot_data["shuffle_paintings"] | 303 | _painting_shuffle = _slot_data["shuffle_paintings"] |
289 | if _slot_data.has("shuffle_panels"): | 304 | if _slot_data.has("shuffle_panels"): |
290 | _panel_shuffle = _slot_data["shuffle_panels"] | 305 | _panel_shuffle = _slot_data["shuffle_panels"] |
306 | if _slot_data.has("sunwarp_access"): | ||
307 | _sunwarp_access = _slot_data["sunwarp_access"] | ||
291 | if _slot_data.has("seed"): | 308 | if _slot_data.has("seed"): |
292 | _slot_seed = _slot_data["seed"] | 309 | _slot_seed = _slot_data["seed"] |
293 | if _slot_data.has("painting_entrance_to_exit"): | 310 | if _slot_data.has("painting_entrance_to_exit"): |
@@ -687,6 +704,11 @@ func processItem(item, index, from, flags): | |||
687 | painting_node = fake_parent_node.get_node_or_null(painting_id) | 704 | painting_node = fake_parent_node.get_node_or_null(painting_id) |
688 | if painting_node != null: | 705 | if painting_node != null: |
689 | painting_node.get_node("Script").movePainting() | 706 | painting_node.get_node("Script").movePainting() |
707 | |||
708 | if gamedata.warp_ids_by_item_id.has(int(item)): | ||
709 | var warpsNode = get_tree().get_root().get_node("Spatial/Warps") | ||
710 | for warp_id in gamedata.warp_ids_by_item_id[int(item)]: | ||
711 | warpsNode.get_node(warp_id).unlock_warp() | ||
690 | 712 | ||
691 | # Handle progressive items. | 713 | # Handle progressive items. |
692 | if item_name in progressive_items.keys(): | 714 | if item_name in progressive_items.keys(): |
@@ -748,6 +770,10 @@ func paintingIsVanilla(painting): | |||
748 | return !$Gamedata.mentioned_paintings.has(painting) | 770 | return !$Gamedata.mentioned_paintings.has(painting) |
749 | 771 | ||
750 | 772 | ||
773 | func warpIsVanilla(warp): | ||
774 | return !$Gamedata.mentioned_warps.has(warp) | ||
775 | |||
776 | |||
751 | func evaluateSolvability(): | 777 | func evaluateSolvability(): |
752 | emit_signal("evaluate_solvability") | 778 | emit_signal("evaluate_solvability") |
753 | 779 | ||