diff options
Diffstat (limited to 'apworld/client/client.gd')
-rw-r--r-- | apworld/client/client.gd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apworld/client/client.gd b/apworld/client/client.gd index 62d7fd8..e25ad4b 100644 --- a/apworld/client/client.gd +++ b/apworld/client/client.gd | |||
@@ -187,6 +187,12 @@ func _on_web_socket_server_message_received(_peer_id: int, packet: String) -> vo | |||
187 | 187 | ||
188 | keyboard_update_received.emit(updates) | 188 | keyboard_update_received.emit(updates) |
189 | 189 | ||
190 | elif cmd == "PathReply": | ||
191 | var textclient = global.get_node("Textclient") | ||
192 | textclient.display_logical_path( | ||
193 | message["type"], int(message.get("id", null)), message["path"] | ||
194 | ) | ||
195 | |||
190 | 196 | ||
191 | func connectToServer(server, un, pw): | 197 | func connectToServer(server, un, pw): |
192 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) | 198 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) |
@@ -253,6 +259,14 @@ func checkWorldport(port_id): | |||
253 | sendMessage([{"cmd": "CheckWorldport", "port_id": port_id}]) | 259 | sendMessage([{"cmd": "CheckWorldport", "port_id": port_id}]) |
254 | 260 | ||
255 | 261 | ||
262 | func getLogicalPath(object_type, object_id): | ||
263 | var msg = {"cmd": "GetPath", "type": object_type} | ||
264 | if object_id != null: | ||
265 | msg["id"] = object_id | ||
266 | |||
267 | sendMessage([msg]) | ||
268 | |||
269 | |||
256 | func sendQuit(): | 270 | func sendQuit(): |
257 | sendMessage([{"cmd": "Quit"}]) | 271 | sendMessage([{"cmd": "Quit"}]) |
258 | 272 | ||