mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: center aligned icons
This commit is contained in:
1 parent
4ea8615fb5
commit
f13b0f2255
3 files changed
+6
-7
No files matched your search
@@ -307,7 +307,7 @@ const missingStrings: Record<string, string> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export async function definitions(production: boolean) {
|
export async function definitions(production: boolean) {
|
||||||
console.log('Building tank definitions...');
|
console.log('Building definitions...');
|
||||||
|
|
||||||
const tankDefinitions: TankDefinitions = {};
|
const tankDefinitions: TankDefinitions = {};
|
||||||
const modelDefinitions: ModelDefinitions = {};
|
const modelDefinitions: ModelDefinitions = {};
|
||||||
|
|||||||
@@ -54,14 +54,15 @@ export async function equipmentIcons(production: boolean) {
|
|||||||
|
|
||||||
if (configPath.startsWith('Gfx/Lobby')) {
|
if (configPath.startsWith('Gfx/Lobby')) {
|
||||||
const configPathWebp = configPath.replace('.txt', '');
|
const configPathWebp = configPath.replace('.txt', '');
|
||||||
const buffer = await readDVPLFile(
|
const image = sharp(
|
||||||
`${DATA}/${configPathWebp}.packed.webp.dvpl`,
|
await readDVPLFile(`${DATA}/${configPathWebp}.packed.webp.dvpl`),
|
||||||
);
|
);
|
||||||
|
const content = (await image.trim().toBuffer()).toString('base64');
|
||||||
|
|
||||||
changes.push({
|
changes.push({
|
||||||
path: `icons/equipment/${optionalDevice.id}.webp`,
|
path: `icons/equipment/${optionalDevice.id}.webp`,
|
||||||
encoding: 'base64',
|
encoding: 'base64',
|
||||||
content: buffer.toString('base64'),
|
content,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const config = await readStringDVPL(`${DATA}/${configPath}.dvpl`);
|
const config = await readStringDVPL(`${DATA}/${configPath}.dvpl`);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Octokit } from '@octokit/rest';
|
|
||||||
import { rm, writeFile } from 'fs/promises';
|
import { rm, writeFile } from 'fs/promises';
|
||||||
import { argv, env } from 'process';
|
import { argv } from 'process';
|
||||||
import {
|
import {
|
||||||
RatingsInfo,
|
RatingsInfo,
|
||||||
RatingsNeighbors,
|
RatingsNeighbors,
|
||||||
@@ -115,7 +114,6 @@ for (let index = 0; index < PLAYERS; index++) {
|
|||||||
const leaderboardJSON = JSON.stringify(leaderboard);
|
const leaderboardJSON = JSON.stringify(leaderboard);
|
||||||
|
|
||||||
if (publish) {
|
if (publish) {
|
||||||
const octokit = new Octokit({ auth: env.GH_TOKEN });
|
|
||||||
const info = await patientFetchJSON<RatingsInfo & { detail: undefined }>(
|
const info = await patientFetchJSON<RatingsInfo & { detail: undefined }>(
|
||||||
`https://${server}.wotblitz.com/en/api/rating-leaderboards/season/`,
|
`https://${server}.wotblitz.com/en/api/rating-leaderboards/season/`,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user