diff options
Diffstat (limited to 'apworld/client/manager.gd')
| -rw-r--r-- | apworld/client/manager.gd | 15 |
1 files changed, 15 insertions, 0 deletions
| diff --git a/apworld/client/manager.gd b/apworld/client/manager.gd index dac09b2..a17bee8 100644 --- a/apworld/client/manager.gd +++ b/apworld/client/manager.gd | |||
| @@ -141,6 +141,7 @@ func _ready(): | |||
| 141 | client.accessible_locations_updated.connect(_on_accessible_locations_updated) | 141 | client.accessible_locations_updated.connect(_on_accessible_locations_updated) |
| 142 | client.checked_locations_updated.connect(_on_checked_locations_updated) | 142 | client.checked_locations_updated.connect(_on_checked_locations_updated) |
| 143 | client.checked_worldports_updated.connect(_on_checked_worldports_updated) | 143 | client.checked_worldports_updated.connect(_on_checked_worldports_updated) |
| 144 | client.door_latched.connect(_on_door_latched) | ||
| 144 | 145 | ||
| 145 | client.could_not_connect.connect(_client_could_not_connect) | 146 | client.could_not_connect.connect(_client_could_not_connect) |
| 146 | client.connect_status.connect(_client_connect_status) | 147 | client.connect_status.connect(_client_connect_status) |
| @@ -376,6 +377,20 @@ func _on_checked_worldports_updated(): | |||
| 376 | textclient_node.update_worldports() | 377 | textclient_node.update_worldports() |
| 377 | 378 | ||
| 378 | 379 | ||
| 380 | func _on_door_latched(door_id): | ||
| 381 | var gamedata = global.get_node("Gamedata") | ||
| 382 | if gamedata.get_door_map_name(door_id) != global.map: | ||
| 383 | return | ||
| 384 | |||
| 385 | var receivers = gamedata.get_door_receivers(door_id) | ||
| 386 | var scene = get_tree().get_root().get_node_or_null("scene") | ||
| 387 | if scene != null: | ||
| 388 | for receiver in receivers: | ||
| 389 | var rnode = scene.get_node_or_null(receiver) | ||
| 390 | if rnode != null: | ||
| 391 | rnode.handleTriggered() | ||
| 392 | |||
| 393 | |||
| 379 | func _client_could_not_connect(message): | 394 | func _client_could_not_connect(message): |
| 380 | could_not_connect.emit(message) | 395 | could_not_connect.emit(message) |
| 381 | 396 | ||
