pokerogue/scripts/asset-tooling/update-exp-sprites.ps1
Sirz Benjie c695df777c
[Refactor][Dev] Move public to its own submodule (#6590)
* Remove public folder to prepare for submodule

* Add submodule and update licensing

* Stop serving non-asset files during build

* Update pull request template

* Update CODEOWNERS

* Add locales submodule

* Update pull request template regarding locales

* remove post-checkout lefthook in favor of git config

* chore: add license info to new script

* Update gh pages workflow

* Apply kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* update assets
2025-09-27 11:01:12 -05:00

29 lines
873 B
PowerShell

# SPDX-FileCopyrightText: 2024-2025 Pagefault Games
# SPDX-FileContributor: FlashfyreDev
#
# SPDX-License-Identifier: AGPL-3.0-only
[string[]] $keys = @()
Get-ChildItem -Path '.\assets\images\pokemon' -Recurse -Directory | Where-Object { $_.Name -eq 'exp' } | ForEach-Object {
Get-ChildItem -Path $_.FullName -Recurse -File | ForEach-Object {
$attr = ""
if ($_.FullName.Contains('\shiny\')) {
$attr += "s"
}
if ($_.FullName.Contains("\back\")) {
$attr += "b"
}
if ($_.FullName.Contains("\female\")) {
$attr += "f"
}
$keyParts = $_.BaseName.Split("-")
$key = $keyParts[0] + $attr
if ($keyParts[1]) {
$key += "-" + $keyParts[1]
}
$keys += $key
}
}
$keys | ConvertTo-Json | Out-File -encoding ASCII .\assets\exp-sprites.json