about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/extradata.gd95
-rw-r--r--Archipelago/load.gd23
-rw-r--r--Archipelago/settings_screen.gd5
3 files changed, 122 insertions, 1 deletions
diff --git a/Archipelago/extradata.gd b/Archipelago/extradata.gd new file mode 100644 index 0000000..89c41d2 --- /dev/null +++ b/Archipelago/extradata.gd
@@ -0,0 +1,95 @@
1extends Node
2
3var proxies = {
4 "Synonym Room/Panel_compose_write": ["Synonym Room/Panel_record_write"],
5 "Synonym Room/Panel_duplicate_same": ["Synonym Room/Panel_identical_same"],
6 "Synonym Room/Panel_giggle_laugh": ["Synonym Room/Panel_chuckle_laugh"],
7 "Synonym Room/Panel_plunge_fall": ["Synonym Room/Panel_autumn_fall"],
8 "Heteronym Room/Panel_mine_mine": ["Heteronym Room/Panel_mine_mine_2"],
9 "Heteronym Room/Panel_mobile_mobile": ["Heteronym Room/Panel_mobile_mobile_2"],
10 "Heteronym Room/Panel_sow_so": ["Heteronym Room/Panel_sow_sow"],
11 "Heteronym Room/Panel_desert_dessert": ["Heteronym Room/Panel_desert_desert"],
12 "Heteronym Room/Panel_two_too": ["Heteronym Room/Panel_two_to"],
13 "Heteronym Room/Panel_not_naught": ["Heteronym Room/Panel_not_knot"],
14 "Truncate Room/Panel_needle_eye": ["Truncate Room/Panel_face_eye"],
15 "Truncate Room/Panel_undead_dead": ["Truncate Room/Panel_deadline_dead"],
16 "Truncate Room/Panel_landmass_mass": ["Truncate Room/Panel_massacred_mass"],
17 "Truncate Room/Panel_mouth_teeth": ["Truncate Room/Panel_saw_teeth"],
18 "Blue Room/Panel_mouth_face": ["Blue Room/Panel_eye_face"],
19 "Blue Room/Panel_ice_eyesight": ["Blue Room/Panel_height_eyesight"],
20 "Blue Room/Panel_just_readjust": ["Blue Room/Panel_read_readjust"],
21 "Blue Room/Panel_continent_planet": ["Blue Room/Panel_ocean_planet"],
22 "Sun Room/Panel_warred_drawer": ["Sun Room/Panel_redraw_drawer"],
23 "Sun Room/Panel_stone_notes": ["Sun Room/Panel_onset_notes"],
24 "Sun Room/Panel_tsar_star": ["Sun Room/Panel_arts_star"],
25 "Sun Room/Panel_dare_read": ["Sun Room/Panel_dear_read"],
26 "Shuffle Room/Panel_amen_mean": ["Shuffle Room/Panel_name_mean"],
27 "Look Room/Panel_blue_hi": ["Look Room/Panel_blue_hi2"],
28 "Rhyme Room/Panel_move_love": ["Rhyme Room/Panel_stove_love"],
29 "Rhyme Room/Panel_sweat_great": ["Rhyme Room/Panel_beat_great"],
30 "Rhyme Room/Panel_knight_write": ["Rhyme Room/Panel_byte_write"],
31 "Rhyme Room/Panel_chair_bear": ["Rhyme Room/Panel_cost_most"],
32 "Double Room/Panel_ascend_rhyme": ["Double Room/Panel_ascend_syn"],
33 "Double Room/Panel_double_rhyme": ["Double Room/Panel_double_syn"],
34 "Double Room/Panel_blocked_rhyme": ["Double Room/Panel_blocked_syn"],
35 "Double Room/Panel_rise_rhyme": ["Double Room/Panel_rise_syn"],
36 "Double Room/Panel_crystal_rhyme": ["Double Room/Panel_crystal_syn"],
37 "Double Room/Panel_creative_rhyme": ["Double Room/Panel_creative_syn"],
38 "Double Room/Panel_child_rhyme": ["Double Room/Panel_child_syn"],
39 "Double Room/Panel_hidden_rhyme": ["Double Room/Panel_hidden_syn"],
40 "Double Room/Panel_word_rhyme": ["Double Room/Panel_word_whole"],
41 "Double Room/Panel_silent_rhyme": ["Double Room/Panel_silent_syn"],
42 "Double Room/Panel_bones_rhyme": ["Double Room/Panel_bones_syn"],
43 "Double Room/Panel_sentence_rhyme": ["Double Room/Panel_sentence_whole"],
44 "Double Room/Panel_dream_rhyme": ["Double Room/Panel_dream_syn"],
45 "Double Room/Panel_mystery_rhyme": ["Double Room/Panel_mystery_syn"],
46 "Double Room/Panel_jump_rhyme": ["Double Room/Panel_jump_syn"],
47 "Double Room/Panel_fall_rhyme": ["Double Room/Panel_fall_syn"],
48 "Double Room/Panel_return_rhyme": ["Double Room/Panel_return_ant"],
49 "Double Room/Panel_descend_rhyme": ["Double Room/Panel_descend_ant"],
50 "Hallway Room/Panel_castle_1":
51 ["Hallway Room/Panel_castle_2", "Hallway Room/Panel_castle_3", "Hallway Room/Panel_castle_4"],
52 "Hallway Room/Panel_counterclockwise_1":
53 [
54 "Hallway Room/Panel_counterclockwise_2",
55 "Hallway Room/Panel_counterclockwise_3",
56 "Hallway Room/Panel_counterclockwise_4"
57 ],
58 "Hallway Room/Panel_transformation_1":
59 [
60 "Hallway Room/Panel_transformation_2",
61 "Hallway Room/Panel_transformation_3",
62 "Hallway Room/Panel_transformation_4"
63 ],
64 "Smiley Room/Panel_soundgram_1": ["Smiley Room/Panel_anagram_9_1"],
65 "Hangry Room/Panel_red_mid_5": ["Hangry Room/Panel_red_bot_5"],
66 "Hangry Room/Panel_red_mid_4": ["Hangry Room/Panel_red_bot_4"],
67 "Ceiling Room/Panel_blue_top_1": ["Ceiling Room/Panel_red_bot_1"],
68 "Ceiling Room/Panel_red_mid_2": ["Ceiling Room/Panel_blue_bot_2"],
69 "Ceiling Room/Panel_red_bot_3": ["Ceiling Room/Panel_blue_mid_3"],
70 "Ceiling Room/Panel_red_top_4": ["Ceiling Room/Panel_blue_mid_4"],
71 "Ceiling Room/Panel_blue_bot_5": ["Ceiling Room/Panel_yellow_top_5"],
72 "Ceiling Room/Panel_yellow_mid_6": ["Ceiling Room/Panel_blue_top_6"],
73 "Ceiling Room/Panel_blue_mid_7": ["Ceiling Room/Panel_yellow_bot_7"],
74 "Ceiling Room/Panel_black_bot_8": ["Ceiling Room/Panel_yellow_mid_8"],
75 "Ceiling Room/Panel_black_top_9": ["Ceiling Room/Panel_yellow_bot_9"],
76 "Ceiling Room/Panel_yellow_top_10": ["Ceiling Room/Panel_black_bot_10"],
77 "Ceiling Room/Panel_black_top_11": ["Ceiling Room/Panel_yellow_mid_11"],
78 "Ceiling Room/Panel_black_top_12": ["Ceiling Room/Panel_red_bot_12"],
79 "Ceiling Room/Panel_black_bot_13": ["Ceiling Room/Panel_red_top_13"],
80 "Ceiling Room/Panel_black_mid_14": ["Ceiling Room/Panel_red_bot_14"],
81 "Ceiling Room/Panel_black_top_15": ["Ceiling Room/Panel_red_mid_15"],
82 "Chemistry Room/Panel_blue_bot_3":
83 ["Chemistry Room/Panel_blue_bot_2", "Chemistry Room/Panel_blue_bot_4"],
84 "Chemistry Room/Panel_blue_bot_6": ["Chemistry Room/Panel_blue_bot_5"],
85 "Chemistry Room/Panel_blue_top_1": ["Chemistry Room/Panel_blue_top_2"],
86 "Chemistry Room/Panel_biology_4": ["Chemistry Room/Panel_biology_8"],
87 "Chemistry Room/Panel_physics_8": ["Chemistry Room/Panel_physics_5"],
88 "Chemistry Room/Panel_physics_7": ["Chemistry Room/Panel_physics_4"],
89 "Chemistry Room/Panel_physics_6": ["Chemistry Room/Panel_physics_3"],
90 "Chemistry Room/Panel_physics_2": ["Chemistry Room/Panel_physics_1"],
91 "Chemistry Room/Panel_physics_9": ["Chemistry Room/Panel_biology_10"],
92 "Challenge Room/Panel_bread_mold": ["Challenge Room/Panel_strawberries_mold"],
93 "Open Areas/Panel_rise_horizon": ["Open Areas/Panel_son_horizon"],
94 "Open Areas/Panel_son_sunrise": ["Open Areas/Panel_rise_sunrise"]
95}
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 2835bb4..409b8c8 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -22,6 +22,7 @@ func _load():
22 global._print("Hooked Load Start") 22 global._print("Hooked Load Start")
23 23
24 var apclient = global.get_node("Archipelago") 24 var apclient = global.get_node("Archipelago")
25 var panels_parent = self.get_node("Panels")
25 26
26 # Override the YOU panel with the AP slot name. 27 # Override the YOU panel with the AP slot name.
27 if self.get_node_or_null("Panels/Color Arrow Room/Panel_you") != null: 28 if self.get_node_or_null("Panels/Color Arrow Room/Panel_you") != null:
@@ -117,7 +118,6 @@ func _load():
117 # This is the best time to create the location nodes, since the map is now 118 # This is the best time to create the location nodes, since the map is now
118 # loaded but the panels haven't been solved from the save file yet. 119 # loaded but the panels haven't been solved from the save file yet.
119 var gamedata = apclient.get_node("Gamedata") 120 var gamedata = apclient.get_node("Gamedata")
120 var panels_parent = self.get_node("Panels")
121 var location_script = apclient.SCRIPT_location 121 var location_script = apclient.SCRIPT_location
122 for location_id in gamedata.panel_ids_by_location_id.keys(): 122 for location_id in gamedata.panel_ids_by_location_id.keys():
123 if not (gamedata.classification_by_location_id[location_id] & apclient._location_classification_bit): 123 if not (gamedata.classification_by_location_id[location_id] & apclient._location_classification_bit):
@@ -437,6 +437,27 @@ func _load():
437 script_instance.name = "Hunt_Notifier" 437 script_instance.name = "Hunt_Notifier"
438 script_instance.key = "Hunt|%d" % panel["loc"] 438 script_instance.key = "Hunt|%d" % panel["loc"]
439 panel_node.add_child(script_instance) 439 panel_node.add_child(script_instance)
440
441 # Make stack/double puzzles into proxies, unless panelsanity is on.
442 if apclient._location_classification_bit != apclient.kCLASSIFICATION_LOCAL_INSANITY:
443 var proxyscript = load("res://scripts/panelProxy.gd")
444
445 var extradata_proxies = apclient.get_node("Extradata").proxies
446 for truepanel in extradata_proxies:
447 var proxies = extradata_proxies[truepanel]
448 for proxypanel in proxies:
449 var proxynode = panels_parent.get_node(proxypanel)
450 var oldparent = proxynode.get_parent()
451 oldparent.remove_child(proxynode)
452 var oldtext = proxynode.text
453 var oldanswer = proxynode.answer
454 proxynode.set_script(proxyscript)
455 proxynode.text = oldtext
456 proxynode.answer = oldanswer
457 proxynode.proxied_panels = ["../../%s" % truepanel]
458 proxynode.exact_proxy = true
459 proxynode.request_ready()
460 oldparent.add_child(proxynode)
440 461
441 # Attach a script to every panel so that we can do things like conditionally 462 # Attach a script to every panel so that we can do things like conditionally
442 # disable them. 463 # disable them.
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 8a81c4d..2cabe09 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd
@@ -31,6 +31,11 @@ func _ready():
31 apdata_instance.name = "Gamedata" 31 apdata_instance.name = "Gamedata"
32 apclient_instance.add_child(apdata_instance) 32 apclient_instance.add_child(apdata_instance)
33 33
34 var extradata = ResourceLoader.load("user://maps/Archipelago/extradata.gd")
35 var extradata_instance = extradata.new()
36 extradata_instance.name = "Extradata"
37 apclient_instance.add_child(extradata_instance)
38
34 # Let's also inject any scripts we need to inject now. 39 # Let's also inject any scripts we need to inject now.
35 installScriptExtension(apclient_instance.SCRIPT_doorControl) 40 installScriptExtension(apclient_instance.SCRIPT_doorControl)
36 installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) 41 installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd"))