Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22f42117df | ||
|
|
788edf5bdf | ||
|
|
d0170d53e4 | ||
|
|
ae5e38139b | ||
|
|
e38713f365 | ||
|
|
5903b8130b | ||
|
|
179ce62a55 | ||
|
|
a2f1593a0e | ||
|
|
6305db7ad6 | ||
|
|
5082e1b82b |
No files matched your search
@@ -29,7 +29,7 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.ASSET_BOT }}
|
||||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||||
VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
|
VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
|
||||||
@@ -37,8 +37,8 @@ env:
|
|||||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||||
WOTB_DLC_CDN: ${{ secrets.WOTB_DLC_CDN }}
|
WOTB_DLC_CDN: ${{ secrets.WOTB_DLC_CDN }}
|
||||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||||
PUBLIC_ASSET_REPO: blitzkit/assets
|
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||||
PUBLIC_ASSET_BRANCH: main
|
PUBLIC_ASSET_BRANCH: ${{ github.event.inputs.cdn_branch || secrets.PUBLIC_ASSET_BRANCH }}
|
||||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||||
@@ -51,9 +51,8 @@ env:
|
|||||||
PUBLIC_NITROPAY_ID: ${{ secrets.PUBLIC_NITROPAY_ID }}
|
PUBLIC_NITROPAY_ID: ${{ secrets.PUBLIC_NITROPAY_ID }}
|
||||||
PUBLIC_DEBUG_MISSING_I18N: false
|
PUBLIC_DEBUG_MISSING_I18N: false
|
||||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||||
PUBLIC_ASSET_FAST_USER: blitzkit
|
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||||
PUBLIC_ASSET_FAST_REPO: assets
|
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
download_client:
|
download_client:
|
||||||
|
|||||||
@@ -14,17 +14,6 @@ env:
|
|||||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
|
||||||
ALLOW_ROBOTS: 'true'
|
|
||||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
|
||||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
|
||||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
|
||||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
|
||||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
|
||||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
|
||||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
|
||||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
|
||||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download release assets
|
- name: Download release assets
|
||||||
run: |
|
run: |
|
||||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/blitzkit/blitzkit/releases/latest \
|
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/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 \")
|
||||||
|
|||||||
@@ -27,15 +27,4 @@ jobs:
|
|||||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
|
||||||
ALLOW_ROBOTS: 'true'
|
|
||||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
|
||||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
|
||||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
|
||||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
|
||||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
|
||||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
|
||||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
|
||||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
|
||||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
|
||||||
run: bun build:ratingleaderboard --region=asia
|
run: bun build:ratingleaderboard --region=asia
|
||||||
@@ -27,15 +27,4 @@ jobs:
|
|||||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
|
||||||
ALLOW_ROBOTS: 'true'
|
|
||||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
|
||||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
|
||||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
|
||||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
|
||||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
|
||||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
|
||||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
|
||||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
|
||||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
|
||||||
run: bun build:ratingleaderboard --region=eu
|
run: bun build:ratingleaderboard --region=eu
|
||||||
@@ -27,15 +27,4 @@ jobs:
|
|||||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
|
||||||
ALLOW_ROBOTS: 'true'
|
|
||||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
|
||||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
|
||||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
|
||||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
|
||||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
|
||||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
|
||||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
|
||||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
|
||||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
|
||||||
run: bun build:ratingleaderboard --region=com
|
run: bun build:ratingleaderboard --region=com
|
||||||
@@ -18,8 +18,10 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||||
|
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||||
|
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||||
ALLOW_ROBOTS: ${{ secrets.ALLOW_ROBOTS }}
|
ALLOW_ROBOTS: 'true'
|
||||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||||
@@ -27,8 +29,8 @@ env:
|
|||||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
_node_modules
|
_node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
*.env
|
.env
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
@@ -22,7 +22,7 @@ depots
|
|||||||
public/sitemap*
|
public/sitemap*
|
||||||
/firebase.json
|
/firebase.json
|
||||||
target
|
target
|
||||||
# packages/core/src/protos/*.ts
|
# *.ts
|
||||||
/.vercel
|
/.vercel
|
||||||
/.astro
|
/.astro
|
||||||
.vercel
|
.vercel
|
||||||
|
|||||||
@@ -4,6 +4,3 @@
|
|||||||
[submodule "submodules/CUE4Parse"]
|
[submodule "submodules/CUE4Parse"]
|
||||||
path = submodules/CUE4Parse
|
path = submodules/CUE4Parse
|
||||||
url = https://github.com/FabianFG/CUE4Parse
|
url = https://github.com/FabianFG/CUE4Parse
|
||||||
[submodule "submodules/blitzkit-internal"]
|
|
||||||
path = submodules/blitzkit-internal
|
|
||||||
url = https://github.com/blitzkit/internal
|
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
"blitzkit",
|
"blitzkit",
|
||||||
"blitzrinth",
|
"blitzrinth",
|
||||||
"blitzstars",
|
"blitzstars",
|
||||||
|
"bufbuild",
|
||||||
"cacheable",
|
"cacheable",
|
||||||
"Callouts",
|
"Callouts",
|
||||||
"Camo",
|
"Camo",
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
"dxgi",
|
"dxgi",
|
||||||
"echarts",
|
"echarts",
|
||||||
"Everytime",
|
"Everytime",
|
||||||
|
"FABLEGEAR",
|
||||||
"FASTNAME",
|
"FASTNAME",
|
||||||
"flexdirection",
|
"flexdirection",
|
||||||
"FOURCC",
|
"FOURCC",
|
||||||
@@ -86,7 +88,6 @@
|
|||||||
"gameplay",
|
"gameplay",
|
||||||
"glsl",
|
"glsl",
|
||||||
"GLTF",
|
"GLTF",
|
||||||
"gtag",
|
|
||||||
"haha",
|
"haha",
|
||||||
"highp",
|
"highp",
|
||||||
"iife",
|
"iife",
|
||||||
@@ -109,7 +110,7 @@
|
|||||||
"Maddoxkkm",
|
"Maddoxkkm",
|
||||||
"malum",
|
"malum",
|
||||||
"mantlets",
|
"mantlets",
|
||||||
"mediump",
|
"MECHA",
|
||||||
"metallicness",
|
"metallicness",
|
||||||
"metalness",
|
"metalness",
|
||||||
"minitelrose",
|
"minitelrose",
|
||||||
@@ -147,9 +148,11 @@
|
|||||||
"POSITIVEY",
|
"POSITIVEY",
|
||||||
"POSITIVEZ",
|
"POSITIVEZ",
|
||||||
"precompute",
|
"precompute",
|
||||||
|
"PROGRESSTON",
|
||||||
"Promisable",
|
"Promisable",
|
||||||
"proto",
|
"proto",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
|
"protoc",
|
||||||
"protos",
|
"protos",
|
||||||
"Pyogenics",
|
"Pyogenics",
|
||||||
"ratingleaderboard",
|
"ratingleaderboard",
|
||||||
@@ -205,6 +208,7 @@
|
|||||||
"vitepress",
|
"vitepress",
|
||||||
"Vovko",
|
"Vovko",
|
||||||
"wargaming",
|
"wargaming",
|
||||||
|
"WARHAMMER",
|
||||||
"webp",
|
"webp",
|
||||||
"whitespaces",
|
"whitespaces",
|
||||||
"WHSS",
|
"WHSS",
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
# BlitzKit 1.27.12
|
|
||||||
|
|
||||||
This update only affects the website.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- Added the ability to sort by HE shell penetration
|
|
||||||
- The Tankopedia compare bars now account for equipment and selected shells
|
|
||||||
- Made the hero section of the Tankopedia a bit shorter to show users that the page is scrollable
|
|
||||||
|
|
||||||
## Fixes
|
|
||||||
|
|
||||||
- The "Clear filters" button no longer shows up after clearing the search bar
|
|
||||||
- Guns for some tanks no longer go transparent when far away from the camera
|
|
||||||
- The dynamic armor tab no longer lags and flickers when rotating the turret of a tank
|
|
||||||
- Reimplemented the missing tool backgrounds in the navigation bar hamburger menu
|
|
||||||
- The navigation bar now properly goes transparent for pages that request like the Tankopedia pages
|
|
||||||
- Removed the tank name text outline because it doesn't work on most devices
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# BlitzKit 1.27.13
|
|
||||||
|
|
||||||
This update adds a feature for a future version of WoTB 👁️👃👁️
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- Added compatibility for the new mechanic for the upcoming Polish Tank Destroyers
|
|
||||||
- This code will remain dormant until the update for WoTB is released
|
|
||||||
- Added a progress bar to the hero section of the Tankopedia to show that the model is loading
|
|
||||||
- Reordered some Tankopedia statistics to bring important statistics like Damage to the very top
|
|
||||||
|
|
||||||
## Fixes
|
|
||||||
|
|
||||||
- The second column in the footer is now aligned on mobile devices
|
|
||||||
- Fixed an issue that stopped the armor highlighting from working on the Kiwi browser and on older devices
|
|
||||||
|
|
||||||
## Technical Changes
|
|
||||||
|
|
||||||
- Removed permissions for robots to crawl non-blitzkit.app domains
|
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "blitzkit",
|
"name": "@blitzkit",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.27.13",
|
"version": "1.27.11",
|
||||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "./types.d.ts",
|
"types": "./types.d.ts",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*",
|
||||||
|
"submodules/*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:assets": "cd packages/scripts && bun run build:assets",
|
"build:assets": "cd packages/scripts && bun run build:assets",
|
||||||
@@ -41,15 +42,23 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"googleapis": "^144.0.0",
|
"googleapis": "^144.0.0",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"protobufjs": "^7.5.2",
|
"protobufjs": "^7.5.2",
|
||||||
|
"react": "^19.1.0",
|
||||||
|
"react-dom": "^19.1.0",
|
||||||
"quicklime": "^1.2.0",
|
"quicklime": "^1.2.0",
|
||||||
"sharp": "^0.33.5"
|
"sharp": "^0.33.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@astrojs/react": "^4.3.0",
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
|
"@types/react": "^19.1.5",
|
||||||
|
"@types/react-dom": "^19.1.5",
|
||||||
"@types/node": "^22.14.1",
|
"@types/node": "^22.14.1",
|
||||||
|
"astro": "^5.8.0",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"prisma": "^6.6.0",
|
"prisma": "^6.6.0",
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
"satori": "^0.10.14",
|
"satori": "^0.10.14",
|
||||||
"@resvg/resvg-js": "^2.6.2",
|
"@resvg/resvg-js": "^2.6.2",
|
||||||
"discord.js": "^14.16.3",
|
"discord.js": "^14.16.3",
|
||||||
"react": "^18.3.1",
|
|
||||||
"@radix-ui/colors": "^3.0.0",
|
"@radix-ui/colors": "^3.0.0",
|
||||||
"fuzzysort": "^2.0.4",
|
"fuzzysort": "^2.0.4",
|
||||||
"bepaint": "^0.1.0-beta.3",
|
"bepaint": "^0.1.0-beta.3",
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": ["src/**/*", "../core/src/blitzkit/supportedLocales.ts", "../i18n/src/unwrapper.ts"]
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"../core/src/blitzkit/supportedLocales.ts",
|
||||||
|
"../i18n/src/unwrapper.ts"
|
||||||
|
],
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "../../"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@blitzkit/closed": "workspace:*",
|
||||||
"@octokit/plugin-throttling": "^8.2.0",
|
"@octokit/plugin-throttling": "^8.2.0",
|
||||||
"@octokit/rest": "^20.1.1",
|
"@octokit/rest": "^20.1.1",
|
||||||
"@prisma/client": "^6.6.0",
|
"@prisma/client": "^6.6.0",
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { CatalogItem } from '@protos/blitz_items';
|
||||||
|
import { Any } from '@protos/google/protobuf/any';
|
||||||
|
import { MessageFns } from '../protos';
|
||||||
|
|
||||||
|
export class CatalogItemAccessor {
|
||||||
|
private components: Record<string, Any> = {};
|
||||||
|
|
||||||
|
constructor(item: CatalogItem) {
|
||||||
|
for (const component of item.components) {
|
||||||
|
if (
|
||||||
|
component.value === undefined ||
|
||||||
|
component.value.component === undefined
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.components[component.key] = component.value.component;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get<Type>(Message: MessageFns<Type>, component: string) {
|
||||||
|
if (component in this.components) {
|
||||||
|
return Message.decode(this.components[component].value);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(`Unknown component: ${component}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export function entityName(entity: string) {
|
||||||
|
const [_, ...name] = entity.split('.');
|
||||||
|
return name.join('.');
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
export * from './canSplash';
|
export * from './canSplash';
|
||||||
|
export * from './catalogItemAccessor';
|
||||||
export * from './clans';
|
export * from './clans';
|
||||||
export * from './classes';
|
export * from './classes';
|
||||||
export * from './constants';
|
export * from './constants';
|
||||||
|
export * from './entityName';
|
||||||
export * from './equipmentPrice';
|
export * from './equipmentPrice';
|
||||||
export * from './fetchBlitz';
|
export * from './fetchBlitz';
|
||||||
export * from './fetchGlossary';
|
export * from './fetchGlossary';
|
||||||
@@ -18,6 +20,7 @@ export * from './getTankStats';
|
|||||||
export * from './idToRegion';
|
export * from './idToRegion';
|
||||||
export * from './isOnGoingRatingSeason';
|
export * from './isOnGoingRatingSeason';
|
||||||
export * from './isValidBlitzId';
|
export * from './isValidBlitzId';
|
||||||
|
export * from './metadataAccessor';
|
||||||
export * from './nations';
|
export * from './nations';
|
||||||
export * from './normalizeExtra';
|
export * from './normalizeExtra';
|
||||||
export * from './normalizeIds';
|
export * from './normalizeIds';
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import { CatalogItem } from '@protos/blitz_items';
|
||||||
|
import { Metadata } from '@protos/blitz_metadata';
|
||||||
|
import { CatalogItemAccessor } from './catalogItemAccessor';
|
||||||
|
|
||||||
|
export class UnpackedMetadataAccessor {
|
||||||
|
private items: Record<string, CatalogItemAccessor> = {};
|
||||||
|
|
||||||
|
constructor(metadata: Metadata) {
|
||||||
|
for (const item of metadata.catalog_items) {
|
||||||
|
if (item.catalog_id in this.items) {
|
||||||
|
throw new Error(`Duplicate catalog ID: ${item.catalog_id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.items[item.catalog_id] = new CatalogItemAccessor(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get(item: string) {
|
||||||
|
if (item in this.items) return this.items[item];
|
||||||
|
|
||||||
|
throw new Error(`Unknown catalog ID: ${item}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DiscreteMetadataAccessor {
|
||||||
|
constructor(private base: string) {}
|
||||||
|
|
||||||
|
async get(item: string) {
|
||||||
|
const response = await fetch(`${this.base}/${item}.pb`);
|
||||||
|
|
||||||
|
if (!response.ok) throw new Error(`Unknown catalog ID: ${item}`);
|
||||||
|
|
||||||
|
const buffer = await response.arrayBuffer();
|
||||||
|
const catalogItem = CatalogItem.decode(new Uint8Array(buffer));
|
||||||
|
|
||||||
|
return new CatalogItemAccessor(catalogItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
import { assertSecret } from './assertSecret';
|
import { assertSecret } from './assertSecret';
|
||||||
|
|
||||||
|
const repo = assertSecret(import.meta.env.PUBLIC_ASSET_REPO);
|
||||||
|
const branch = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
||||||
|
const fastUser = assertSecret(import.meta.env.PUBLIC_ASSET_FAST_USER);
|
||||||
|
const fastRepo = assertSecret(import.meta.env.PUBLIC_ASSET_FAST_REPO);
|
||||||
|
|
||||||
export function asset(path: string) {
|
export function asset(path: string) {
|
||||||
return `${assertSecret(import.meta.env.PUBLIC_ASSET_BASE)}/${path}`;
|
return branch === 'main'
|
||||||
|
? `https://${fastUser}.github.io/${fastRepo}/${path}`
|
||||||
|
: `https://raw.githubusercontent.com/${repo}/${branch}/${path}`;
|
||||||
}
|
}
|
||||||
@@ -46,4 +46,5 @@ export * from './gallery';
|
|||||||
export * from './metaSortTank';
|
export * from './metaSortTank';
|
||||||
export * from './popularTanks';
|
export * from './popularTanks';
|
||||||
export * from './romanize';
|
export * from './romanize';
|
||||||
|
export * from './slugify';
|
||||||
export * from './youtubers';
|
export * from './youtubers';
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { deburr } from 'lodash-es';
|
||||||
|
|
||||||
|
const nonAlphanumericRegex = /[^a-z0-9]/g;
|
||||||
|
const multipleDashesRegex = /--+/g;
|
||||||
|
const trailingDashRegex = /-$/g;
|
||||||
|
const leadingDashRegex = /^-/g;
|
||||||
|
|
||||||
|
export function slugify(name: string) {
|
||||||
|
let slug = deburr(name).toLowerCase();
|
||||||
|
slug = slug.replaceAll(nonAlphanumericRegex, '-');
|
||||||
|
slug = slug.replaceAll(multipleDashesRegex, '-');
|
||||||
|
slug = slug.replaceAll(trailingDashRegex, '');
|
||||||
|
slug = slug.replaceAll(leadingDashRegex, '');
|
||||||
|
|
||||||
|
return slug;
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
|
||||||
import { deburr } from 'lodash-es';
|
import { deburr } from 'lodash-es';
|
||||||
import { SUPPORTED_LOCALES } from '../../../i18n/src/strings';
|
|
||||||
import { I18nString } from '../protos';
|
import { I18nString } from '../protos';
|
||||||
import { fetchCamouflageDefinitions } from './camouflageDefinitions';
|
import { fetchCamouflageDefinitions } from './camouflageDefinitions';
|
||||||
import { fetchTankDefinitions } from './tankDefinitions';
|
import { fetchTankDefinitions } from './tankDefinitions';
|
||||||
@@ -26,8 +26,8 @@ export async function fetchTankNames() {
|
|||||||
searchableNameDeburr,
|
searchableNameDeburr,
|
||||||
camouflages: tank.camouflages
|
camouflages: tank.camouflages
|
||||||
?.map((id) =>
|
?.map((id) =>
|
||||||
SUPPORTED_LOCALES.map(
|
locales.supported.map(
|
||||||
(locale) =>
|
({ locale }) =>
|
||||||
camouflageDefinitions.camouflages[id]?.name.locales[locale],
|
camouflageDefinitions.camouflages[id]?.name.locales[locale],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -42,9 +42,11 @@ export async function fetchTankNames() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const SEARCH_KEYS = [
|
export const SEARCH_KEYS = [
|
||||||
...SUPPORTED_LOCALES.map((locale) => [
|
...locales.supported
|
||||||
`searchableName.locales.${locale}`,
|
.map(({ locale }) => [
|
||||||
`searchableNameDeburr.locales.${locale}`,
|
`searchableName.locales.${locale}`,
|
||||||
]).flat(),
|
`searchableNameDeburr.locales.${locale}`,
|
||||||
|
])
|
||||||
|
.flat(),
|
||||||
'camouflages',
|
'camouflages',
|
||||||
];
|
];
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { MessageFns } from '../protos';
|
||||||
|
|
||||||
|
export function encodePBBuffer<Type>(message: MessageFns<Type>, data: Type) {
|
||||||
|
return Buffer.from(message.encode(data).finish());
|
||||||
|
}
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
|
export * from './encodePBBuffer';
|
||||||
export * from './fetchPB';
|
export * from './fetchPB';
|
||||||
export * from './pbMap';
|
export * from './pbMap';
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/average_definitions.proto
|
// source: average_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message CamouflageDefinitions {
|
message CamouflageDefinitions {
|
||||||
map<uint32, Camouflage> camouflages = 1;
|
map<uint32, Camouflage> camouflages = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/camouflage_definitions.proto
|
// source: camouflage_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message ConsumableDefinitions {
|
message ConsumableDefinitions {
|
||||||
map<uint32, Consumable> consumables = 1;
|
map<uint32, Consumable> consumables = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/consumable_definitions.proto
|
// source: consumable_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
@@ -11,14 +11,14 @@ import { createBaseI18nString, I18nString } from "./i18n";
|
|||||||
export const protobufPackage = "blitzkit";
|
export const protobufPackage = "blitzkit";
|
||||||
|
|
||||||
export enum ConsumableTankCategoryFilterCategory {
|
export enum ConsumableTankCategoryFilterCategory {
|
||||||
CLIP = 0,
|
CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP = 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
export function consumableTankCategoryFilterCategoryFromJSON(object: any): ConsumableTankCategoryFilterCategory {
|
export function consumableTankCategoryFilterCategoryFromJSON(object: any): ConsumableTankCategoryFilterCategory {
|
||||||
switch (object) {
|
switch (object) {
|
||||||
case 0:
|
case 0:
|
||||||
case "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP":
|
case "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP":
|
||||||
return ConsumableTankCategoryFilterCategory.CLIP;
|
return ConsumableTankCategoryFilterCategory.CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP;
|
||||||
default:
|
default:
|
||||||
throw new globalThis.Error(
|
throw new globalThis.Error(
|
||||||
"Unrecognized enum value " + object + " for enum ConsumableTankCategoryFilterCategory",
|
"Unrecognized enum value " + object + " for enum ConsumableTankCategoryFilterCategory",
|
||||||
@@ -28,7 +28,7 @@ export function consumableTankCategoryFilterCategoryFromJSON(object: any): Consu
|
|||||||
|
|
||||||
export function consumableTankCategoryFilterCategoryToJSON(object: ConsumableTankCategoryFilterCategory): string {
|
export function consumableTankCategoryFilterCategoryToJSON(object: ConsumableTankCategoryFilterCategory): string {
|
||||||
switch (object) {
|
switch (object) {
|
||||||
case ConsumableTankCategoryFilterCategory.CLIP:
|
case ConsumableTankCategoryFilterCategory.CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP:
|
||||||
return "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP";
|
return "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP";
|
||||||
default:
|
default:
|
||||||
throw new globalThis.Error(
|
throw new globalThis.Error(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message EquipmentDefinitions {
|
message EquipmentDefinitions {
|
||||||
map<string, EquipmentPreset> presets = 1;
|
map<string, EquipmentPreset> presets = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/equipment_definitions.proto
|
// source: equipment_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message Gallery {
|
message Gallery {
|
||||||
repeated Avatar avatars = 1;
|
repeated Avatar avatars = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/gallery.proto
|
// source: gallery.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message GameDefinitions {
|
message GameDefinitions {
|
||||||
required string version = 1;
|
required string version = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/game_definitions.proto
|
// source: game_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/i18n.proto
|
// source: i18n.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message MapDefinitions {
|
message MapDefinitions {
|
||||||
map<int32, MapDefinition> maps = 1;
|
map<int32, MapDefinition> maps = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/map_definitions.proto
|
// source: map_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/model_definitions.proto
|
// source: model_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/popular_tanks.proto
|
// source: popular_tanks.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/consumable_definitions.proto";
|
import "consumable_definitions.proto";
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message ProvisionDefinitions {
|
message ProvisionDefinitions {
|
||||||
map<uint32, Provision> provisions = 1;
|
map<uint32, Provision> provisions = 1;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/provision_definitions.proto
|
// source: provision_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/rating_leaderboard.proto
|
// source: rating_leaderboard.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/reviews.proto
|
// source: reviews.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-ts_proto v2.2.2
|
// protoc-gen-ts_proto v2.2.2
|
||||||
// protoc v5.28.2
|
// protoc v5.28.2
|
||||||
// source: packages/core/src/protos/skill_definitions.proto
|
// source: skill_definitions.proto
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ syntax = "proto2";
|
|||||||
|
|
||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
import "packages/core/src/protos/i18n.proto";
|
import "i18n.proto";
|
||||||
|
|
||||||
message TankDefinitions {
|
message TankDefinitions {
|
||||||
map<uint32, TankDefinition> tanks = 1;
|
map<uint32, TankDefinition> tanks = 1;
|
||||||
@@ -157,17 +157,6 @@ message GunDefinitionBase {
|
|||||||
required float dispersion_damaged = 13;
|
required float dispersion_damaged = 13;
|
||||||
repeated Unlock unlocks = 14;
|
repeated Unlock unlocks = 14;
|
||||||
required uint32 shell_capacity = 15;
|
required uint32 shell_capacity = 15;
|
||||||
optional AssaultRanges assault_ranges = 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
message AssaultRanges {
|
|
||||||
repeated AssaultRange ranges = 1;
|
|
||||||
repeated ShellType types = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message AssaultRange {
|
|
||||||
required float distance = 1;
|
|
||||||
required float factor = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message ShellDefinition {
|
message ShellDefinition {
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": ["src/**/*", "../i18n/src/strings.ts"]
|
"include": ["src/**/*", "../i18n/src/strings.ts"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "../../"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,89 +1,8 @@
|
|||||||
import { merge } from 'ts-deepmerge';
|
import type en from '../strings/en.json';
|
||||||
import en from '../strings/en.json';
|
|
||||||
import es from '../strings/es.json';
|
|
||||||
import fr from '../strings/fr.json';
|
|
||||||
import ja from '../strings/ja.json';
|
|
||||||
import pl from '../strings/pl.json';
|
|
||||||
import pt from '../strings/pt.json';
|
|
||||||
import ru from '../strings/ru.json';
|
|
||||||
import uk from '../strings/uk.json';
|
|
||||||
import zh from '../strings/zh.json';
|
|
||||||
|
|
||||||
export type BlitzKitStrings = typeof en;
|
export type BlitzKitStrings = typeof en;
|
||||||
|
|
||||||
const stringsRaw = { en, es, fr, ja, pl, pt, ru, uk, zh };
|
export const SUPPORTED_LOCALE_FLAGS: Record<string, string> = {
|
||||||
|
|
||||||
export const SUPPORTED_LOCALES = Object.keys(stringsRaw) as SupportedLocale[];
|
|
||||||
|
|
||||||
export const DEFAULT_LOCALE = SUPPORTED_LOCALES[0];
|
|
||||||
|
|
||||||
function redact(string: string) {
|
|
||||||
const matches = [...string.matchAll(/%s\d+/g)];
|
|
||||||
const characters = string
|
|
||||||
.split('')
|
|
||||||
.map((char) => (char === ' ' ? ' ' : '█')) as string[];
|
|
||||||
|
|
||||||
matches.forEach((match) => {
|
|
||||||
const start = match.index;
|
|
||||||
const matchText = match[0];
|
|
||||||
for (let i = 0; i < matchText.length; i++) {
|
|
||||||
characters[start + i] = matchText[i];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return characters.join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
function nuke(object: TranslationTree) {
|
|
||||||
for (const key in object) {
|
|
||||||
const typedKey = key as keyof typeof object;
|
|
||||||
|
|
||||||
if (typeof object[typedKey] === 'string') {
|
|
||||||
const value = object[typedKey];
|
|
||||||
object[typedKey] = redact(value as string);
|
|
||||||
} else nuke(object[typedKey] as TranslationTree);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const stringsPartial: Partial<Record<SupportedLocale, TranslationTree>> = {};
|
|
||||||
|
|
||||||
for (const locale in stringsRaw) {
|
|
||||||
if (locale === DEFAULT_LOCALE) {
|
|
||||||
stringsPartial[DEFAULT_LOCALE] = stringsRaw[DEFAULT_LOCALE];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const localeStrings = stringsRaw[locale as SupportedLocale];
|
|
||||||
stringsPartial[locale as SupportedLocale] = merge(
|
|
||||||
stringsRaw[DEFAULT_LOCALE],
|
|
||||||
localeStrings,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (import.meta.env.PUBLIC_DEBUG_MISSING_I18N === 'true') {
|
|
||||||
nuke(stringsPartial[locale as SupportedLocale]!);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const STRINGS = stringsPartial as Record<
|
|
||||||
SupportedLocale,
|
|
||||||
BlitzKitStrings
|
|
||||||
>;
|
|
||||||
|
|
||||||
export type SupportedLocale = keyof typeof stringsRaw;
|
|
||||||
|
|
||||||
export const SUPPORTED_LOCALE_BLITZ_MAP: Record<SupportedLocale, string> = {
|
|
||||||
en: 'en',
|
|
||||||
es: 'es',
|
|
||||||
fr: 'fr',
|
|
||||||
ja: 'ja',
|
|
||||||
pt: 'pt',
|
|
||||||
ru: 'ru',
|
|
||||||
uk: 'uk',
|
|
||||||
zh: 'zh-Hans',
|
|
||||||
pl: 'pl',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const SUPPORTED_LOCALE_FLAGS: Record<SupportedLocale, string> = {
|
|
||||||
en: '🇺🇸',
|
en: '🇺🇸',
|
||||||
es: '🇪🇸',
|
es: '🇪🇸',
|
||||||
fr: '🇫🇷',
|
fr: '🇫🇷',
|
||||||
@@ -94,7 +13,3 @@ export const SUPPORTED_LOCALE_FLAGS: Record<SupportedLocale, string> = {
|
|||||||
zh: '🇨🇳',
|
zh: '🇨🇳',
|
||||||
pl: '🇵🇱',
|
pl: '🇵🇱',
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TranslationTree = { [key: string]: TranslationNode };
|
|
||||||
|
|
||||||
export type TranslationNode = string | TranslationTree;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { I18nString } from '@blitzkit/core';
|
import { I18nString } from '@blitzkit/core';
|
||||||
import { DEFAULT_LOCALE } from './strings';
|
import locales from '../locales.json' with { type: 'json' };
|
||||||
|
|
||||||
export function unwrapper(locale: string) {
|
export function unwrapper(locale: string) {
|
||||||
return function (i18nString: I18nString) {
|
return function (i18nString: I18nString) {
|
||||||
@@ -7,6 +7,6 @@ export function unwrapper(locale: string) {
|
|||||||
return i18nString.locales[locale];
|
return i18nString.locales[locale];
|
||||||
}
|
}
|
||||||
|
|
||||||
return i18nString.locales[DEFAULT_LOCALE];
|
return i18nString.locales[locales.default];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,18 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"common": {
|
"common": {
|
||||||
|
"tiers": {
|
||||||
|
"0": "Unknown tier",
|
||||||
|
"1": "I",
|
||||||
|
"2": "II",
|
||||||
|
"3": "III",
|
||||||
|
"4": "IV",
|
||||||
|
"5": "V",
|
||||||
|
"6": "VI",
|
||||||
|
"7": "VII",
|
||||||
|
"8": "Vintage"
|
||||||
|
},
|
||||||
|
|
||||||
"units": {
|
"units": {
|
||||||
"m": "%s1m",
|
"m": "%s1m",
|
||||||
"mm": "%s1mm",
|
"mm": "%s1mm",
|
||||||
@@ -86,15 +98,44 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"nations": {
|
"nations": {
|
||||||
"ussr": "U.S.S.R.",
|
"0": "Unknown nation",
|
||||||
"germany": "Germany",
|
"1": "U.S.S.R.",
|
||||||
"usa": "U.S.A.",
|
"2": "Germany",
|
||||||
"china": "China",
|
"3": "U.S.A.",
|
||||||
"uk": "U.K.",
|
"4": "China",
|
||||||
"france": "France",
|
"5": "France",
|
||||||
"japan": "Japan",
|
"6": "U.K.",
|
||||||
"european": "European Nation",
|
"7": "Japan",
|
||||||
"other": "Hybrid Nation"
|
"8": "Europe",
|
||||||
|
"9": "Poland",
|
||||||
|
"10": "Australia",
|
||||||
|
"11": "Canada",
|
||||||
|
"12": "Italy",
|
||||||
|
"13": "Finland",
|
||||||
|
"14": "Czech",
|
||||||
|
"15": "Hybrid Nation",
|
||||||
|
"16": "GDR",
|
||||||
|
"17": "Ireland",
|
||||||
|
"18": "Scotland",
|
||||||
|
"19": "Sweden",
|
||||||
|
"20": "Argo Coalition",
|
||||||
|
"21": "Titan Lab",
|
||||||
|
"22": "Defender",
|
||||||
|
"23": "Progresston",
|
||||||
|
"24": "Wasteland",
|
||||||
|
"25": "Hunters Moon",
|
||||||
|
"26": "Cold Front",
|
||||||
|
"27": "The Explorer",
|
||||||
|
"28": "Fablegear",
|
||||||
|
"29": "Outlaws",
|
||||||
|
"30": "GUP",
|
||||||
|
"31": "Dune",
|
||||||
|
"32": "Terminator",
|
||||||
|
"33": "Warhammer",
|
||||||
|
"34": "Valkirya Chronicles",
|
||||||
|
"35": "Mecha",
|
||||||
|
"36": "TMNT",
|
||||||
|
"37": "Star Trek"
|
||||||
},
|
},
|
||||||
|
|
||||||
"nations_adjectives": {
|
"nations_adjectives": {
|
||||||
@@ -109,6 +150,14 @@
|
|||||||
"other": "Hybrid"
|
"other": "Hybrid"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"tank_class": {
|
||||||
|
"0": "Unknown Class",
|
||||||
|
"1": "Heavy",
|
||||||
|
"2": "Light",
|
||||||
|
"3": "Medium",
|
||||||
|
"4": "Tank destroyer"
|
||||||
|
},
|
||||||
|
|
||||||
"tank_class_short": {
|
"tank_class_short": {
|
||||||
"-1": "unrecognized",
|
"-1": "unrecognized",
|
||||||
"0": "Light",
|
"0": "Light",
|
||||||
@@ -133,10 +182,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"tree_type": {
|
"tree_type": {
|
||||||
"-1": "unrecognized",
|
"0": "Unknown tree type",
|
||||||
"0": "Tech tree",
|
"1": "Common",
|
||||||
"1": "Premium",
|
"2": "Premium",
|
||||||
"2": "Collector"
|
"3": "Collector"
|
||||||
},
|
},
|
||||||
|
|
||||||
"regions": {
|
"regions": {
|
||||||
@@ -790,7 +839,6 @@
|
|||||||
"fire.caliber": "caliber",
|
"fire.caliber": "caliber",
|
||||||
"fire.standardPenetration": "standard penetration",
|
"fire.standardPenetration": "standard penetration",
|
||||||
"fire.premiumPenetration": "premium penetration",
|
"fire.premiumPenetration": "premium penetration",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "damage",
|
"fire.damage": "damage",
|
||||||
"fire.moduleDamage": "module damage",
|
"fire.moduleDamage": "module damage",
|
||||||
"fire.shellVelocity": "shell velocity",
|
"fire.shellVelocity": "shell velocity",
|
||||||
@@ -887,10 +935,6 @@
|
|||||||
"tank_seo_description": "%s1 armor, statistics, equipment, provisions, and more. %s2 DPM, %s3hp alpha, %s4mm penetration, %s5kph top speed, %s6hp health.",
|
"tank_seo_description": "%s1 armor, statistics, equipment, provisions, and more. %s2 DPM, %s3hp alpha, %s4mm penetration, %s5kph top speed, %s6hp health.",
|
||||||
|
|
||||||
"visualizers": {
|
"visualizers": {
|
||||||
"assault": {
|
|
||||||
"title": "Assault shells"
|
|
||||||
},
|
|
||||||
|
|
||||||
"rotator": {
|
"rotator": {
|
||||||
"hull": "Hull",
|
"hull": "Hull",
|
||||||
"turret": "Turret",
|
"turret": "Turret",
|
||||||
@@ -993,6 +1037,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"meta": {
|
"meta": {
|
||||||
|
"compensation": "Compensation",
|
||||||
|
"free": "Free",
|
||||||
"back": "Back",
|
"back": "Back",
|
||||||
"compare": "Compare",
|
"compare": "Compare",
|
||||||
"swap": {
|
"swap": {
|
||||||
@@ -1006,11 +1052,12 @@
|
|||||||
"class": "Class",
|
"class": "Class",
|
||||||
"tier": "Tier",
|
"tier": "Tier",
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"dev_id": "DEV: ID",
|
"id": "ID",
|
||||||
"purchase": "Purchase price",
|
"purchase": "Purchase price",
|
||||||
"restoration": "Restoration price",
|
"restoration": "Restoration price",
|
||||||
"sale": "Sale price",
|
"sale": "Sale price",
|
||||||
"research": "Research XP"
|
"set": "Set",
|
||||||
|
"price": "Price"
|
||||||
},
|
},
|
||||||
|
|
||||||
"tech_tree": {
|
"tech_tree": {
|
||||||
@@ -1083,6 +1130,7 @@
|
|||||||
"hull_traverse_speed": "Hull traverse speed",
|
"hull_traverse_speed": "Hull traverse speed",
|
||||||
"camouflage": "Camouflage",
|
"camouflage": "Camouflage",
|
||||||
"reload": "Reload",
|
"reload": "Reload",
|
||||||
|
|
||||||
"crewCount": "Crew count",
|
"crewCount": "Crew count",
|
||||||
"shellNormalization": "Normalization",
|
"shellNormalization": "Normalization",
|
||||||
"shellRicochet": "Ricochet",
|
"shellRicochet": "Ricochet",
|
||||||
@@ -1096,7 +1144,6 @@
|
|||||||
"caliber": "Caliber",
|
"caliber": "Caliber",
|
||||||
"penetration": "Penetration",
|
"penetration": "Penetration",
|
||||||
"damage": "Damage",
|
"damage": "Damage",
|
||||||
"damageWithoutAssault": "Damage without assault shells",
|
|
||||||
"clipDamage": "Clipping potential",
|
"clipDamage": "Clipping potential",
|
||||||
"moduleDamage": "Module damage",
|
"moduleDamage": "Module damage",
|
||||||
"explosionRadius": "Explosion radius",
|
"explosionRadius": "Explosion radius",
|
||||||
|
|||||||
@@ -698,7 +698,6 @@
|
|||||||
"fire.caliber": "calibre",
|
"fire.caliber": "calibre",
|
||||||
"fire.standardPenetration": "penetración estándar",
|
"fire.standardPenetration": "penetración estándar",
|
||||||
"fire.premiumPenetration": "penetración prémium",
|
"fire.premiumPenetration": "penetración prémium",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "daño",
|
"fire.damage": "daño",
|
||||||
"fire.moduleDamage": "daño al módulo",
|
"fire.moduleDamage": "daño al módulo",
|
||||||
"fire.shellVelocity": "velocidad del proyectil",
|
"fire.shellVelocity": "velocidad del proyectil",
|
||||||
|
|||||||
@@ -698,7 +698,6 @@
|
|||||||
"fire.caliber": "caliber",
|
"fire.caliber": "caliber",
|
||||||
"fire.standardPenetration": "standard penetration",
|
"fire.standardPenetration": "standard penetration",
|
||||||
"fire.premiumPenetration": "premium penetration",
|
"fire.premiumPenetration": "premium penetration",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "damage",
|
"fire.damage": "damage",
|
||||||
"fire.moduleDamage": "module damage",
|
"fire.moduleDamage": "module damage",
|
||||||
"fire.shellVelocity": "shell velocity",
|
"fire.shellVelocity": "shell velocity",
|
||||||
|
|||||||
@@ -698,7 +698,6 @@
|
|||||||
"fire.caliber": "砲口径",
|
"fire.caliber": "砲口径",
|
||||||
"fire.standardPenetration": "通常弾貫通力",
|
"fire.standardPenetration": "通常弾貫通力",
|
||||||
"fire.premiumPenetration": "課金弾貫通力",
|
"fire.premiumPenetration": "課金弾貫通力",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "ダメージ",
|
"fire.damage": "ダメージ",
|
||||||
"fire.moduleDamage": "モジュールダメージ",
|
"fire.moduleDamage": "モジュールダメージ",
|
||||||
"fire.shellVelocity": "弾速",
|
"fire.shellVelocity": "弾速",
|
||||||
|
|||||||
@@ -380,7 +380,7 @@
|
|||||||
},
|
},
|
||||||
"embeds": {
|
"embeds": {
|
||||||
"name": "osadzenie",
|
"name": "osadzenie",
|
||||||
"description": "Jak działają osadzone"
|
"description": "Jak działa osadzanie"
|
||||||
},
|
},
|
||||||
"introduction": {
|
"introduction": {
|
||||||
"name": "wprowadzenie",
|
"name": "wprowadzenie",
|
||||||
@@ -698,7 +698,6 @@
|
|||||||
"fire.caliber": "caliber",
|
"fire.caliber": "caliber",
|
||||||
"fire.standardPenetration": "standard penetration",
|
"fire.standardPenetration": "standard penetration",
|
||||||
"fire.premiumPenetration": "premium penetration",
|
"fire.premiumPenetration": "premium penetration",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "damage",
|
"fire.damage": "damage",
|
||||||
"fire.moduleDamage": "module damage",
|
"fire.moduleDamage": "module damage",
|
||||||
"fire.shellVelocity": "shell velocity",
|
"fire.shellVelocity": "shell velocity",
|
||||||
|
|||||||
@@ -698,7 +698,6 @@
|
|||||||
"fire.caliber": "calibre",
|
"fire.caliber": "calibre",
|
||||||
"fire.standardPenetration": "penetração padrão",
|
"fire.standardPenetration": "penetração padrão",
|
||||||
"fire.premiumPenetration": "penetração premium",
|
"fire.premiumPenetration": "penetração premium",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "dano",
|
"fire.damage": "dano",
|
||||||
"fire.moduleDamage": "dano a módulos",
|
"fire.moduleDamage": "dano a módulos",
|
||||||
"fire.shellVelocity": "velocidade do projétil",
|
"fire.shellVelocity": "velocidade do projétil",
|
||||||
|
|||||||
@@ -697,8 +697,7 @@
|
|||||||
"fire.reload": "перезарядка",
|
"fire.reload": "перезарядка",
|
||||||
"fire.caliber": "калибр",
|
"fire.caliber": "калибр",
|
||||||
"fire.standardPenetration": "базовое пробитие",
|
"fire.standardPenetration": "базовое пробитие",
|
||||||
"fire.premiumPenetration": "премиумное пробитие ",
|
"fire.premiumPenetration": "улучшенное пробитие ",
|
||||||
"fire.tertiaryPenetration": "пробитие третьего снаряда",
|
|
||||||
"fire.damage": "урон",
|
"fire.damage": "урон",
|
||||||
"fire.moduleDamage": "урон по модулям",
|
"fire.moduleDamage": "урон по модулям",
|
||||||
"fire.shellVelocity": "скорость снаряда",
|
"fire.shellVelocity": "скорость снаряда",
|
||||||
@@ -791,8 +790,8 @@
|
|||||||
"hull": "Корпус",
|
"hull": "Корпус",
|
||||||
"turret": "Башня",
|
"turret": "Башня",
|
||||||
"hard": "Твёрдые",
|
"hard": "Твёрдые",
|
||||||
"medium": "Средние",
|
"medium": "Средний танк",
|
||||||
"soft": "Мягкие",
|
"soft": "На мягком грунте",
|
||||||
"effective": "Эффективно"
|
"effective": "Эффективно"
|
||||||
},
|
},
|
||||||
"ricochet": {
|
"ricochet": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"test": {
|
"test": {
|
||||||
"default": "тест",
|
"default": "тест",
|
||||||
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is %s1 because it has the color of %s2. I like it so much that I will say its name 3 times! %s1! %s1! %s1! Once again, it's %s2, not %s3.",
|
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is %s1 because it has the color of %s2. I like it so much that I will say its name 3 times! %s1! %s1! %s1! Once again, it's %s2, not %s3.",
|
||||||
"fox": "Швидка бура лисиця перестрибує через лінивого собаку."
|
"fox": "The quick brown fox jumps over the lazy dog."
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"units": {
|
"units": {
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"hp": "%s1хп",
|
"hp": "%s1хп",
|
||||||
"x": "х%s1",
|
"x": "х%s1",
|
||||||
"percentage": "%s1%",
|
"percentage": "%s1%",
|
||||||
"deg_s": "%s1°/с"
|
"deg_s": "%s1°/s"
|
||||||
},
|
},
|
||||||
"gun_types": {
|
"gun_types": {
|
||||||
"auto_loader": "Магазинна система заряджання",
|
"auto_loader": "Магазинна система заряджання",
|
||||||
@@ -413,10 +413,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"name": "налагодження",
|
"name": "debug",
|
||||||
"description": "Інформація про налагодження бота",
|
"description": "Debug information about the bot",
|
||||||
"body": {
|
"body": {
|
||||||
"title": "# Налагодження\n\n",
|
"title": "# Debug\n\n",
|
||||||
"version": "Версія",
|
"version": "Версія",
|
||||||
"shard": {
|
"shard": {
|
||||||
"label": "Уламок",
|
"label": "Уламок",
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
},
|
},
|
||||||
"embed": {
|
"embed": {
|
||||||
"title": "Невірний обліковий запис?",
|
"title": "Невірний обліковий запис?",
|
||||||
"description": "Використайте команду ще раз і виберіть ім'я користувача з результатів пошуку."
|
"description": "Use the command again and select a username from the search results."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search_clans": {
|
"search_clans": {
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"limit": {
|
"limit": {
|
||||||
"name": "ліміт",
|
"name": "ліміт",
|
||||||
"description": "Максимальна кількість результатів клану (за замовчуванням: %s1)"
|
"description": "The max number of clan results (default: %s1)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"body": {
|
"body": {
|
||||||
@@ -698,7 +698,6 @@
|
|||||||
"fire.caliber": "калібр",
|
"fire.caliber": "калібр",
|
||||||
"fire.standardPenetration": "базове пробиття",
|
"fire.standardPenetration": "базове пробиття",
|
||||||
"fire.premiumPenetration": "преміум пробиття",
|
"fire.premiumPenetration": "преміум пробиття",
|
||||||
"fire.tertiaryPenetration": "tertiary penetration",
|
|
||||||
"fire.damage": "шкода",
|
"fire.damage": "шкода",
|
||||||
"fire.moduleDamage": "шкода по модулях",
|
"fire.moduleDamage": "шкода по модулях",
|
||||||
"fire.shellVelocity": "швидкість польоту снаряда",
|
"fire.shellVelocity": "швидкість польоту снаряда",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
Samples,
|
Samples,
|
||||||
averageDefinitionsAllStatsKeys,
|
averageDefinitionsAllStatsKeys,
|
||||||
emptySamples,
|
emptySamples,
|
||||||
|
encodePBBuffer,
|
||||||
getAccountInfo,
|
getAccountInfo,
|
||||||
getTankStats,
|
getTankStats,
|
||||||
idToRegion,
|
idToRegion,
|
||||||
@@ -234,11 +235,11 @@ async function postWork() {
|
|||||||
commitAssets('averages', [
|
commitAssets('averages', [
|
||||||
{
|
{
|
||||||
path: `averages/${latest}.pb`,
|
path: `averages/${latest}.pb`,
|
||||||
content: AverageDefinitions.encode(averageDefinitions).finish(),
|
content: encodePBBuffer(AverageDefinitions, averageDefinitions),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'averages/manifest.json',
|
path: 'averages/manifest.json',
|
||||||
content: new TextEncoder().encode(JSON.stringify(manifest)),
|
content: Buffer.from(JSON.stringify(manifest), 'utf-8'),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import { FileChange } from '../core/github/commitMultipleFiles';
|
|||||||
export async function blitzkitTankIcons() {
|
export async function blitzkitTankIcons() {
|
||||||
console.log('Building blitzkit tank icons...');
|
console.log('Building blitzkit tank icons...');
|
||||||
|
|
||||||
|
console.log('Starting website dev server...');
|
||||||
const browser = await launch();
|
const browser = await launch();
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
const tanks = Object.values((await fetchTankDefinitions()).tanks);
|
const tanks = Object.values((await fetchTankDefinitions()).tanks);
|
||||||
@@ -18,14 +19,12 @@ export async function blitzkitTankIcons() {
|
|||||||
width: BLITZKIT_TANK_ICON_SIZE.width - 1,
|
width: BLITZKIT_TANK_ICON_SIZE.width - 1,
|
||||||
height: BLITZKIT_TANK_ICON_SIZE.height,
|
height: BLITZKIT_TANK_ICON_SIZE.height,
|
||||||
});
|
});
|
||||||
|
await page.goto(`http://localhost:4321/api/tankopedia/tank-icon/${id}/`, {
|
||||||
|
waitUntil: 'networkidle0',
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
if (index === 0) {
|
||||||
await page.goto(`http://localhost:4321/api/tankopedia/tank-icon/${id}/`, {
|
console.log('Dev server started!');
|
||||||
waitUntil: 'networkidle0',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`${id} ${name} time out`, error);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const screenshot = await page.screenshot({
|
const screenshot = await page.screenshot({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Avatar, fetchGlossary, Gallery } from '@blitzkit/core';
|
import { Avatar, encodePBBuffer, fetchGlossary, Gallery } from '@blitzkit/core';
|
||||||
import locales from '@blitzkit/i18n/locales.json';
|
import locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
|
||||||
import { extname } from 'path';
|
import { extname } from 'path';
|
||||||
import ProgressBar from 'progress';
|
import ProgressBar from 'progress';
|
||||||
import { commitAssets } from '../core/github/commitAssets';
|
import { commitAssets } from '../core/github/commitAssets';
|
||||||
@@ -68,13 +68,13 @@ export async function glossary() {
|
|||||||
|
|
||||||
gallery.avatars.push(avatar);
|
gallery.avatars.push(avatar);
|
||||||
|
|
||||||
const content = await fetch(url)
|
const content = await fetch(url).then((response) =>
|
||||||
.then((response) => response.arrayBuffer())
|
response.arrayBuffer(),
|
||||||
.then((buffer) => new Uint8Array(buffer));
|
);
|
||||||
|
|
||||||
changes.push({
|
changes.push({
|
||||||
path: `gallery/avatars/${key}${avatar.extension}`,
|
path: `gallery/avatars/${key}${avatar.extension}`,
|
||||||
content,
|
content: Buffer.from(content),
|
||||||
});
|
});
|
||||||
|
|
||||||
bar.tick();
|
bar.tick();
|
||||||
@@ -83,7 +83,7 @@ export async function glossary() {
|
|||||||
|
|
||||||
changes.push({
|
changes.push({
|
||||||
path: 'definitions/gallery.pb',
|
path: 'definitions/gallery.pb',
|
||||||
content: Gallery.encode(gallery).finish(),
|
content: encodePBBuffer(Gallery, gallery),
|
||||||
});
|
});
|
||||||
|
|
||||||
await commitAssets('glossary', changes);
|
await commitAssets('glossary', changes);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { gameModeBanners } from './gameModeBanners';
|
|||||||
import { glossary } from './glossary';
|
import { glossary } from './glossary';
|
||||||
import { migration } from './migration';
|
import { migration } from './migration';
|
||||||
import { moduleIcons } from './moduleIcons';
|
import { moduleIcons } from './moduleIcons';
|
||||||
|
import { popularTanks } from './popularTanks';
|
||||||
import { shellIcons } from './shellIcons';
|
import { shellIcons } from './shellIcons';
|
||||||
import { skillIcons } from './skillIcons';
|
import { skillIcons } from './skillIcons';
|
||||||
import { tankArmors } from './tankArmors';
|
import { tankArmors } from './tankArmors';
|
||||||
@@ -46,7 +47,7 @@ const methods = [
|
|||||||
boosterIcons,
|
boosterIcons,
|
||||||
tankIcons,
|
tankIcons,
|
||||||
blitzkitTankIcons,
|
blitzkitTankIcons,
|
||||||
// popularTanks,
|
popularTanks,
|
||||||
glossary,
|
glossary,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export async function migration() {
|
|||||||
await commitAssets('migration', [
|
await commitAssets('migration', [
|
||||||
{
|
{
|
||||||
path: 'definitions/migration.json',
|
path: 'definitions/migration.json',
|
||||||
content: new TextEncoder().encode(JSON.stringify(map)),
|
content: Buffer.from(JSON.stringify(map)),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
assertSecret,
|
assertSecret,
|
||||||
|
encodePBBuffer,
|
||||||
fetchTankDefinitions,
|
fetchTankDefinitions,
|
||||||
PopularTanks,
|
PopularTanks,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
@@ -69,7 +70,7 @@ export async function popularTanks() {
|
|||||||
await commitAssets('popular tanks', [
|
await commitAssets('popular tanks', [
|
||||||
{
|
{
|
||||||
path: 'definitions/popular-tanks.pb',
|
path: 'definitions/popular-tanks.pb',
|
||||||
content: PopularTanks.encode(popularTanks).finish(),
|
content: encodePBBuffer(PopularTanks, popularTanks),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -29,11 +29,10 @@ export async function tankArmors() {
|
|||||||
|
|
||||||
const id = toUniqueId(nation, tank.id);
|
const id = toUniqueId(nation, tank.id);
|
||||||
const model = await extractArmor(DATA, `${nation}-${tankKey}`);
|
const model = await extractArmor(DATA, `${nation}-${tankKey}`);
|
||||||
const content = await nodeIO.writeBinary(model);
|
|
||||||
|
|
||||||
changes.push({
|
changes.push({
|
||||||
path: `3d/tanks/armor/${id}.glb`,
|
path: `3d/tanks/armor/${id}.glb`,
|
||||||
content,
|
content: Buffer.from(await nodeIO.writeBinary(model)),
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { toUniqueId } from '@blitzkit/core';
|
import { toUniqueId } from '@blitzkit/core';
|
||||||
import { NodeIO } from '@gltf-transform/core';
|
import { NodeIO } from '@gltf-transform/core';
|
||||||
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
|
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
|
||||||
import { readdir, writeFile } from 'fs/promises';
|
import { readdir } from 'fs/promises';
|
||||||
import { extractModel } from '../core/blitz/extractModel';
|
import { extractModel } from '../core/blitz/extractModel';
|
||||||
import { readXMLDVPL } from '../core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../core/blitz/readYAMLDVPL';
|
||||||
@@ -32,6 +32,7 @@ export async function tankModels() {
|
|||||||
if (tankKey.includes('tutorial_bot')) continue;
|
if (tankKey.includes('tutorial_bot')) continue;
|
||||||
|
|
||||||
const id = toUniqueId(nation, tank.id);
|
const id = toUniqueId(nation, tank.id);
|
||||||
|
|
||||||
const parameters = await readYAMLDVPL<TankParameters>(
|
const parameters = await readYAMLDVPL<TankParameters>(
|
||||||
`${DATA}/3d/Tanks/Parameters/${nation}/${tankKey}.yaml`,
|
`${DATA}/3d/Tanks/Parameters/${nation}/${tankKey}.yaml`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ const content = RatingLeaderboard.encode({
|
|||||||
const changes: FileChange[] = [
|
const changes: FileChange[] = [
|
||||||
{
|
{
|
||||||
path: `regions/${normalizedServer}/rating/${info.current_season}.pb`,
|
path: `regions/${normalizedServer}/rating/${info.current_season}.pb`,
|
||||||
content,
|
content: Buffer.from(content),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,9 @@
|
|||||||
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) {
|
||||||
let path: string;
|
const path = `${file}${file.endsWith('.dvpl') ? '' : '.dvpl'}`;
|
||||||
|
|
||||||
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,15 +1,12 @@
|
|||||||
import { DdsReadStream, PvrReadStream } from '@blitzkit/core';
|
import { DdsReadStream, PvrReadStream } from '@blitzkit/core';
|
||||||
import { existsSync } from 'fs';
|
import { existsSync } from 'fs';
|
||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
import { DATA_COMPRESSED } from '../../../buildAssets/constants';
|
|
||||||
import { readDVPLFile } from '../readDVPLFile';
|
import { readDVPLFile } from '../readDVPLFile';
|
||||||
import { TextureMutation } from './constants';
|
import { TextureMutation } from './constants';
|
||||||
|
|
||||||
export async function readTexture(path: string, mutation?: TextureMutation) {
|
export async function readTexture(path: string, mutation?: TextureMutation) {
|
||||||
const ddsTexturePath = path.replace('.tex', '.dx11.dds');
|
const ddsTexturePath = path.replace('.tex', '.dx11.dds');
|
||||||
const isDds = existsSync(
|
const isDds = existsSync(`${ddsTexturePath}.dvpl`);
|
||||||
`${ddsTexturePath}${DATA_COMPRESSED ? '.dvpl' : ''}`,
|
|
||||||
);
|
|
||||||
const resolvedTexturePath = isDds
|
const resolvedTexturePath = isDds
|
||||||
? ddsTexturePath
|
? ddsTexturePath
|
||||||
: ddsTexturePath.replace('.dds', '.pvr');
|
: ddsTexturePath.replace('.dds', '.pvr');
|
||||||
@@ -78,4 +75,5 @@ export async function readTexture(path: string, mutation?: TextureMutation) {
|
|||||||
default:
|
default:
|
||||||
return await sharp(raw.data, { raw }).jpeg().toBuffer();
|
return await sharp(raw.data, { raw }).jpeg().toBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,10 @@
|
|||||||
import { asset } from '@blitzkit/core';
|
|
||||||
import ProgressBar from 'progress';
|
import ProgressBar from 'progress';
|
||||||
import { compareUint8Arrays } from './compareUint8Arrays';
|
|
||||||
import { GithubChangeBlob, createBlob } from './createBlob';
|
import { GithubChangeBlob, createBlob } from './createBlob';
|
||||||
import { octokit } from './octokit';
|
import { octokit } from './octokit';
|
||||||
|
|
||||||
export interface FileChange {
|
export interface FileChange {
|
||||||
path: string;
|
path: string;
|
||||||
content: Uint8Array;
|
content: Buffer;
|
||||||
}
|
|
||||||
|
|
||||||
enum DiffStatus {
|
|
||||||
New,
|
|
||||||
Changed,
|
|
||||||
Unchanged,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const heuristicFormats = ['glb', 'webp', 'jpg', 'png'];
|
const heuristicFormats = ['glb', 'webp', 'jpg', 'png'];
|
||||||
@@ -27,61 +19,72 @@ export async function commitMultipleFiles(
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
changesRaw.map(async (change) => {
|
changesRaw.map(async (change) => {
|
||||||
const response = await fetch(asset(change.path), {
|
const blobPath = `${repoRaw}/${branch}/${change.path}`;
|
||||||
headers: { 'Accept-Encoding': 'identity' },
|
const response = await fetch(
|
||||||
});
|
`https://raw.githubusercontent.com/${blobPath}`,
|
||||||
let diff: { change: number; status: DiffStatus };
|
);
|
||||||
|
let isNew: boolean;
|
||||||
|
let isDifferent: boolean;
|
||||||
|
let diff: number;
|
||||||
|
|
||||||
if (response.status === 404) {
|
if (response.status === 404) {
|
||||||
diff = { change: change.content.length, status: DiffStatus.New };
|
isNew = true;
|
||||||
|
diff = change.content.length;
|
||||||
|
isDifferent = true;
|
||||||
} else if (
|
} else if (
|
||||||
response.headers.has('Content-Length') &&
|
response.headers.has('Content-Length') &&
|
||||||
Number(response.headers.get('Content-Length')) !== change.content.length
|
parseInt(response.headers.get('Content-Length')!) !==
|
||||||
|
change.content.length
|
||||||
) {
|
) {
|
||||||
diff = {
|
isNew = false;
|
||||||
change:
|
diff =
|
||||||
change.content.length -
|
change.content.length -
|
||||||
Number(response.headers.get('Content-Length')),
|
parseInt(response.headers.get('Content-Length')!);
|
||||||
status: DiffStatus.Changed,
|
isDifferent = true;
|
||||||
};
|
|
||||||
} else if (response.status === 200) {
|
} else if (response.status === 200) {
|
||||||
if (
|
isNew = false;
|
||||||
heuristicFormats.some((format) => change.path.endsWith(`.${format}`))
|
const buffer = Buffer.from(await response.arrayBuffer());
|
||||||
) {
|
|
||||||
/**
|
|
||||||
* Heuristic: if it's a large blob like a .glb, a diff = 0 might end
|
|
||||||
* up being a false positive with isDifferent = true. So, it's okay
|
|
||||||
* to assume it's unchanged.
|
|
||||||
*/
|
|
||||||
diff = { change: 0, status: DiffStatus.Unchanged };
|
|
||||||
} else {
|
|
||||||
const buffer = new Uint8Array(await response.arrayBuffer());
|
|
||||||
|
|
||||||
if (compareUint8Arrays(buffer, change.content)) {
|
if (buffer.equals(change.content)) {
|
||||||
diff = { change: 0, status: DiffStatus.Unchanged };
|
diff = 0;
|
||||||
} else {
|
isDifferent = false;
|
||||||
diff = {
|
} else {
|
||||||
change: change.content.length - buffer.length,
|
diff = change.content.length - buffer.length;
|
||||||
status: DiffStatus.Changed,
|
isDifferent = true;
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unexpected status code ${response.status} for ${change.path}`,
|
`Unexpected status code ${response.status} for ${blobPath}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (diff.status === DiffStatus.Unchanged) {
|
/**
|
||||||
// just don't bother
|
* Heuristic: if it's a large blob like a .glb, a diff = 0 might end up
|
||||||
// console.log(`🔵 (${diff.change.toLocaleString()}B) ${change.path}`);
|
* being a false positive with isDifferent = true. So, it's okay to
|
||||||
} else {
|
* assume it's unchanged.
|
||||||
|
*/
|
||||||
|
if (
|
||||||
|
diff === 0 &&
|
||||||
|
heuristicFormats.some((format) => change.path.endsWith(`.${format}`))
|
||||||
|
) {
|
||||||
|
isDifferent = false;
|
||||||
|
isNew = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNew) {
|
||||||
console.log(
|
console.log(
|
||||||
`${
|
`🟢 (+${change.content.length.toLocaleString()}B) ${blobPath}`,
|
||||||
diff.status === DiffStatus.New ? '🟢' : '🟡'
|
|
||||||
} (${diff.change > 0 ? '+' : ''}${diff.change.toLocaleString()}B) ${change.path}`,
|
|
||||||
);
|
);
|
||||||
changes.push(change);
|
changes.push(change);
|
||||||
|
} else if (isDifferent) {
|
||||||
|
console.log(
|
||||||
|
`🟡 (${diff > 0 ? '+' : ''}${diff.toLocaleString()}B) ${blobPath}`,
|
||||||
|
);
|
||||||
|
changes.push(change);
|
||||||
|
} else {
|
||||||
|
console.log(
|
||||||
|
`🔵 (${change.content.length.toLocaleString()}B) ${blobPath}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
export function compareUint8Arrays(a: Uint8Array, b: Uint8Array) {
|
|
||||||
if (a.length !== b.length) return false;
|
|
||||||
|
|
||||||
for (let index = 0; index < a.length; index++) {
|
|
||||||
if (a[index] !== b[index]) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -20,7 +20,7 @@ export const createBlob = throttle(
|
|||||||
await octokit.git.createBlob({
|
await octokit.git.createBlob({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
content: Buffer.from(change.content).toString('base64'),
|
content: change.content.toString('base64'),
|
||||||
encoding: 'base64',
|
encoding: 'base64',
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
@@ -34,7 +34,6 @@ export const createBlob = throttle(
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`Failed blob ${change.path}; retrying in ${TIME_PER_BLOB}ms...`,
|
`Failed blob ${change.path}; retrying in ${TIME_PER_BLOB}ms...`,
|
||||||
error,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, TIME_PER_BLOB));
|
await new Promise((resolve) => setTimeout(resolve, TIME_PER_BLOB));
|
||||||
|
|||||||
@@ -134,12 +134,14 @@ function post() {
|
|||||||
const files = idsChunked.map((chunk, index) => {
|
const files = idsChunked.map((chunk, index) => {
|
||||||
const didsWriteStream = new DidsWriteStream().dids(chunk);
|
const didsWriteStream = new DidsWriteStream().dids(chunk);
|
||||||
const buffer = didsWriteStream.uint8Array;
|
const buffer = didsWriteStream.uint8Array;
|
||||||
const content = compress(buffer);
|
const compressed = compress(buffer);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Chunk ${index} with ${chunk.length} ids (compressed: ${content.length}; uncompressed: ${buffer.length})`,
|
`Chunk ${index} with ${chunk.length} ids (compressed: ${compressed.length}; uncompressed: ${buffer.length})`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const content = Buffer.from(compressed);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content,
|
content,
|
||||||
path: `ids/${index}.dids.lz4`,
|
path: `ids/${index}.dids.lz4`,
|
||||||
@@ -149,12 +151,13 @@ function post() {
|
|||||||
commitAssets('discovered ids', [
|
commitAssets('discovered ids', [
|
||||||
...files,
|
...files,
|
||||||
{
|
{
|
||||||
content: new TextEncoder().encode(
|
content: Buffer.from(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
chunks: idsChunked.length,
|
chunks: idsChunked.length,
|
||||||
count: ids.length,
|
count: ids.length,
|
||||||
time: Date.now(),
|
time: Date.now(),
|
||||||
} satisfies DiscoveredIdsDefinitions),
|
} satisfies DiscoveredIdsDefinitions),
|
||||||
|
'utf-8',
|
||||||
),
|
),
|
||||||
path: 'ids/manifest.json',
|
path: 'ids/manifest.json',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { exec as execSync } from 'child_process';
|
import { exec as execSync } from 'child_process';
|
||||||
import { existsSync } from 'fs';
|
import { existsSync } from 'fs';
|
||||||
import { readdir, rm, writeFile } from 'fs/promises';
|
import { readdir, rm, writeFile } from 'fs/promises';
|
||||||
|
import { chunk } from 'lodash-es';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
|
|
||||||
const ROOT = 'packages/core/src/protos';
|
|
||||||
|
|
||||||
const exec = promisify(execSync);
|
const exec = promisify(execSync);
|
||||||
|
|
||||||
let executableFileExtension: string;
|
let executableFileExtension: string;
|
||||||
@@ -15,33 +14,42 @@ if (existsSync('node_modules/.bin/protoc-gen-ts_proto.exe')) {
|
|||||||
executableFileExtension = '';
|
executableFileExtension = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const filesRaw = await readdir(`${ROOT}`);
|
await compile('packages/core/src/protos');
|
||||||
await Promise.all(
|
await compile('submodules/blitzkit-closed/src/protos');
|
||||||
filesRaw.map(async (file) => {
|
|
||||||
if (!file.endsWith('.proto')) {
|
|
||||||
await rm(`${ROOT}/${file}`);
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
const files = filesRaw.filter((file) => file.endsWith('.proto'));
|
async function compile(root: string) {
|
||||||
const args = [
|
const filesRaw = await readdir(root);
|
||||||
`--plugin=./node_modules/.bin/protoc-gen-ts_proto${executableFileExtension}`,
|
|
||||||
'--ts_proto_opt=esModuleInterop=true',
|
|
||||||
'--ts_proto_opt=oneof=unions-value',
|
|
||||||
'--ts_proto_opt=removeEnumPrefix=true',
|
|
||||||
'--ts_proto_opt=unrecognizedEnum=false',
|
|
||||||
'--ts_proto_opt=snakeToCamel=false',
|
|
||||||
'--ts_proto_out=.',
|
|
||||||
...files.map((file) => `${ROOT}/${file}`),
|
|
||||||
];
|
|
||||||
|
|
||||||
await exec(`protoc ${args.join(' ')}`);
|
for (const file of filesRaw) {
|
||||||
await writeFile(
|
if (!file.endsWith('.ts')) continue;
|
||||||
`${ROOT}/index.ts`,
|
await rm(`${root}/${file}`);
|
||||||
'// @ts-nocheck\n' +
|
}
|
||||||
files
|
|
||||||
.map((file) => file.replace('.proto', ''))
|
const allFiles = filesRaw.filter((file) => file.endsWith('.proto'));
|
||||||
.map((file) => `export * from './${file}.ts';`)
|
|
||||||
.join('\n'),
|
for (const files of chunk(allFiles, 32)) {
|
||||||
);
|
const args = [
|
||||||
|
`-I=${root}`,
|
||||||
|
`--plugin=./node_modules/.bin/protoc-gen-ts_proto${executableFileExtension}`,
|
||||||
|
'--ts_proto_opt=esModuleInterop=true',
|
||||||
|
'--ts_proto_opt=oneof=unions-value',
|
||||||
|
// '--ts_proto_opt=removeEnumPrefix=true',
|
||||||
|
'--ts_proto_opt=unrecognizedEnum=false',
|
||||||
|
'--ts_proto_opt=snakeToCamel=false',
|
||||||
|
`--ts_proto_out=${root}`,
|
||||||
|
...files.map((file) => `${root}/${file}`),
|
||||||
|
];
|
||||||
|
|
||||||
|
await exec(`protoc ${args.join(' ')}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
await writeFile(
|
||||||
|
`${root}/index.ts`,
|
||||||
|
'// @ts-nocheck\n' +
|
||||||
|
allFiles
|
||||||
|
.sort()
|
||||||
|
.map((file) => file.replace('.proto', ''))
|
||||||
|
.map((file) => `export * from './${file}.ts';`)
|
||||||
|
.join('\n'),
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
asset,
|
asset,
|
||||||
|
encodePBBuffer,
|
||||||
fetchTankDefinitions,
|
fetchTankDefinitions,
|
||||||
Reviews,
|
Reviews,
|
||||||
Video,
|
Video,
|
||||||
@@ -80,7 +81,7 @@ for (const tank of tanksSanitized) {
|
|||||||
}
|
}
|
||||||
await commitAssets('reviews', [
|
await commitAssets('reviews', [
|
||||||
{
|
{
|
||||||
content: Reviews.encode(reviews).finish(),
|
content: encodePBBuffer(Reviews, reviews),
|
||||||
path: 'definitions/reviews.pb',
|
path: 'definitions/reviews.pb',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": ["src/**/*"]
|
"include": ["src/**/*"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "../../"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
|
import partytown from '@astrojs/partytown';
|
||||||
import react from '@astrojs/react';
|
import react from '@astrojs/react';
|
||||||
import sitemap from '@astrojs/sitemap';
|
import sitemap from '@astrojs/sitemap';
|
||||||
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
import locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
i18n: {
|
i18n: {
|
||||||
defaultLocale: 'en',
|
defaultLocale: locales.default,
|
||||||
locales: [...SUPPORTED_LOCALES],
|
locales: locales.supported.map(({ locale }) => locale),
|
||||||
routing: {
|
routing: {
|
||||||
prefixDefaultLocale: false,
|
prefixDefaultLocale: false,
|
||||||
},
|
},
|
||||||
@@ -20,7 +21,7 @@ export default defineConfig({
|
|||||||
outDir: '../../dist/website',
|
outDir: '../../dist/website',
|
||||||
prefetch: true,
|
prefetch: true,
|
||||||
|
|
||||||
integrations: [react(), sitemap()],
|
integrations: [react(), sitemap(), partytown()],
|
||||||
vite: {
|
vite: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@astrojs/partytown": "^2.1.4",
|
||||||
"@astrolib/seo": "^1.0.0-beta.8",
|
"@astrolib/seo": "^1.0.0-beta.8",
|
||||||
|
"@blitzkit/closed": "workspace:*",
|
||||||
"@blitzkit/core": "workspace:*",
|
"@blitzkit/core": "workspace:*",
|
||||||
"@blitzkit/i18n": "workspace:*",
|
"@blitzkit/i18n": "workspace:*",
|
||||||
"@fontsource/inter": "^5.2.5",
|
"@fontsource/inter": "^5.2.5",
|
||||||
@@ -19,10 +21,10 @@
|
|||||||
"@nivo/bar": "^0.87.0",
|
"@nivo/bar": "^0.87.0",
|
||||||
"@nivo/line": "^0.88.0",
|
"@nivo/line": "^0.88.0",
|
||||||
"@radix-ui/colors": "^3.0.0",
|
"@radix-ui/colors": "^3.0.0",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.2",
|
||||||
"@radix-ui/themes": "^3.1.4",
|
"@radix-ui/themes": "^3.2.1",
|
||||||
"@react-three/drei": "^9.115.0",
|
"@react-three/drei": "^10.0.8",
|
||||||
"@react-three/fiber": "^8.17.10",
|
"@react-three/fiber": "^9.1.2",
|
||||||
"compare-versions": "^6.1.1",
|
"compare-versions": "^6.1.1",
|
||||||
"echarts": "^5.5.1",
|
"echarts": "^5.5.1",
|
||||||
"immer": "^10.1.1",
|
"immer": "^10.1.1",
|
||||||
@@ -30,9 +32,7 @@
|
|||||||
"markdown-to-jsx": "^7.5.0",
|
"markdown-to-jsx": "^7.5.0",
|
||||||
"nanostores": "^0.11.3",
|
"nanostores": "^0.11.3",
|
||||||
"quicklime": "^1.2.0",
|
"quicklime": "^1.2.0",
|
||||||
"react": "^18.3.1",
|
|
||||||
"react-device-detect": "^2.2.3",
|
"react-device-detect": "^2.2.3",
|
||||||
"react-dom": "^18.3.1",
|
|
||||||
"react-promise-suspense": "^0.3.4",
|
"react-promise-suspense": "^0.3.4",
|
||||||
"three": "^0.169.0",
|
"three": "^0.169.0",
|
||||||
"urlon": "^3.1.0",
|
"urlon": "^3.1.0",
|
||||||
@@ -45,10 +45,7 @@
|
|||||||
"@playform/compress": "^0.1.9",
|
"@playform/compress": "^0.1.9",
|
||||||
"@playform/inline": "^0.1.2",
|
"@playform/inline": "^0.1.2",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/react": "^18.3.12",
|
|
||||||
"@types/react-dom": "^18.3.1",
|
|
||||||
"@types/three": "^0.160.0",
|
"@types/three": "^0.160.0",
|
||||||
"astro": "^4.16.7",
|
"astro": "^4.16.7"
|
||||||
"astro-compressor": "^1.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
dh=ecd11a058908f58ccea092ed17aa43ace59 4b9a5
|
|
||||||
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 371 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 365 KiB After Width: | Height: | Size: 365 KiB |
|
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 379 KiB |
|
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 242 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 771 KiB After Width: | Height: | Size: 771 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
@@ -1,5 +1,3 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
#define USE_FOG
|
#define USE_FOG
|
||||||
|
|
||||||
#include <fog_pars_fragment>
|
#include <fog_pars_fragment>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
#define USE_FOG
|
#define USE_FOG
|
||||||
|
|
||||||
#include <fog_pars_vertex>
|
#include <fog_pars_vertex>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
uniform float thickness;
|
uniform float thickness;
|
||||||
uniform float penetration;
|
uniform float penetration;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
#include <clipping_planes_pars_vertex>
|
#include <clipping_planes_pars_vertex>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
varying vec3 vNormal;
|
varying vec3 vNormal;
|
||||||
varying vec3 vViewPosition;
|
varying vec3 vViewPosition;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
precision mediump float;
|
|
||||||
|
|
||||||
varying vec3 vNormal;
|
varying vec3 vNormal;
|
||||||
varying vec3 vViewPosition;
|
varying vec3 vViewPosition;
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,29 @@
|
|||||||
import { TankClass } from '@blitzkit/core';
|
import { TankClass as TankClass_dava } from '@blitzkit/core';
|
||||||
|
import { TankClass } from '@protos/blitz_static_tank_component';
|
||||||
|
import { QuestionMarkIcon } from '@radix-ui/react-icons';
|
||||||
import type { ComponentProps, ReactNode } from 'react';
|
import type { ComponentProps, ReactNode } from 'react';
|
||||||
import { ClassHeavy } from './components/ClassHeavy';
|
import { ClassHeavy } from './components/ClassHeavy';
|
||||||
import { ClassLight } from './components/ClassLight';
|
import { ClassLight } from './components/ClassLight';
|
||||||
import { ClassMedium } from './components/ClassMedium';
|
import { ClassMedium } from './components/ClassMedium';
|
||||||
import { ClassTankDestroyer } from './components/ClassTankDestroyer';
|
import { ClassTankDestroyer } from './components/ClassTankDestroyer';
|
||||||
|
|
||||||
export const classIcons: Record<
|
export const classIcons_ue: Record<
|
||||||
TankClass,
|
TankClass,
|
||||||
|
((props: ComponentProps<'svg'>) => ReactNode) | typeof QuestionMarkIcon
|
||||||
|
> = {
|
||||||
|
[TankClass.TANK_CLASS_UNSPECIFIED]: QuestionMarkIcon,
|
||||||
|
[TankClass.TANK_CLASS_TANK_DESTROYER]: ClassTankDestroyer,
|
||||||
|
[TankClass.TANK_CLASS_HEAVY]: ClassHeavy,
|
||||||
|
[TankClass.TANK_CLASS_LIGHT]: ClassLight,
|
||||||
|
[TankClass.TANK_CLASS_MEDIUM]: ClassMedium,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const classIcons: Record<
|
||||||
|
TankClass_dava,
|
||||||
(props: ComponentProps<'svg'>) => ReactNode
|
(props: ComponentProps<'svg'>) => ReactNode
|
||||||
> = {
|
> = {
|
||||||
[TankClass.TANK_DESTROYER]: ClassTankDestroyer,
|
[TankClass_dava.TANK_CLASS_TANK_DESTROYER]: ClassTankDestroyer,
|
||||||
[TankClass.HEAVY]: ClassHeavy,
|
[TankClass_dava.TANK_CLASS_HEAVY]: ClassHeavy,
|
||||||
[TankClass.LIGHT]: ClassLight,
|
[TankClass_dava.TANK_CLASS_LIGHT]: ClassLight,
|
||||||
[TankClass.MEDIUM]: ClassMedium,
|
[TankClass_dava.TANK_CLASS_MEDIUM]: ClassMedium,
|
||||||
};
|
};
|
||||||