diff options
Diffstat (limited to 'apworld/client/client.gd')
| -rw-r--r-- | apworld/client/client.gd | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/apworld/client/client.gd b/apworld/client/client.gd index ce5ac7e..54d3d67 100644 --- a/apworld/client/client.gd +++ b/apworld/client/client.gd | |||
| @@ -38,6 +38,7 @@ signal hint_received(message) | |||
| 38 | signal door_latched(id) | 38 | signal door_latched(id) | 
| 39 | signal accessible_locations_updated | 39 | signal accessible_locations_updated | 
| 40 | signal checked_locations_updated | 40 | signal checked_locations_updated | 
| 41 | signal ignored_locations_updated(locations) | ||
| 41 | signal checked_worldports_updated | 42 | signal checked_worldports_updated | 
| 42 | signal keyboard_update_received | 43 | signal keyboard_update_received | 
| 43 | 44 | ||
| @@ -199,6 +200,13 @@ func _on_web_socket_server_message_received(_peer_id: int, packet: String) -> vo | |||
| 199 | 200 | ||
| 200 | door_latched.emit(iid) | 201 | door_latched.emit(iid) | 
| 201 | 202 | ||
| 203 | elif cmd == "SetIgnoredLocations": | ||
| 204 | var locs = [] | ||
| 205 | for id in message["locations"]: | ||
| 206 | locs.append(int(id)) | ||
| 207 | |||
| 208 | ignored_locations_updated.emit(locs) | ||
| 209 | |||
| 202 | 210 | ||
| 203 | func connectToServer(server, un, pw): | 211 | func connectToServer(server, un, pw): | 
| 204 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) | 212 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) | 
| @@ -280,6 +288,14 @@ func getLogicalPath(object_type, object_id): | |||
| 280 | sendMessage([msg]) | 288 | sendMessage([msg]) | 
| 281 | 289 | ||
| 282 | 290 | ||
| 291 | func addIgnoredLocation(loc_id): | ||
| 292 | sendMessage([{"cmd": "IgnoreLocation", "id": loc_id}]) | ||
| 293 | |||
| 294 | |||
| 295 | func removeIgnoredLocation(loc_id): | ||
| 296 | sendMessage([{"cmd": "UnignoreLocation", "id": loc_id}]) | ||
| 297 | |||
| 298 | |||
| 283 | func sendQuit(): | 299 | func sendQuit(): | 
| 284 | sendMessage([{"cmd": "Quit"}]) | 300 | sendMessage([{"cmd": "Quit"}]) | 
| 285 | 301 | ||
