diff --git a/progature/run.py b/progature/run.py index 6ee913b..9ae2e4a 100644 --- a/progature/run.py +++ b/progature/run.py @@ -7,6 +7,7 @@ from progature.engine.core.game.manager import GameManager from progature.gui import main_window, game_window, chapter_window, level_window, quest_window +from progature.settings.config import GAME_DIR_PATH if __name__ == "__main__": @@ -23,7 +24,8 @@ if values["_GAMES_"]: game = values["_GAMES_"][0] if game: - manager = GameManager(game.file_name) + path = Path(GAME_DIR_PATH) / game.file_name + manager = GameManager(path) game_window(manager) else: pg.popup_error("Please select a chapter") diff --git a/progature/utils/loader.py b/progature/utils/loader.py index 16a277b..62cb0ac 100644 --- a/progature/utils/loader.py +++ b/progature/utils/loader.py @@ -3,10 +3,11 @@ from progature.engine.core.game.loader import GameLoader from progature.engine.components import Game from progature.engine.structures import Pot +from progature.settings.config import GAME_DIR_PATH def load_all_games() -> Pot[Game]: - path = Path("progature/db/games").glob("*.json") + path = Path(GAME_DIR_PATH).glob("*.json") game_files = [file for file in path if file.is_file()] game_lsit = []