diff options
Diffstat (limited to 'Archipelago')
-rw-r--r-- | Archipelago/client.gd | 26 | ||||
-rw-r--r-- | Archipelago/settings_screen.gd | 1 | ||||
-rw-r--r-- | Archipelago/teleport.gd | 24 |
3 files changed, 51 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 | ||
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 453e3bf..dce9b70 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -52,6 +52,7 @@ func _ready(): | |||
52 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) | 52 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) |
53 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) | 53 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) |
54 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) | 54 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) |
55 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/teleport.gd")) | ||
55 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) | 56 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) |
56 | 57 | ||
57 | var apclient = global.get_node("Archipelago") | 58 | var apclient = global.get_node("Archipelago") |
diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd new file mode 100644 index 0000000..d322722 --- /dev/null +++ b/Archipelago/teleport.gd | |||
@@ -0,0 +1,24 @@ | |||
1 | extends "res://scripts/teleport.gd" | ||
2 | |||
3 | var _unlocked = true | ||
4 | |||
5 | |||
6 | func _ready(): | ||
7 | var apclient = global.get_node("Archipelago") | ||
8 | if apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): | ||
9 | if self.get_parent().name == "Teleporter Warps": | ||
10 | if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: | ||
11 | _unlocked = false | ||
12 | else: | ||
13 | _unlocked = false | ||
14 | |||
15 | ._ready() | ||
16 | |||
17 | |||
18 | func _body_entered(var body): | ||
19 | if _unlocked: | ||
20 | ._body_entered(body) | ||
21 | |||
22 | |||
23 | func unlock_warp(): | ||
24 | _unlocked = true | ||