diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-11-04 14:56:04 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-11-04 14:56:04 -0500 |
| commit | 452289b3b6247bb512b9353e0f2c6a9b7090be55 (patch) | |
| tree | 499bb3c365cb91cb161b8b0e9bf51c6d5c0d72f8 /apworld/client/maps/the_entry.gd | |
| parent | 24a59794f408c6aa878a8477a920a1d7b7d9c4c5 (diff) | |
| download | lingo2-archipelago-452289b3b6247bb512b9353e0f2c6a9b7090be55.tar.gz lingo2-archipelago-452289b3b6247bb512b9353e0f2c6a9b7090be55.tar.bz2 lingo2-archipelago-452289b3b6247bb512b9353e0f2c6a9b7090be55.zip | |
Split map-specific initialization into separate files
Diffstat (limited to 'apworld/client/maps/the_entry.gd')
| -rw-r--r-- | apworld/client/maps/the_entry.gd | 156 |
1 files changed, 156 insertions, 0 deletions
| diff --git a/apworld/client/maps/the_entry.gd b/apworld/client/maps/the_entry.gd new file mode 100644 index 0000000..3608bb3 --- /dev/null +++ b/apworld/client/maps/the_entry.gd | |||
| @@ -0,0 +1,156 @@ | |||
| 1 | func on_map_load(root): | ||
| 2 | var ap = global.get_node("Archipelago") | ||
| 3 | |||
| 4 | # Remove door behind X1. | ||
| 5 | var door_node = root.get_node("/root/scene/Components/Doors/exit_1") | ||
| 6 | door_node.handleTriggered() | ||
| 7 | |||
| 8 | # Display win condition. | ||
| 9 | var sign_prefab = preload("res://objects/nodes/sign.tscn") | ||
| 10 | var sign1 = sign_prefab.instantiate() | ||
| 11 | sign1.position = Vector3(-7, 5, -15.01) | ||
| 12 | sign1.text = "victory" | ||
| 13 | root.get_node("/root/scene").add_child.call_deferred(sign1) | ||
| 14 | |||
| 15 | var sign2 = sign_prefab.instantiate() | ||
| 16 | sign2.position = Vector3(-7, 4, -15.01) | ||
| 17 | sign2.text = "%s ending" % ap.kEndingNameByVictoryValue.get(ap.victory_condition, "?") | ||
| 18 | |||
| 19 | var sign2_color = ap.kEndingNameByVictoryValue.get(ap.victory_condition, "coral").to_lower() | ||
| 20 | if sign2_color == "white": | ||
| 21 | sign2_color = "silver" | ||
| 22 | |||
| 23 | sign2.material = load("res://assets/materials/%s.material" % sign2_color) | ||
| 24 | root.get_node("/root/scene").add_child.call_deferred(sign2) | ||
| 25 | |||
| 26 | # Add the gift map entry panel if needed. | ||
| 27 | if not ap.enable_gift_maps.is_empty(): | ||
| 28 | var panel_prefab = preload("res://objects/nodes/panel.tscn") | ||
| 29 | var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn") | ||
| 30 | var wpl_prefab = preload("res://objects/nodes/listeners/worldportListener.tscn") | ||
| 31 | |||
| 32 | var giftmap_parent = Node.new() | ||
| 33 | giftmap_parent.name = "GiftMapEntrance" | ||
| 34 | root.get_node("/root/scene/Components").add_child.call_deferred(giftmap_parent) | ||
| 35 | |||
| 36 | var symbolless_player = "" | ||
| 37 | for i in range(ap.client.ap_user.length()): | ||
| 38 | if "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".contains( | ||
| 39 | ap.client.ap_user[i] | ||
| 40 | ): | ||
| 41 | symbolless_player = symbolless_player + ap.client.ap_user[i].to_lower() | ||
| 42 | |||
| 43 | var giftmap_panel = panel_prefab.instantiate() | ||
| 44 | giftmap_panel.name = "Panel" | ||
| 45 | giftmap_panel.position = Vector3(33.5, -190, 5.5) | ||
| 46 | giftmap_panel.rotation_degrees = Vector3(-45, 0, 0) | ||
| 47 | giftmap_panel.clue = "player" | ||
| 48 | giftmap_panel.answer = symbolless_player | ||
| 49 | |||
| 50 | if ap.enable_gift_maps.has("The Advanced"): | ||
| 51 | var icely_panel = panel_prefab.instantiate() | ||
| 52 | icely_panel.name = "IcelyPanel" | ||
| 53 | icely_panel.answer = "icely" | ||
| 54 | icely_panel.position = Vector3(33.5, -200, 5.5) | ||
| 55 | giftmap_panel.proxies.append(NodePath("../IcelyPanel")) | ||
| 56 | giftmap_parent.add_child.call_deferred(icely_panel) | ||
| 57 | |||
| 58 | var icely_wpl = wpl_prefab.instantiate() | ||
| 59 | icely_wpl.name = "IcelyWpl" | ||
| 60 | icely_wpl.exit = "the_advanced" | ||
| 61 | icely_wpl.senders.append(NodePath("../IcelyPanel")) | ||
| 62 | giftmap_parent.add_child.call_deferred(icely_wpl) | ||
| 63 | |||
| 64 | if ap.enable_gift_maps.has("The Charismatic"): | ||
| 65 | var souvey_panel = panel_prefab.instantiate() | ||
| 66 | souvey_panel.name = "SouveyPanel" | ||
| 67 | souvey_panel.answer = "souvey" | ||
| 68 | souvey_panel.position = Vector3(33.5, -210, 5.5) | ||
| 69 | giftmap_panel.proxies.append(NodePath("../SouveyPanel")) | ||
| 70 | giftmap_parent.add_child.call_deferred(souvey_panel) | ||
| 71 | |||
| 72 | var souvey_wpl = wpl_prefab.instantiate() | ||
| 73 | souvey_wpl.name = "SouveyWpl" | ||
| 74 | souvey_wpl.exit = "the_charismatic" | ||
| 75 | souvey_wpl.senders.append(NodePath("../SouveyPanel")) | ||
| 76 | giftmap_parent.add_child.call_deferred(souvey_wpl) | ||
| 77 | |||
| 78 | if ap.enable_gift_maps.has("The Crystalline"): | ||
| 79 | var q_panel = panel_prefab.instantiate() | ||
| 80 | q_panel.name = "QPanel" | ||
| 81 | q_panel.answer = "q" | ||
| 82 | q_panel.position = Vector3(33.5, -220, 5.5) | ||
| 83 | giftmap_panel.proxies.append(NodePath("../QPanel")) | ||
| 84 | giftmap_parent.add_child.call_deferred(q_panel) | ||
| 85 | |||
| 86 | var q_wpl = wpl_prefab.instantiate() | ||
| 87 | q_wpl.name = "QWpl" | ||
| 88 | q_wpl.exit = "the_crystalline" | ||
| 89 | q_wpl.senders.append(NodePath("../QPanel")) | ||
| 90 | giftmap_parent.add_child.call_deferred(q_wpl) | ||
| 91 | |||
| 92 | if ap.enable_gift_maps.has("The Fuzzy"): | ||
| 93 | var gongus_panel = panel_prefab.instantiate() | ||
| 94 | gongus_panel.name = "GongusPanel" | ||
| 95 | gongus_panel.answer = "gongus" | ||
| 96 | gongus_panel.position = Vector3(33.5, -260, 5.5) | ||
| 97 | giftmap_panel.proxies.append(NodePath("../GongusPanel")) | ||
| 98 | giftmap_parent.add_child.call_deferred(gongus_panel) | ||
| 99 | |||
| 100 | var kiwi_panel = panel_prefab.instantiate() | ||
| 101 | kiwi_panel.name = "KiwiPanel" | ||
| 102 | kiwi_panel.answer = "kiwi" | ||
| 103 | kiwi_panel.position = Vector3(33.5, -270, 5.5) | ||
| 104 | giftmap_panel.proxies.append(NodePath("../KiwiPanel")) | ||
| 105 | giftmap_parent.add_child.call_deferred(kiwi_panel) | ||
| 106 | |||
| 107 | var fuzzy_wpl = wpl_prefab.instantiate() | ||
| 108 | fuzzy_wpl.name = "FuzzyWpl" | ||
| 109 | fuzzy_wpl.exit = "the_fuzzy" | ||
| 110 | fuzzy_wpl.senders.append(NodePath("../GongusPanel")) | ||
| 111 | fuzzy_wpl.senders.append(NodePath("../KiwiPanel")) | ||
| 112 | fuzzy_wpl.complete_at = 1 | ||
| 113 | giftmap_parent.add_child.call_deferred(fuzzy_wpl) | ||
| 114 | |||
| 115 | if ap.enable_gift_maps.has("The Stellar"): | ||
| 116 | var hatkirby_panel = panel_prefab.instantiate() | ||
| 117 | hatkirby_panel.name = "HatkirbyPanel" | ||
| 118 | hatkirby_panel.answer = "hatkirby" | ||
| 119 | hatkirby_panel.position = Vector3(33.5, -230, 5.5) | ||
| 120 | giftmap_panel.proxies.append(NodePath("../HatkirbyPanel")) | ||
| 121 | giftmap_parent.add_child.call_deferred(hatkirby_panel) | ||
| 122 | |||
| 123 | var kirby_panel = panel_prefab.instantiate() | ||
| 124 | kirby_panel.name = "KirbyPanel" | ||
| 125 | kirby_panel.answer = "kirby" | ||
| 126 | kirby_panel.position = Vector3(33.5, -240, 5.5) | ||
| 127 | giftmap_panel.proxies.append(NodePath("../KirbyPanel")) | ||
| 128 | giftmap_parent.add_child.call_deferred(kirby_panel) | ||
| 129 | |||
| 130 | var star_panel = panel_prefab.instantiate() | ||
| 131 | star_panel.name = "StarPanel" | ||
| 132 | star_panel.answer = "star" | ||
| 133 | star_panel.position = Vector3(33.5, -250, 5.5) | ||
| 134 | giftmap_panel.proxies.append(NodePath("../StarPanel")) | ||
| 135 | giftmap_parent.add_child.call_deferred(star_panel) | ||
| 136 | |||
| 137 | var stellar_wpl = wpl_prefab.instantiate() | ||
| 138 | stellar_wpl.name = "StellarWpl" | ||
| 139 | stellar_wpl.exit = "the_stellar" | ||
| 140 | stellar_wpl.senders.append(NodePath("../HatkirbyPanel")) | ||
| 141 | stellar_wpl.senders.append(NodePath("../KirbyPanel")) | ||
| 142 | stellar_wpl.senders.append(NodePath("../StarPanel")) | ||
| 143 | stellar_wpl.complete_at = 1 | ||
| 144 | giftmap_parent.add_child.call_deferred(stellar_wpl) | ||
| 145 | |||
| 146 | giftmap_parent.add_child.call_deferred(giftmap_panel) | ||
| 147 | |||
| 148 | var giftmap_tpl = tpl_prefab.instantiate() | ||
| 149 | giftmap_tpl.name = "PanelTeleporter" | ||
| 150 | giftmap_tpl.teleport_point = Vector3(33.5, 1, 5.5) | ||
| 151 | giftmap_tpl.teleport_rotate = Vector3(-45, 0, 0) | ||
| 152 | giftmap_tpl.target_path = giftmap_panel | ||
| 153 | giftmap_tpl.senders.append( | ||
| 154 | NodePath("/root/scene/Components/Listeners/unlockReaderListenerDoubles") | ||
| 155 | ) | ||
| 156 | giftmap_parent.add_child.call_deferred(giftmap_tpl) | ||
