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 58a099c..4431fa0 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 | 
| @@ -279,6 +302,8 @@ func _on_data(): | |||
| 279 | _painting_shuffle = _slot_data["shuffle_paintings"] | 302 | _painting_shuffle = _slot_data["shuffle_paintings"] | 
| 280 | if _slot_data.has("shuffle_panels"): | 303 | if _slot_data.has("shuffle_panels"): | 
| 281 | _panel_shuffle = _slot_data["shuffle_panels"] | 304 | _panel_shuffle = _slot_data["shuffle_panels"] | 
| 305 | if _slot_data.has("sunwarp_access"): | ||
| 306 | _sunwarp_access = _slot_data["sunwarp_access"] | ||
| 282 | if _slot_data.has("seed"): | 307 | if _slot_data.has("seed"): | 
| 283 | _slot_seed = _slot_data["seed"] | 308 | _slot_seed = _slot_data["seed"] | 
| 284 | if _slot_data.has("painting_entrance_to_exit"): | 309 | if _slot_data.has("painting_entrance_to_exit"): | 
| @@ -296,6 +321,16 @@ func _on_data(): | |||
| 296 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 321 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 
| 297 | if _slot_data.has("early_color_hallways"): | 322 | if _slot_data.has("early_color_hallways"): | 
| 298 | _early_color_hallways = _slot_data["early_color_hallways"] | 323 | _early_color_hallways = _slot_data["early_color_hallways"] | 
| 324 | if _slot_data.has("enable_pilgrimage"): | ||
| 325 | _pilgrimage_enabled = _slot_data["enable_pilgrimage"] | ||
| 326 | if _slot_data.has("pilgrimage_allows_roof_access"): | ||
| 327 | _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] | ||
| 328 | if _slot_data.has("pilgrimage_allows_paintings"): | ||
| 329 | _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] | ||
| 330 | if _slot_data.has("shuffle_sunwarps"): | ||
| 331 | _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] | ||
| 332 | if _slot_data.has("sunwarp_permutation"): | ||
| 333 | _sunwarp_mapping = _slot_data["sunwarp_permutation"] | ||
| 299 | 334 | ||
| 300 | _puzzle_skips = 0 | 335 | _puzzle_skips = 0 | 
| 301 | 336 | ||
| @@ -659,6 +694,11 @@ func processItem(item, index, from, flags): | |||
| 659 | if painting_node != null: | 694 | if painting_node != null: | 
| 660 | painting_node.get_node("Script").movePainting() | 695 | painting_node.get_node("Script").movePainting() | 
| 661 | 696 | ||
| 697 | if gamedata.warp_ids_by_item_id.has(int(item)): | ||
| 698 | var warpsNode = get_tree().get_root().get_node("Spatial/Warps") | ||
| 699 | for warp_id in gamedata.warp_ids_by_item_id[int(item)]: | ||
| 700 | warpsNode.get_node(warp_id).unlock_warp() | ||
| 701 | |||
| 662 | # Handle progressive items. | 702 | # Handle progressive items. | 
| 663 | if item_name in progressive_items.keys(): | 703 | if item_name in progressive_items.keys(): | 
| 664 | if not item_name in _progressive_progress: | 704 | if not item_name in _progressive_progress: | 
| @@ -719,6 +759,10 @@ func paintingIsVanilla(painting): | |||
| 719 | return !$Gamedata.mentioned_paintings.has(painting) | 759 | return !$Gamedata.mentioned_paintings.has(painting) | 
| 720 | 760 | ||
| 721 | 761 | ||
| 762 | func warpIsVanilla(warp): | ||
| 763 | return !$Gamedata.mentioned_warps.has(warp) | ||
| 764 | |||
| 765 | |||
| 722 | func evaluateSolvability(): | 766 | func evaluateSolvability(): | 
| 723 | emit_signal("evaluate_solvability") | 767 | emit_signal("evaluate_solvability") | 
| 724 | 768 | ||
