Project availability mistypos, fix defaults
This commit is contained in:
@@ -160,3 +160,11 @@ cython_debug/
|
|||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
# 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.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
|
# Horizon Toolchain
|
||||||
|
output/
|
||||||
|
.toolchain.tsconfig.json
|
||||||
|
/examples/**/*.zip
|
||||||
|
/examples/**/*.icmod
|
||||||
|
/examples/**/*.icpack
|
||||||
|
/examples/**/*.hzpack
|
||||||
|
|||||||
@@ -191,8 +191,7 @@ class Globals:
|
|||||||
return self.parameter_signature
|
return self.parameter_signature
|
||||||
|
|
||||||
def is_project_available(self, which_project: Optional[str] = None):
|
def is_project_available(self, which_project: Optional[str] = None):
|
||||||
from .make_config import MakeConfig
|
if not isinstance(self.PREFERRED_CONFIG, MakeDataConfig):
|
||||||
if not isinstance(self.PREFERRED_CONFIG, MakeConfig):
|
|
||||||
return False
|
return False
|
||||||
return which_project is None or which_project == self.MAKE_CONFIG.current_project
|
return which_project is None or which_project == self.MAKE_CONFIG.current_project
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class MakeModpackData(FlushableMakeProjectData):
|
|||||||
version_name: Union[MutableMapping[str, str], str] = "1.0"
|
version_name: Union[MutableMapping[str, str], str] = "1.0"
|
||||||
version_code: int = 1
|
version_code: int = 1
|
||||||
description: Union[MutableMapping[str, str], str] = ""
|
description: Union[MutableMapping[str, str], str] = ""
|
||||||
icon: Optional[str] = "pack_icon.png"
|
icon: Optional[str] = None
|
||||||
|
|
||||||
def flush_to_output(self, directory: str) -> int:
|
def flush_to_output(self, directory: str) -> int:
|
||||||
manifest_file = join(directory, "modpack.json")
|
manifest_file = join(directory, "modpack.json")
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class LinkedResourceStorage:
|
|||||||
def append_resource(self, relative_path: str, output_path: str, **properties: Any) -> None:
|
def append_resource(self, relative_path: str, output_path: str, **properties: Any) -> None:
|
||||||
for linked_resource in self.contents:
|
for linked_resource in self.contents:
|
||||||
if relative_path == linked_resource["relative_path"] and output_path == linked_resource["output_path"]:
|
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
|
return
|
||||||
self.contents.append({
|
self.contents.append({
|
||||||
"relative_path": relative_path,
|
"relative_path": relative_path,
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ def build_package() -> int:
|
|||||||
elif isdir(input_resource):
|
elif isdir(input_resource):
|
||||||
copy_directory(input_resource, output_package_resource)
|
copy_directory(input_resource, output_package_resource)
|
||||||
else:
|
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 path in GLOBALS.MAKE_CONFIG.obtain_list("excludeFromRelease"):
|
||||||
for excluded_path in expand_paths(join(output_package_directory, path)):
|
for excluded_path in expand_paths(join(output_package_directory, path)):
|
||||||
remove_tree(excluded_path)
|
remove_tree(excluded_path)
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ def task_update_includes() -> int:
|
|||||||
def task_resources() -> int:
|
def task_resources() -> int:
|
||||||
from .resources import (build_additional_resources, build_pack_graphics,
|
from .resources import (build_additional_resources, build_pack_graphics,
|
||||||
build_resources)
|
build_resources)
|
||||||
|
overall_result = 0
|
||||||
if GLOBALS.MAKE_CONFIG.supports_resources:
|
if GLOBALS.MAKE_CONFIG.supports_resources:
|
||||||
overall_result = build_resources()
|
overall_result = build_resources()
|
||||||
if overall_result == 0 and GLOBALS.MAKE_CONFIG.supports_pack_graphics:
|
if overall_result == 0 and GLOBALS.MAKE_CONFIG.supports_pack_graphics:
|
||||||
|
|||||||
Reference in New Issue
Block a user