From b7bb03659e1b8b56c4b6bd90fdaeff6f6c4c44d2 Mon Sep 17 00:00:00 2001 From: Y-ellowDev Date: Wed, 11 Sep 2024 22:39:44 +0100 Subject: [PATCH 1/4] Update utilities.json --- plugins/utilities.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 9786b189..5f27b9b9 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -851,6 +851,20 @@ } } }, + "achievements_unlocker": { + "description": "Anlock All Achievements", + "external_url": "", + "authors": [ + { + "name": "Yelllow", + "email": "im.yellow.dev@gmail.com", + "discord": "y.lw" + } + ], + "versions": { + "1.0.0": null + } + }, "ultra_party_window": { "description": "Ultra your party window with lots of features", "external_url": "", @@ -1407,4 +1421,4 @@ } } } -} \ No newline at end of file +} From 242143ceb3b029c3270e106600cb4730f7a09a0a Mon Sep 17 00:00:00 2001 From: Y-ellowDev Date: Wed, 11 Sep 2024 22:43:16 +0100 Subject: [PATCH 2/4] Create achievements_unlocker.py --- plugins/utilities/achievements_unlocker.py | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 plugins/utilities/achievements_unlocker.py diff --git a/plugins/utilities/achievements_unlocker.py b/plugins/utilities/achievements_unlocker.py new file mode 100644 index 00000000..064c0f9e --- /dev/null +++ b/plugins/utilities/achievements_unlocker.py @@ -0,0 +1,35 @@ +# BY Yelllow (dis : @y.lw) + +import babase +import bauiv1 as bui +import bascenev1 as bs + +ACHIEVEMENTS = bui.app.classic.ach.achievements + +def unlock_all_achievements(): + if bui.app.plus.get_v1_account_state() != 'signed_in': + return bui.screenmessage(bui.Lstr(resource='notSignedInErrorText'), color=(1, 0, 0)) + + UNLOCKED = False + for num, achievement in enumerate(ACHIEVEMENTS, start=1): + if not achievement.complete: + bui.app.plus.add_v1_account_transaction({'type': 'ACHIEVEMENT', 'name': achievement.name}) + achievement.set_complete() + bui.screenmessage(f"- Unlocked ({achievement.name})", color=(1, 1, 0)) + UNLOCKED = True + + + if UNLOCKED: + bui.screenmessage("Unlocked All Achievements !", color=(0, 1, 0)) + + +def _have_pro(): + return True + +# ba_meta require api 8 +# ba_meta export plugin + +class ByYelllow(babase.Plugin): + def on_app_running(self) -> None: + bs.app.classic.accounts.have_pro = _have_pro + self.timer = bs.AppTimer(5, unlock_all_achievements) From d51c10c8ce4b8f6ecae26853be5fda13d5745712 Mon Sep 17 00:00:00 2001 From: Y-ellowDev Date: Wed, 11 Sep 2024 21:46:37 +0000 Subject: [PATCH 3/4] [ci] auto-format --- plugins/utilities/achievements_unlocker.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/utilities/achievements_unlocker.py b/plugins/utilities/achievements_unlocker.py index 064c0f9e..fa7f08e7 100644 --- a/plugins/utilities/achievements_unlocker.py +++ b/plugins/utilities/achievements_unlocker.py @@ -6,22 +6,23 @@ ACHIEVEMENTS = bui.app.classic.ach.achievements + def unlock_all_achievements(): if bui.app.plus.get_v1_account_state() != 'signed_in': return bui.screenmessage(bui.Lstr(resource='notSignedInErrorText'), color=(1, 0, 0)) - + UNLOCKED = False for num, achievement in enumerate(ACHIEVEMENTS, start=1): if not achievement.complete: - bui.app.plus.add_v1_account_transaction({'type': 'ACHIEVEMENT', 'name': achievement.name}) + bui.app.plus.add_v1_account_transaction( + {'type': 'ACHIEVEMENT', 'name': achievement.name}) achievement.set_complete() bui.screenmessage(f"- Unlocked ({achievement.name})", color=(1, 1, 0)) UNLOCKED = True - - + if UNLOCKED: bui.screenmessage("Unlocked All Achievements !", color=(0, 1, 0)) - + def _have_pro(): return True @@ -29,6 +30,7 @@ def _have_pro(): # ba_meta require api 8 # ba_meta export plugin + class ByYelllow(babase.Plugin): def on_app_running(self) -> None: bs.app.classic.accounts.have_pro = _have_pro From f85b3d9194b238b192960a7de75653dc673a4025 Mon Sep 17 00:00:00 2001 From: Y-ellowDev Date: Wed, 11 Sep 2024 21:46:39 +0000 Subject: [PATCH 4/4] [ci] apply-version-metadata --- plugins/utilities.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 5f27b9b9..d014645b 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -862,7 +862,12 @@ } ], "versions": { - "1.0.0": null + "1.0.0": { + "api_version": 8, + "commit_sha": "d51c10c", + "released_on": "11-09-2024", + "md5sum": "259d79e3c7e6fefc1ad6da82f50764ec" + } } }, "ultra_party_window": { @@ -1421,4 +1426,4 @@ } } } -} +} \ No newline at end of file