diff options
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r-- | Archipelago/load.gd | 32 |
1 files changed, 28 insertions, 4 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): |