From 2125ccf715544d3703cadf064a85331de8b053e4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 27 Sep 2025 11:49:37 -0400 Subject: Automatically close client when clicking Quit --- apworld/client/client.gd | 4 ++++ apworld/client/main.gd | 1 + 2 files changed, 5 insertions(+) (limited to 'apworld/client') diff --git a/apworld/client/client.gd b/apworld/client/client.gd index 05b2b6c..286ad4b 100644 --- a/apworld/client/client.gd +++ b/apworld/client/client.gd @@ -227,6 +227,10 @@ func scoutLocations(loc_ids): sendMessage([{"cmd": "LocationScouts", "locations": loc_ids}]) +func sendQuit(): + sendMessage([{"cmd": "Quit"}]) + + func hasItem(item_id): return _received_items.has(item_id) diff --git a/apworld/client/main.gd b/apworld/client/main.gd index 9d66358..8425d8c 100644 --- a/apworld/client/main.gd +++ b/apworld/client/main.gd @@ -137,6 +137,7 @@ func _connect_pressed(): func _back_pressed(): var ap = global.get_node("Archipelago") ap.disconnect_from_ap() + ap.client.sendQuit() get_tree().quit() -- cgit 1.4.1