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 3541016..b3668d7 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 = "" |
| @@ -40,7 +41,7 @@ const progressive_items = { | |||
| 40 | ], | 41 | ], |
| 41 | "Progressive Hallway Room": | 42 | "Progressive Hallway Room": |
| 42 | [ | 43 | [ |
| 43 | {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"}, | 44 | {"item": "Hallway Room (1) - Exit", "display": "First Door"}, |
| 44 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, | 45 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, |
| 45 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, | 46 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, |
| 46 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, | 47 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, |
| @@ -62,12 +63,22 @@ const progressive_items = { | |||
| 62 | {"item": "The Colorful - Green Door", "display": "Green"}, | 63 | {"item": "The Colorful - Green Door", "display": "Green"}, |
| 63 | {"item": "The Colorful - Brown Door", "display": "Brown"}, | 64 | {"item": "The Colorful - Brown Door", "display": "Brown"}, |
| 64 | {"item": "The Colorful - Gray Door", "display": "Gray"}, | 65 | {"item": "The Colorful - Gray Door", "display": "Gray"}, |
| 66 | ], | ||
| 67 | "Progressive Pilgrimage": | ||
| 68 | [ | ||
| 69 | {"item": "1 Sunwarp", "display": "1 Sunwarp"}, | ||
| 70 | {"item": "2 Sunwarp", "display": "2 Sunwarp"}, | ||
| 71 | {"item": "3 Sunwarp", "display": "3 Sunwarp"}, | ||
| 72 | {"item": "4 Sunwarp", "display": "4 Sunwarp"}, | ||
| 73 | {"item": "5 Sunwarp", "display": "5 Sunwarp"}, | ||
| 74 | {"item": "6 Sunwarp", "display": "6 Sunwarp"}, | ||
| 65 | ] | 75 | ] |
| 66 | } | 76 | } |
| 67 | 77 | ||
| 68 | const kTHE_END = 0 | 78 | const kTHE_END = 0 |
| 69 | const kTHE_MASTER = 1 | 79 | const kTHE_MASTER = 1 |
| 70 | const kLEVEL_2 = 2 | 80 | const kLEVEL_2 = 2 |
| 81 | const kPILGRIMAGE = 3 | ||
| 71 | 82 | ||
| 72 | const kNO_PANEL_SHUFFLE = 0 | 83 | const kNO_PANEL_SHUFFLE = 0 |
| 73 | const kREARRANGE_PANELS = 1 | 84 | const kREARRANGE_PANELS = 1 |
| @@ -80,6 +91,12 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0 | |||
| 80 | const kCLASSIFICATION_REMOTE_REDUCED = 1 | 91 | const kCLASSIFICATION_REMOTE_REDUCED = 1 |
| 81 | const kCLASSIFICATION_REMOTE_INSANITY = 2 | 92 | const kCLASSIFICATION_REMOTE_INSANITY = 2 |
| 82 | 93 | ||
| 94 | const kSUNWARP_ACCESS_NORMAL = 0 | ||
| 95 | const kSUNWARP_ACCESS_DISABLED = 1 | ||
| 96 | const kSUNWARP_ACCESS_UNLOCK = 2 | ||
| 97 | const kSUNWARP_ACCESS_INDIVIDUAL = 3 | ||
| 98 | const kSUNWARP_ACCESS_PROGRESSIVE = 4 | ||
| 99 | |||
| 83 | var _client = WebSocketClient.new() | 100 | var _client = WebSocketClient.new() |
| 84 | var _should_process = false | 101 | var _should_process = false |
| 85 | var _initiated_disconnect = false | 102 | var _initiated_disconnect = false |
| @@ -111,10 +128,16 @@ var _door_shuffle = false | |||
| 111 | var _color_shuffle = false | 128 | var _color_shuffle = false |
| 112 | var _panel_shuffle = 0 # none, rearrange | 129 | var _panel_shuffle = 0 # none, rearrange |
| 113 | var _painting_shuffle = false | 130 | var _painting_shuffle = false |
| 131 | var _sunwarp_access = 0 # normal, disabled, unlock, progressive | ||
| 114 | var _mastery_achievements = 21 | 132 | var _mastery_achievements = 21 |
| 115 | var _level_2_requirement = 223 | 133 | var _level_2_requirement = 223 |
| 116 | var _location_classification_bit = 0 | 134 | var _location_classification_bit = 0 |
| 117 | var _early_color_hallways = false | 135 | var _early_color_hallways = false |
| 136 | var _pilgrimage_enabled = false | ||
| 137 | var _pilgrimage_allows_roof_access = false | ||
| 138 | var _pilgrimage_allows_paintings = false | ||
| 139 | var _sunwarp_shuffle = false | ||
| 140 | var _sunwarp_mapping = [] | ||
| 118 | var _slot_seed = 0 | 141 | var _slot_seed = 0 |
| 119 | 142 | ||
| 120 | var _map_loaded = false | 143 | var _map_loaded = false |
| @@ -276,6 +299,8 @@ func _on_data(): | |||
| 276 | _painting_shuffle = _slot_data["shuffle_paintings"] | 299 | _painting_shuffle = _slot_data["shuffle_paintings"] |
| 277 | if _slot_data.has("shuffle_panels"): | 300 | if _slot_data.has("shuffle_panels"): |
| 278 | _panel_shuffle = _slot_data["shuffle_panels"] | 301 | _panel_shuffle = _slot_data["shuffle_panels"] |
| 302 | if _slot_data.has("sunwarp_access"): | ||
| 303 | _sunwarp_access = _slot_data["sunwarp_access"] | ||
| 279 | if _slot_data.has("seed"): | 304 | if _slot_data.has("seed"): |
| 280 | _slot_seed = _slot_data["seed"] | 305 | _slot_seed = _slot_data["seed"] |
| 281 | if _slot_data.has("painting_entrance_to_exit"): | 306 | if _slot_data.has("painting_entrance_to_exit"): |
| @@ -293,6 +318,16 @@ func _on_data(): | |||
| 293 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 318 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY |
| 294 | if _slot_data.has("early_color_hallways"): | 319 | if _slot_data.has("early_color_hallways"): |
| 295 | _early_color_hallways = _slot_data["early_color_hallways"] | 320 | _early_color_hallways = _slot_data["early_color_hallways"] |
| 321 | if _slot_data.has("enable_pilgrimage"): | ||
| 322 | _pilgrimage_enabled = _slot_data["enable_pilgrimage"] | ||
| 323 | if _slot_data.has("pilgrimage_allows_roof_access"): | ||
| 324 | _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] | ||
| 325 | if _slot_data.has("pilgrimage_allows_paintings"): | ||
| 326 | _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] | ||
| 327 | if _slot_data.has("shuffle_sunwarps"): | ||
| 328 | _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] | ||
| 329 | if _slot_data.has("sunwarp_permutation"): | ||
| 330 | _sunwarp_mapping = _slot_data["sunwarp_permutation"] | ||
| 296 | 331 | ||
| 297 | _puzzle_skips = 0 | 332 | _puzzle_skips = 0 |
| 298 | 333 | ||
| @@ -633,6 +668,11 @@ func processItem(item, index, from, flags): | |||
| 633 | if painting_node != null: | 668 | if painting_node != null: |
| 634 | painting_node.get_node("Script").movePainting() | 669 | painting_node.get_node("Script").movePainting() |
| 635 | 670 | ||
| 671 | if gamedata.warp_ids_by_item_id.has(int(item)): | ||
| 672 | var warpsNode = get_tree().get_root().get_node("Spatial/Warps") | ||
| 673 | for warp_id in gamedata.warp_ids_by_item_id[int(item)]: | ||
| 674 | warpsNode.get_node(warp_id).unlock_warp() | ||
| 675 | |||
| 636 | # Handle progressive items. | 676 | # Handle progressive items. |
| 637 | if item_name in progressive_items.keys(): | 677 | if item_name in progressive_items.keys(): |
| 638 | if not item_name in _progressive_progress: | 678 | if not item_name in _progressive_progress: |
| @@ -693,6 +733,10 @@ func paintingIsVanilla(painting): | |||
| 693 | return !$Gamedata.mentioned_paintings.has(painting) | 733 | return !$Gamedata.mentioned_paintings.has(painting) |
| 694 | 734 | ||
| 695 | 735 | ||
| 736 | func warpIsVanilla(warp): | ||
| 737 | return !$Gamedata.mentioned_warps.has(warp) | ||
| 738 | |||
| 739 | |||
| 696 | func evaluateSolvability(): | 740 | func evaluateSolvability(): |
| 697 | emit_signal("evaluate_solvability") | 741 | emit_signal("evaluate_solvability") |
| 698 | 742 | ||
