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.gd53
1 files changed, 44 insertions, 9 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index d93b2ed..2aa4697 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"},
@@ -67,18 +68,19 @@ const progressive_items = {
67 ], 68 ],
68 "Progressive Pilgrimage": 69 "Progressive Pilgrimage":
69 [ 70 [
70 {"item": "Hub Room - 1 Sunwarp", "display": "1 Sunwarp"}, 71 {"item": "1 Sunwarp", "display": "1 Sunwarp"},
71 {"item": "Orange Tower Fourth Floor - 2 Sunwarp", "display": "2 Sunwarp"}, 72 {"item": "2 Sunwarp", "display": "2 Sunwarp"},
72 {"item": "Orange Tower Third Floor - 3 Sunwarp", "display": "3 Sunwarp"}, 73 {"item": "3 Sunwarp", "display": "3 Sunwarp"},
73 {"item": "Orange Tower First Floor - 4 Sunwarp", "display": "4 Sunwarp"}, 74 {"item": "4 Sunwarp", "display": "4 Sunwarp"},
74 {"item": "Orange Tower Fourth Floor - 5 Sunwarp", "display": "5 Sunwarp"}, 75 {"item": "5 Sunwarp", "display": "5 Sunwarp"},
75 {"item": "Outside The Agreeable - 6 Sunwarp", "display": "6 Sunwarp"}, 76 {"item": "6 Sunwarp", "display": "6 Sunwarp"},
76 ] 77 ]
77} 78}
78 79
79const kTHE_END = 0 80const kTHE_END = 0
80const kTHE_MASTER = 1 81const kTHE_MASTER = 1
81const kLEVEL_2 = 2 82const kLEVEL_2 = 2
83const kPILGRIMAGE = 3
82 84
83const kNO_PANEL_SHUFFLE = 0 85const kNO_PANEL_SHUFFLE = 0
84const kREARRANGE_PANELS = 1 86const kREARRANGE_PANELS = 1
@@ -94,7 +96,8 @@ const kCLASSIFICATION_REMOTE_INSANITY = 2
94const kSUNWARP_ACCESS_NORMAL = 0 96const kSUNWARP_ACCESS_NORMAL = 0
95const kSUNWARP_ACCESS_DISABLED = 1 97const kSUNWARP_ACCESS_DISABLED = 1
96const kSUNWARP_ACCESS_UNLOCK = 2 98const kSUNWARP_ACCESS_UNLOCK = 2
97const kSUNWARP_ACCESS_PROGRESSIVE = 3 99const kSUNWARP_ACCESS_INDIVIDUAL = 3
100const kSUNWARP_ACCESS_PROGRESSIVE = 4
98 101
99var _client = WebSocketClient.new() 102var _client = WebSocketClient.new()
100var _should_process = false 103var _should_process = false
@@ -133,6 +136,12 @@ var _mastery_achievements = 21
133var _level_2_requirement = 223 136var _level_2_requirement = 223
134var _location_classification_bit = 0 137var _location_classification_bit = 0
135var _early_color_hallways = false 138var _early_color_hallways = false
139var _pilgrimage_compatibility = false # set to true for pre-0.4.6
140var _pilgrimage_enabled = false
141var _pilgrimage_allows_roof_access = false
142var _pilgrimage_allows_paintings = false
143var _sunwarp_shuffle = false
144var _sunwarp_mapping = []
136var _slot_seed = 0 145var _slot_seed = 0
137 146
138var _map_loaded = false 147var _map_loaded = false
@@ -305,6 +314,8 @@ func _on_data():
305 _panel_shuffle = _slot_data["shuffle_panels"] 314 _panel_shuffle = _slot_data["shuffle_panels"]
306 if _slot_data.has("sunwarp_access"): 315 if _slot_data.has("sunwarp_access"):
307 _sunwarp_access = _slot_data["sunwarp_access"] 316 _sunwarp_access = _slot_data["sunwarp_access"]
317 else:
318 _sunwarp_access = kSUNWARP_ACCESS_NORMAL
308 if _slot_data.has("seed"): 319 if _slot_data.has("seed"):
309 _slot_seed = _slot_data["seed"] 320 _slot_seed = _slot_data["seed"]
310 if _slot_data.has("painting_entrance_to_exit"): 321 if _slot_data.has("painting_entrance_to_exit"):
@@ -322,6 +333,25 @@ func _on_data():
322 _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY 333 _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY
323 if _slot_data.has("early_color_hallways"): 334 if _slot_data.has("early_color_hallways"):
324 _early_color_hallways = _slot_data["early_color_hallways"] 335 _early_color_hallways = _slot_data["early_color_hallways"]
336 if _slot_data.has("enable_pilgrimage"):
337 _pilgrimage_enabled = _slot_data["enable_pilgrimage"]
338 else:
339 _pilgrimage_compatibility = true
340 _pilgrimage_enabled = true
341 if _slot_data.has("pilgrimage_allows_roof_access"):
342 _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"]
343 else:
344 _pilgrimage_allows_roof_access = true
345 if _slot_data.has("pilgrimage_allows_paintings"):
346 _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"]
347 else:
348 _pilgrimage_allows_paintings = true
349 if _slot_data.has("shuffle_sunwarps"):
350 _sunwarp_shuffle = _slot_data["shuffle_sunwarps"]
351 else:
352 _sunwarp_shuffle = false
353 if _slot_data.has("sunwarp_permutation"):
354 _sunwarp_mapping = _slot_data["sunwarp_permutation"]
325 355
326 if track_player: 356 if track_player:
327 setValue("PlayerPos", {"x": 0, "z": 0}) 357 setValue("PlayerPos", {"x": 0, "z": 0})
@@ -704,7 +734,12 @@ func processItem(item, index, from, flags):
704 painting_node = fake_parent_node.get_node_or_null(painting_id) 734 painting_node = fake_parent_node.get_node_or_null(painting_id)
705 if painting_node != null: 735 if painting_node != null:
706 painting_node.get_node("Script").movePainting() 736 painting_node.get_node("Script").movePainting()
707 737
738 if gamedata.warp_ids_by_item_id.has(int(item)):
739 var warpsNode = get_tree().get_root().get_node("Spatial/Warps")
740 for warp_id in gamedata.warp_ids_by_item_id[int(item)]:
741 warpsNode.get_node(warp_id).unlock_warp()
742
708 if gamedata.warp_ids_by_item_id.has(int(item)): 743 if gamedata.warp_ids_by_item_id.has(int(item)):
709 var warpsNode = get_tree().get_root().get_node("Spatial/Warps") 744 var warpsNode = get_tree().get_root().get_node("Spatial/Warps")
710 for warp_id in gamedata.warp_ids_by_item_id[int(item)]: 745 for warp_id in gamedata.warp_ids_by_item_id[int(item)]: