Project availability mistypos, fix defaults

This commit is contained in:
MaXFeeD
2025-09-25 20:10:10 +03:00
parent 5016918a44
commit 7e6b4727d8
6 changed files with 13 additions and 5 deletions
+8
View File
@@ -160,3 +160,11 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Horizon Toolchain
output/
.toolchain.tsconfig.json
/examples/**/*.zip
/examples/**/*.icmod
/examples/**/*.icpack
/examples/**/*.hzpack
+1 -2
View File
@@ -191,8 +191,7 @@ class Globals:
return self.parameter_signature
def is_project_available(self, which_project: Optional[str] = None):
from .make_config import MakeConfig
if not isinstance(self.PREFERRED_CONFIG, MakeConfig):
if not isinstance(self.PREFERRED_CONFIG, MakeDataConfig):
return False
return which_project is None or which_project == self.MAKE_CONFIG.current_project
+1 -1
View File
@@ -108,7 +108,7 @@ class MakeModpackData(FlushableMakeProjectData):
version_name: Union[MutableMapping[str, str], str] = "1.0"
version_code: int = 1
description: Union[MutableMapping[str, str], str] = ""
icon: Optional[str] = "pack_icon.png"
icon: Optional[str] = None
def flush_to_output(self, directory: str) -> int:
manifest_file = join(directory, "modpack.json")
+1 -1
View File
@@ -197,7 +197,7 @@ class LinkedResourceStorage:
def append_resource(self, relative_path: str, output_path: str, **properties: Any) -> None:
for linked_resource in self.contents:
if relative_path == linked_resource["relative_path"] and output_path == linked_resource["output_path"]:
attention(f"Duplicate resource directory {relative_path}, skipping it...")
attention(f"Duplicate resource directory {relative_path!r}, skipping it...")
return
self.contents.append({
"relative_path": relative_path,
+1 -1
View File
@@ -135,7 +135,7 @@ def build_package() -> int:
elif isdir(input_resource):
copy_directory(input_resource, output_package_resource)
else:
attention(f"We cannot copy {linked_resource['relative_path']} resource because we could not determine its type.")
attention(f"We cannot copy resource {linked_resource['relative_path']!r} because we could not determine its type.")
for path in GLOBALS.MAKE_CONFIG.obtain_list("excludeFromRelease"):
for excluded_path in expand_paths(join(output_package_directory, path)):
remove_tree(excluded_path)
+1
View File
@@ -200,6 +200,7 @@ def task_update_includes() -> int:
def task_resources() -> int:
from .resources import (build_additional_resources, build_pack_graphics,
build_resources)
overall_result = 0
if GLOBALS.MAKE_CONFIG.supports_resources:
overall_result = build_resources()
if overall_result == 0 and GLOBALS.MAKE_CONFIG.supports_pack_graphics: