This commit is contained in:
+17
-1
@@ -11,9 +11,11 @@
|
|||||||
},
|
},
|
||||||
"patches": {
|
"patches": {
|
||||||
"package_name": {
|
"package_name": {
|
||||||
|
"enabled": true,
|
||||||
"new_package_name": "com.wowlikon.anixart"
|
"new_package_name": "com.wowlikon.anixart"
|
||||||
},
|
},
|
||||||
"compress": {
|
"compress": {
|
||||||
|
"enabled": true,
|
||||||
"remove_language_files": true,
|
"remove_language_files": true,
|
||||||
"remove_AI_voiceover": true,
|
"remove_AI_voiceover": true,
|
||||||
"remove_debug_lines": true,
|
"remove_debug_lines": true,
|
||||||
@@ -23,9 +25,11 @@
|
|||||||
"compress_png_files": true
|
"compress_png_files": true
|
||||||
},
|
},
|
||||||
"change_server": {
|
"change_server": {
|
||||||
|
"enabled": false,
|
||||||
"server": "https://anixarty.wowlikon.tech/modding"
|
"server": "https://anixarty.wowlikon.tech/modding"
|
||||||
},
|
},
|
||||||
"color_theme": {
|
"color_theme": {
|
||||||
|
"enabled": true,
|
||||||
"colors": {
|
"colors": {
|
||||||
"primary": "#ccff00",
|
"primary": "#ccff00",
|
||||||
"secondary": "#ffffd700",
|
"secondary": "#ffffd700",
|
||||||
@@ -39,12 +43,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"replace_navbar": {
|
"replace_navbar": {
|
||||||
|
"enabled": true,
|
||||||
"items": ["home", "discover", "feed", "bookmarks", "profile"]
|
"items": ["home", "discover", "feed", "bookmarks", "profile"]
|
||||||
},
|
},
|
||||||
"custom_speed": {
|
"custom_speed": {
|
||||||
"speeds": [9.0]
|
"enabled": true,
|
||||||
|
"speeds": [0.0]
|
||||||
|
},
|
||||||
|
"disable_ad": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"disable_beta_banner": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"insert_new": {
|
||||||
|
"enabled": true
|
||||||
},
|
},
|
||||||
"settings_urls": {
|
"settings_urls": {
|
||||||
|
"enabled": true,
|
||||||
"menu": {
|
"menu": {
|
||||||
"Мы в социальных сетях": [
|
"Мы в социальных сетях": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,6 +112,28 @@ def init():
|
|||||||
raise typer.Exit(1)
|
raise typer.Exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
# ======================= INFO =========================
|
||||||
|
@app.command()
|
||||||
|
def info(patch_name: str = ""):
|
||||||
|
"""Вывод информации о патче"""
|
||||||
|
conf = load_config().model_dump()
|
||||||
|
if patch_name:
|
||||||
|
patch = Patch(patch_name, __import__(f"patcher.patches.{patch_name}"))
|
||||||
|
console.print(f"[green]Информация о патче {patch.name}:")
|
||||||
|
console.print(f" [yellow]Приоритет: {patch.priority}")
|
||||||
|
console.print(f" [yellow]Описание: {patch.module.__doc__}")
|
||||||
|
else:
|
||||||
|
console.print("[cyan]Список патчей:")
|
||||||
|
for f in PATCHES.glob("*.py"):
|
||||||
|
if f.name.startswith("todo_") or f.name == "__init__.py":
|
||||||
|
continue
|
||||||
|
name = f.stem
|
||||||
|
if conf['patches'].get(name,{}).get('enabled',True):
|
||||||
|
console.print(f" [yellow]{name}: [green]✔ enabled")
|
||||||
|
else:
|
||||||
|
console.print(f" [yellow]{name}: [red]✘ disabled")
|
||||||
|
|
||||||
|
|
||||||
# ======================= PATCHING =========================
|
# ======================= PATCHING =========================
|
||||||
class Patch:
|
class Patch:
|
||||||
def __init__(self, name: str, module):
|
def __init__(self, name: str, module):
|
||||||
@@ -232,7 +254,7 @@ def build(
|
|||||||
continue
|
continue
|
||||||
name = f.stem
|
name = f.stem
|
||||||
settings = patch_settings.get(name, {})
|
settings = patch_settings.get(name, {})
|
||||||
if not settings.get("enable", True):
|
if not settings.get("enabled", True):
|
||||||
console.print(f"[yellow]≫ Пропускаем {name}")
|
console.print(f"[yellow]≫ Пропускаем {name}")
|
||||||
continue
|
continue
|
||||||
module = importlib.import_module(f"patches.{name}")
|
module = importlib.import_module(f"patches.{name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user