about summary refs log tree commit diff stats
path: root/apworld/client/worldport.gd
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/client/worldport.gd')
-rw-r--r--apworld/client/worldport.gd10
1 files changed, 9 insertions, 1 deletions
diff --git a/apworld/client/worldport.gd b/apworld/client/worldport.gd index cdca248..ed9891e 100644 --- a/apworld/client/worldport.gd +++ b/apworld/client/worldport.gd
@@ -3,6 +3,8 @@ extends "res://scripts/nodes/worldport.gd"
3var absolute_rotation = false 3var absolute_rotation = false
4var target_rotation = 0 4var target_rotation = 0
5 5
6var port_id = null
7
6 8
7func _ready(): 9func _ready():
8 var node_path = String( 10 var node_path = String(
@@ -13,7 +15,7 @@ func _ready():
13 15
14 if ap.shuffle_worldports: 16 if ap.shuffle_worldports:
15 var gamedata = global.get_node("Gamedata") 17 var gamedata = global.get_node("Gamedata")
16 var port_id = gamedata.get_port_for_map_node_path(global.map, node_path) 18 port_id = gamedata.get_port_for_map_node_path(global.map, node_path)
17 if port_id != null: 19 if port_id != null:
18 if port_id in ap.port_pairings: 20 if port_id in ap.port_pairings:
19 var target_port = gamedata.objects.get_ports()[ap.port_pairings[port_id]] 21 var target_port = gamedata.objects.get_ports()[ap.port_pairings[port_id]]
@@ -29,6 +31,8 @@ func _ready():
29 sets_entry_point = true 31 sets_entry_point = true
30 invisible = false 32 invisible = false
31 fades = true 33 fades = true
34 else:
35 port_id = null
32 36
33 if global.map == "icarus" and exit == "daedalus": 37 if global.map == "icarus" and exit == "daedalus":
34 if not ap.daedalus_roof_access: 38 if not ap.daedalus_roof_access:
@@ -39,6 +43,10 @@ func _ready():
39 43
40func bodyEntered(body): 44func bodyEntered(body):
41 if body.is_in_group("player"): 45 if body.is_in_group("player"):
46 if port_id != null:
47 var ap = global.get_node("Archipelago")
48 ap.client.checkWorldport(port_id)
49
42 if absolute_rotation: 50 if absolute_rotation:
43 entry_rotate.y = target_rotation - body.rotation_degrees.y 51 entry_rotate.y = target_rotation - body.rotation_degrees.y
44 52