Merge pull request #192 from Loup-Garou911XD/main

Removed deprecated methods
This commit is contained in:
rikkolovescats 2023-10-01 18:48:12 +05:30 committed by GitHub
commit 69f464548c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View file

@ -1,6 +1,12 @@
{ {
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
"versions": { "versions": {
"1.0.2": {
"api_version": 8,
"commit_sha": "818ec65",
"released_on": "01-10-2023",
"md5sum": "9cd1facb888e63ba08b0607a8561991a"
},
"1.0.1": { "1.0.1": {
"api_version": 8, "api_version": 8,
"commit_sha": "7dba50e", "commit_sha": "7dba50e",

View file

@ -32,7 +32,7 @@ _env = _babase.env()
_uiscale = bui.app.ui_v1.uiscale _uiscale = bui.app.ui_v1.uiscale
PLUGIN_MANAGER_VERSION = "1.0.1" PLUGIN_MANAGER_VERSION = "1.0.2"
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
# Current tag can be changed to "staging" or any other branch in # Current tag can be changed to "staging" or any other branch in
# plugin manager repo for testing purpose. # plugin manager repo for testing purpose.
@ -799,7 +799,7 @@ class Plugin:
def latest_compatible_version(self): def latest_compatible_version(self):
if self._latest_compatible_version is None: if self._latest_compatible_version is None:
for number, info in self.info["versions"].items(): for number, info in self.info["versions"].items():
if info["api_version"] == babase.app.api_version: if info["api_version"] == babase.app.env.api_version:
self._latest_compatible_version = PluginVersion( self._latest_compatible_version = PluginVersion(
self, self,
(number, info), (number, info),
@ -1233,7 +1233,7 @@ class PluginManager:
async def get_update_details(self): async def get_update_details(self):
index = await self.get_index() index = await self.get_index()
for version, info in index["versions"].items(): for version, info in index["versions"].items():
if info["api_version"] != babase.app.api_version: if info["api_version"] != babase.app.env.api_version:
# No point checking a version of the API game doesn't support. # No point checking a version of the API game doesn't support.
continue continue
if version == PLUGIN_MANAGER_VERSION: if version == PLUGIN_MANAGER_VERSION:

View file

@ -722,6 +722,12 @@
} }
], ],
"versions": { "versions": {
"2.0.1": {
"api_version": 8,
"commit_sha": "41cc38a",
"released_on": "01-10-2023",
"md5sum": "9ed00b2c86bd62168aa1cab6ea5fdfe4"
},
"2.0.0": { "2.0.0": {
"api_version": 8, "api_version": 8,
"commit_sha": "9340deb", "commit_sha": "9340deb",

View file

@ -185,7 +185,7 @@ class Practice(Plugin):
def on_app_running(self) -> None: def on_app_running(self) -> None:
"""Plugin start point.""" """Plugin start point."""
if app.build_number < 20427: if app.env.build_number < 20427:
bui.screenmessage( bui.screenmessage(
'ok', 'ok',
color=(.8, .1, .1)) color=(.8, .1, .1))