mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
fixed custom minigames import issue
This commit is contained in:
parent
39a0c3e1c3
commit
ea07c73eeb
1 changed files with 4 additions and 2 deletions
6
dist/ba_root/mods/custom_hooks.py
vendored
6
dist/ba_root/mods/custom_hooks.py
vendored
|
|
@ -115,10 +115,12 @@ def import_discord_bot() -> None:
|
|||
|
||||
def import_games():
|
||||
"""Imports the custom games from games directory."""
|
||||
import sys
|
||||
sys.path.append(_ba.env()['python_directory_user']+os.sep+"games")
|
||||
games=os.listdir("ba_root/mods/games")
|
||||
for game in games:
|
||||
if game.endswith(".py") or game.endswith(".so"):
|
||||
importlib.import_module("games."+game.replace(".so","").replace(".py",""))
|
||||
if game.endswith(".so"):
|
||||
importlib.import_module("games."+game.replace(".so",""))
|
||||
|
||||
maps=os.listdir("ba_root/mods/maps")
|
||||
for _map in maps:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue