From b0f474bee1c8e1111f7542bf4985136d9aedf340 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 27 Sep 2025 17:14:40 -0400 Subject: 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. --- apworld/client/client.gd | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'apworld/client/client.gd') 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) signal hint_received(message) signal accessible_locations_updated signal checked_locations_updated +signal keyboard_update_received func _init(): @@ -157,6 +158,13 @@ func _on_web_socket_server_message_received(_peer_id: int, packet: String) -> vo accessible_locations_updated.emit() + elif cmd == "UpdateKeyboard": + var updates = {} + for k in message["updates"]: + updates[k] = int(message["updates"][k]) + + keyboard_update_received.emit(updates) + func connectToServer(server, un, pw): sendMessage([{"cmd": "Connect", "server": server, "player": un, "password": pw}]) @@ -202,19 +210,6 @@ func sendLocations(loc_ids): sendMessage([{"cmd": "LocationChecks", "locations": loc_ids}]) -func setValue(key, value, operation = "replace"): - sendMessage( - [ - { - "cmd": "Set", - "key": "Lingo2_%d_%s" % [_slot, key], - "want_reply": false, - "operations": [{"operation": operation, "value": value}] - } - ] - ) - - func say(textdata): sendMessage([{"cmd": "Say", "text": textdata}]) @@ -227,6 +222,10 @@ func scoutLocations(loc_ids): sendMessage([{"cmd": "LocationScouts", "locations": loc_ids}]) +func updateKeyboard(updates): + sendMessage([{"cmd": "UpdateKeyboard", "keyboard": updates}]) + + func sendQuit(): sendMessage([{"cmd": "Quit"}]) -- cgit 1.4.1