Skip to content

Commit

Permalink
Simplified pathing with a resource folder constant
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDuckCow committed Aug 25, 2024
1 parent 524717e commit a3ed89b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions MCprep_addon/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Engine(enum.Enum):
UNKNOWN_LOCATION = (-1, "UNKNOWN LOCATION")
DEBUG_MODE = False

MCPREP_RESOURCES: Path = Path(os.path.dirname(__file__), "MCprep_resources")


# -----------------------------------------------------------------------------
# ADDON GLOBAL VARIABLES AND INITIAL SETTINGS
Expand All @@ -75,14 +77,12 @@ class MCprepEnv:
def __init__(self):
self.data = None
self.json_data: Optional[Dict] = None
self.json_path: Path = Path(
os.path.dirname(__file__), "MCprep_resources", "mcprep_data.json")
self.json_path: Path = Path(MCPREP_RESOURCES, "mcprep_data.json")
self.json_path_update: Path = Path(
os.path.dirname(__file__), "MCprep_resources", "mcprep_data_update.json")
MCPREP_RESOURCES, "mcprep_data_update.json")

self.dev_file: Path = Path(os.path.dirname(__file__), "mcprep_dev.txt")
self.languages_folder: Path = Path(
os.path.dirname(__file__), "MCprep_resources", "Languages")
self.languages_folder: Path = Path(MCPREP_RESOURCES, "Languages")
self.translations: Path = Path(os.path.dirname(__file__), "translations.py")

self.last_check_for_updated = 0
Expand Down

0 comments on commit a3ed89b

Please sign in to comment.