Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 24 additions & 3 deletions scripts/tracker/build_sprite_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

import argparse
import json
import os
import re
import subprocess
import time
from collections import defaultdict
from pathlib import Path
Expand Down Expand Up @@ -270,8 +272,8 @@ def combine(base: str, variant: str) -> str:
if gen_num >= 2:
results.append(combine(front_base, "shiny/female"))

# In Gen 2 (Crystal), animated sprites only existed for the front battle entrance; back sprites were purely static in-game
if subcat == "Animated" and gen_num == 2:
# In Gen 2 (Crystal) and Gen 4 (Diamond/Pearl, Platinum, HeartGold/SoulSilver), animated sprites only existed for the front battle entrance; back sprites were purely static in-game
if subcat == "Animated" and (gen_num == 2 or gen_num == 4):
return results

# Back perspectives (battle sprites)
Expand Down Expand Up @@ -737,8 +739,27 @@ def is_dimorphic_entity(pk_id: int, identifier: str, sp_id: int | str) -> bool:
if len(parts) >= 3:
types_dict[parts[0]][parts[1]].append("/".join(parts[2:]))

manifest = {
def get_current_branch() -> str:
"""Detects current Git branch from CI environment or local Git repo."""
if os.environ.get("GITHUB_REF_NAME"):
return os.environ["GITHUB_REF_NAME"]
try:
res = subprocess.run(
["git", "rev-parse", "--abbrev-ref", "HEAD"],
capture_output=True,
text=True,
check=True,
)
branch = res.stdout.strip()
if branch and branch != "HEAD":
return branch
except Exception:
pass
return "master"

manifest: dict[str, Any] = {
"version": "2.0",
"branch": get_current_branch(),
"generated_at": time.strftime("%Y-%m-%dT%H:%M:%SZ"),
"counts": {
"pokemon_entities": len(pokemon_list),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading