Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbe53deb98 | ||
|
|
1f07c2be74 | ||
|
|
ea744b673a | ||
|
|
d8a6cac52f | ||
|
|
1524b9a35d | ||
|
|
36738f57a9 | ||
|
|
a704b291fd | ||
|
|
e1b5b21fae | ||
|
|
097f2792ae | ||
|
|
089d0e9682 | ||
|
|
6a92b3ae80 | ||
|
|
1e91065033 | ||
|
|
b20bb97ea3 | ||
|
|
ba97a9f28b | ||
|
|
81e480f983 | ||
|
|
40e4e0a274 | ||
|
|
83b7de77de | ||
|
|
20f7119854 | ||
|
|
275ddcc7a6 | ||
|
|
4858f31da4 | ||
|
|
4bc255a624 | ||
|
|
17755641a1 | ||
|
|
0e6b0087ce | ||
|
|
fcd084a86f | ||
|
|
af699ff5b7 | ||
|
|
93665df223 | ||
|
|
f8b4f9372a | ||
|
|
e84e15daf4 | ||
|
|
d7af7e19dd | ||
|
|
c5cf172e42 | ||
|
|
2e8cac885c | ||
|
|
9ed4a856bf | ||
|
|
eedd4b3f27 | ||
|
|
3b7fe0b114 | ||
|
|
a6d66b94f5 | ||
|
|
c7a7bbb809 | ||
|
|
02ce6ba8d9 | ||
|
|
9dd057d594 | ||
|
|
64ec981496 | ||
|
|
8afafdeece | ||
|
|
6b9fd1d392 | ||
|
|
c1efc50134 | ||
|
|
b4b1f4e916 | ||
|
|
3de0c40ce3 | ||
|
|
893bfa8393 | ||
|
|
cc25535c34 | ||
|
|
a4cdf16fcd | ||
|
|
36588b11e6 | ||
|
|
e927838c14 | ||
|
|
5197ebb6a7 | ||
|
|
51089a3e91 | ||
|
|
c6121fd4bd | ||
|
|
7dca9d3244 | ||
|
|
abebfcf6c6 | ||
|
|
470869418c | ||
|
|
cd2bad3b27 | ||
|
|
5e9555aa57 | ||
|
|
084d55b853 | ||
|
|
a3879f3fa7 | ||
|
|
135a2d74c4 | ||
|
|
233f866c9e | ||
|
|
9e880ff24f | ||
|
|
36039563e0 | ||
|
|
022e970537 | ||
|
|
51e99ec442 | ||
|
|
caeba34ba1 | ||
|
|
6d6a634973 | ||
|
|
55e6599eaa | ||
|
|
e146366385 | ||
|
|
b1dd319c1e |
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.ASSET_BOT }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
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: ${{ secrets.PUBLIC_ASSET_REPO }}
|
PUBLIC_ASSET_REPO: blitzkit/assets
|
||||||
PUBLIC_ASSET_BRANCH: ${{ github.event.inputs.cdn_branch || secrets.PUBLIC_ASSET_BRANCH }}
|
PUBLIC_ASSET_BRANCH: main
|
||||||
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,8 +51,9 @@ 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: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
PUBLIC_ASSET_FAST_USER: blitzkit
|
||||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
PUBLIC_ASSET_FAST_REPO: assets
|
||||||
|
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
download_client:
|
download_client:
|
||||||
|
|||||||
@@ -14,6 +14,17 @@ 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/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 \")
|
||||||
|
|||||||
@@ -27,4 +27,15 @@ 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,4 +27,15 @@ 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,4 +27,15 @@ 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,10 +18,8 @@ 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: 'true'
|
ALLOW_ROBOTS: ${{ secrets.ALLOW_ROBOTS }}
|
||||||
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 }}
|
||||||
@@ -29,8 +27,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_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
||||||
|
|
||||||
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
|
||||||
# *.ts
|
# packages/core/src/protos/*.ts
|
||||||
/.vercel
|
/.vercel
|
||||||
/.astro
|
/.astro
|
||||||
.vercel
|
.vercel
|
||||||
|
|||||||
@@ -4,3 +4,6 @@
|
|||||||
[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,7 +33,6 @@
|
|||||||
"blitzkit",
|
"blitzkit",
|
||||||
"blitzrinth",
|
"blitzrinth",
|
||||||
"blitzstars",
|
"blitzstars",
|
||||||
"bufbuild",
|
|
||||||
"cacheable",
|
"cacheable",
|
||||||
"Callouts",
|
"Callouts",
|
||||||
"Camo",
|
"Camo",
|
||||||
@@ -76,7 +75,6 @@
|
|||||||
"dxgi",
|
"dxgi",
|
||||||
"echarts",
|
"echarts",
|
||||||
"Everytime",
|
"Everytime",
|
||||||
"FABLEGEAR",
|
|
||||||
"FASTNAME",
|
"FASTNAME",
|
||||||
"flexdirection",
|
"flexdirection",
|
||||||
"FOURCC",
|
"FOURCC",
|
||||||
@@ -88,6 +86,7 @@
|
|||||||
"gameplay",
|
"gameplay",
|
||||||
"glsl",
|
"glsl",
|
||||||
"GLTF",
|
"GLTF",
|
||||||
|
"gtag",
|
||||||
"haha",
|
"haha",
|
||||||
"highp",
|
"highp",
|
||||||
"iife",
|
"iife",
|
||||||
@@ -110,7 +109,7 @@
|
|||||||
"Maddoxkkm",
|
"Maddoxkkm",
|
||||||
"malum",
|
"malum",
|
||||||
"mantlets",
|
"mantlets",
|
||||||
"MECHA",
|
"mediump",
|
||||||
"metallicness",
|
"metallicness",
|
||||||
"metalness",
|
"metalness",
|
||||||
"minitelrose",
|
"minitelrose",
|
||||||
@@ -148,11 +147,9 @@
|
|||||||
"POSITIVEY",
|
"POSITIVEY",
|
||||||
"POSITIVEZ",
|
"POSITIVEZ",
|
||||||
"precompute",
|
"precompute",
|
||||||
"PROGRESSTON",
|
|
||||||
"Promisable",
|
"Promisable",
|
||||||
"proto",
|
"proto",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
"protoc",
|
|
||||||
"protos",
|
"protos",
|
||||||
"Pyogenics",
|
"Pyogenics",
|
||||||
"ratingleaderboard",
|
"ratingleaderboard",
|
||||||
@@ -208,7 +205,6 @@
|
|||||||
"vitepress",
|
"vitepress",
|
||||||
"Vovko",
|
"Vovko",
|
||||||
"wargaming",
|
"wargaming",
|
||||||
"WARHAMMER",
|
|
||||||
"webp",
|
"webp",
|
||||||
"whitespaces",
|
"whitespaces",
|
||||||
"WHSS",
|
"WHSS",
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# 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
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# 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,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzkit",
|
"name": "blitzkit",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.27.11",
|
"version": "1.27.13",
|
||||||
"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",
|
||||||
@@ -42,23 +41,15 @@
|
|||||||
"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,6 +9,7 @@
|
|||||||
"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,11 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": [
|
"include": ["src/**/*", "../core/src/blitzkit/supportedLocales.ts", "../i18n/src/unwrapper.ts"]
|
||||||
"src/**/*",
|
|
||||||
"../core/src/blitzkit/supportedLocales.ts",
|
|
||||||
"../i18n/src/unwrapper.ts"
|
|
||||||
],
|
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": "../../"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
"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",
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
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}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
export function entityName(entity: string) {
|
|
||||||
const [_, ...name] = entity.split('.');
|
|
||||||
return name.join('.');
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
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';
|
||||||
@@ -20,7 +18,6 @@ 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';
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
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,12 +1,5 @@
|
|||||||
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 branch === 'main'
|
return `${assertSecret(import.meta.env.PUBLIC_ASSET_BASE)}/${path}`;
|
||||||
? `https://${fastUser}.github.io/${fastRepo}/${path}`
|
|
||||||
: `https://raw.githubusercontent.com/${repo}/${branch}/${path}`;
|
|
||||||
}
|
}
|
||||||
@@ -46,5 +46,4 @@ 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';
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
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) =>
|
||||||
locales.supported.map(
|
SUPPORTED_LOCALES.map(
|
||||||
({ locale }) =>
|
(locale) =>
|
||||||
camouflageDefinitions.camouflages[id]?.name.locales[locale],
|
camouflageDefinitions.camouflages[id]?.name.locales[locale],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -42,11 +42,9 @@ export async function fetchTankNames() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const SEARCH_KEYS = [
|
export const SEARCH_KEYS = [
|
||||||
...locales.supported
|
...SUPPORTED_LOCALES.map((locale) => [
|
||||||
.map(({ locale }) => [
|
`searchableName.locales.${locale}`,
|
||||||
`searchableName.locales.${locale}`,
|
`searchableNameDeburr.locales.${locale}`,
|
||||||
`searchableNameDeburr.locales.${locale}`,
|
]).flat(),
|
||||||
])
|
|
||||||
.flat(),
|
|
||||||
'camouflages',
|
'camouflages',
|
||||||
];
|
];
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import { MessageFns } from '../protos';
|
|
||||||
|
|
||||||
export function encodePBBuffer<Type>(message: MessageFns<Type>, data: Type) {
|
|
||||||
return Buffer.from(message.encode(data).finish());
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
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: average_definitions.proto
|
// source: packages/core/src/protos/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 "i18n.proto";
|
import "packages/core/src/protos/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: camouflage_definitions.proto
|
// source: packages/core/src/protos/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 "i18n.proto";
|
import "packages/core/src/protos/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: consumable_definitions.proto
|
// source: packages/core/src/protos/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 {
|
||||||
CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP = 0,
|
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.CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP;
|
return ConsumableTankCategoryFilterCategory.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.CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP:
|
case ConsumableTankCategoryFilterCategory.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 "i18n.proto";
|
import "packages/core/src/protos/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: equipment_definitions.proto
|
// source: packages/core/src/protos/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 "i18n.proto";
|
import "packages/core/src/protos/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: gallery.proto
|
// source: packages/core/src/protos/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 "i18n.proto";
|
import "packages/core/src/protos/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: game_definitions.proto
|
// source: packages/core/src/protos/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: i18n.proto
|
// source: packages/core/src/protos/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 "i18n.proto";
|
import "packages/core/src/protos/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: map_definitions.proto
|
// source: packages/core/src/protos/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: model_definitions.proto
|
// source: packages/core/src/protos/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: popular_tanks.proto
|
// source: packages/core/src/protos/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 "consumable_definitions.proto";
|
import "packages/core/src/protos/consumable_definitions.proto";
|
||||||
import "i18n.proto";
|
import "packages/core/src/protos/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: provision_definitions.proto
|
// source: packages/core/src/protos/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: rating_leaderboard.proto
|
// source: packages/core/src/protos/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: reviews.proto
|
// source: packages/core/src/protos/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: skill_definitions.proto
|
// source: packages/core/src/protos/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 "i18n.proto";
|
import "packages/core/src/protos/i18n.proto";
|
||||||
|
|
||||||
message TankDefinitions {
|
message TankDefinitions {
|
||||||
map<uint32, TankDefinition> tanks = 1;
|
map<uint32, TankDefinition> tanks = 1;
|
||||||
@@ -157,6 +157,17 @@ 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,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": ["src/**/*", "../i18n/src/strings.ts"],
|
"include": ["src/**/*", "../i18n/src/strings.ts"]
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": "../../"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,89 @@
|
|||||||
import type en from '../strings/en.json';
|
import { merge } from 'ts-deepmerge';
|
||||||
|
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;
|
||||||
|
|
||||||
export const SUPPORTED_LOCALE_FLAGS: Record<string, string> = {
|
const stringsRaw = { en, es, fr, ja, pl, pt, ru, uk, zh };
|
||||||
|
|
||||||
|
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: '🇫🇷',
|
||||||
@@ -13,3 +94,7 @@ export const SUPPORTED_LOCALE_FLAGS: Record<string, 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 locales from '../locales.json' with { type: 'json' };
|
import { DEFAULT_LOCALE } from './strings';
|
||||||
|
|
||||||
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[locales.default];
|
return i18nString.locales[DEFAULT_LOCALE];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -6,18 +6,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"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",
|
||||||
@@ -98,44 +86,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"nations": {
|
"nations": {
|
||||||
"0": "Unknown nation",
|
"ussr": "U.S.S.R.",
|
||||||
"1": "U.S.S.R.",
|
"germany": "Germany",
|
||||||
"2": "Germany",
|
"usa": "U.S.A.",
|
||||||
"3": "U.S.A.",
|
"china": "China",
|
||||||
"4": "China",
|
"uk": "U.K.",
|
||||||
"5": "France",
|
"france": "France",
|
||||||
"6": "U.K.",
|
"japan": "Japan",
|
||||||
"7": "Japan",
|
"european": "European Nation",
|
||||||
"8": "Europe",
|
"other": "Hybrid Nation"
|
||||||
"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": {
|
||||||
@@ -150,14 +109,6 @@
|
|||||||
"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",
|
||||||
@@ -182,10 +133,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"tree_type": {
|
"tree_type": {
|
||||||
"0": "Unknown tree type",
|
"-1": "unrecognized",
|
||||||
"1": "Common",
|
"0": "Tech tree",
|
||||||
"2": "Premium",
|
"1": "Premium",
|
||||||
"3": "Collector"
|
"2": "Collector"
|
||||||
},
|
},
|
||||||
|
|
||||||
"regions": {
|
"regions": {
|
||||||
@@ -839,6 +790,7 @@
|
|||||||
"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",
|
||||||
@@ -935,6 +887,10 @@
|
|||||||
"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",
|
||||||
@@ -1037,8 +993,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"meta": {
|
"meta": {
|
||||||
"compensation": "Compensation",
|
|
||||||
"free": "Free",
|
|
||||||
"back": "Back",
|
"back": "Back",
|
||||||
"compare": "Compare",
|
"compare": "Compare",
|
||||||
"swap": {
|
"swap": {
|
||||||
@@ -1052,12 +1006,11 @@
|
|||||||
"class": "Class",
|
"class": "Class",
|
||||||
"tier": "Tier",
|
"tier": "Tier",
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"id": "ID",
|
"dev_id": "DEV: ID",
|
||||||
"purchase": "Purchase price",
|
"purchase": "Purchase price",
|
||||||
"restoration": "Restoration price",
|
"restoration": "Restoration price",
|
||||||
"sale": "Sale price",
|
"sale": "Sale price",
|
||||||
"set": "Set",
|
"research": "Research XP"
|
||||||
"price": "Price"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"tech_tree": {
|
"tech_tree": {
|
||||||
@@ -1130,7 +1083,6 @@
|
|||||||
"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",
|
||||||
@@ -1144,6 +1096,7 @@
|
|||||||
"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,6 +698,7 @@
|
|||||||
"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,6 +698,7 @@
|
|||||||
"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,6 +698,7 @@
|
|||||||
"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ła osadzanie"
|
"description": "Jak działają osadzone"
|
||||||
},
|
},
|
||||||
"introduction": {
|
"introduction": {
|
||||||
"name": "wprowadzenie",
|
"name": "wprowadzenie",
|
||||||
@@ -698,6 +698,7 @@
|
|||||||
"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,6 +698,7 @@
|
|||||||
"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,7 +697,8 @@
|
|||||||
"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": "скорость снаряда",
|
||||||
@@ -790,8 +791,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": "The quick brown fox jumps over the lazy dog."
|
"fox": "Швидка бура лисиця перестрибує через лінивого собаку."
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"units": {
|
"units": {
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"hp": "%s1хп",
|
"hp": "%s1хп",
|
||||||
"x": "х%s1",
|
"x": "х%s1",
|
||||||
"percentage": "%s1%",
|
"percentage": "%s1%",
|
||||||
"deg_s": "%s1°/s"
|
"deg_s": "%s1°/с"
|
||||||
},
|
},
|
||||||
"gun_types": {
|
"gun_types": {
|
||||||
"auto_loader": "Магазинна система заряджання",
|
"auto_loader": "Магазинна система заряджання",
|
||||||
@@ -413,10 +413,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"name": "debug",
|
"name": "налагодження",
|
||||||
"description": "Debug information about the bot",
|
"description": "Інформація про налагодження бота",
|
||||||
"body": {
|
"body": {
|
||||||
"title": "# Debug\n\n",
|
"title": "# Налагодження\n\n",
|
||||||
"version": "Версія",
|
"version": "Версія",
|
||||||
"shard": {
|
"shard": {
|
||||||
"label": "Уламок",
|
"label": "Уламок",
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
},
|
},
|
||||||
"embed": {
|
"embed": {
|
||||||
"title": "Невірний обліковий запис?",
|
"title": "Невірний обліковий запис?",
|
||||||
"description": "Use the command again and select a username from the search results."
|
"description": "Використайте команду ще раз і виберіть ім'я користувача з результатів пошуку."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search_clans": {
|
"search_clans": {
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"limit": {
|
"limit": {
|
||||||
"name": "ліміт",
|
"name": "ліміт",
|
||||||
"description": "The max number of clan results (default: %s1)"
|
"description": "Максимальна кількість результатів клану (за замовчуванням: %s1)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"body": {
|
"body": {
|
||||||
@@ -698,6 +698,7 @@
|
|||||||
"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,7 +8,6 @@ import {
|
|||||||
Samples,
|
Samples,
|
||||||
averageDefinitionsAllStatsKeys,
|
averageDefinitionsAllStatsKeys,
|
||||||
emptySamples,
|
emptySamples,
|
||||||
encodePBBuffer,
|
|
||||||
getAccountInfo,
|
getAccountInfo,
|
||||||
getTankStats,
|
getTankStats,
|
||||||
idToRegion,
|
idToRegion,
|
||||||
@@ -235,11 +234,11 @@ async function postWork() {
|
|||||||
commitAssets('averages', [
|
commitAssets('averages', [
|
||||||
{
|
{
|
||||||
path: `averages/${latest}.pb`,
|
path: `averages/${latest}.pb`,
|
||||||
content: encodePBBuffer(AverageDefinitions, averageDefinitions),
|
content: AverageDefinitions.encode(averageDefinitions).finish(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'averages/manifest.json',
|
path: 'averages/manifest.json',
|
||||||
content: Buffer.from(JSON.stringify(manifest), 'utf-8'),
|
content: new TextEncoder().encode(JSON.stringify(manifest)),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,6 @@ 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);
|
||||||
@@ -19,12 +18,14 @@ 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',
|
|
||||||
});
|
|
||||||
|
|
||||||
if (index === 0) {
|
try {
|
||||||
console.log('Dev server started!');
|
await page.goto(`http://localhost:4321/api/tankopedia/tank-icon/${id}/`, {
|
||||||
|
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, encodePBBuffer, fetchGlossary, Gallery } from '@blitzkit/core';
|
import { Avatar, fetchGlossary, Gallery } from '@blitzkit/core';
|
||||||
import locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
|
import locales from '@blitzkit/i18n/locales.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).then((response) =>
|
const content = await fetch(url)
|
||||||
response.arrayBuffer(),
|
.then((response) => response.arrayBuffer())
|
||||||
);
|
.then((buffer) => new Uint8Array(buffer));
|
||||||
|
|
||||||
changes.push({
|
changes.push({
|
||||||
path: `gallery/avatars/${key}${avatar.extension}`,
|
path: `gallery/avatars/${key}${avatar.extension}`,
|
||||||
content: Buffer.from(content),
|
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: encodePBBuffer(Gallery, gallery),
|
content: Gallery.encode(gallery).finish(),
|
||||||
});
|
});
|
||||||
|
|
||||||
await commitAssets('glossary', changes);
|
await commitAssets('glossary', changes);
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ 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';
|
||||||
@@ -47,7 +46,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: Buffer.from(JSON.stringify(map)),
|
content: new TextEncoder().encode(JSON.stringify(map)),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
assertSecret,
|
assertSecret,
|
||||||
encodePBBuffer,
|
|
||||||
fetchTankDefinitions,
|
fetchTankDefinitions,
|
||||||
PopularTanks,
|
PopularTanks,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
@@ -70,7 +69,7 @@ export async function popularTanks() {
|
|||||||
await commitAssets('popular tanks', [
|
await commitAssets('popular tanks', [
|
||||||
{
|
{
|
||||||
path: 'definitions/popular-tanks.pb',
|
path: 'definitions/popular-tanks.pb',
|
||||||
content: encodePBBuffer(PopularTanks, popularTanks),
|
content: PopularTanks.encode(popularTanks).finish(),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -29,10 +29,11 @@ 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: Buffer.from(await nodeIO.writeBinary(model)),
|
content,
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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 } from 'fs/promises';
|
import { readdir, writeFile } 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,7 +32,6 @@ 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: Buffer.from(content),
|
content,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -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,12 +1,15 @@
|
|||||||
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(`${ddsTexturePath}.dvpl`);
|
const isDds = existsSync(
|
||||||
|
`${ddsTexturePath}${DATA_COMPRESSED ? '.dvpl' : ''}`,
|
||||||
|
);
|
||||||
const resolvedTexturePath = isDds
|
const resolvedTexturePath = isDds
|
||||||
? ddsTexturePath
|
? ddsTexturePath
|
||||||
: ddsTexturePath.replace('.dds', '.pvr');
|
: ddsTexturePath.replace('.dds', '.pvr');
|
||||||
@@ -75,5 +78,4 @@ 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,10 +1,18 @@
|
|||||||
|
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: Buffer;
|
content: Uint8Array;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum DiffStatus {
|
||||||
|
New,
|
||||||
|
Changed,
|
||||||
|
Unchanged,
|
||||||
}
|
}
|
||||||
|
|
||||||
const heuristicFormats = ['glb', 'webp', 'jpg', 'png'];
|
const heuristicFormats = ['glb', 'webp', 'jpg', 'png'];
|
||||||
@@ -19,72 +27,61 @@ 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(
|
headers: { 'Accept-Encoding': 'identity' },
|
||||||
`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) {
|
||||||
isNew = true;
|
diff = { change: change.content.length, status: DiffStatus.New };
|
||||||
diff = change.content.length;
|
|
||||||
isDifferent = true;
|
|
||||||
} else if (
|
} else if (
|
||||||
response.headers.has('Content-Length') &&
|
response.headers.has('Content-Length') &&
|
||||||
parseInt(response.headers.get('Content-Length')!) !==
|
Number(response.headers.get('Content-Length')) !== change.content.length
|
||||||
change.content.length
|
|
||||||
) {
|
) {
|
||||||
isNew = false;
|
diff = {
|
||||||
diff =
|
change:
|
||||||
change.content.length -
|
change.content.length -
|
||||||
parseInt(response.headers.get('Content-Length')!);
|
Number(response.headers.get('Content-Length')),
|
||||||
isDifferent = true;
|
status: DiffStatus.Changed,
|
||||||
|
};
|
||||||
} else if (response.status === 200) {
|
} else if (response.status === 200) {
|
||||||
isNew = false;
|
if (
|
||||||
const buffer = Buffer.from(await response.arrayBuffer());
|
heuristicFormats.some((format) => change.path.endsWith(`.${format}`))
|
||||||
|
) {
|
||||||
if (buffer.equals(change.content)) {
|
/**
|
||||||
diff = 0;
|
* Heuristic: if it's a large blob like a .glb, a diff = 0 might end
|
||||||
isDifferent = false;
|
* up being a false positive with isDifferent = true. So, it's okay
|
||||||
|
* to assume it's unchanged.
|
||||||
|
*/
|
||||||
|
diff = { change: 0, status: DiffStatus.Unchanged };
|
||||||
} else {
|
} else {
|
||||||
diff = change.content.length - buffer.length;
|
const buffer = new Uint8Array(await response.arrayBuffer());
|
||||||
isDifferent = true;
|
|
||||||
|
if (compareUint8Arrays(buffer, change.content)) {
|
||||||
|
diff = { change: 0, status: DiffStatus.Unchanged };
|
||||||
|
} else {
|
||||||
|
diff = {
|
||||||
|
change: change.content.length - buffer.length,
|
||||||
|
status: DiffStatus.Changed,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unexpected status code ${response.status} for ${blobPath}`,
|
`Unexpected status code ${response.status} for ${change.path}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
if (diff.status === DiffStatus.Unchanged) {
|
||||||
* Heuristic: if it's a large blob like a .glb, a diff = 0 might end up
|
// just don't bother
|
||||||
* being a false positive with isDifferent = true. So, it's okay to
|
// console.log(`🔵 (${diff.change.toLocaleString()}B) ${change.path}`);
|
||||||
* assume it's unchanged.
|
|
||||||
*/
|
|
||||||
if (
|
|
||||||
diff === 0 &&
|
|
||||||
heuristicFormats.some((format) => change.path.endsWith(`.${format}`))
|
|
||||||
) {
|
|
||||||
isDifferent = false;
|
|
||||||
isNew = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNew) {
|
|
||||||
console.log(
|
|
||||||
`🟢 (+${change.content.length.toLocaleString()}B) ${blobPath}`,
|
|
||||||
);
|
|
||||||
changes.push(change);
|
|
||||||
} else if (isDifferent) {
|
|
||||||
console.log(
|
|
||||||
`🟡 (${diff > 0 ? '+' : ''}${diff.toLocaleString()}B) ${blobPath}`,
|
|
||||||
);
|
|
||||||
changes.push(change);
|
|
||||||
} else {
|
} else {
|
||||||
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);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
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: change.content.toString('base64'),
|
content: Buffer.from(change.content).toString('base64'),
|
||||||
encoding: 'base64',
|
encoding: 'base64',
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
@@ -34,6 +34,7 @@ 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,14 +134,12 @@ 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 compressed = compress(buffer);
|
const content = compress(buffer);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Chunk ${index} with ${chunk.length} ids (compressed: ${compressed.length}; uncompressed: ${buffer.length})`,
|
`Chunk ${index} with ${chunk.length} ids (compressed: ${content.length}; uncompressed: ${buffer.length})`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const content = Buffer.from(compressed);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content,
|
content,
|
||||||
path: `ids/${index}.dids.lz4`,
|
path: `ids/${index}.dids.lz4`,
|
||||||
@@ -151,13 +149,12 @@ function post() {
|
|||||||
commitAssets('discovered ids', [
|
commitAssets('discovered ids', [
|
||||||
...files,
|
...files,
|
||||||
{
|
{
|
||||||
content: Buffer.from(
|
content: new TextEncoder().encode(
|
||||||
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,9 +1,10 @@
|
|||||||
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;
|
||||||
@@ -14,42 +15,33 @@ if (existsSync('node_modules/.bin/protoc-gen-ts_proto.exe')) {
|
|||||||
executableFileExtension = '';
|
executableFileExtension = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
await compile('packages/core/src/protos');
|
const filesRaw = await readdir(`${ROOT}`);
|
||||||
await compile('submodules/blitzkit-closed/src/protos');
|
await Promise.all(
|
||||||
|
filesRaw.map(async (file) => {
|
||||||
|
if (!file.endsWith('.proto')) {
|
||||||
|
await rm(`${ROOT}/${file}`);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
async function compile(root: string) {
|
const files = filesRaw.filter((file) => file.endsWith('.proto'));
|
||||||
const filesRaw = await readdir(root);
|
const args = [
|
||||||
|
`--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}`),
|
||||||
|
];
|
||||||
|
|
||||||
for (const file of filesRaw) {
|
await exec(`protoc ${args.join(' ')}`);
|
||||||
if (!file.endsWith('.ts')) continue;
|
await writeFile(
|
||||||
await rm(`${root}/${file}`);
|
`${ROOT}/index.ts`,
|
||||||
}
|
'// @ts-nocheck\n' +
|
||||||
|
files
|
||||||
const allFiles = filesRaw.filter((file) => file.endsWith('.proto'));
|
.map((file) => file.replace('.proto', ''))
|
||||||
|
.map((file) => `export * from './${file}.ts';`)
|
||||||
for (const files of chunk(allFiles, 32)) {
|
.join('\n'),
|
||||||
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,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
asset,
|
asset,
|
||||||
encodePBBuffer,
|
|
||||||
fetchTankDefinitions,
|
fetchTankDefinitions,
|
||||||
Reviews,
|
Reviews,
|
||||||
Video,
|
Video,
|
||||||
@@ -81,7 +80,7 @@ for (const tank of tanksSanitized) {
|
|||||||
}
|
}
|
||||||
await commitAssets('reviews', [
|
await commitAssets('reviews', [
|
||||||
{
|
{
|
||||||
content: encodePBBuffer(Reviews, reviews),
|
content: Reviews.encode(reviews).finish(),
|
||||||
path: 'definitions/reviews.pb',
|
path: 'definitions/reviews.pb',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"]
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": "../../"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
// @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 locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
|
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
i18n: {
|
i18n: {
|
||||||
defaultLocale: locales.default,
|
defaultLocale: 'en',
|
||||||
locales: locales.supported.map(({ locale }) => locale),
|
locales: [...SUPPORTED_LOCALES],
|
||||||
routing: {
|
routing: {
|
||||||
prefixDefaultLocale: false,
|
prefixDefaultLocale: false,
|
||||||
},
|
},
|
||||||
@@ -21,7 +20,7 @@ export default defineConfig({
|
|||||||
outDir: '../../dist/website',
|
outDir: '../../dist/website',
|
||||||
prefetch: true,
|
prefetch: true,
|
||||||
|
|
||||||
integrations: [react(), sitemap(), partytown()],
|
integrations: [react(), sitemap()],
|
||||||
vite: {
|
vite: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
"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",
|
||||||
@@ -21,10 +19,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.2",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@radix-ui/themes": "^3.2.1",
|
"@radix-ui/themes": "^3.1.4",
|
||||||
"@react-three/drei": "^10.0.8",
|
"@react-three/drei": "^9.115.0",
|
||||||
"@react-three/fiber": "^9.1.2",
|
"@react-three/fiber": "^8.17.10",
|
||||||
"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",
|
||||||
@@ -32,7 +30,9 @@
|
|||||||
"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,7 +45,10 @@
|
|||||||
"@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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
dh=ecd11a058908f58ccea092ed17aa43ace59 4b9a5
|
||||||
|
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 242 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 365 KiB After Width: | Height: | Size: 365 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 |
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 379 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 371 KiB |
@@ -1,3 +1,5 @@
|
|||||||
|
precision mediump float;
|
||||||
|
|
||||||
#define USE_FOG
|
#define USE_FOG
|
||||||
|
|
||||||
#include <fog_pars_fragment>
|
#include <fog_pars_fragment>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
precision mediump float;
|
||||||
|
|
||||||
#define USE_FOG
|
#define USE_FOG
|
||||||
|
|
||||||
#include <fog_pars_vertex>
|
#include <fog_pars_vertex>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
precision mediump float;
|
||||||
|
|
||||||
uniform float thickness;
|
uniform float thickness;
|
||||||
uniform float penetration;
|
uniform float penetration;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
precision mediump float;
|
||||||
|
|
||||||
#include <clipping_planes_pars_vertex>
|
#include <clipping_planes_pars_vertex>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
precision mediump float;
|
||||||
|
|
||||||
varying vec3 vNormal;
|
varying vec3 vNormal;
|
||||||
varying vec3 vViewPosition;
|
varying vec3 vViewPosition;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
precision mediump float;
|
||||||
|
|
||||||
varying vec3 vNormal;
|
varying vec3 vNormal;
|
||||||
varying vec3 vViewPosition;
|
varying vec3 vViewPosition;
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,16 @@
|
|||||||
import { TankClass as TankClass_dava } from '@blitzkit/core';
|
import { TankClass } 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_ue: Record<
|
|
||||||
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<
|
export const classIcons: Record<
|
||||||
TankClass_dava,
|
TankClass,
|
||||||
(props: ComponentProps<'svg'>) => ReactNode
|
(props: ComponentProps<'svg'>) => ReactNode
|
||||||
> = {
|
> = {
|
||||||
[TankClass_dava.TANK_CLASS_TANK_DESTROYER]: ClassTankDestroyer,
|
[TankClass.TANK_DESTROYER]: ClassTankDestroyer,
|
||||||
[TankClass_dava.TANK_CLASS_HEAVY]: ClassHeavy,
|
[TankClass.HEAVY]: ClassHeavy,
|
||||||
[TankClass_dava.TANK_CLASS_LIGHT]: ClassLight,
|
[TankClass.LIGHT]: ClassLight,
|
||||||
[TankClass_dava.TANK_CLASS_MEDIUM]: ClassMedium,
|
[TankClass.MEDIUM]: ClassMedium,
|
||||||
};
|
};
|
||||||