diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-09-28 13:33:19 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-09-28 13:33:19 -0400 |
commit | 4af6a856f804c9f86a5f598516af3c9c128e93ee (patch) | |
tree | b02a2a5b63c68723e63fee1e3f1f0eb60908258c /Archipelago | |
parent | d74779819cba60dae9163daccbf6b54c500047b3 (diff) | |
download | lingo-archipelago-4af6a856f804c9f86a5f598516af3c9c128e93ee.tar.gz lingo-archipelago-4af6a856f804c9f86a5f598516af3c9c128e93ee.tar.bz2 lingo-archipelago-4af6a856f804c9f86a5f598516af3c9c128e93ee.zip |
Added support for early color hallways
Diffstat (limited to 'Archipelago')
-rw-r--r-- | Archipelago/client.gd | 3 | ||||
-rw-r--r-- | Archipelago/load.gd | 58 |
2 files changed, 49 insertions, 12 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 0403d67..b481703 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -92,6 +92,7 @@ var _painting_shuffle = false | |||
92 | var _mastery_achievements = 21 | 92 | var _mastery_achievements = 21 |
93 | var _level_2_requirement = 223 | 93 | var _level_2_requirement = 223 |
94 | var _location_classification_bit = 0 | 94 | var _location_classification_bit = 0 |
95 | var _early_color_hallways = false | ||
95 | var _slot_seed = 0 | 96 | var _slot_seed = 0 |
96 | 97 | ||
97 | var _map_loaded = false | 98 | var _map_loaded = false |
@@ -264,6 +265,8 @@ func _on_data(): | |||
264 | _location_classification_bit = kCLASSIFICATION_LOCAL_REDUCED | 265 | _location_classification_bit = kCLASSIFICATION_LOCAL_REDUCED |
265 | elif _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_INSANITY: | 266 | elif _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_INSANITY: |
266 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 267 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY |
268 | if _slot_data.has("early_color_hallways"): | ||
269 | _early_color_hallways = _slot_data["early_color_hallways"] | ||
267 | 270 | ||
268 | _puzzle_skips = 0 | 271 | _puzzle_skips = 0 |
269 | 272 | ||
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index d2977dd..fa16f2a 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -6,6 +6,7 @@ const EXCLUDED_PAINTINGS = [ | |||
6 | "ascension_nw.tscn", | 6 | "ascension_nw.tscn", |
7 | "ascension_se.tscn", | 7 | "ascension_se.tscn", |
8 | "ascension_sw.tscn", | 8 | "ascension_sw.tscn", |
9 | "dan_L1_gate.tscn", | ||
9 | "frame.tscn", | 10 | "frame.tscn", |
10 | "scenery_0.tscn", | 11 | "scenery_0.tscn", |
11 | "scenery_1.tscn", | 12 | "scenery_1.tscn", |
@@ -284,6 +285,36 @@ func _load(): | |||
284 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" | 285 | "../../../Panels/Countdown Panels/Panel_1234567890_wanderlust" |
285 | ] | 286 | ] |
286 | 287 | ||
288 | if apclient._early_color_hallways: | ||
289 | var painting_scene = load("res://nodes/paintings/dan_L1_gate.tscn") | ||
290 | var mypainting_script = ResourceLoader.load("user://maps/Archipelago/mypainting.gd") | ||
291 | |||
292 | var exit_painting = painting_scene.instance() | ||
293 | exit_painting.set_name("color_exit_painting") | ||
294 | exit_painting.translation.x = -98.75 | ||
295 | exit_painting.translation.y = 1 | ||
296 | exit_painting.translation.z = 3.5 | ||
297 | exit_painting.rotation_degrees.y = -90 | ||
298 | |||
299 | var exit_mps = mypainting_script.new() | ||
300 | exit_mps.set_name("Script") | ||
301 | exit_mps.orientation = "west" | ||
302 | exit_painting.add_child(exit_mps) | ||
303 | $Decorations/Paintings.add_child(exit_painting) | ||
304 | |||
305 | var enter_painting = painting_scene.instance() | ||
306 | enter_painting.set_name("color_enter_painting") | ||
307 | enter_painting.translation.x = 4.5 | ||
308 | enter_painting.translation.y = 1 | ||
309 | enter_painting.translation.z = 6.75 | ||
310 | |||
311 | var enter_mps = mypainting_script.new() | ||
312 | enter_mps.set_name("Script") | ||
313 | enter_mps.orientation = "south" | ||
314 | enter_mps.target = exit_mps | ||
315 | enter_painting.add_child(enter_mps) | ||
316 | $Decorations/Paintings.add_child(enter_painting) | ||
317 | |||
287 | # Randomize the paintings, if necessary. | 318 | # Randomize the paintings, if necessary. |
288 | if apclient._painting_shuffle: | 319 | if apclient._painting_shuffle: |
289 | var paintings_dir = Directory.new() | 320 | var paintings_dir = Directory.new() |
@@ -326,7 +357,7 @@ func _load(): | |||
326 | if remaining_size >= all_paintings.size(): | 357 | if remaining_size >= all_paintings.size(): |
327 | remaining_size = all_paintings.size() | 358 | remaining_size = all_paintings.size() |
328 | var remaining = [] | 359 | var remaining = [] |
329 | for i in range(0, remaining_size): | 360 | for _i in range(0, remaining_size): |
330 | var j = rng.randi_range(0, all_paintings.size() - 1) | 361 | var j = rng.randi_range(0, all_paintings.size() - 1) |
331 | remaining.append(all_paintings[j]) | 362 | remaining.append(all_paintings[j]) |
332 | all_paintings.remove(j) | 363 | all_paintings.remove(j) |
@@ -463,26 +494,29 @@ func instantiate_painting(name, scene): | |||
463 | var new_painting = painting_scene.instance() | 494 | var new_painting = painting_scene.instance() |
464 | new_painting.set_name(name) | 495 | new_painting.set_name(name) |
465 | 496 | ||
466 | var old_painting = self.get_node("Decorations/Paintings").get_node(name) | 497 | var old_painting = self.get_node("Decorations/Paintings").get_node_or_null(name) |
467 | new_painting.translation = old_painting.translation | 498 | if old_painting != null: |
468 | new_painting.rotation = old_painting.rotation | 499 | new_painting.translation = old_painting.translation |
500 | new_painting.rotation = old_painting.rotation | ||
469 | 501 | ||
470 | var mypainting_script = ResourceLoader.load("user://maps/Archipelago/mypainting.gd") | 502 | var mypainting_script = ResourceLoader.load("user://maps/Archipelago/mypainting.gd") |
471 | var mps_inst = mypainting_script.new() | 503 | var mps_inst = mypainting_script.new() |
472 | mps_inst.set_name("Script") | 504 | mps_inst.set_name("Script") |
473 | 505 | ||
474 | var gamedata = apclient.get_node("Gamedata") | 506 | var gamedata = apclient.get_node("Gamedata") |
475 | var pconfig = gamedata.paintings[name] | 507 | if gamedata.paintings.has(name): |
476 | mps_inst.orientation = pconfig["orientation"] | 508 | var pconfig = gamedata.paintings[name] |
477 | if pconfig["move"]: | 509 | mps_inst.orientation = pconfig["orientation"] |
478 | mps_inst.move = true | 510 | if pconfig["move"]: |
479 | mps_inst.move_to_x = old_painting.move_to_x | 511 | mps_inst.move = true |
480 | mps_inst.move_to_z = old_painting.move_to_z | 512 | mps_inst.move_to_x = old_painting.move_to_x |
481 | mps_inst.key = old_painting.key | 513 | mps_inst.move_to_z = old_painting.move_to_z |
514 | mps_inst.key = old_painting.key | ||
482 | 515 | ||
483 | self.get_node("AP_Paintings").add_child(new_painting) | 516 | self.get_node("AP_Paintings").add_child(new_painting) |
484 | new_painting.add_child(mps_inst) | 517 | new_painting.add_child(mps_inst) |
485 | old_painting.queue_free() | 518 | if old_painting != null: |
519 | old_painting.queue_free() | ||
486 | return mps_inst | 520 | return mps_inst |
487 | 521 | ||
488 | 522 | ||