Merge branch 'main' into ue4

This commit is contained in:
TrèsAbhi committed 2025-06-05 14:25:23 -05:00
commit 95f67a04d7
6 files changed
+685 -675

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
- name: Download release assets - name: Download release assets
run: | run: |
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkit/releases/latest \ DOWNLOAD_URL=$(curl -s https://api.github.com/repos/blitzkit/blitzkit/releases/latest \
| grep "browser_download_url.*bot.zip" \ | grep "browser_download_url.*bot.zip" \
| cut -d : -f 2,3 \ | cut -d : -f 2,3 \
| tr -d \") | tr -d \")
+2 -2
View File
@@ -790,8 +790,8 @@
"hull": "Корпус", "hull": "Корпус",
"turret": "Башня", "turret": "Башня",
"hard": "Твёрдые", "hard": "Твёрдые",
"medium": "Средний танк", "medium": "Средние",
"soft": "На мягком грунте", "soft": "Мягкие",
"effective": "Эффективно" "effective": "Эффективно"
}, },
"ricochet": { "ricochet": {
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,20 @@
import { readFile } from 'fs/promises'; import { readFile } from 'fs/promises';
import { DATA_COMPRESSED } from '../../buildAssets/constants';
import { readDVPL } from './readDVPL'; import { readDVPL } from './readDVPL';
export async function readDVPLFile(file: string) { export async function readDVPLFile(file: string) {
const path = `${file}${file.endsWith('.dvpl') ? '' : '.dvpl'}`; let path: string;
if (DATA_COMPRESSED) {
path = file.endsWith('.dvpl') ? file : `${file}.dvpl`;
} else {
path = file.replace('.dvpl', '');
}
const content = await readFile(path); const content = await readFile(path);
if (!DATA_COMPRESSED) return content;
const dvpl = readDVPL(content); const dvpl = readDVPL(content);
return dvpl; return dvpl;
@@ -1,3 +1,4 @@
import { asset } from '@blitzkit/core';
import ProgressBar from 'progress'; import ProgressBar from 'progress';
import { GithubChangeBlob, createBlob } from './createBlob'; import { GithubChangeBlob, createBlob } from './createBlob';
import { octokit } from './octokit'; import { octokit } from './octokit';
@@ -19,10 +20,7 @@ export async function commitMultipleFiles(
await Promise.all( await Promise.all(
changesRaw.map(async (change) => { changesRaw.map(async (change) => {
const blobPath = `${repoRaw}/${branch}/${change.path}`; const response = await fetch(asset(change.path));
const response = await fetch(
`https://raw.githubusercontent.com/${blobPath}`,
);
let isNew: boolean; let isNew: boolean;
let isDifferent: boolean; let isDifferent: boolean;
let diff: number; let diff: number;
@@ -45,7 +43,7 @@ export async function commitMultipleFiles(
isNew = false; isNew = false;
const buffer = Buffer.from(await response.arrayBuffer()); const buffer = Buffer.from(await response.arrayBuffer());
if (buffer.equals(change.content)) { if (buffer.equals(new Uint8Array(change.content))) {
diff = 0; diff = 0;
isDifferent = false; isDifferent = false;
} else { } else {
@@ -54,7 +52,7 @@ export async function commitMultipleFiles(
} }
} else { } else {
throw new Error( throw new Error(
`Unexpected status code ${response.status} for ${blobPath}`, `Unexpected status code ${response.status} for ${change.path}`,
); );
} }
@@ -73,17 +71,17 @@ export async function commitMultipleFiles(
if (isNew) { if (isNew) {
console.log( console.log(
`🟢 (+${change.content.length.toLocaleString()}B) ${blobPath}`, `🟢 (+${change.content.length.toLocaleString()}B) ${change.path}`,
); );
changes.push(change); changes.push(change);
} else if (isDifferent) { } else if (isDifferent) {
console.log( console.log(
`🟡 (${diff > 0 ? '+' : ''}${diff.toLocaleString()}B) ${blobPath}`, `🟡 (${diff > 0 ? '+' : ''}${diff.toLocaleString()}B) ${change.path}`,
); );
changes.push(change); changes.push(change);
} else { } else {
console.log( console.log(
`🔵 (${change.content.length.toLocaleString()}B) ${blobPath}`, `🔵 (${change.content.length.toLocaleString()}B) ${change.path}`,
); );
} }
}), }),
@@ -0,0 +1 @@
dh=ecd11a058908f58ccea092ed17aa43ace59 4b9a5