diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-27 17:14:40 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-27 17:14:40 -0400 |
commit | b0f474bee1c8e1111f7542bf4985136d9aedf340 (patch) | |
tree | ef2aa34bad532ffb2a45d90893dbcd4c378a0dfb /apworld/client/client.gd | |
parent | feb89a44ddf5f93bc476ca29cd02257aea47dc06 (diff) | |
download | lingo2-archipelago-b0f474bee1c8e1111f7542bf4985136d9aedf340.tar.gz lingo2-archipelago-b0f474bee1c8e1111f7542bf4985136d9aedf340.tar.bz2 lingo2-archipelago-b0f474bee1c8e1111f7542bf4985136d9aedf340.zip |
Treat local letters as items for tracker
Local letters are now synced with datastorage, so they transfer to other computers like regular items would, and the tracker also now waits until you collect local letters before showing what they give you in logic.
Diffstat (limited to 'apworld/client/client.gd')
-rw-r--r-- | apworld/client/client.gd | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/apworld/client/client.gd b/apworld/client/client.gd index 286ad4b..3d4096f 100644 --- a/apworld/client/client.gd +++ b/apworld/client/client.gd | |||
@@ -33,6 +33,7 @@ signal item_sent_notification(message) | |||
33 | signal hint_received(message) | 33 | signal hint_received(message) |
34 | signal accessible_locations_updated | 34 | signal accessible_locations_updated |
35 | signal checked_locations_updated | 35 | signal checked_locations_updated |
36 | signal keyboard_update_received | ||
36 | 37 | ||
37 | 38 | ||
38 | func _init(): | 39 | func _init(): |
@@ -157,6 +158,13 @@ func _on_web_socket_server_message_received(_peer_id: int, packet: String) -> vo | |||
157 | 158 | ||
158 | accessible_locations_updated.emit() | 159 | accessible_locations_updated.emit() |
159 | 160 | ||
161 | elif cmd == "UpdateKeyboard": | ||
162 | var updates = {} | ||
163 | for k in message["updates"]: | ||
164 | updates[k] = int(message["updates"][k]) | ||
165 | |||
166 | keyboard_update_received.emit(updates) | ||
167 | |||
160 | 168 | ||
161 | func connectToServer(server, un, pw): | 169 | func connectToServer(server, un, pw): |
162 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) | 170 | sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) |
@@ -202,19 +210,6 @@ func sendLocations(loc_ids): | |||
202 | sendMessage([{"cmd": "LocationChecks", "locations": loc_ids}]) | 210 | sendMessage([{"cmd": "LocationChecks", "locations": loc_ids}]) |
203 | 211 | ||
204 | 212 | ||
205 | func setValue(key, value, operation = "replace"): | ||
206 | sendMessage( | ||
207 | [ | ||
208 | { | ||
209 | "cmd": "Set", | ||
210 | "key": "Lingo2_%d_%s" % [_slot, key], | ||
211 | "want_reply": false, | ||
212 | "operations": [{"operation": operation, "value": value}] | ||
213 | } | ||
214 | ] | ||
215 | ) | ||
216 | |||
217 | |||
218 | func say(textdata): | 213 | func say(textdata): |
219 | sendMessage([{"cmd": "Say", "text": textdata}]) | 214 | sendMessage([{"cmd": "Say", "text": textdata}]) |
220 | 215 | ||
@@ -227,6 +222,10 @@ func scoutLocations(loc_ids): | |||
227 | sendMessage([{"cmd": "LocationScouts", "locations": loc_ids}]) | 222 | sendMessage([{"cmd": "LocationScouts", "locations": loc_ids}]) |
228 | 223 | ||
229 | 224 | ||
225 | func updateKeyboard(updates): | ||
226 | sendMessage([{"cmd": "UpdateKeyboard", "keyboard": updates}]) | ||
227 | |||
228 | |||
230 | func sendQuit(): | 229 | func sendQuit(): |
231 | sendMessage([{"cmd": "Quit"}]) | 230 | sendMessage([{"cmd": "Quit"}]) |
232 | 231 | ||