about summary refs log tree commit diff stats
path: root/apworld/client/client.gd
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/client/client.gd')
-rw-r--r--apworld/client/client.gd16
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)
38signal door_latched(id) 38signal door_latched(id)
39signal accessible_locations_updated 39signal accessible_locations_updated
40signal checked_locations_updated 40signal checked_locations_updated
41signal ignored_locations_updated(locations)
41signal checked_worldports_updated 42signal checked_worldports_updated
42signal keyboard_update_received 43signal 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
203func connectToServer(server, un, pw): 211func 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
291func addIgnoredLocation(loc_id):
292 sendMessage([{"cmd": "IgnoreLocation", "id": loc_id}])
293
294
295func removeIgnoredLocation(loc_id):
296 sendMessage([{"cmd": "UnignoreLocation", "id": loc_id}])
297
298
283func sendQuit(): 299func sendQuit():
284 sendMessage([{"cmd": "Quit"}]) 300 sendMessage([{"cmd": "Quit"}])
285 301