diff options
Diffstat (limited to 'apworld/client/maps/the_parthenon.gd')
| -rw-r--r-- | apworld/client/maps/the_parthenon.gd | 51 |
1 files changed, 51 insertions, 0 deletions
| 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 @@ | |||
| 1 | func on_map_load(root): | ||
| 2 | var ap = global.get_node("Archipelago") | ||
| 3 | |||
| 4 | # Add the strict cyan ending validation. | ||
| 5 | if ap.strict_cyan_ending: | ||
| 6 | var panel_prefab = preload("res://objects/nodes/panel.tscn") | ||
| 7 | var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn") | ||
| 8 | var reverse_prefab = preload("res://objects/nodes/listeners/reversingListener.tscn") | ||
| 9 | |||
| 10 | var previous_panel = null | ||
| 11 | var next_y = -100 | ||
| 12 | var words = ["quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"] | ||
| 13 | for word in words: | ||
| 14 | var panel = panel_prefab.instantiate() | ||
| 15 | panel.position = Vector3(0, next_y, 0) | ||
| 16 | next_y -= 10 | ||
| 17 | panel.clue = word | ||
| 18 | panel.symbol = "." | ||
| 19 | panel.answer = "%s%s" % [word, word] | ||
| 20 | panel.name = "EndCheck_%s" % word | ||
| 21 | |||
| 22 | var tpl = tpl_prefab.instantiate() | ||
| 23 | tpl.teleport_point = Vector3(0, 1, -11) | ||
| 24 | tpl.teleport_rotate = Vector3(-45, 0, 0) | ||
| 25 | tpl.target_path = panel | ||
| 26 | tpl.name = "Teleport" | ||
| 27 | |||
| 28 | if previous_panel == null: | ||
| 29 | tpl.senderGroup.append(NodePath("/root/scene/Panels/Rulers")) | ||
| 30 | else: | ||
| 31 | tpl.senders.append(NodePath("../../%s" % previous_panel.name)) | ||
| 32 | |||
| 33 | var reversing = reverse_prefab.instantiate() | ||
| 34 | reversing.senders.append(NodePath("..")) | ||
| 35 | reversing.name = "Reversing" | ||
| 36 | tpl.senders.append(NodePath("../Reversing")) | ||
| 37 | |||
| 38 | panel.add_child.call_deferred(tpl) | ||
| 39 | panel.add_child.call_deferred(reversing) | ||
| 40 | root.get_node("/root/scene/Panels").add_child.call_deferred(panel) | ||
| 41 | |||
| 42 | previous_panel = panel | ||
| 43 | |||
| 44 | # Duplicate the door that usually waits on the rulers. We can't set the | ||
| 45 | # senders here for some reason so we actually set them in the door ready | ||
| 46 | # function. | ||
| 47 | var entry1 = root.get_node("/root/scene/Components/Doors/entry_1") | ||
| 48 | var entry12 = entry1.duplicate() | ||
| 49 | entry12.name = "spe_entry_1" | ||
| 50 | entry1.get_parent().add_child.call_deferred(entry12) | ||
| 51 | entry1.queue_free() | ||
