mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: use buffers
This commit is contained in:
1 parent
c8bb1f190a
commit
c98c19dc36
26 files changed
+134
-269
No files matched your search
@@ -17,18 +17,15 @@ export async function moduleIcons() {
|
||||
.map(async (file) => {
|
||||
const nameRaw = file.match(/vehicle(.+)\.packed\.webp\.dvpl/)![1];
|
||||
const name = nameRaw[0].toLowerCase() + nameRaw.slice(1);
|
||||
const content = (
|
||||
await sharp(
|
||||
await readDVPLFile(`${DATA}/Gfx/UI/ModulesTechTree/${file}`),
|
||||
)
|
||||
.trim()
|
||||
.toBuffer()
|
||||
).toString('base64');
|
||||
const content = await sharp(
|
||||
await readDVPLFile(`${DATA}/Gfx/UI/ModulesTechTree/${file}`),
|
||||
)
|
||||
.trim()
|
||||
.toBuffer();
|
||||
|
||||
return {
|
||||
content,
|
||||
path: `icons/modules/${name}.webp`,
|
||||
encoding: 'base64',
|
||||
} satisfies FileChange;
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user