diff options
Diffstat (limited to 'randomizer')
-rw-r--r-- | randomizer/extradata.gd | 95 | ||||
-rw-r--r-- | randomizer/load.gd | 20 | ||||
-rw-r--r-- | randomizer/settings_screen.gd | 5 |
3 files changed, 120 insertions, 0 deletions
diff --git a/randomizer/extradata.gd b/randomizer/extradata.gd new file mode 100644 index 0000000..89c41d2 --- /dev/null +++ b/randomizer/extradata.gd | |||
@@ -0,0 +1,95 @@ | |||
1 | extends Node | ||
2 | |||
3 | var 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/randomizer/load.gd b/randomizer/load.gd index 7f08814..c14332c 100644 --- a/randomizer/load.gd +++ b/randomizer/load.gd | |||
@@ -104,6 +104,26 @@ func _load(): | |||
104 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" | 104 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" |
105 | ] | 105 | ] |
106 | 106 | ||
107 | # Make stack/double puzzles into proxies. | ||
108 | var proxyscript = load("res://scripts/panelProxy.gd") | ||
109 | |||
110 | var extradata_proxies = randomizer.get_node("Extradata").proxies | ||
111 | for truepanel in extradata_proxies: | ||
112 | var proxies = extradata_proxies[truepanel] | ||
113 | for proxypanel in proxies: | ||
114 | var proxynode = panels_parent.get_node(proxypanel) | ||
115 | var oldparent = proxynode.get_parent() | ||
116 | oldparent.remove_child(proxynode) | ||
117 | var oldtext = proxynode.text | ||
118 | var oldanswer = proxynode.answer | ||
119 | proxynode.set_script(proxyscript) | ||
120 | proxynode.text = oldtext | ||
121 | proxynode.answer = oldanswer | ||
122 | proxynode.proxied_panels = ["../../%s" % truepanel] | ||
123 | proxynode.exact_proxy = true | ||
124 | proxynode.request_ready() | ||
125 | oldparent.add_child(proxynode) | ||
126 | |||
107 | # Proceed with the rest of the load. | 127 | # Proceed with the rest of the load. |
108 | global._print("Hooked Load End") | 128 | global._print("Hooked Load End") |
109 | ._load() | 129 | ._load() |
diff --git a/randomizer/settings_screen.gd b/randomizer/settings_screen.gd index 708b4ef..842b046 100644 --- a/randomizer/settings_screen.gd +++ b/randomizer/settings_screen.gd | |||
@@ -20,6 +20,11 @@ func _ready(): | |||
20 | generated_puzzles_instance.name = "GeneratedPuzzles" | 20 | generated_puzzles_instance.name = "GeneratedPuzzles" |
21 | randomizer_instance.add_child(generated_puzzles_instance) | 21 | randomizer_instance.add_child(generated_puzzles_instance) |
22 | 22 | ||
23 | var extradata = ResourceLoader.load("user://maps/randomizer/extradata.gd") | ||
24 | var extradata_instance = extradata.new() | ||
25 | extradata_instance.name = "Extradata" | ||
26 | randomizer_instance.add_child(extradata_instance) | ||
27 | |||
23 | # Let's also inject any scripts we need to inject now. | 28 | # Let's also inject any scripts we need to inject now. |
24 | installScriptExtension(ResourceLoader.load("user://maps/randomizer/load.gd")) | 29 | installScriptExtension(ResourceLoader.load("user://maps/randomizer/load.gd")) |
25 | installScriptExtension(ResourceLoader.load("user://maps/randomizer/panelEnd.gd")) | 30 | installScriptExtension(ResourceLoader.load("user://maps/randomizer/panelEnd.gd")) |