From af3c53f0aefa50c2c960fd9708c61c1c05c85016 Mon Sep 17 00:00:00 2001 From: fireundubh Date: Fri, 15 May 2020 11:57:20 -0700 Subject: [PATCH] Fixed issue where Pyro and XSD did not agree on TES5 game type signature --- pyro/PapyrusProject.xsd | 2 +- pyro/ProjectBase.py | 17 +++++++++++------ pyro/__main__.py | 4 ++-- pyro/setup.py | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pyro/PapyrusProject.xsd b/pyro/PapyrusProject.xsd index 7920e345..72caedcc 100644 --- a/pyro/PapyrusProject.xsd +++ b/pyro/PapyrusProject.xsd @@ -92,7 +92,7 @@ - + diff --git a/pyro/ProjectBase.py b/pyro/ProjectBase.py index 17ed5515..c4cf2e2c 100644 --- a/pyro/ProjectBase.py +++ b/pyro/ProjectBase.py @@ -12,7 +12,12 @@ class ProjectBase: options: ProjectOptions = None - game_types: dict = {'sse': 'Skyrim Special Edition', 'tesv': 'Skyrim', 'fo4': 'Fallout 4'} + game_types: dict = { + 'sse': 'Skyrim Special Edition', + 'tes5': 'Skyrim', + 'tesv': 'Skyrim', + 'fo4': 'Fallout 4' + } variables: dict = {} program_path: str = '' @@ -125,7 +130,7 @@ def get_registry_path(self, game_type: str = '') -> str: game_name = 'Fallout4' elif game_type == 'sse': game_name = 'Skyrim Special Edition' - elif game_type == 'tesv': + elif game_type in ('tes5', 'tesv'): game_name = 'Skyrim' else: raise ValueError('Cannot determine registry path from game type') @@ -217,7 +222,7 @@ def get_game_type(self) -> str: return 'sse' if game_path.endswith('skyrim'): ProjectBase.log.warning('Using game type: Skyrim (determined from game path)') - return 'tesv' + return 'tes5' if self.options.registry_path: registry_path_parts = self.options.registry_path.casefold().split(os.sep) @@ -229,7 +234,7 @@ def get_game_type(self) -> str: return 'sse' if 'skyrim' in registry_path_parts: ProjectBase.log.warning('Using game type: Skyrim (determined from registry path)') - return 'tesv' + return 'tes5' if self.import_paths: for import_path in reversed(self.import_paths): @@ -242,7 +247,7 @@ def get_game_type(self) -> str: return 'sse' if 'skyrim' in path_parts: ProjectBase.log.warning('Using game type: Skyrim (determined from import paths)') - return 'tesv' + return 'tes5' if self.options.flags_path: flags_path = self.options.flags_path.casefold() @@ -254,7 +259,7 @@ def get_game_type(self) -> str: self.get_game_path('sse') except FileNotFoundError: ProjectBase.log.warning('Using game type: Skyrim (determined from flags path)') - return 'tesv' + return 'tes5' else: ProjectBase.log.warning('Using game type: Skyrim Special Edition (determined from flags path)') return 'sse' diff --git a/pyro/__main__.py b/pyro/__main__.py index f12b8f94..6f6c8969 100644 --- a/pyro/__main__.py +++ b/pyro/__main__.py @@ -58,8 +58,8 @@ _game_arguments = _parser.add_argument_group('game arguments') _game_arguments.add_argument('-g', '--game-type', action='store', type=str, - choices={'fo4', 'tesv', 'sse'}, - help='set game type (choices: fo4, tesv, sse)') + choices={'fo4', 'tes5', 'tesv', 'sse'}, + help='set game type (choices: fo4, tes5, sse)') _game_path_arguments = _game_arguments.add_mutually_exclusive_group() _game_path_arguments.add_argument('--game-path', diff --git a/pyro/setup.py b/pyro/setup.py index c71e0ba4..c7debd3c 100644 --- a/pyro/setup.py +++ b/pyro/setup.py @@ -2,7 +2,7 @@ setup( name='Pyro', - description='A parallelized incremental build system for TESV, SSE, and FO4 projects', + description='A parallelized incremental build system for TES5, SSE, and FO4 projects', author='fireundubh', author_email='fireundubh@gmail.com', license='MIT License',