about summary refs log tree commit diff stats
path: root/apworld/client/player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/client/player.gd')
-rw-r--r--apworld/client/player.gd107
1 files changed, 72 insertions, 35 deletions
diff --git a/apworld/client/player.gd b/apworld/client/player.gd index 0e3fb23..65bf54e 100644 --- a/apworld/client/player.gd +++ b/apworld/client/player.gd
@@ -98,38 +98,72 @@ func _ready():
98 old_door.queue_free() 98 old_door.queue_free()
99 get_node("/root/scene/Components/Doors").add_child.call_deferred(new_door) 99 get_node("/root/scene/Components/Doors").add_child.call_deferred(new_door)
100 100
101 # Block off roof access in Daedalus. 101 if global.map == "daedalus":
102 if global.map == "daedalus" and not ap.daedalus_roof_access: 102 # Teleport the direction panels when the stairs are there.
103 _set_up_invis_wall(75.5, 11, -24.5, 1, 10, 49) 103 var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn")
104 _set_up_invis_wall(51.5, 11, -17, 16, 10, 1) 104
105 _set_up_invis_wall(46, 10, -9.5, 1, 10, 10) 105 var dir1 = get_node("/root/scene/Panels/Castle Entrance/castle_direction_1")
106 _set_up_invis_wall(67.5, 11, 17, 16, 10, 1) 106 var dir1_tpl = tpl_prefab.instantiate()
107 _set_up_invis_wall(50.5, 11, 14, 10, 10, 1) 107 dir1_tpl.target_path = dir1
108 _set_up_invis_wall(39, 10, 18.5, 1, 10, 22) 108 dir1_tpl.teleport_point = Vector3(59.5, 8, -6.5)
109 _set_up_invis_wall(20, 15, 18.5, 1, 10, 16) 109 dir1_tpl.teleport_rotate = Vector3(-45, 0, 0)
110 _set_up_invis_wall(11.5, 15, 3, 32, 10, 1) 110 dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south"))
111 _set_up_invis_wall(11.5, 16, -20, 14, 20, 1) 111 dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north"))
112 _set_up_invis_wall(14, 16, -26.5, 1, 20, 4) 112 dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west"))
113 _set_up_invis_wall(28.5, 20.5, -26.5, 1, 15, 25) 113 dir1.add_child.call_deferred(dir1_tpl)
114 _set_up_invis_wall(40.5, 20.5, -11, 30, 15, 1) 114
115 _set_up_invis_wall(50.5, 15, 5.5, 7, 10, 1) 115 var dir2 = get_node("/root/scene/Panels/Castle Entrance/castle_direction_2")
116 _set_up_invis_wall(83.5, 33.5, 5.5, 1, 7, 11) 116 var dir2_tpl = tpl_prefab.instantiate()
117 _set_up_invis_wall(83.5, 33.5, -5.5, 1, 7, 11) 117 dir2_tpl.target_path = dir2
118 118 dir2_tpl.teleport_point = Vector3(59.5, 8, 6.5)
119 var warp_exit_prefab = preload("res://objects/nodes/exit.tscn") 119 dir2_tpl.teleport_rotate = Vector3(-45, -180, 0)
120 var warp_exit = warp_exit_prefab.instantiate() 120 dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south"))
121 warp_exit.name = "roof_access_blocker_warp_exit" 121 dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north"))
122 warp_exit.position = Vector3(58, 10, 0) 122 dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west"))
123 warp_exit.rotation_degrees.y = 90 123 dir2.add_child.call_deferred(dir2_tpl)
124 get_parent().add_child.call_deferred(warp_exit) 124
125 125 var dir3 = get_node("/root/scene/Panels/Castle Entrance/castle_direction_3")
126 var warp_enter_prefab = preload("res://objects/nodes/teleportAuto.tscn") 126 var dir3_tpl = tpl_prefab.instantiate()
127 var warp_enter = warp_enter_prefab.instantiate() 127 dir3_tpl.target_path = dir3
128 warp_enter.target = warp_exit 128 dir3_tpl.teleport_point = Vector3(54, 8, 0)
129 warp_enter.position = Vector3(76.5, 30, 1) 129 dir3_tpl.teleport_rotate = Vector3(-45, 90, 0)
130 warp_enter.scale = Vector3(4, 1.5, 1) 130 dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south"))
131 warp_enter.rotation_degrees.y = 90 131 dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north"))
132 get_parent().add_child.call_deferred(warp_enter) 132 dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west"))
133 dir3.add_child.call_deferred(dir3_tpl)
134
135 # Block off roof access in Daedalus.
136 if not ap.daedalus_roof_access:
137 _set_up_invis_wall(75.5, 11, -24.5, 1, 10, 49)
138 _set_up_invis_wall(51.5, 11, -17, 16, 10, 1)
139 _set_up_invis_wall(46, 10, -9.5, 1, 10, 10)
140 _set_up_invis_wall(67.5, 11, 17, 16, 10, 1)
141 _set_up_invis_wall(50.5, 11, 14, 10, 10, 1)
142 _set_up_invis_wall(39, 10, 18.5, 1, 10, 22)
143 _set_up_invis_wall(20, 15, 18.5, 1, 10, 16)
144 _set_up_invis_wall(11.5, 15, 3, 32, 10, 1)
145 _set_up_invis_wall(11.5, 16, -20, 14, 20, 1)
146 _set_up_invis_wall(14, 16, -26.5, 1, 20, 4)
147 _set_up_invis_wall(28.5, 20.5, -26.5, 1, 15, 25)
148 _set_up_invis_wall(40.5, 20.5, -11, 30, 15, 1)
149 _set_up_invis_wall(50.5, 15, 5.5, 7, 10, 1)
150 _set_up_invis_wall(83.5, 33.5, 5.5, 1, 7, 11)
151 _set_up_invis_wall(83.5, 33.5, -5.5, 1, 7, 11)
152
153 var warp_exit_prefab = preload("res://objects/nodes/exit.tscn")
154 var warp_exit = warp_exit_prefab.instantiate()
155 warp_exit.name = "roof_access_blocker_warp_exit"
156 warp_exit.position = Vector3(58, 10, 0)
157 warp_exit.rotation_degrees.y = 90
158 get_parent().add_child.call_deferred(warp_exit)
159
160 var warp_enter_prefab = preload("res://objects/nodes/teleportAuto.tscn")
161 var warp_enter = warp_enter_prefab.instantiate()
162 warp_enter.target = warp_exit
163 warp_enter.position = Vector3(76.5, 30, 1)
164 warp_enter.scale = Vector3(4, 1.5, 1)
165 warp_enter.rotation_degrees.y = 90
166 get_parent().add_child.call_deferred(warp_enter)
133 167
134 if global.map == "the_entry": 168 if global.map == "the_entry":
135 # Remove door behind X1. 169 # Remove door behind X1.
@@ -604,9 +638,12 @@ func _ready():
604 continue 638 continue
605 639
606 if ( 640 if (
607 door.get_type() == gamedata.SCRIPT_proto.DoorType.ITEM_ONLY 641 not (door.has_legacy_location() and door.get_legacy_location())
608 or door.get_type() == gamedata.SCRIPT_proto.DoorType.GALLERY_PAINTING 642 and (
609 or door.get_type() == gamedata.SCRIPT_proto.DoorType.CONTROL_CENTER_COLOR 643 door.get_type() == gamedata.SCRIPT_proto.DoorType.ITEM_ONLY
644 or door.get_type() == gamedata.SCRIPT_proto.DoorType.GALLERY_PAINTING
645 or door.get_type() == gamedata.SCRIPT_proto.DoorType.CONTROL_CENTER_COLOR
646 )
610 ): 647 ):
611 continue 648 continue
612 649