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