v0.4.0: Cloudflare Pages deploy tooling, items search in URL, spirit bear patch lookup
This commit is contained in:
@@ -102,6 +102,15 @@ def main() -> None:
|
||||
if src.is_file():
|
||||
shutil.copy2(src, portrait_dst / f"{key}.png")
|
||||
n_portrait += 1
|
||||
# Non-hero units in patch lookup (e.g. 熊灵) use bundled portraits too.
|
||||
for cell in ((payload.get("patch_lookup") or {}).get("heroes") or {}).values():
|
||||
key = cell.get("key") if isinstance(cell, dict) else None
|
||||
if not key:
|
||||
continue
|
||||
src = HERO_PORTRAITS / f"{key}.png"
|
||||
if src.is_file() and not (portrait_dst / f"{key}.png").is_file():
|
||||
shutil.copy2(src, portrait_dst / f"{key}.png")
|
||||
n_portrait += 1
|
||||
counts["portrait"] = n_portrait
|
||||
|
||||
n_videos = 0
|
||||
|
||||
Reference in New Issue
Block a user