diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-06 16:09:10 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-06 16:09:10 -0400 |
commit | 067d8e707bfa7a445da37190c24f7654dd738121 (patch) | |
tree | a06e9fded81f1c07ee61a863bd5c69069bd1034d /client/Archipelago/client.gd | |
parent | bb4b16ca06c70cf263424955713c91117f2f1813 (diff) | |
download | lingo2-archipelago-067d8e707bfa7a445da37190c24f7654dd738121.tar.gz lingo2-archipelago-067d8e707bfa7a445da37190c24f7654dd738121.tar.bz2 lingo2-archipelago-067d8e707bfa7a445da37190c24f7654dd738121.zip |
[Client] Location scouting for letters
Diffstat (limited to 'client/Archipelago/client.gd')
-rw-r--r-- | client/Archipelago/client.gd | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/Archipelago/client.gd b/client/Archipelago/client.gd index 428560e..2e080fd 100644 --- a/client/Archipelago/client.gd +++ b/client/Archipelago/client.gd | |||
@@ -41,6 +41,7 @@ signal connect_status | |||
41 | signal client_connected(slot_data) | 41 | signal client_connected(slot_data) |
42 | signal item_received(item_id, index, player, flags, amount) | 42 | signal item_received(item_id, index, player, flags, amount) |
43 | signal message_received(message) | 43 | signal message_received(message) |
44 | signal location_scout_received(item_id, location_id, player, flags) | ||
44 | 45 | ||
45 | 46 | ||
46 | func _init(): | 47 | func _init(): |
@@ -257,6 +258,16 @@ func _process(_delta): | |||
257 | elif cmd == "PrintJSON": | 258 | elif cmd == "PrintJSON": |
258 | emit_signal("message_received", message) | 259 | emit_signal("message_received", message) |
259 | 260 | ||
261 | elif cmd == "LocationInfo": | ||
262 | for loc in message["locations"]: | ||
263 | emit_signal( | ||
264 | "location_scout_received", | ||
265 | int(loc["item"]), | ||
266 | int(loc["location"]), | ||
267 | int(loc["player"]), | ||
268 | int(loc["flags"]) | ||
269 | ) | ||
270 | |||
260 | elif state == WebSocketPeer.STATE_CLOSED: | 271 | elif state == WebSocketPeer.STATE_CLOSED: |
261 | if _has_connected: | 272 | if _has_connected: |
262 | _closed() | 273 | _closed() |
@@ -392,6 +403,10 @@ func completedGoal(): | |||
392 | sendMessage([{"cmd": "StatusUpdate", "status": 30}]) # CLIENT_GOAL | 403 | sendMessage([{"cmd": "StatusUpdate", "status": 30}]) # CLIENT_GOAL |
393 | 404 | ||
394 | 405 | ||
406 | func scoutLocations(loc_ids): | ||
407 | sendMessage([{"cmd": "LocationScouts", "locations": loc_ids}]) | ||
408 | |||
409 | |||
395 | func hasItem(item_id): | 410 | func hasItem(item_id): |
396 | return _received_items.has(item_id) | 411 | return _received_items.has(item_id) |
397 | 412 | ||