From 4ceced47e689cdce745d2579ef7985ad37ae0883 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 13:32:17 -0600 Subject: [PATCH 1/3] Profile Merge fix --- .../ba_data/python/bauiv1lib/profile/edit.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/assets/ba_data/python/bauiv1lib/profile/edit.py b/src/assets/ba_data/python/bauiv1lib/profile/edit.py index 8456c607..f37a087c 100644 --- a/src/assets/ba_data/python/bauiv1lib/profile/edit.py +++ b/src/assets/ba_data/python/bauiv1lib/profile/edit.py @@ -803,6 +803,20 @@ class EditProfileWindow(bui.Window): bui.getsound('error').play() return False + # Make sure we're not renaming to another existing profile. + profiles: dict = bui.app.config.get('Player Profiles', {}) + if ( + self._existing_profile != new_name + and new_name in profiles.keys() + ): + # NOTE: Implement a new LSTR! + bui.screenmessage(bui.Lstr( + resource='nameDuplicateText', + fallback_value='Cannot rename to existing profile!' + )) + bui.getsound('error').play() + return False + if transition_out: bui.getsound('gunCocking').play() From cf24e42fd03fe04030574da6dab86c5b60ed552a Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 13:38:02 -0600 Subject: [PATCH 2/3] preflight restruct --- .../ba_data/python/bauiv1lib/profile/edit.py | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/profile/edit.py b/src/assets/ba_data/python/bauiv1lib/profile/edit.py index f37a087c..c9c47895 100644 --- a/src/assets/ba_data/python/bauiv1lib/profile/edit.py +++ b/src/assets/ba_data/python/bauiv1lib/profile/edit.py @@ -65,17 +65,13 @@ class EditProfileWindow(bui.Window): self._height = height = ( 350.0 if uiscale is bui.UIScale.SMALL - else 400.0 - if uiscale is bui.UIScale.MEDIUM - else 450.0 + else 400.0 if uiscale is bui.UIScale.MEDIUM else 450.0 ) spacing = 40 self._base_scale = ( 2.05 if uiscale is bui.UIScale.SMALL - else 1.5 - if uiscale is bui.UIScale.MEDIUM - else 1.0 + else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0 ) top_extra = 15 if uiscale is bui.UIScale.SMALL else 15 super().__init__( @@ -83,9 +79,9 @@ class EditProfileWindow(bui.Window): size=(width, height + top_extra), transition=transition, scale=self._base_scale, - stack_offset=(0, 15) - if uiscale is bui.UIScale.SMALL - else (0, 0), + stack_offset=( + (0, 15) if uiscale is bui.UIScale.SMALL else (0, 0) + ), ) ) cancel_button = btn = bui.buttonwidget( @@ -475,9 +471,11 @@ class EditProfileWindow(bui.Window): parent=self._root_widget, autoselect=True, position=(self._width * 0.5 + b_offs - b_size * 0.5, v - 50), - up_widget=self._upgrade_button - if self._upgrade_button is not None - else self._account_type_info_button, + up_widget=( + self._upgrade_button + if self._upgrade_button is not None + else self._account_type_info_button + ), size=(b_size, b_size), color=self._highlight, label='', From 4ed42f11f3457230b43e8922423441f23d0f8f78 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 13:47:22 -0600 Subject: [PATCH 3/3] Do the changelog.,, --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9f4499..3c53be30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ EraOSBeta!) - Added a UI for customizing Series Length in Teams and Points-to-Win in FFA (Thanks EraOSBeta!) +- Renaming & overwriting existing profiles is no longer possible (Thanks Temp!) ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...)