mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: localize game assets
This commit is contained in:
1 parent
d8459d373c
commit
ef9778ea96
90 files changed
+336
-251
No files matched your search
@@ -8,16 +8,16 @@ import { DATA } from './constants';
|
||||
|
||||
export async function boosterIcons() {
|
||||
const boosterFiles = (await readdir(`${DATA}/Gfx/Shared/boosters`)).filter(
|
||||
(file) => !file.endsWith('@2x.txt.dvpl') && !file.startsWith('texture0'),
|
||||
(file) => !file.includes('@2x.txt') && !file.startsWith('texture0'),
|
||||
);
|
||||
const image = sharp(
|
||||
await readDVPLFile(`${DATA}/Gfx/Shared/boosters/texture0.packed.webp.dvpl`),
|
||||
await readDVPLFile(`${DATA}/Gfx/Shared/boosters/texture0.packed.webp`),
|
||||
);
|
||||
const changes: FileChange[] = [];
|
||||
|
||||
await Promise.all(
|
||||
boosterFiles.map(async (file) => {
|
||||
const name = file.match(/booster_(.+).txt.dvpl/)?.[1];
|
||||
const name = file.match(/booster_(.+).txt/)?.[1];
|
||||
|
||||
if (name === undefined) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user