diff options
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 8abc42c..13a7635 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -7,6 +7,7 @@ var SCRIPT_multiplayer | |||
7 | var SCRIPT_mypainting | 7 | var SCRIPT_mypainting |
8 | var SCRIPT_notifier | 8 | var SCRIPT_notifier |
9 | var SCRIPT_panel | 9 | var SCRIPT_panel |
10 | var SCRIPT_pilgrimage_terminator | ||
10 | var SCRIPT_uuid | 11 | var SCRIPT_uuid |
11 | 12 | ||
12 | var ap_server = "" | 13 | var ap_server = "" |
@@ -42,7 +43,7 @@ const progressive_items = { | |||
42 | ], | 43 | ], |
43 | "Progressive Hallway Room": | 44 | "Progressive Hallway Room": |
44 | [ | 45 | [ |
45 | {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"}, | 46 | {"item": "Hallway Room (1) - Exit", "display": "First Door"}, |
46 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, | 47 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, |
47 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, | 48 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, |
48 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, | 49 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, |
@@ -64,12 +65,22 @@ const progressive_items = { | |||
64 | {"item": "The Colorful - Green Door", "display": "Green"}, | 65 | {"item": "The Colorful - Green Door", "display": "Green"}, |
65 | {"item": "The Colorful - Brown Door", "display": "Brown"}, | 66 | {"item": "The Colorful - Brown Door", "display": "Brown"}, |
66 | {"item": "The Colorful - Gray Door", "display": "Gray"}, | 67 | {"item": "The Colorful - Gray Door", "display": "Gray"}, |
68 | ], | ||
69 | "Progressive Pilgrimage": | ||
70 | [ | ||
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"}, | ||
67 | ] | 77 | ] |
68 | } | 78 | } |
69 | 79 | ||
70 | const kTHE_END = 0 | 80 | const kTHE_END = 0 |
71 | const kTHE_MASTER = 1 | 81 | const kTHE_MASTER = 1 |
72 | const kLEVEL_2 = 2 | 82 | const kLEVEL_2 = 2 |
83 | const kPILGRIMAGE = 3 | ||
73 | 84 | ||
74 | const kNO_PANEL_SHUFFLE = 0 | 85 | const kNO_PANEL_SHUFFLE = 0 |
75 | const kREARRANGE_PANELS = 1 | 86 | const kREARRANGE_PANELS = 1 |
@@ -82,6 +93,12 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0 | |||
82 | const kCLASSIFICATION_REMOTE_REDUCED = 1 | 93 | const kCLASSIFICATION_REMOTE_REDUCED = 1 |
83 | const kCLASSIFICATION_REMOTE_INSANITY = 2 | 94 | const kCLASSIFICATION_REMOTE_INSANITY = 2 |
84 | 95 | ||
96 | const kSUNWARP_ACCESS_NORMAL = 0 | ||
97 | const kSUNWARP_ACCESS_DISABLED = 1 | ||
98 | const kSUNWARP_ACCESS_UNLOCK = 2 | ||
99 | const kSUNWARP_ACCESS_INDIVIDUAL = 3 | ||
100 | const kSUNWARP_ACCESS_PROGRESSIVE = 4 | ||
101 | |||
85 | var _client = WebSocketClient.new() | 102 | var _client = WebSocketClient.new() |
86 | var _should_process = false | 103 | var _should_process = false |
87 | var _initiated_disconnect = false | 104 | var _initiated_disconnect = false |
@@ -114,10 +131,16 @@ var _door_shuffle = false | |||
114 | var _color_shuffle = false | 131 | var _color_shuffle = false |
115 | var _panel_shuffle = 0 # none, rearrange | 132 | var _panel_shuffle = 0 # none, rearrange |
116 | var _painting_shuffle = false | 133 | var _painting_shuffle = false |
134 | var _sunwarp_access = 0 # normal, disabled, unlock, progressive | ||
117 | var _mastery_achievements = 21 | 135 | var _mastery_achievements = 21 |
118 | var _level_2_requirement = 223 | 136 | var _level_2_requirement = 223 |
119 | var _location_classification_bit = 0 | 137 | var _location_classification_bit = 0 |
120 | var _early_color_hallways = false | 138 | var _early_color_hallways = false |
139 | var _pilgrimage_enabled = false | ||
140 | var _pilgrimage_allows_roof_access = false | ||
141 | var _pilgrimage_allows_paintings = false | ||
142 | var _sunwarp_shuffle = false | ||
143 | var _sunwarp_mapping = [] | ||
121 | var _slot_seed = 0 | 144 | var _slot_seed = 0 |
122 | 145 | ||
123 | var _map_loaded = false | 146 | var _map_loaded = false |
@@ -288,6 +311,8 @@ func _on_data(): | |||
288 | _painting_shuffle = _slot_data["shuffle_paintings"] | 311 | _painting_shuffle = _slot_data["shuffle_paintings"] |
289 | if _slot_data.has("shuffle_panels"): | 312 | if _slot_data.has("shuffle_panels"): |
290 | _panel_shuffle = _slot_data["shuffle_panels"] | 313 | _panel_shuffle = _slot_data["shuffle_panels"] |
314 | if _slot_data.has("sunwarp_access"): | ||
315 | _sunwarp_access = _slot_data["sunwarp_access"] | ||
291 | if _slot_data.has("seed"): | 316 | if _slot_data.has("seed"): |
292 | _slot_seed = _slot_data["seed"] | 317 | _slot_seed = _slot_data["seed"] |
293 | if _slot_data.has("painting_entrance_to_exit"): | 318 | if _slot_data.has("painting_entrance_to_exit"): |
@@ -305,6 +330,16 @@ func _on_data(): | |||
305 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 330 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY |
306 | if _slot_data.has("early_color_hallways"): | 331 | if _slot_data.has("early_color_hallways"): |
307 | _early_color_hallways = _slot_data["early_color_hallways"] | 332 | _early_color_hallways = _slot_data["early_color_hallways"] |
333 | if _slot_data.has("enable_pilgrimage"): | ||
334 | _pilgrimage_enabled = _slot_data["enable_pilgrimage"] | ||
335 | if _slot_data.has("pilgrimage_allows_roof_access"): | ||
336 | _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] | ||
337 | if _slot_data.has("pilgrimage_allows_paintings"): | ||
338 | _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] | ||
339 | if _slot_data.has("shuffle_sunwarps"): | ||
340 | _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] | ||
341 | if _slot_data.has("sunwarp_permutation"): | ||
342 | _sunwarp_mapping = _slot_data["sunwarp_permutation"] | ||
308 | 343 | ||
309 | if track_player: | 344 | if track_player: |
310 | setValue("PlayerPos", {"x": 0, "z": 0}) | 345 | setValue("PlayerPos", {"x": 0, "z": 0}) |
@@ -688,6 +723,11 @@ func processItem(item, index, from, flags): | |||
688 | if painting_node != null: | 723 | if painting_node != null: |
689 | painting_node.get_node("Script").movePainting() | 724 | painting_node.get_node("Script").movePainting() |
690 | 725 | ||
726 | if gamedata.warp_ids_by_item_id.has(int(item)): | ||
727 | var warpsNode = get_tree().get_root().get_node("Spatial/Warps") | ||
728 | for warp_id in gamedata.warp_ids_by_item_id[int(item)]: | ||
729 | warpsNode.get_node(warp_id).unlock_warp() | ||
730 | |||
691 | # Handle progressive items. | 731 | # Handle progressive items. |
692 | if item_name in progressive_items.keys(): | 732 | if item_name in progressive_items.keys(): |
693 | if not item_name in _progressive_progress: | 733 | if not item_name in _progressive_progress: |
@@ -748,6 +788,10 @@ func paintingIsVanilla(painting): | |||
748 | return !$Gamedata.mentioned_paintings.has(painting) | 788 | return !$Gamedata.mentioned_paintings.has(painting) |
749 | 789 | ||
750 | 790 | ||
791 | func warpIsVanilla(warp): | ||
792 | return !$Gamedata.mentioned_warps.has(warp) | ||
793 | |||
794 | |||
751 | func evaluateSolvability(): | 795 | func evaluateSolvability(): |
752 | emit_signal("evaluate_solvability") | 796 | emit_signal("evaluate_solvability") |
753 | 797 | ||