mntm-asset-packer 1.1.5__py3-none-any.whl → 1.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mntm-asset-packer
3
- Version: 1.1.5
3
+ Version: 1.1.6
4
4
  Summary: An improved asset packer script to make the process of creating and packing asset packs for the Momentum firmware easier.
5
5
  Author-email: notnotnescap <nescap@tuta.io>
6
6
  Requires-Python: >=3.10
@@ -0,0 +1,5 @@
1
+ mntm_asset_packer.py,sha256=gFvKENg7mLtAS9l0TLndkBBlH9HxzPd_IPom2UZRRsY,27818
2
+ mntm_asset_packer-1.1.6.dist-info/METADATA,sha256=6P5Az5W5E41p51zOCzIx6BhMRFcUeaGtPr74KIPHNyE,3694
3
+ mntm_asset_packer-1.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
+ mntm_asset_packer-1.1.6.dist-info/entry_points.txt,sha256=CF05qVMVPPNhTroKeH_kkKqVgG-mJ-Q0mSAZHpfxkr0,61
5
+ mntm_asset_packer-1.1.6.dist-info/RECORD,,
mntm_asset_packer.py CHANGED
@@ -88,7 +88,7 @@ Bubble slots: 0
88
88
  try:
89
89
  VERSION = importlib.metadata.version("mntm-asset-packer")
90
90
  except importlib.metadata.PackageNotFoundError:
91
- VERSION = "1.1.5 (standalone mode)"
91
+ VERSION = "1.1.6 (standalone mode)"
92
92
  # this means the script is being used directly with python
93
93
  # instead of using the python package
94
94
 
@@ -418,12 +418,17 @@ def pack_specific(
418
418
  """Packs a specific asset pack."""
419
419
  asset_pack_path = pathlib.Path(asset_pack_path)
420
420
  output_directory = pathlib.Path(output_directory)
421
- logger(f"Packing '\033[3m{asset_pack_path.name}\033[0m'")
422
421
 
423
422
  if not asset_pack_path.is_dir():
424
423
  logger(f"\033[31mError: '{asset_pack_path}' is not a directory\033[0m")
425
424
  return
426
425
 
426
+ if not (asset_pack_path / "Anims").is_dir() and not (asset_pack_path / "Icons").is_dir() and not (asset_pack_path / "Fonts").is_dir() and not (asset_pack_path / "Passport").is_dir():
427
+ logger(f"\033[37mInfo: '{asset_pack_path}' is not an asset pack, skipping.\033[0m")
428
+ return
429
+
430
+ logger(f"Packing '\033[3m{asset_pack_path.name}\033[0m'")
431
+
427
432
  packed = output_directory / asset_pack_path.name
428
433
 
429
434
  if packed.exists():
@@ -434,6 +439,7 @@ def pack_specific(
434
439
  packed.unlink()
435
440
  except (OSError, shutil.Error):
436
441
  logger(f"\033[31mError: Failed to remove existing pack: '{packed}'\033[0m")
442
+ return
437
443
 
438
444
  # packing anims
439
445
  if (asset_pack_path / "Anims/manifest.txt").exists():
@@ -494,12 +500,16 @@ def recover_specific(
494
500
  """Recovers a specific asset pack."""
495
501
  asset_pack_path = pathlib.Path(asset_pack_path)
496
502
  output_directory = pathlib.Path(output_directory)
497
- logger(f"Recovering '\033[3m{asset_pack_path.name}\033[0m'")
498
503
 
499
504
  if not asset_pack_path.is_dir():
500
505
  logger(f"\033[31mError: '{asset_pack_path}' is not a directory\033[0m")
501
506
  return
502
507
 
508
+ if not (asset_pack_path / "Anims").is_dir() and not (asset_pack_path / "Icons").is_dir() and not (asset_pack_path / "Fonts").is_dir() and not (asset_pack_path / "Passport").is_dir():
509
+ logger(f"\033[37mInfo: '{asset_pack_path}' is not an asset pack, skipping.\033[0m")
510
+ return
511
+
512
+ logger(f"Recovering '\033[3m{asset_pack_path.name}\033[0m'")
503
513
  recovered = output_directory / asset_pack_path.name
504
514
 
505
515
  if recovered.exists():
@@ -1,5 +0,0 @@
1
- mntm_asset_packer.py,sha256=TvZctZblwOZFfMx95ScAtvm4aAPcZpA_o7o51M8yAFE,27208
2
- mntm_asset_packer-1.1.5.dist-info/METADATA,sha256=wwsj-E7PtJkCPiiDlUpWkaNHPSza2ftAgOIJcVBAuXE,3694
3
- mntm_asset_packer-1.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
- mntm_asset_packer-1.1.5.dist-info/entry_points.txt,sha256=CF05qVMVPPNhTroKeH_kkKqVgG-mJ-Q0mSAZHpfxkr0,61
5
- mntm_asset_packer-1.1.5.dist-info/RECORD,,