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.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/apworld/client/client.gd b/apworld/client/client.gd index 54d3d67..c149482 100644 --- a/apworld/client/client.gd +++ b/apworld/client/client.gd
@@ -26,6 +26,7 @@ var _accessible_locations = []
26var _accessible_worldports = [] 26var _accessible_worldports = []
27var _goal_accessible = false 27var _goal_accessible = false
28var _latched_doors = [] 28var _latched_doors = []
29var _hinted_locations = []
29 30
30signal could_not_connect 31signal could_not_connect
31signal connect_status 32signal connect_status
@@ -41,6 +42,7 @@ signal checked_locations_updated
41signal ignored_locations_updated(locations) 42signal ignored_locations_updated(locations)
42signal checked_worldports_updated 43signal checked_worldports_updated
43signal keyboard_update_received 44signal keyboard_update_received
45signal hinted_locations_updated
44 46
45 47
46func _init(): 48func _init():
@@ -207,6 +209,14 @@ func _on_web_socket_server_message_received(_peer_id: int, packet: String) -> vo
207 209
208 ignored_locations_updated.emit(locs) 210 ignored_locations_updated.emit(locs)
209 211
212 elif cmd == "UpdateHintedLocations":
213 for id in message["locations"]:
214 var iid = int(id)
215 if !_hinted_locations.has(iid):
216 _hinted_locations.append(iid)
217
218 hinted_locations_updated.emit()
219
210 220
211func connectToServer(server, un, pw): 221func connectToServer(server, un, pw):
212 sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) 222 sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}])