diff options
Diffstat (limited to 'apworld/client/manager.gd')
-rw-r--r-- | apworld/client/manager.gd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apworld/client/manager.gd b/apworld/client/manager.gd index 2c25269..3facfba 100644 --- a/apworld/client/manager.gd +++ b/apworld/client/manager.gd | |||
@@ -15,6 +15,7 @@ var ap_pass = "" | |||
15 | var connection_history = [] | 15 | var connection_history = [] |
16 | var show_compass = false | 16 | var show_compass = false |
17 | var show_locations = false | 17 | var show_locations = false |
18 | var show_minimap = false | ||
18 | 19 | ||
19 | var client | 20 | var client |
20 | var keyboard | 21 | var keyboard |
@@ -93,6 +94,9 @@ func _init(): | |||
93 | if data.size() > 5: | 94 | if data.size() > 5: |
94 | show_locations = data[5] | 95 | show_locations = data[5] |
95 | 96 | ||
97 | if data.size() > 6: | ||
98 | show_minimap = data[6] | ||
99 | |||
96 | 100 | ||
97 | func _ready(): | 101 | func _ready(): |
98 | client = SCRIPT_client.new() | 102 | client = SCRIPT_client.new() |
@@ -105,6 +109,7 @@ func _ready(): | |||
105 | client.hint_received.connect(_process_hint_received) | 109 | client.hint_received.connect(_process_hint_received) |
106 | client.accessible_locations_updated.connect(_on_accessible_locations_updated) | 110 | client.accessible_locations_updated.connect(_on_accessible_locations_updated) |
107 | client.checked_locations_updated.connect(_on_checked_locations_updated) | 111 | client.checked_locations_updated.connect(_on_checked_locations_updated) |
112 | client.checked_worldports_updated.connect(_on_checked_worldports_updated) | ||
108 | 113 | ||
109 | client.could_not_connect.connect(_client_could_not_connect) | 114 | client.could_not_connect.connect(_client_could_not_connect) |
110 | client.connect_status.connect(_client_connect_status) | 115 | client.connect_status.connect(_client_connect_status) |
@@ -114,6 +119,7 @@ func _ready(): | |||
114 | 119 | ||
115 | keyboard = SCRIPT_keyboard.new() | 120 | keyboard = SCRIPT_keyboard.new() |
116 | add_child(keyboard) | 121 | add_child(keyboard) |
122 | client.keyboard_update_received.connect(keyboard.remote_keyboard_updated) | ||
117 | 123 | ||
118 | 124 | ||
119 | func saveSettings(): | 125 | func saveSettings(): |
@@ -128,6 +134,7 @@ func saveSettings(): | |||
128 | connection_history, | 134 | connection_history, |
129 | show_compass, | 135 | show_compass, |
130 | show_locations, | 136 | show_locations, |
137 | show_minimap, | ||
131 | ] | 138 | ] |
132 | file.store_var(data, true) | 139 | file.store_var(data, true) |
133 | file.close() | 140 | file.close() |
@@ -189,6 +196,7 @@ func _process_item(item, amount): | |||
189 | if gamedata.get_door_map_name(lock[0]) != global.map: | 196 | if gamedata.get_door_map_name(lock[0]) != global.map: |
190 | continue | 197 | continue |
191 | 198 | ||
199 | # TODO: fix doors opening from door groups | ||
192 | var receivers = gamedata.get_door_receivers(lock[0]) | 200 | var receivers = gamedata.get_door_receivers(lock[0]) |
193 | var scene = get_tree().get_root().get_node_or_null("scene") | 201 | var scene = get_tree().get_root().get_node_or_null("scene") |
194 | if scene != null: | 202 | if scene != null: |
@@ -321,6 +329,12 @@ func _on_checked_locations_updated(): | |||
321 | textclient_node.update_locations() | 329 | textclient_node.update_locations() |
322 | 330 | ||
323 | 331 | ||
332 | func _on_checked_worldports_updated(): | ||
333 | var textclient_node = global.get_node("Textclient") | ||
334 | if textclient_node != null: | ||
335 | textclient_node.update_locations() | ||
336 | |||
337 | |||
324 | func _client_could_not_connect(message): | 338 | func _client_could_not_connect(message): |
325 | could_not_connect.emit(message) | 339 | could_not_connect.emit(message) |
326 | 340 | ||