mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-26 00:47:10 +08:00
Merge pull request #670 from 3alTemp/profile-merge-fix
Profile merge fix
This commit is contained in:
commit
3a372c1a31
@ -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?...)
|
||||
|
||||
@ -801,6 +801,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()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user