pokerogue/scripts/update-exp-sprites.ps1
Sirz Benjie 51d4c33de0
[Misc] Standardize-file-names (#6137)
* Standardize filenames to kebab-case

Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>

* Move script outside of public folder

* Move update_exp_sprites to scripts

* Add ls-lint to lint file and directory names

* Update lefthook.yml to skip merge / rebase on all pre-commit commands

---------

Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>
2025-07-24 16:38:31 -04:00

24 lines
740 B
PowerShell

[string[]] $keys = @()
Get-ChildItem -Path '.\public\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 .\public\exp-sprites.json