touhou-reimpl/extract.nu

15 lines
327 B
Plaintext

def main [thdat: path, version: int] {
let game = if $version == 10 {
"mof"
} else if $version == 11 {
"sa"
} else {
return (error make {msg: "version not supported", label: { text: "expected 10 or 11", span: (metadata $version).span } })
exit 1
}
thdat -C $"assets/($game)" -x $version $thdat
}