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_sun_temple.gd | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 apworld/client/maps/the_sun_temple.gd (limited to 'apworld/client/maps/the_sun_temple.gd') diff --git a/apworld/client/maps/the_sun_temple.gd b/apworld/client/maps/the_sun_temple.gd new file mode 100644 index 0000000..9804bf8 --- /dev/null +++ b/apworld/client/maps/the_sun_temple.gd @@ -0,0 +1,56 @@ +func on_map_load(root): + var ap = global.get_node("Archipelago") + + # Add the strict purple ending validation. + if ap.strict_purple_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 = word + panel.name = "EndCheck_%s" % word + + var tpl = tpl_prefab.instantiate() + tpl.teleport_point = Vector3(0, 1, 0) + tpl.teleport_rotate = Vector3(-45, 180, 0) + tpl.target_path = panel + tpl.name = "Teleport" + + if previous_panel == null: + tpl.senders.append(NodePath("/root/scene/Panels/End/panel_24")) + 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 doors that usually wait on EQUINOX. We can't set the senders + # here for some reason so we actually set them in the door ready function. + var endplat = root.get_node("/root/scene/Components/Doors/EndPlatform") + var endplat2 = endplat.duplicate() + endplat2.name = "spe_EndPlatform" + endplat.get_parent().add_child.call_deferred(endplat2) + endplat.queue_free() + + var entry2 = root.get_node("/root/scene/Components/Doors/entry_2") + var entry22 = entry2.duplicate() + entry22.name = "spe_entry_2" + entry2.get_parent().add_child.call_deferred(entry22) + entry2.queue_free() -- cgit 1.4.1