mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
added logging
This commit is contained in:
parent
da4c17fc88
commit
787771cb8a
3 changed files with 17 additions and 25 deletions
|
|
@ -1,9 +1,14 @@
|
||||||
# Released under the MIT License. See LICENSE for details.
|
# Released under the MIT License. See LICENSE for details.
|
||||||
# BY Stary_Agent
|
# BY Stary_Agent
|
||||||
"""Hockey game and support classes."""
|
"""Hockey game and support classes."""
|
||||||
|
|
||||||
|
# ba_meta require api 8
|
||||||
|
# (see https://ballistica.net/wiki/meta-tag-system)
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
plugman = dict(
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import babase
|
import babase
|
||||||
import bauiv1 as bui
|
import bauiv1 as bui
|
||||||
import bascenev1 as bs
|
import bascenev1 as bs
|
||||||
|
|
@ -11,16 +16,6 @@ plugman = dict(
|
||||||
from bascenev1lib.actor.scoreboard import Scoreboard
|
from bascenev1lib.actor.scoreboard import Scoreboard
|
||||||
from bascenev1lib.actor.powerupbox import PowerupBoxFactory
|
from bascenev1lib.actor.powerupbox import PowerupBoxFactory
|
||||||
from bascenev1lib.gameutils import SharedObjects
|
from bascenev1lib.gameutils import SharedObjects
|
||||||
plugin_name="soccer",
|
|
||||||
description="Shoot the ball in left or right edge of the map to score",
|
|
||||||
external_url="https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
||||||
authors=[{"name": "mr.sample", "email": "sample@sample.com", "discord": "sample"}],
|
|
||||||
version="2.1.0"
|
|
||||||
)
|
|
||||||
|
|
||||||
# ba_meta require api 8
|
|
||||||
# (see https://ballistica.net/wiki/meta-tag-system)
|
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Any, Sequence, Dict, Type, List, Optional, Union
|
from typing import Any, Sequence, Dict, Type, List, Optional, Union
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,7 @@
|
||||||
# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport)
|
# Porting to api 8 made easier by baport.(https://github.com/bombsquad-community/baport)
|
||||||
# ba_meta require api 9
|
# ba_meta require api 9
|
||||||
import bascenev1 as bs
|
|
||||||
import babase
|
import babase
|
||||||
plugman = dict(
|
import bascenev1 as bs
|
||||||
plugin_name="allow_invisible_models",
|
|
||||||
description="Changing model to None will make it invisible.",
|
|
||||||
external_url="https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
||||||
authors=[{"name": "mr.sample", "email": "sample@sample.com", "discord": "sample"}],
|
|
||||||
version="1.2.2",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
original_getmesh = bs.getmesh
|
original_getmesh = bs.getmesh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ import json
|
||||||
import sys
|
import sys
|
||||||
from ast import Call, Dict, Name, Constant, keyword
|
from ast import Call, Dict, Name, Constant, keyword
|
||||||
|
|
||||||
|
DEBUG = True
|
||||||
|
def debug_print(*args, **kwargs):
|
||||||
|
if DEBUG:
|
||||||
|
print(*args, **kwargs)
|
||||||
|
|
||||||
def update_plugin_json(plugin_info, category):
|
def update_plugin_json(plugin_info, category):
|
||||||
name = plugin_info["plugin_name"]
|
name = plugin_info["plugin_name"]
|
||||||
|
|
@ -57,6 +61,7 @@ def update_plugin_json(plugin_info, category):
|
||||||
def extract_plugman(plugins):
|
def extract_plugman(plugins):
|
||||||
for plugin in plugins:
|
for plugin in plugins:
|
||||||
if "plugins/" in plugin:
|
if "plugins/" in plugin:
|
||||||
|
debug_print(plugin)
|
||||||
# Split the path and get the part after 'plugins/'
|
# Split the path and get the part after 'plugins/'
|
||||||
parts = plugin.split("plugins/")[1].split("/")
|
parts = plugin.split("plugins/")[1].split("/")
|
||||||
category = parts[0] # First part after plugins/
|
category = parts[0] # First part after plugins/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue