diff --git a/client_assets/multi_poly/gtnh_icon.png b/client_assets/multi_poly/gtnh_icon.png new file mode 100644 index 00000000..ed97a4ea Binary files /dev/null and b/client_assets/multi_poly/gtnh_icon.png differ diff --git a/src/gtnh/assembler/multi_poly.py b/src/gtnh/assembler/multi_poly.py index 05a47a48..74f0eded 100644 --- a/src/gtnh/assembler/multi_poly.py +++ b/src/gtnh/assembler/multi_poly.py @@ -5,7 +5,7 @@ from gtnh.assembler.downloader import get_asset_version_cache_location from gtnh.assembler.generic_assembler import GenericAssembler -from gtnh.defs import JAVA_9_ARCHIVE_SUFFIX, MMC_PACK_INSTANCE, MMC_PACK_JSON, RELEASE_MMC_DIR, Side +from gtnh.defs import JAVA_9_ARCHIVE_SUFFIX, MMC_ASSETS_DIR, MMC_PACK_INSTANCE, MMC_PACK_JSON, RELEASE_MMC_DIR, Side from gtnh.models.gtnh_config import GTNHConfig from gtnh.models.gtnh_release import GTNHRelease from gtnh.models.gtnh_version import GTNHVersion @@ -143,3 +143,6 @@ def add_mmc_meta_data(self, side: Side) -> None: archive.writestr( str(self.mmc_archive_root) + "/instance.cfg", MMC_PACK_INSTANCE.format(f"GTNH {self.release.version}") ) + with archive.open(str(self.mmc_archive_root) + "/gtnh_icon.png", "w") as target: + with open(MMC_ASSETS_DIR / "gtnh_icon.png", "rb") as icon: + shutil.copyfileobj(icon, target) diff --git a/src/gtnh/defs.py b/src/gtnh/defs.py index 94d558fc..7ba6a599 100644 --- a/src/gtnh/defs.py +++ b/src/gtnh/defs.py @@ -26,6 +26,9 @@ RELEASE_README_DIR = RELEASE_DIR / "readmes" SERVER_ASSETS_DIR = ROOT_DIR / "server_assets" +CLIENT_ASSETS_DIR = ROOT_DIR / "client_assets" + +MMC_ASSETS_DIR = CLIENT_ASSETS_DIR / "multi_poly" TRANSLATION_DIR = ROOT_DIR / "translations" @@ -90,7 +93,7 @@ class Archive(str, Enum): OverrideMemory=false OverrideNativeWorkarounds=false OverrideWindow=false -iconKey=default +iconKey=gtnh_icon name={} notes= """