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/daedalus.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/daedalus.gd')
| -rw-r--r-- | apworld/client/maps/daedalus.gd | 85 |
1 files changed, 85 insertions, 0 deletions
| diff --git a/apworld/client/maps/daedalus.gd b/apworld/client/maps/daedalus.gd new file mode 100644 index 0000000..5fcf7a5 --- /dev/null +++ b/apworld/client/maps/daedalus.gd | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | func on_map_load(root): | ||
| 2 | var ap = global.get_node("Archipelago") | ||
| 3 | |||
| 4 | # Teleport the direction panels when the stairs are there. | ||
| 5 | var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn") | ||
| 6 | |||
| 7 | var dir1 = root.get_node("/root/scene/Panels/Castle Entrance/castle_direction_1") | ||
| 8 | var dir1_tpl = tpl_prefab.instantiate() | ||
| 9 | dir1_tpl.target_path = dir1 | ||
| 10 | dir1_tpl.teleport_point = Vector3(59.5, 8, -6.5) | ||
| 11 | dir1_tpl.teleport_rotate = Vector3(-45, 0, 0) | ||
| 12 | dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south")) | ||
| 13 | dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north")) | ||
| 14 | dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west")) | ||
| 15 | dir1.add_child.call_deferred(dir1_tpl) | ||
| 16 | |||
| 17 | var dir2 = root.get_node("/root/scene/Panels/Castle Entrance/castle_direction_2") | ||
| 18 | var dir2_tpl = tpl_prefab.instantiate() | ||
| 19 | dir2_tpl.target_path = dir2 | ||
| 20 | dir2_tpl.teleport_point = Vector3(59.5, 8, 6.5) | ||
| 21 | dir2_tpl.teleport_rotate = Vector3(-45, -180, 0) | ||
| 22 | dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south")) | ||
| 23 | dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north")) | ||
| 24 | dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west")) | ||
| 25 | dir2.add_child.call_deferred(dir2_tpl) | ||
| 26 | |||
| 27 | var dir3 = root.get_node("/root/scene/Panels/Castle Entrance/castle_direction_3") | ||
| 28 | var dir3_tpl = tpl_prefab.instantiate() | ||
| 29 | dir3_tpl.target_path = dir3 | ||
| 30 | dir3_tpl.teleport_point = Vector3(54, 8, 0) | ||
| 31 | dir3_tpl.teleport_rotate = Vector3(-45, 90, 0) | ||
| 32 | dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south")) | ||
| 33 | dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north")) | ||
| 34 | dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west")) | ||
| 35 | dir3.add_child.call_deferred(dir3_tpl) | ||
| 36 | |||
| 37 | # Block off roof access in Daedalus. | ||
| 38 | if not ap.daedalus_roof_access: | ||
| 39 | _set_up_invis_wall(root, 75.5, 11, -24.5, 1, 10, 49) | ||
| 40 | _set_up_invis_wall(root, 51.5, 11, -17, 16, 10, 1) | ||
| 41 | _set_up_invis_wall(root, 46, 10, -9.5, 1, 10, 10) | ||
| 42 | _set_up_invis_wall(root, 67.5, 11, 17, 16, 10, 1) | ||
| 43 | _set_up_invis_wall(root, 50.5, 11, 14, 10, 10, 1) | ||
| 44 | _set_up_invis_wall(root, 39, 10, 18.5, 1, 10, 22) | ||
| 45 | _set_up_invis_wall(root, 20, 15, 18.5, 1, 10, 16) | ||
| 46 | _set_up_invis_wall(root, 11.5, 15, 3, 32, 10, 1) | ||
| 47 | _set_up_invis_wall(root, 11.5, 16, -20, 14, 20, 1) | ||
| 48 | _set_up_invis_wall(root, 14, 16, -26.5, 1, 20, 4) | ||
| 49 | _set_up_invis_wall(root, 28.5, 20.5, -26.5, 1, 15, 25) | ||
| 50 | _set_up_invis_wall(root, 40.5, 20.5, -11, 30, 15, 1) | ||
| 51 | _set_up_invis_wall(root, 50.5, 15, 5.5, 7, 10, 1) | ||
| 52 | _set_up_invis_wall(root, 83.5, 33.5, 5.5, 1, 7, 11) | ||
| 53 | _set_up_invis_wall(root, 83.5, 33.5, -5.5, 1, 7, 11) | ||
| 54 | |||
| 55 | var warp_exit_prefab = preload("res://objects/nodes/exit.tscn") | ||
| 56 | var warp_exit = warp_exit_prefab.instantiate() | ||
| 57 | warp_exit.name = "roof_access_blocker_warp_exit" | ||
| 58 | warp_exit.position = Vector3(58, 10, 0) | ||
| 59 | warp_exit.rotation_degrees.y = 90 | ||
| 60 | root.get_node("/root/scene").add_child.call_deferred(warp_exit) | ||
| 61 | |||
| 62 | var warp_enter_prefab = preload("res://objects/nodes/teleportAuto.tscn") | ||
| 63 | var warp_enter = warp_enter_prefab.instantiate() | ||
| 64 | warp_enter.target = warp_exit | ||
| 65 | warp_enter.position = Vector3(76.5, 30, 1) | ||
| 66 | warp_enter.scale = Vector3(4, 1.5, 1) | ||
| 67 | warp_enter.rotation_degrees.y = 90 | ||
| 68 | root.get_node("/root/scene").add_child.call_deferred(warp_enter) | ||
| 69 | |||
| 70 | |||
| 71 | func _set_up_invis_wall(root, x, y, z, sx, sy, sz): | ||
| 72 | var prefab = preload("res://objects/nodes/block.tscn") | ||
| 73 | var newwall = prefab.instantiate() | ||
| 74 | newwall.position.x = x | ||
| 75 | newwall.position.y = y | ||
| 76 | newwall.position.z = z | ||
| 77 | newwall.scale.x = sz | ||
| 78 | newwall.scale.y = sy | ||
| 79 | newwall.scale.z = sx | ||
| 80 | newwall.set_surface_override_material(0, preload("res://assets/materials/blackMatte.material")) | ||
| 81 | newwall.visibility_range_end = 3 | ||
| 82 | newwall.visibility_range_end_margin = 1 | ||
| 83 | newwall.visibility_range_fade_mode = RenderingServer.VISIBILITY_RANGE_FADE_SELF | ||
| 84 | newwall.skeleton = ".." | ||
| 85 | root.get_node("/root/scene").add_child.call_deferred(newwall) | ||
