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 58a099c..4431fa0 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
@@ -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
762func warpIsVanilla(warp):
763 return !$Gamedata.mentioned_warps.has(warp)
764
765
722func evaluateSolvability(): 766func evaluateSolvability():
723 emit_signal("evaluate_solvability") 767 emit_signal("evaluate_solvability")
724 768