about summary refs log tree commit diff stats
path: root/Archipelago/client.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r--Archipelago/client.gd46
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
7var SCRIPT_mypainting 7var SCRIPT_mypainting
8var SCRIPT_notifier 8var SCRIPT_notifier
9var SCRIPT_panel 9var SCRIPT_panel
10var SCRIPT_pilgrimage_terminator
10var SCRIPT_uuid 11var SCRIPT_uuid
11 12
12var ap_server = "" 13var 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
70const kTHE_END = 0 80const kTHE_END = 0
71const kTHE_MASTER = 1 81const kTHE_MASTER = 1
72const kLEVEL_2 = 2 82const kLEVEL_2 = 2
83const kPILGRIMAGE = 3
73 84
74const kNO_PANEL_SHUFFLE = 0 85const kNO_PANEL_SHUFFLE = 0
75const kREARRANGE_PANELS = 1 86const kREARRANGE_PANELS = 1
@@ -82,6 +93,12 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0
82const kCLASSIFICATION_REMOTE_REDUCED = 1 93const kCLASSIFICATION_REMOTE_REDUCED = 1
83const kCLASSIFICATION_REMOTE_INSANITY = 2 94const kCLASSIFICATION_REMOTE_INSANITY = 2
84 95
96const kSUNWARP_ACCESS_NORMAL = 0
97const kSUNWARP_ACCESS_DISABLED = 1
98const kSUNWARP_ACCESS_UNLOCK = 2
99const kSUNWARP_ACCESS_INDIVIDUAL = 3
100const kSUNWARP_ACCESS_PROGRESSIVE = 4
101
85var _client = WebSocketClient.new() 102var _client = WebSocketClient.new()
86var _should_process = false 103var _should_process = false
87var _initiated_disconnect = false 104var _initiated_disconnect = false
@@ -114,10 +131,16 @@ var _door_shuffle = false
114var _color_shuffle = false 131var _color_shuffle = false
115var _panel_shuffle = 0 # none, rearrange 132var _panel_shuffle = 0 # none, rearrange
116var _painting_shuffle = false 133var _painting_shuffle = false
134var _sunwarp_access = 0 # normal, disabled, unlock, progressive
117var _mastery_achievements = 21 135var _mastery_achievements = 21
118var _level_2_requirement = 223 136var _level_2_requirement = 223
119var _location_classification_bit = 0 137var _location_classification_bit = 0
120var _early_color_hallways = false 138var _early_color_hallways = false
139var _pilgrimage_enabled = false
140var _pilgrimage_allows_roof_access = false
141var _pilgrimage_allows_paintings = false
142var _sunwarp_shuffle = false
143var _sunwarp_mapping = []
121var _slot_seed = 0 144var _slot_seed = 0
122 145
123var _map_loaded = false 146var _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
791func warpIsVanilla(warp):
792 return !$Gamedata.mentioned_warps.has(warp)
793
794
751func evaluateSolvability(): 795func evaluateSolvability():
752 emit_signal("evaluate_solvability") 796 emit_signal("evaluate_solvability")
753 797