diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-27 12:04:27 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-27 12:04:27 -0400 |
commit | 15f0dd00a39f6d3abcb81ff1cd338c84c9c3ebce (patch) | |
tree | 1119ff71a555699d0a60c67a698020bb74c0819e | |
parent | 867d8cf1bb1610663742c31ef7eb0d9550f2b53e (diff) | |
download | lingo-archipelago-15f0dd00a39f6d3abcb81ff1cd338c84c9c3ebce.tar.gz lingo-archipelago-15f0dd00a39f6d3abcb81ff1cd338c84c9c3ebce.tar.bz2 lingo-archipelago-15f0dd00a39f6d3abcb81ff1cd338c84c9c3ebce.zip |
Painting names are loaded from the game now
This makes us update-resistant because we automatically get access to new paintings, and also it prevents issues where the names in the mod do not line up with the game's names, which have caused crashes in at least one MW.
-rw-r--r-- | Archipelago/load.gd | 32 | ||||
-rw-r--r-- | Archipelago/paintingdata.gd | 189 |
2 files changed, 28 insertions, 193 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 6860de7..72bbd15 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -1,5 +1,21 @@ | |||
1 | extends "res://scripts/load.gd" | 1 | extends "res://scripts/load.gd" |
2 | 2 | ||
3 | const EXCLUDED_PAINTINGS = [ | ||
4 | "ascension.tscn", | ||
5 | "ascension_ne.tscn", | ||
6 | "ascension_nw.tscn", | ||
7 | "ascension_se.tscn", | ||
8 | "ascension_sw.tscn", | ||
9 | "frame.tscn", | ||
10 | "scenery_0.tscn", | ||
11 | "scenery_1.tscn", | ||
12 | "scenery_2.tscn", | ||
13 | "scenery_3.tscn", | ||
14 | "scenery_4.tscn", | ||
15 | "scenery_5.tscn", | ||
16 | "pilgrim.tscn" | ||
17 | ] | ||
18 | |||
3 | 19 | ||
4 | func _load(): | 20 | func _load(): |
5 | global._print("Hooked Load Start") | 21 | global._print("Hooked Load Start") |
@@ -195,13 +211,21 @@ func _load(): | |||
195 | 211 | ||
196 | # Randomize the paintings, if necessary. | 212 | # Randomize the paintings, if necessary. |
197 | if apclient._painting_shuffle: | 213 | if apclient._painting_shuffle: |
198 | var pd_script = ResourceLoader.load("user://maps/Archipelago/paintingdata.gd") | 214 | var paintings_dir = Directory.new() |
199 | var pd = pd_script.new() | 215 | var all_paintings = [] |
216 | if paintings_dir.open("res://nodes/paintings") == OK: | ||
217 | paintings_dir.list_dir_begin() | ||
218 | var file_name = paintings_dir.get_next() | ||
219 | while file_name != "": | ||
220 | if file_name.ends_with(".tscn") and not EXCLUDED_PAINTINGS.has(file_name): | ||
221 | all_paintings.append(file_name.trim_suffix(".tscn")) | ||
222 | file_name = paintings_dir.get_next() | ||
223 | paintings_dir.list_dir_end() | ||
224 | |||
225 | var pd = Node.new() | ||
200 | pd.set_name("AP_Paintings") | 226 | pd.set_name("AP_Paintings") |
201 | self.add_child(pd) | 227 | self.add_child(pd) |
202 | 228 | ||
203 | var all_paintings = pd.kALL_PAINTINGS | ||
204 | |||
205 | var classes = {} | 229 | var classes = {} |
206 | for painting in apclient._paintings_mapping.values(): | 230 | for painting in apclient._paintings_mapping.values(): |
207 | if not classes.has(painting): | 231 | if not classes.has(painting): |
diff --git a/Archipelago/paintingdata.gd b/Archipelago/paintingdata.gd deleted file mode 100644 index f82063d..0000000 --- a/Archipelago/paintingdata.gd +++ /dev/null | |||
@@ -1,189 +0,0 @@ | |||
1 | extends Node | ||
2 | |||
3 | const kALL_PAINTINGS = [ | ||
4 | "arrows", | ||
5 | "beach", | ||
6 | "bg_1_stonks", | ||
7 | "bg_alison", | ||
8 | "bg_aquatechture", | ||
9 | "bg_automata", | ||
10 | "bg_barbell", | ||
11 | "bg_basketball", | ||
12 | "bg_bass", | ||
13 | "bg_bee", | ||
14 | "bg_bg1", | ||
15 | "bg_bg2", | ||
16 | "bg_bg3", | ||
17 | "bg_bg4", | ||
18 | "bg_bg5", | ||
19 | "bg_bg6", | ||
20 | "bg_bg7", | ||
21 | "bg_bg8", | ||
22 | "bg_bookshelf", | ||
23 | "bg_boxer", | ||
24 | "bg_box_black", | ||
25 | "bg_box_blue", | ||
26 | "bg_box_green", | ||
27 | "bg_box_orange", | ||
28 | "bg_box_purple", | ||
29 | "bg_box_red", | ||
30 | "bg_box_white", | ||
31 | "bg_bread", | ||
32 | "bg_breakfast", | ||
33 | "bg_breakout", | ||
34 | "bg_bright_square", | ||
35 | "bg_bush", | ||
36 | "bg_candle", | ||
37 | "bg_cannoe", | ||
38 | "bg_cannon", | ||
39 | "bg_car", | ||
40 | "bg_cat", | ||
41 | "bg_champion", | ||
42 | "bg_cheese", | ||
43 | "bg_chomp", | ||
44 | "bg_colin", | ||
45 | "bg_colorcentric", | ||
46 | "bg_cooking", | ||
47 | "bg_cow", | ||
48 | "bg_david", | ||
49 | "bg_distant_planet", | ||
50 | "bg_dragon_scale", | ||
51 | "bg_duck", | ||
52 | "bg_egg", | ||
53 | "bg_emt", | ||
54 | "bg_enigma", | ||
55 | "bg_farmer", | ||
56 | "bg_feeling_still", | ||
57 | "bg_fish2", | ||
58 | "bg_fish", | ||
59 | "bg_flowbot", | ||
60 | "bg_fourth", | ||
61 | "bg_fractured", | ||
62 | "bg_frog", | ||
63 | "bg_gene", | ||
64 | "bg_good_morning_sun", | ||
65 | "bg_good_night_moon", | ||
66 | "bg_grave", | ||
67 | "bg_great_wave", | ||
68 | "bg_grooves", | ||
69 | "bg_growth", | ||
70 | "bg_halloween_2", | ||
71 | "bg_hammering", | ||
72 | "bg_hazard", | ||
73 | "bg_hilbert", | ||
74 | "bg_interconnection", | ||
75 | "bg_in_the_weeds", | ||
76 | "bg_jhon", | ||
77 | "bg_knight", | ||
78 | "bg_knight_night", | ||
79 | "bg_laboratory", | ||
80 | "bg_life", | ||
81 | "bg_lingo", | ||
82 | "bg_long_nose", | ||
83 | "bg_magic_trick", | ||
84 | "bg_manifold_tree", | ||
85 | "bg_margret", | ||
86 | "bg_marshmallow", | ||
87 | "bg_mona_lisa", | ||
88 | "bg_moonbound", | ||
89 | "bg_mountain", | ||
90 | "bg_nose", | ||
91 | "bg_notnerb", | ||
92 | "bg_pear", | ||
93 | "bg_pearson", | ||
94 | "bg_pencils", | ||
95 | "bg_penguin", | ||
96 | "bg_planet_eclipse", | ||
97 | "bg_planet_gas_giant", | ||
98 | "bg_planet_ringed", | ||
99 | "bg_quarterly_review", | ||
100 | "bg_rabbit", | ||
101 | "bg_reacher", | ||
102 | "bg_roboworker", | ||
103 | "bg_sandcastle", | ||
104 | "bg_sax", | ||
105 | "bg_scorpion", | ||
106 | "bg_sheryl", | ||
107 | "bg_skew_tree", | ||
108 | "bg_snow_day", | ||
109 | "bg_spare", | ||
110 | "bg_sport_shirt", | ||
111 | "bg_squares", | ||
112 | "bg_stained_glass", | ||
113 | "bg_stakeout", | ||
114 | "bg_starry_night", | ||
115 | "bg_sub", | ||
116 | "bg_sushi", | ||
117 | "bg_taco", | ||
118 | "bg_talking", | ||
119 | "bg_teris", | ||
120 | "bg_timmy", | ||
121 | "bg_tomato", | ||
122 | "bg_trumpet", | ||
123 | "bg_two_tall", | ||
124 | "bg_watermelon", | ||
125 | "bg_waves", | ||
126 | "bg_wrench", | ||
127 | "blueman", | ||
128 | "boxes", | ||
129 | "catlike", | ||
130 | "cherry", | ||
131 | "clock", | ||
132 | "colors", | ||
133 | "crep", | ||
134 | "crown", | ||
135 | "egg", | ||
136 | "eight", | ||
137 | "electrons", | ||
138 | "emmy", | ||
139 | "ether", | ||
140 | "eyes", | ||
141 | "eyesyellow", | ||
142 | "flower", | ||
143 | "fruitbowl", | ||
144 | "garden", | ||
145 | "gardenexploded", | ||
146 | "hatkirby", | ||
147 | "hatman", | ||
148 | "hi", | ||
149 | "hi_solved", | ||
150 | "icy", | ||
151 | "ig_note", | ||
152 | "ig_rose", | ||
153 | "kiwi", | ||
154 | "knot", | ||
155 | "map", | ||
156 | "maze", | ||
157 | "mittens", | ||
158 | "ninjonicx", | ||
159 | "ninjonicx_square", | ||
160 | "noka", | ||
161 | "ntwiles", | ||
162 | "owl", | ||
163 | "panda", | ||
164 | "pattern_gold", | ||
165 | "pattern_gray", | ||
166 | "pattern_icely", | ||
167 | "pattern_purple", | ||
168 | "pattern_solar", | ||
169 | "pencil", | ||
170 | "rainbow", | ||
171 | "redman", | ||
172 | "rever", | ||
173 | "rm_tower", | ||
174 | "rubrica", | ||
175 | "samswine", | ||
176 | "smile", | ||
177 | "smile_red", | ||
178 | "snowman", | ||
179 | "symmetry", | ||
180 | "symmetry_2", | ||
181 | "taiji", | ||
182 | "tree", | ||
183 | "tst_box_black_lav", | ||
184 | "tst_box_magenta", | ||
185 | "tst_box_mint", | ||
186 | "undalevein", | ||
187 | "yinyang", | ||
188 | "zombie" | ||
189 | ] | ||