From 452289b3b6247bb512b9353e0f2c6a9b7090be55 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 4 Nov 2025 14:56:04 -0500 Subject: Split map-specific initialization into separate files --- apworld/client/maps/the_parthenon.gd | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 apworld/client/maps/the_parthenon.gd (limited to 'apworld/client/maps/the_parthenon.gd') diff --git a/apworld/client/maps/the_parthenon.gd b/apworld/client/maps/the_parthenon.gd new file mode 100644 index 0000000..96510da --- /dev/null +++ b/apworld/client/maps/the_parthenon.gd @@ -0,0 +1,51 @@ +func on_map_load(root): + var ap = global.get_node("Archipelago") + + # Add the strict cyan ending validation. + if ap.strict_cyan_ending: + var panel_prefab = preload("res://objects/nodes/panel.tscn") + var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn") + var reverse_prefab = preload("res://objects/nodes/listeners/reversingListener.tscn") + + var previous_panel = null + var next_y = -100 + var words = ["quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"] + for word in words: + var panel = panel_prefab.instantiate() + panel.position = Vector3(0, next_y, 0) + next_y -= 10 + panel.clue = word + panel.symbol = "." + panel.answer = "%s%s" % [word, word] + panel.name = "EndCheck_%s" % word + + var tpl = tpl_prefab.instantiate() + tpl.teleport_point = Vector3(0, 1, -11) + tpl.teleport_rotate = Vector3(-45, 0, 0) + tpl.target_path = panel + tpl.name = "Teleport" + + if previous_panel == null: + tpl.senderGroup.append(NodePath("/root/scene/Panels/Rulers")) + else: + tpl.senders.append(NodePath("../../%s" % previous_panel.name)) + + var reversing = reverse_prefab.instantiate() + reversing.senders.append(NodePath("..")) + reversing.name = "Reversing" + tpl.senders.append(NodePath("../Reversing")) + + panel.add_child.call_deferred(tpl) + panel.add_child.call_deferred(reversing) + root.get_node("/root/scene/Panels").add_child.call_deferred(panel) + + previous_panel = panel + + # Duplicate the door that usually waits on the rulers. We can't set the + # senders here for some reason so we actually set them in the door ready + # function. + var entry1 = root.get_node("/root/scene/Components/Doors/entry_1") + var entry12 = entry1.duplicate() + entry12.name = "spe_entry_1" + entry1.get_parent().add_child.call_deferred(entry12) + entry1.queue_free() -- cgit 1.4.1