mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
Build Fixing Part 3
This commit is contained in:
parent
3907df6871
commit
f8595db387
2 changed files with 15 additions and 14 deletions
|
|
@ -1,7 +1,6 @@
|
|||
# ba_meta require api 7
|
||||
import ba
|
||||
import _ba
|
||||
import bastd
|
||||
from bastd.ui import popup
|
||||
|
||||
import urllib.request
|
||||
|
|
@ -24,9 +23,9 @@ _uiscale = ba.app.ui.uiscale
|
|||
PLUGIN_MANAGER_VERSION = "0.1.1"
|
||||
REPOSITORY_URL = "http://github.com/bombsquad-community/plugin-manager"
|
||||
CURRENT_TAG = "main"
|
||||
# XXX: Using https with `ba.open_url` seems to trigger a pop-up dialog box on Android currently (v1.7.6)
|
||||
# and won't open the actual URL in a web-browser. Let's fallback to http for now until this
|
||||
# gets resolved.
|
||||
# XXX: Using https with `ba.open_url` seems to trigger a pop-up dialog box on
|
||||
# Android currently (v1.7.6) and won't open the actual URL in a web-browser.
|
||||
# Let's fallback to http for now until this gets resolved.
|
||||
INDEX_META = "{repository_url}/{content_type}/{tag}/index.json"
|
||||
HEADERS = {
|
||||
"User-Agent": _env["user_agent_string"],
|
||||
|
|
@ -34,8 +33,8 @@ HEADERS = {
|
|||
PLUGIN_DIRECTORY = _env["python_directory_user"]
|
||||
REGEXP = {
|
||||
"plugin_api_version": re.compile(b"(?<=ba_meta require api )(.*)"),
|
||||
"plugin_entry_points": re.compile(b"(ba_meta export plugin\n+class )(.*)\("),
|
||||
"minigames": re.compile(b"(ba_meta export game\n+class )(.*)\("),
|
||||
"plugin_entry_points": re.compile(b"(ba_meta export plugin\n+class )(.*)\\("),
|
||||
"minigames": re.compile(b"(ba_meta export game\n+class )(.*)\\("),
|
||||
}
|
||||
|
||||
_CACHE = {}
|
||||
|
|
@ -96,8 +95,9 @@ class StartupTasks:
|
|||
self.plugin_manager = PluginManager()
|
||||
|
||||
def setup_config(self):
|
||||
is_config_updated = False
|
||||
existing_plugin_manager_config = copy.deepcopy(ba.app.config.get("Community Plugin Manager"))
|
||||
# is_config_updated = False
|
||||
existing_plugin_manager_config = copy.deepcopy(
|
||||
ba.app.config.get("Community Plugin Manager"))
|
||||
|
||||
plugin_manager_config = ba.app.config.setdefault("Community Plugin Manager", {})
|
||||
plugin_manager_config.setdefault("Custom Sources", [])
|
||||
|
|
@ -133,7 +133,8 @@ class StartupTasks:
|
|||
to_version, commit_sha = update_details
|
||||
ba.screenmessage(f"Plugin Manager is being updated to version v{to_version}.")
|
||||
await self.plugin_manager.update(to_version, commit_sha)
|
||||
ba.screenmessage("Update successful. Restart game to reload changes.", color = (0,1,0))
|
||||
ba.screenmessage("Update successful. Restart game to reload changes.",
|
||||
color=(0, 1, 0))
|
||||
|
||||
async def update_plugins(self):
|
||||
if not ba.app.config["Community Plugin Manager"]["Settings"]["Auto Update Plugins"]:
|
||||
|
|
@ -925,7 +926,7 @@ class PluginSourcesWindow(popup.PopupWindow):
|
|||
self.scale_origin = origin_widget.get_screen_space_center()
|
||||
|
||||
b_textcolor = (0.75, 0.7, 0.8)
|
||||
s = 1.1 if _uiscale is ba.UIScale.SMALL else 1.27 if ba.UIScale.MEDIUM else 1.57
|
||||
# s = 1.1 if _uiscale is ba.UIScale.SMALL else 1.27 if ba.UIScale.MEDIUM else 1.57
|
||||
# text_scale = 0.7 * s
|
||||
self._transition_out = 'out_scale'
|
||||
transition = 'in_scale'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ from bastd.actor.spazfactory import SpazFactory
|
|||
from bastd.actor.scoreboard import Scoreboard
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import (Any, Tuple, Dict, Type, List, Sequence, Optional,
|
||||
from typing import (Any, Tuple, Type, List, Sequence, Optional,
|
||||
Union)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue