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 3541016..b3668d7 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 = ""
@@ -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
68const kTHE_END = 0 78const kTHE_END = 0
69const kTHE_MASTER = 1 79const kTHE_MASTER = 1
70const kLEVEL_2 = 2 80const kLEVEL_2 = 2
81const kPILGRIMAGE = 3
71 82
72const kNO_PANEL_SHUFFLE = 0 83const kNO_PANEL_SHUFFLE = 0
73const kREARRANGE_PANELS = 1 84const kREARRANGE_PANELS = 1
@@ -80,6 +91,12 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0
80const kCLASSIFICATION_REMOTE_REDUCED = 1 91const kCLASSIFICATION_REMOTE_REDUCED = 1
81const kCLASSIFICATION_REMOTE_INSANITY = 2 92const kCLASSIFICATION_REMOTE_INSANITY = 2
82 93
94const kSUNWARP_ACCESS_NORMAL = 0
95const kSUNWARP_ACCESS_DISABLED = 1
96const kSUNWARP_ACCESS_UNLOCK = 2
97const kSUNWARP_ACCESS_INDIVIDUAL = 3
98const kSUNWARP_ACCESS_PROGRESSIVE = 4
99
83var _client = WebSocketClient.new() 100var _client = WebSocketClient.new()
84var _should_process = false 101var _should_process = false
85var _initiated_disconnect = false 102var _initiated_disconnect = false
@@ -111,10 +128,16 @@ var _door_shuffle = false
111var _color_shuffle = false 128var _color_shuffle = false
112var _panel_shuffle = 0 # none, rearrange 129var _panel_shuffle = 0 # none, rearrange
113var _painting_shuffle = false 130var _painting_shuffle = false
131var _sunwarp_access = 0 # normal, disabled, unlock, progressive
114var _mastery_achievements = 21 132var _mastery_achievements = 21
115var _level_2_requirement = 223 133var _level_2_requirement = 223
116var _location_classification_bit = 0 134var _location_classification_bit = 0
117var _early_color_hallways = false 135var _early_color_hallways = false
136var _pilgrimage_enabled = false
137var _pilgrimage_allows_roof_access = false
138var _pilgrimage_allows_paintings = false
139var _sunwarp_shuffle = false
140var _sunwarp_mapping = []
118var _slot_seed = 0 141var _slot_seed = 0
119 142
120var _map_loaded = false 143var _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
736func warpIsVanilla(warp):
737 return !$Gamedata.mentioned_warps.has(warp)
738
739
696func evaluateSolvability(): 740func evaluateSolvability():
697 emit_signal("evaluate_solvability") 741 emit_signal("evaluate_solvability")
698 742