diff --git a/src/icmtoolchain/build_config.py b/src/icmtoolchain/build_config.py index a8c7d6c..da4323b 100644 --- a/src/icmtoolchain/build_config.py +++ b/src/icmtoolchain/build_config.py @@ -32,7 +32,9 @@ class BuildConfig(MakeDataConfig): def iterate_scripts(self) -> Iterable[MakeScriptData]: if self.get_value("defaultConfig.buildType") == "release": # XXX: Perhaps we should do something, but scripts may no longer exist. - # It is important to leave a `compile`` field to load them. + # It is important to leave a `compile` field to load them. + from .shell import frozen + frozen("Project is set to release mode, building scripts will be skipped.") return library_path = self.get_value("defaultConfig.libraryDir") @@ -56,7 +58,7 @@ class BuildConfig(MakeDataConfig): def obtain_script_data(self, source: Config) -> MakeScriptData: relative_path = source.get_value_unsafe("path") - type = source.get_value_unsafe("type") + type = source.get_value_unsafe("sourceType") if not type in VALID_SOURCE_TYPES: raise ValueError(f"Script {relative_path!r} has invalid type, it should be one of: {', '.join(VALID_SOURCE_TYPES)}!") diff --git a/src/icmtoolchain/language.py b/src/icmtoolchain/language.py index de35c59..cf01561 100644 --- a/src/icmtoolchain/language.py +++ b/src/icmtoolchain/language.py @@ -23,7 +23,7 @@ def get_language_directories(compile_type: str, language_config: Config, propert if not any(directories): # Obtain directories from deprecated `compile` property. directories = list(filter( - lambda source: isinstance(source, Config) and compile_type == source.get_value("type"), + lambda source: isinstance(source, Config) and compile_type == source.get_value("type", lambda: source.get_value("sourceType")), make_config.obtain_list("compile") )) configurables = dict() diff --git a/src/icmtoolchain/resources.py b/src/icmtoolchain/resources.py index 9cc9200..f50f2b2 100644 --- a/src/icmtoolchain/resources.py +++ b/src/icmtoolchain/resources.py @@ -16,8 +16,8 @@ def build_resources() -> int: GLOBALS.MOD_STRUCTURE.cleanup_build_target("gui") GLOBALS.MOD_STRUCTURE.cleanup_build_target("minecraft_resource_pack") GLOBALS.MOD_STRUCTURE.cleanup_build_target("minecraft_behavior_pack") - overall_result = 0 + overall_result = 0 for resource in GLOBALS.MAKE_CONFIG.iterate_resources(): resource_files = expand_paths(GLOBALS.MAKE_CONFIG.get_relative_path(resource.relative_path)) if len(resource_files) == 0: @@ -91,7 +91,6 @@ def build_pack_graphics() -> int: def build_additional_resources() -> int: overall_result = 0 - for asset in GLOBALS.MAKE_CONFIG.iterate_assets(): additional_files = expand_paths(GLOBALS.MAKE_CONFIG.get_relative_path(asset.relative_path)) if len(additional_files) == 0: diff --git a/src/icmtoolchain/script_build.py b/src/icmtoolchain/script_build.py index 53dcae5..fd959ba 100644 --- a/src/icmtoolchain/script_build.py +++ b/src/icmtoolchain/script_build.py @@ -158,7 +158,7 @@ def copy_build_targets(composite: List[Tuple[str, str, str]], includes: List[Tup continue if not GLOBALS.BUILD_STORAGE.is_path_changed(temporary_script): - failure(f"Build target {basename(temporary_script)!r} is not changed.") + frozen(f"Build target {basename(temporary_script)!r} is not changed.") GLOBALS.BUILD_STORAGE.save()