Revert "updated server switch"

oop
This reverts commit c2832136aa.
This commit is contained in:
Ayush Saini 2023-07-08 15:44:27 +05:30
parent c2832136aa
commit 4eb520fa19
8 changed files with 873 additions and 355 deletions

View file

@ -4,8 +4,23 @@ import _baplus
import babase
def is_game_version_lower_than(version):
"""
Returns a boolean value indicating whether the current game
version is lower than the passed version. Useful for addressing
any breaking changes within game versions.
"""
game_version = tuple(map(int, babase.app.version.split(".")))
version = tuple(map(int, version.split(".")))
return game_version < version
if is_game_version_lower_than("1.7.20"):
original_get_purchased = _baplus.get_purchased
else:
assert bs.app.plus is not None
original_get_purchased = bs.app.plus.get_purchased
original_get_purchased = _baplus.get_purchased
def get_purchased(item):
if item.startswith('characters.') or item.startswith('icons.'):
@ -17,5 +32,8 @@ def get_purchased(item):
class Unlock(babase.Plugin):
def on_app_running(self):
babase.app.classic.accounts.have_pro = lambda: True
_baplus.get_purchased = get_purchased
if is_game_version_lower_than("1.7.20"):
_baplus.get_purchased = get_purchased
else:
assert bs.app.plus is not None
bs.app.plus.get_purchased = get_purchased