From b276a812e28c65b582d21cc8939518279bd52ff0 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Sun, 27 Nov 2022 19:43:54 +0530 Subject: [PATCH] Commit Last Manual Party Connect Port to config --- CHANGELOG.md | 1 + assets/src/ba_data/python/bastd/ui/gather/manualtab.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42606cb3..6540f64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Removed a few obsolete internal functions: `_ba.is_ouya_build()`, `_ba.android_media_scan_file()`. - Renaming some methods/data to disambiguate 'login' vs 'sign-in', both in the app and on ballistica.net. Those two terms are somewhat ambiguous and interchangeable in English and can either be a verb or a noun. I'd like to keep things clear in Ballistica by always using 'sign-in' for the verb form and 'login' for the noun. For example: 'You can now sign in to your account using your Google Play login'. - WARNING: There are currently some rough edges with Google Play V2 accounts; for example Google Play achievements and leaderboards UIs are not currently showing up. I will be cleaning all of this up before the official 1.7.14 release. +- Commit Last Manual Party Connect Port to config. Previously, it always assumed the port to be 43210. ### 1.7.13 (build 20919, api 7, 2022-11-03) - Android target-sdk has been updated to 33 (Android 13). Please holler if anything seems broken or is behaving differently than before on Android. diff --git a/assets/src/ba_data/python/bastd/ui/gather/manualtab.py b/assets/src/ba_data/python/bastd/ui/gather/manualtab.py index 960e6eef..17207994 100644 --- a/assets/src/ba_data/python/bastd/ui/gather/manualtab.py +++ b/assets/src/ba_data/python/bastd/ui/gather/manualtab.py @@ -234,6 +234,7 @@ class ManualGatherTab(GatherTab): c_width = region_width c_height = region_height - 20 last_addr = ba.app.config.get('Last Manual Party Connect Address', '') + last_port = ba.app.config.get('Last Manual Party Connect Port', 43210) v = c_height - 70 v -= 70 ba.textwidget( @@ -275,7 +276,7 @@ class ManualGatherTab(GatherTab): parent=self._container, editable=True, description=ba.Lstr(resource='gatherWindow.' 'portText'), - text='43210', + text=str(last_port), autoselect=True, max_chars=5, position=(c_width * 0.5 - 240 + 490, v - 30), @@ -811,6 +812,7 @@ class ManualGatherTab(GatherTab): # Store for later. config = ba.app.config config['Last Manual Party Connect Address'] = resolved_address + config['Last Manual Party Connect Port'] = port config.commit() ba.internal.connect_to_party(resolved_address, port=port)