diff options
Diffstat (limited to 'apworld/client/client.gd')
| -rw-r--r-- | apworld/client/client.gd | 10 |
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 = [] | |||
| 26 | var _accessible_worldports = [] | 26 | var _accessible_worldports = [] |
| 27 | var _goal_accessible = false | 27 | var _goal_accessible = false |
| 28 | var _latched_doors = [] | 28 | var _latched_doors = [] |
| 29 | var _hinted_locations = [] | ||
| 29 | 30 | ||
| 30 | signal could_not_connect | 31 | signal could_not_connect |
| 31 | signal connect_status | 32 | signal connect_status |
| @@ -41,6 +42,7 @@ signal checked_locations_updated | |||
| 41 | signal ignored_locations_updated(locations) | 42 | signal ignored_locations_updated(locations) |
| 42 | signal checked_worldports_updated | 43 | signal checked_worldports_updated |
| 43 | signal keyboard_update_received | 44 | signal keyboard_update_received |
| 45 | signal hinted_locations_updated | ||
| 44 | 46 | ||
| 45 | 47 | ||
| 46 | func _init(): | 48 | func _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 | ||
| 211 | func connectToServer(server, un, pw): | 221 | func connectToServer(server, un, pw): |
| 212 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) | 222 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) |
