Compare commits

...
39 Commits
Author SHA1 Message Date
TrèsAbhi 4c8c2d0868 feat: auto pick localization entity 2025-12-05 21:35:58 -06:00
TrèsAbhi b2f266401f Merge branch 'main' into ue 2025-12-05 21:23:39 -06:00
TrèsAbhi 407d00b25b Update index.astro 2025-12-05 09:35:05 -06:00
TrèsAbhi fb4fb926e8 fix: add boxShadow to Giveaway component for improved styling 2025-12-04 14:22:24 -06:00
TrèsAbhi 70b0df55b0 fix: add drop-shadow filter to Giveaway component image for better visibility 2025-12-04 14:21:32 -06:00
TrèsAbhi 7e8fd40c61 fix: format minutes and seconds in Giveaway component for better readability 2025-12-04 14:20:23 -06:00
TrèsAbhi 9286104391 feat: enhance Giveaway component with skeleton loading state 2025-12-04 14:19:35 -06:00
TrèsAbhi 814192c0b0 feat: add Giveaway component for Music Box event with countdown timer 2025-12-04 14:17:53 -06:00
TrèsAbhi 8fa6f87540 fix: update disclaimer for Christmas Garage Guide 2025 2025-12-04 12:29:50 -06:00
TrèsAbhi d265f0b0a1 fix: clarify Christmas Tree ornament set requirements in Christmas Garage Guide 2025 2025-12-03 18:29:32 -06:00
TrèsAbhi 9ccaade1fc fix: clarify Christmas Tree upgrade mechanics in Christmas Garage Guide 2025 2025-12-03 18:28:56 -06:00
TrèsAbhi 2bb5bb33c0 fix: enhance clarity on Christmas Tree upgrade benefits in Christmas Garage Guide 2025 2025-12-03 18:28:03 -06:00
TrèsAbhi e456063c27 fix: clarify Music Box mechanics in Christmas Garage Guide 2025 2025-12-03 18:26:54 -06:00
TrèsAbhi 7bc25f0722 fix: clarify Music Box mechanics in Christmas Garage Guide 2025 2025-12-03 18:26:12 -06:00
TrèsAbhi 6ed991d281 fix: clarify Music Box mechanics in Christmas Garage Guide 2025 2025-12-03 18:25:02 -06:00
GonnaHetzMe 2487e0eebf Update GitHub Actions to latest versions (#185) 2025-12-03 18:22:53 -06:00
TrèsAbhi 6cc44cdfee feat: add ArticlePlug component for Christmas 2025 promotion 2025-12-03 18:12:41 -06:00
TrèsAbhi eca26e1e79 feat: enhance Christmas Garage Guide 2025 with detailed mechanics and rewards 2025-12-03 18:01:05 -06:00
TrèsAbhi 5484a15071 fix: standardize import quotes and set maxWidth for PageWrapper 2025-12-03 17:51:19 -06:00
TrèsAbhi b58ca4f594 feat: move guide to guides 2025-12-03 17:49:16 -06:00
TrèsAbhi 7708e2c1db feat: add Christmas Garage Guide 2025 and update settings 2025-12-03 17:48:29 -06:00
TrèsAbhi de77e27d50 fix: max 25 seasons 2025-12-01 17:13:26 -06:00
TrèsAbhi e159583333 fix: use repos direct 2025-12-01 17:02:54 -06:00
TrèsAbhi bfcf183a6e feat: hide warning 2025-12-01 17:01:19 -06:00
TrèsAbhi 5541eca23d feat: start of derived statistics 2025-12-01 16:51:11 -06:00
TrèsAbhi 122d65840e feat: aggregateAttributes 2025-12-01 13:09:55 -06:00
TrèsAbhi ed4b72d85c feat: upgrade stages 2025-11-30 22:26:13 -06:00
TrèsAbhi 4033e8618f feat: useAwait 2025-11-30 22:12:46 -06:00
TrèsAbhi 42cada1811 feat: move and api 2025-11-30 21:06:17 -06:00
TrèsAbhi ff7ed213c8 feat: complete 2025-11-30 21:01:53 -06:00
TrèsAbhi a0367af06b feat: start of stats 2025-11-30 20:54:36 -06:00
TrèsAbhi 58c2965c53 Merge branch 'main' into ue 2025-11-30 20:27:42 -06:00
TrèsAbhi edae41409a feat: tank data 2025-11-29 14:22:32 -06:00
TrèsAbhi 383d3a36ef feat: load tank data 2025-11-28 14:21:26 -06:00
TrèsAbhi 6a958da390 feat: implement strings 2025-11-28 14:13:03 -06:00
TrèsAbhi ef154f99d5 feat: start of scraping 2025-11-28 13:51:17 -06:00
TrèsAbhi 4a20102de3 feat: base work 2025-11-28 13:19:15 -06:00
TrèsAbhi 4e170f2917 feat: port minimal files 2025-11-28 13:03:33 -06:00
TrèsAbhi a70d788f6b feat: init ue website 2025-11-28 13:00:41 -06:00
68 changed files with 1347 additions and 88 deletions

No files matched your search

+2 -2
View File
@@ -64,14 +64,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- run: bun run setup - run: bun run setup
- name: AppArmor hack - name: AppArmor hack
+2 -2
View File
@@ -32,11 +32,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+3 -3
View File
@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
@@ -28,7 +28,7 @@ jobs:
run: bun run build:bot run: bun run build:bot
- name: Archive build - name: Archive build
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v5
with: with:
name: bot name: bot
path: dist/bot path: dist/bot
+2 -2
View File
@@ -22,11 +22,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+2 -2
View File
@@ -32,11 +32,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+2 -2
View File
@@ -32,11 +32,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+2 -2
View File
@@ -32,11 +32,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+2 -2
View File
@@ -24,11 +24,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
+3 -3
View File
@@ -38,11 +38,11 @@ jobs:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v2
- uses: arduino/setup-protoc@v3 - uses: arduino/setup-protoc@v3
with: with:
repo-token: ${{ secrets.GH_TOKEN }} repo-token: ${{ secrets.GH_TOKEN }}
@@ -53,7 +53,7 @@ jobs:
run: bun run build:website run: bun run build:website
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v4
with: with:
path: dist/website path: dist/website
+1 -1
View File
@@ -22,7 +22,7 @@ depots
public/sitemap* public/sitemap*
/firebase.json /firebase.json
target target
# packages/core/src/protos/*.ts packages/website-ue/src/protos/*.ts
/.vercel /.vercel
.astro .astro
.vercel .vercel
+5 -2
View File
@@ -17,8 +17,6 @@
"astrojs", "astrojs",
"astrolib", "astrolib",
"atgm", "atgm",
"Autoloader",
"Autoreloader",
"AYUV", "AYUV",
"battleresults", "battleresults",
"bbox", "bbox",
@@ -61,10 +59,12 @@
"Ddpf", "Ddpf",
"Ddsd", "Ddsd",
"deadrail", "deadrail",
"DEBUFF",
"debugflags", "debugflags",
"deburr", "deburr",
"decalmask", "decalmask",
"decompressor", "decompressor",
"décor",
"dedup", "dedup",
"defence", "defence",
"degressive", "degressive",
@@ -96,6 +96,7 @@
"gameplay", "gameplay",
"glsl", "glsl",
"GLTF", "GLTF",
"GSOR",
"gtag", "gtag",
"haha", "haha",
"Herdbreaker", "Herdbreaker",
@@ -173,6 +174,7 @@
"ratingleaderboard", "ratingleaderboard",
"raycaster", "raycaster",
"Redirector", "Redirector",
"REGEN",
"Relogin", "Relogin",
"researchable", "researchable",
"Resvg", "Resvg",
@@ -187,6 +189,7 @@
"searchtanks", "searchtanks",
"SHAREDEXP", "SHAREDEXP",
"SKLLD", "SKLLD",
"sluggify",
"smoothstep", "smoothstep",
"Smri", "Smri",
"Specularity", "Specularity",
+41
View File
@@ -175,6 +175,43 @@
"vite": "^7.1.9", "vite": "^7.1.9",
}, },
}, },
"packages/website-ue": {
"name": "@blitzkit/website-ue",
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^9.4.4",
"@astrojs/react": "^4.4.0",
"@astrolib/seo": "^1.0.0-beta.8",
"@blitzkit/closed": "workspace:*",
"@blitzkit/core": "workspace:*",
"@blitzkit/i18n": "workspace:*",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/themes": "^3.2.1",
"@react-three/drei": "^10.7.6",
"@react-three/fiber": "^9.4.0",
"@types/lodash-es": "^4.17.12",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@types/three": "^0.180.0",
"@vite-pwa/astro": "^1.1.0",
"astro": "^5.14.4",
"astro-favicons": "^3.1.5",
"fuzzysort": "^3.1.0",
"immer": "^10.1.3",
"lodash-es": "^4.17.21",
"quicklime": "^1.2.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-promise-suspense": "^0.3.4",
"three": "^0.180.0",
"three-stdlib": "^2.36.0",
"typescript": "^5.9.3",
"varuna": "workspace:*",
"vite": "^7.1.9",
"yaml": "^2.8.1",
},
},
}, },
"packages": { "packages": {
"@apideck/better-ajv-errors": ["@apideck/[email protected]", "", { "dependencies": { "json-schema": "^0.4.0", "jsonpointer": "^5.0.0", "leven": "^3.1.0" }, "peerDependencies": { "ajv": ">=8" } }, "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA=="], "@apideck/better-ajv-errors": ["@apideck/[email protected]", "", { "dependencies": { "json-schema": "^0.4.0", "jsonpointer": "^5.0.0", "leven": "^3.1.0" }, "peerDependencies": { "ajv": ">=8" } }, "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA=="],
@@ -403,6 +440,8 @@
"@blitzkit/website": ["@blitzkit/website@workspace:packages/website"], "@blitzkit/website": ["@blitzkit/website@workspace:packages/website"],
"@blitzkit/website-ue": ["@blitzkit/website-ue@workspace:packages/website-ue"],
"@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-fdRs9PSrBF7QUntpZpq6BTw58fhgGJojgg39m9oFOJGZT+nip9b0so5cYY1oWl5pvemDLr0cPPsH46vwThEbpQ=="], "@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-fdRs9PSrBF7QUntpZpq6BTw58fhgGJojgg39m9oFOJGZT+nip9b0so5cYY1oWl5pvemDLr0cPPsH46vwThEbpQ=="],
"@capsizecss/unpack": ["@capsizecss/[email protected]", "", { "dependencies": { "fontkit": "^2.0.2" } }, "sha512-+ntATQe1AlL7nTOYjwjj6w3299CgRot48wL761TUGYpYgAou3AaONZazp0PKZyCyWhudWsjhq1nvRHOvbMzhTA=="], "@capsizecss/unpack": ["@capsizecss/[email protected]", "", { "dependencies": { "fontkit": "^2.0.2" } }, "sha512-+ntATQe1AlL7nTOYjwjj6w3299CgRot48wL761TUGYpYgAou3AaONZazp0PKZyCyWhudWsjhq1nvRHOvbMzhTA=="],
@@ -2615,6 +2654,8 @@
"@blitzkit/website/vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="], "@blitzkit/website/vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="],
"@blitzkit/website-ue/vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="],
"@discordjs/rest/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="], "@discordjs/rest/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
"@discordjs/ws/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="], "@discordjs/ws/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
+57
View File
@@ -0,0 +1,57 @@
# Christmas Garage Guide 2025
This content was pre-recorded on a test server and the version you may see may not be the same. Please see [the official WoTB portal](https://wotblitz.com/) for the most up-to-date information.
The holiday season has arrived, and this year the celebrations spill directly into your garage, transforming the familiar space into a festive hub filled with activities, rewards, and seasonal flair. Instead of just offering decorations or a visual makeover, this event brings a full set of mechanics that turn everyday battles into a steady stream of progress. Whether you’re aiming for bonuses, collectibles, or new tanks, the garage is designed to make every match feel like part of a larger holiday journey.
![](https://i.imgur.com/HmbDw0x.jpeg)
## The Music Box
The familiar Snow Globes are absent this year, replaced entirely by **Music Boxes**, which act as the new way to try your luck for seasonal rewards. They behave similarly to the Snow Globes and give you a chance to obtain various items, including a shot at the brand-new **[GSOR the TANK](https://blitzkit.app/tanks/gsor-the-tank/)**. But this time around, **they do not guarantee a tank every single time.** But as a bonus, the Music Box guarantees you will not receive duplicate tanks. Once you have a tank, the Music Box will try its best to give you a different one each time.
![](https://i.imgur.com/sxYV77L.jpeg)
## Win Battles, Earn Rewards
Each victory during the event rewards you with **3 Hot Coffees**, a seasonal currency that serves as the backbone of the progression system. These coffees can be exchanged for a variety of Festive Town rewards, giving you reasons to keep pushing through battles even if you’re just casually playing.
![](https://i.imgur.com/MXGxejz.jpeg)
With the coffees, you’ll also be able to claim **2 tank certificates**, one for **tier VII** vehicles and another covering **tier IX–X** options.
The tier VII pool includes the [E 25](https://blitzkit.app/tanks/e-25), [CS-52 LIS](https://blitzkit.app/tanks/cs-52-lis), [AMX 13 57](https://blitzkit.app/tanks/amx-13-57), [Steyr WT](https://blitzkit.app/tanks/steyr-wt), [Kunze Panzer](https://blitzkit.app/tanks/kunze-panzer), and [Super Hellcat](https://blitzkit.app/tanks/super-hellcat). Meanwhile, the tier IX–X certificate gives access to higher-tier picks like the [121B](https://blitzkit.app/tanks/121b), [AMX 30 B](https://blitzkit.app/tanks/amx-30-b), [Obj. 260](https://blitzkit.app/tanks/obj-260), [Char Futur 4](https://blitzkit.app/tanks/char-futur-4), [TL-7-120](https://blitzkit.app/tanks/tl-7-120), and [Object 452K](https://blitzkit.app/tanks/object-452k).
![](https://i.imgur.com/lxr7PE9.png)
## Upgrade Your Christmas Tree
Golden tokens allow you to upgrade your Christmas Tree through **four distinct stages**, each bringing your garage closer to its fully decorated holiday form.
![](https://i.imgur.com/bcmQE8T.jpeg)
As the tree grows, additional ornament slots open up, eight in total, which appear on the left side of your screen. These slots give you more room to customize the look of your garage and make the tree feel like something you’ve built up piece by piece over the course of the event. Each new ornament adds to the atmosphere, making the progression feel both cosmetic and rewarding.
A fully decorated tree grants up to **+25% silver** per battle, turning your regular gameplay into a more profitable experience without requiring extra effort. Ensure all your ornaments come from the same set to unlock the full potential of the tree (all left, all middle, or all right).
![](https://i.imgur.com/MMbyYLn.jpeg)
## Upgrade Your Yuletide Stall
Your golden tokens can also be invested into upgrading the **Yuletide Stall**, another element of the garage that evolves as you level it up. Each upgrade unlocks new rewards, giving you incentives to distribute your tokens across different attractions instead of focusing on only one. The stall begins in a simple state, but after upgrades it transforms visually and functionally, becoming a more vibrant part of your garage.
![](https://i.imgur.com/AONZN5O.jpeg)
Each upgrade unlocks a tier worth of rewards that you can claim in exchange for Free XP, Gold, Silver, and more Hot Coffees!
![](https://i.imgur.com/8fNy0Yj.png)
## Upgrade Your Shooting Gallery
Another upgradeable area is the **Shooting Gallery**, which contributes its own set of rewards as it levels up. Enhancing the gallery expands your options for exchanging mastery badges, making those badges more useful during the event than they usually are.
![](https://i.imgur.com/Rj1WNCE.jpeg)
![](https://i.imgur.com/GAUd2uR.png)
Consider yourselves debriefed. Happy holidays!
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5 -5
View File
@@ -7,7 +7,7 @@
"build:assets": "cd packages/scripts && bun run build:assets", "build:assets": "cd packages/scripts && bun run build:assets",
"build:averages": "bun --filter=@blitzkit/scripts run build:averages", "build:averages": "bun --filter=@blitzkit/scripts run build:averages",
"build:bot": "cd packages/scripts && bun run build:bot", "build:bot": "cd packages/scripts && bun run build:bot",
"build:website": "cd packages/website && bun run build", "build:website": "cd packages/website-ue && bun run build",
"build:prisma": "prisma generate", "build:prisma": "prisma generate",
"build:proxyclient": "cd packages/scripts && bun run build:proxyclient", "build:proxyclient": "cd packages/scripts && bun run build:proxyclient",
"build:catalogitemaccesssor": "cd packages/scripts && bun run build:catalogitemaccesssor", "build:catalogitemaccesssor": "cd packages/scripts && bun run build:catalogitemaccesssor",
@@ -16,22 +16,22 @@
"dev:bot": "bun run build:bot --dev && bun start:bot", "dev:bot": "bun run build:bot --dev && bun start:bot",
"start:bot": "bun dist/bot/main.js", "start:bot": "bun dist/bot/main.js",
"dev:docs": "vitepress dev docs", "dev:docs": "vitepress dev docs",
"dev:website": "cd packages/website && bun run dev", "dev:website": "cd packages/website-ue && bun run dev",
"dev:app": "cd packages/app && bun run dev", "dev:app": "cd packages/app && bun run dev",
"dev": "bun run dev:website", "dev": "bun run dev:website",
"dev:api": "bun --filter=@blitzkit/api run dev", "dev:api": "bun --filter=@blitzkit/api run dev",
"setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader", "setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader",
"setup:patches": "bun --filter=@blitzkit/scripts run setup:patches", "setup:patches": "bun --filter=@blitzkit/scripts run setup:patches",
"start:website": "bun --filter=@blitzkit/website run start", "start:website": "bun --filter=@blitzkit/website-ue run start",
"host:docs": "vitepress preview docs", "host:docs": "vitepress preview docs",
"lint": "tsc", "lint": "tsc",
"lint:website": "cd packages/website && bun run lint", "lint:website": "cd packages/website-ue && bun run lint",
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"", "format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
"update": "yarn upgrade --latest", "update": "yarn upgrade --latest",
"tunnel": "cloudflared tunnel --url http://localhost:3000", "tunnel": "cloudflared tunnel --url http://localhost:3000",
"discoverids": "scripts/discoverIds.ts", "discoverids": "scripts/discoverIds.ts",
"build:protos": "cd packages/scripts && bun run build:protos", "build:protos": "cd packages/scripts && bun run build:protos",
"preview:website": "cd packages/website && bun run preview", "preview:website": "cd packages/website-ue && bun run preview",
"build:reviews": "cd packages/scripts && bun build:reviews", "build:reviews": "cd packages/scripts && bun build:reviews",
"build:ids": "cd packages/scripts && bun build:ids", "build:ids": "cd packages/scripts && bun build:ids",
"prunestrings": "cd packages/scripts && bun prunestrings", "prunestrings": "cd packages/scripts && bun prunestrings",
@@ -52,7 +52,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
const seasonNumbers = range( const seasonNumbers = range(
FIRST_MINIMAL_ARCHIVED_RATING_SEASON, FIRST_MINIMAL_ARCHIVED_RATING_SEASON,
latestArchivedSeasonNumber + (onGoingSeason ? 1 : 0) + 1 latestArchivedSeasonNumber + (onGoingSeason ? 1 : 0) + 1
); ).slice(-25);
function addOptions(option: SlashCommandSubcommandBuilder) { function addOptions(option: SlashCommandSubcommandBuilder) {
const { strings } = translator(Locale.EnglishUS); const { strings } = translator(Locale.EnglishUS);
@@ -196,7 +196,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
strings.common.leagues as Record<string, string> strings.common.leagues as Record<string, string>
)[name] )[name]
), ),
}) satisfies APIApplicationCommandOptionChoice<string> } satisfies APIApplicationCommandOptionChoice<string>)
) )
) )
.setRequired(true); .setRequired(true);
@@ -219,8 +219,8 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
const season = seasonOption const season = seasonOption
? parseInt(seasonOption) ? parseInt(seasonOption)
: onGoingSeason : onGoingSeason
? latestArchivedSeasonNumber + 1 ? latestArchivedSeasonNumber + 1
: latestArchivedSeasonNumber; : latestArchivedSeasonNumber;
const isCurrentSeason = season === latestArchivedSeasonNumber + 1; const isCurrentSeason = season === latestArchivedSeasonNumber + 1;
let titleName: string; let titleName: string;
let titleImage: string | undefined; let titleImage: string | undefined;
@@ -258,7 +258,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
position: player.number, position: player.number,
clan: player.clan_tag, clan: player.clan_tag,
nickname: player.nickname, nickname: player.nickname,
}) satisfies SimplifiedPlayer } satisfies SimplifiedPlayer)
) )
) )
: await getArchivedRatingLeaderboard(region, season!).then( : await getArchivedRatingLeaderboard(region, season!).then(
@@ -295,7 +295,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
.deleted_player, .deleted_player,
{ id: player.id } { id: player.id }
), ),
}) satisfies SimplifiedPlayer } satisfies SimplifiedPlayer)
); );
} }
); );
@@ -349,7 +349,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
score: player.score, score: player.score,
clan: player.clan_tag, clan: player.clan_tag,
nickname: player.nickname, nickname: player.nickname,
}) satisfies SimplifiedPlayer } satisfies SimplifiedPlayer)
) )
) )
: await getArchivedRatingLeaderboard(region, season!).then( : await getArchivedRatingLeaderboard(region, season!).then(
@@ -19,9 +19,9 @@ export function localizationObject(
(!strict || validNameRegex.test(translation)) && translation.length > 0; (!strict || validNameRegex.test(translation)) && translation.length > 0;
if (!isValid) { if (!isValid) {
console.warn( // console.warn(
`Invalid localization for ${locale} (${path}): ${translation}; skipping...` // `Invalid localization for ${locale} (${path}): ${translation}; skipping...`
); // );
return localizations; return localizations;
} }
@@ -17,7 +17,7 @@ export async function getArchivedLatestSeasonNumber() {
if (ratingInfo.detail) { if (ratingInfo.detail) {
const regionsURL = ( const regionsURL = (
(await fetch( (await fetch(
`https://api.github.com/repos/tresabhi/${assertSecret( `https://api.github.com/repos/${assertSecret(
import.meta.env.PUBLIC_ASSET_REPO import.meta.env.PUBLIC_ASSET_REPO
)}/git/trees/main` )}/git/trees/main`
).then((response) => response.json())) as GitHubTrees ).then((response) => response.json())) as GitHubTrees
+42 -41
View File
@@ -1,49 +1,50 @@
export * from './assertSecret'; export * from "./assertSecret";
export * from './asset'; export * from "./asset";
export * from './availableProvisions'; export * from "./availableProvisions";
export * from './averageDefinitions'; export * from "./averageDefinitions";
// export * from './camouflageDefinitions'; // export * from './camouflageDefinitions';
// export * from './checkConsumableProvisionInclusivity'; // export * from './checkConsumableProvisionInclusivity';
export * from './coefficient'; export * from "./coefficient";
export * from './consumableDefinitions'; export * from "./consumableDefinitions";
// export * from './context'; // export * from './context';
export * from './createDefaultSkills'; export * from "./createDefaultSkills";
export * from './degressiveStat'; export * from "./degressiveStat";
export * from './discoveredIdDefinitions'; export * from "./discoveredIdDefinitions";
export * from './emblemURL'; export * from "./emblemURL";
export * from './equipmentDefinitions'; export * from "./equipmentDefinitions";
export * from './eventManager'; export * from "./eventManager";
export * from './gameDefinitions'; export * from "./gameDefinitions";
export * from './getArchivedLatestSeasonNumber'; export * from "./getArchivedLatestSeasonNumber";
// export * from './getArchivedRatingInfo'; // export * from './getArchivedRatingInfo';
export * from './getArchivedRatingLeaderboard'; export * from "./getArchivedRatingLeaderboard";
// export * from './getArchivedRatingMidnightLeaderboard'; // export * from './getArchivedRatingMidnightLeaderboard';
export * from './getTimeDaysAgo'; export * from "./getTimeDaysAgo";
export * from './isExplosive'; export * from "./isExplosive";
export * from './mapDefinitions'; export * from "./mapDefinitions";
export * from './modelDefinitions'; export * from "./modelDefinitions";
export * from './normalizeBoundingBox'; export * from "./normalizeBoundingBox";
// export * from './parseBkni'; // export * from './parseBkni';
// export * from './patientFetch'; // export * from './patientFetch';
export * from './patientFetchJSON'; export * from "./patientFetchJSON";
export * from './progressiveStat'; export * from "./progressiveStat";
export * from './provisionDefinitions'; export * from "./provisionDefinitions";
export * from './resolveDpm'; export * from "./resolveDpm";
export * from './resolvePenetrationCoefficient'; export * from "./resolvePenetrationCoefficient";
export * from './reviews'; export * from "./reviews";
export * from './skillDefinitions'; export * from "./skillDefinitions";
export * from './sum'; export * from "./sum";
export * from './tankDefinitions'; export * from "./tankDefinitions";
export * from './tankIcon'; export * from "./tankIcon";
export * from './tankNames'; export * from "./tankNames";
export * from './unionBoundingBox'; export * from "./unionBoundingBox";
export * from './uniqueGuns'; export * from "./uniqueGuns";
export * from './unwrapBlitzkitResponse'; export * from "./unwrapBlitzkitResponse";
export * from './votes'; export * from "./votes";
// export * from './withCORSProxy'; // export * from './withCORSProxy';
export * from './createDefaultProvisions'; export * from "./createDefaultProvisions";
export * from './gallery'; export * from "./gallery";
export * from './metaSortTank'; export * from "./metaSortTank";
export * from './popularTanks'; export * from "./popularTanks";
export * from './romanize'; export * from "./romanize";
export * from './youtubers'; export * from "./sluggify.ts";
export * from "./youtubers";
+16
View File
@@ -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 sluggify(value: string) {
let slug = deburr(value).toLowerCase();
slug = slug.replaceAll(nonAlphanumericRegex, "-");
slug = slug.replaceAll(multipleDashesRegex, "-");
slug = slug.replaceAll(trailingDashRegex, "");
slug = slug.replaceAll(leadingDashRegex, "");
return slug;
}
+5 -2
View File
@@ -2,12 +2,15 @@ import { build } from "esbuild";
import { cp, readdir, rm } from "fs/promises"; import { cp, readdir, rm } from "fs/promises";
import { argv } from "process"; import { argv } from "process";
const dev = argv.includes("--dev");
const projectDir = "../.."; const projectDir = "../..";
const srcRoot = `${projectDir}/packages/bot`; const srcRoot = `${projectDir}/packages/bot`;
const distRoot = `${projectDir}/dist/bot`; const distRoot = `${projectDir}/dist/bot`;
const modulesRoot = "../../node_modules"; const modulesRoot = dev
? "../../packages/bot/node_modules"
: "../../node_modules";
const workers = await readdir(`${srcRoot}/src/workers`); const workers = await readdir(`${srcRoot}/src/workers`);
const dev = argv.includes("--dev");
await rm(distRoot, { recursive: true, force: true }); await rm(distRoot, { recursive: true, force: true });
+2 -1
View File
@@ -11,7 +11,8 @@ const TS_PROTO_EXECUTABLE_LOCATIONS = [
const roots = [ const roots = [
// "../../packages/core/src/protos", // "../../packages/core/src/protos",
"../../packages/closed/protos", // "../../packages/closed/protos",
"../../packages/website-ue/src/protos",
]; ];
const exec = promisify(execSync); const exec = promisify(execSync);
+114
View File
@@ -0,0 +1,114 @@
import node from "@astrojs/node";
import react from "@astrojs/react";
import { wrapper } from "@blitzkit/i18n";
import locales from "@blitzkit/i18n/locales.json";
import strings from "@blitzkit/i18n/strings/en.json";
import { mauve, mauveDark } from "@radix-ui/colors";
import AstroPWA from "@vite-pwa/astro";
import favicons from "astro-favicons";
import { defineConfig } from "astro/config";
import packageJSON from "../../package.json";
import { tools } from "./src/constants/tools";
const POSSIBLE_TARGETS = ["app", "web"];
const target = process.env.PUBLIC_TARGET;
if (!target || !POSSIBLE_TARGETS.includes(target)) {
throw new Error("Invalid target");
}
export default defineConfig({
devToolbar: { enabled: false },
vite: { server: { allowedHosts: [] } },
output: target === "web" ? "static" : "server",
site: "https://blitzkit.app",
outDir: "../../dist/website",
prefetch: { defaultStrategy: "hover", prefetchAll: true },
build: { concurrency: 4 },
adapter: target === "app" ? node({ mode: "standalone" }) : undefined,
integrations: [
favicons({
name: strings.common.name,
short_name: strings.common.name,
background: mauveDark.mauve1,
themes: [mauve.mauve1, mauveDark.mauve1],
appleStatusBarStyle: "black-translucent",
version: packageJSON.version,
shortcuts: Object.values(tools)
.filter((tool) => !tool.disabled && !tool.href)
.map((tool) => {
const stringId = (tool.strings ??
tool.id) as keyof typeof strings.website.tools;
return {
name: strings.website.tools[stringId].name,
name_localized: wrapper(
(strings) => strings.website.tools[stringId].name
),
description: strings.website.tools[stringId].description,
description_localized: wrapper(
(strings) => strings.website.tools[stringId].description
),
short_name: strings.website.tools[stringId].name,
short_name_localized: wrapper(
(strings) => strings.website.tools[stringId].name
),
url: `/${tool.id}`,
icon: `public/assets/images/tools/${tool.id}.webp`,
};
}),
manifest: {
description: strings.website.home.seo_description,
description_localized: wrapper(
(strings) => strings.website.home.seo_description
),
dir: "ltr",
categories: ["utilities", "games", "developer", "developer tools"],
id: "com.tresabhi.blitzkit",
start_url: "/",
launch_handler: { client_mode: "navigate-new" },
display: "fullscreen",
display_override: ["fullscreen", "standalone", "minimal-ui"],
lang: locales.default,
orientation: "any",
},
icons: {
windows: true,
android: true,
appleIcon: true,
appleStartup: true,
favicons: true,
yandex: true,
},
}),
AstroPWA({
manifest: false,
devOptions: { enabled: true },
workbox: {
globPatterns: ["**/*.{html,css,js,png,webp,svg,xml,json}"],
runtimeCaching: [
{
urlPattern: ({ url }) =>
url.href.startsWith(import.meta.env.PUBLIC_ASSET_BASE),
handler: "NetworkFirst",
},
],
},
}),
react(),
],
});
+45
View File
@@ -0,0 +1,45 @@
{
"name": "@blitzkit/website-ue",
"type": "module",
"scripts": {
"dev": "PUBLIC_TARGET=web astro dev",
"build": "PUBLIC_TARGET=web astro build",
"preview": "PUBLIC_TARGET=web astro preview",
"lint": "PUBLIC_TARGET=web astro check",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^9.4.4",
"@astrojs/react": "^4.4.0",
"@astrolib/seo": "^1.0.0-beta.8",
"@blitzkit/closed": "workspace:*",
"@blitzkit/core": "workspace:*",
"@blitzkit/i18n": "workspace:*",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/themes": "^3.2.1",
"@react-three/drei": "^10.7.6",
"@react-three/fiber": "^9.4.0",
"@types/lodash-es": "^4.17.12",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@types/three": "^0.180.0",
"@vite-pwa/astro": "^1.1.0",
"astro": "^5.14.4",
"astro-favicons": "^3.1.5",
"fuzzysort": "^3.1.0",
"immer": "^10.1.3",
"lodash-es": "^4.17.21",
"quicklime": "^1.2.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-promise-suspense": "^0.3.4",
"three": "^0.180.0",
"three-stdlib": "^2.36.0",
"typescript": "^5.9.3",
"varuna": "workspace:*",
"vite": "^7.1.9",
"yaml": "^2.8.1"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

+46
View File
@@ -0,0 +1,46 @@
<svg width="426" height="426" viewBox="0 0 426 426" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M416.628 244.997L235.625 372.974C223.13 381.809 202.87 381.809 190.375 372.974L9.37173 244.997C3.1239 240.58 -3.95076e-06 234.79 0 229V196.6H426V229C426 234.79 422.876 240.58 416.628 244.997Z" fill="#0D2847"/>
<path d="M416.628 180.603L235.625 52.6262C223.13 43.7913 202.87 43.7913 190.375 52.6262L9.37172 180.603C-3.12391 189.438 -3.12391 203.762 9.37173 212.597L190.375 340.574C202.87 349.409 223.13 349.409 235.625 340.574L416.628 212.597C429.124 203.762 429.124 189.438 416.628 180.603Z" fill="#D9D9D9"/>
<path d="M416.628 180.603L235.625 52.6262C223.13 43.7913 202.87 43.7913 190.375 52.6262L9.37172 180.603C-3.12391 189.438 -3.12391 203.762 9.37173 212.597L190.375 340.574C202.87 349.409 223.13 349.409 235.625 340.574L416.628 212.597C429.124 203.762 429.124 189.438 416.628 180.603Z" fill="url(#paint0_linear_764_240)"/>
<path d="M416.628 180.603L235.625 52.6262C223.13 43.7913 202.87 43.7913 190.375 52.6262L9.37172 180.603C-3.12391 189.438 -3.12391 203.762 9.37173 212.597L190.375 340.574C202.87 349.409 223.13 349.409 235.625 340.574L416.628 212.597C429.124 203.762 429.124 189.438 416.628 180.603Z" fill="url(#paint1_linear_764_240)"/>
<g filter="url(#filter0_d_764_240)">
<path d="M197.056 150.108L201.368 153.051L290.596 213.945L306.6 202.599L310.832 199.599L289.153 184.23L288.86 177.31L335.236 182.298L351.706 170.622L359.102 165.378L288.049 158.111L286.355 118L263.968 133.871L265.867 167.722L217.292 135.762L197.056 150.108Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.905 289L74.2242 204.714L70 201.714L116.393 168.767C129.906 159.17 143.124 153.539 156.048 151.875C168.971 150.211 180.919 153.275 191.893 161.069C198.702 165.905 202.718 171.006 203.941 176.372C205.165 181.658 204.302 186.506 201.354 190.918L201.692 191.158C208.978 188.301 216.935 187.286 225.563 188.113C234.247 188.9 242.613 192.151 250.66 197.866C261.803 205.779 266.398 214.825 264.446 225.004C262.551 235.142 254.96 244.929 241.672 254.366L192.905 289ZM221.999 242.08L200.456 257.38L163.905 231.422L185.448 216.123C192.007 211.465 198.473 209.23 204.846 209.42C211.22 209.529 217.193 211.562 222.764 215.519C228.392 219.516 231.31 223.797 231.521 228.364C231.732 232.85 228.558 237.422 221.999 242.08ZM165.937 205.64L146.77 219.252L114.693 196.472L133.861 182.859C140.363 178.241 146.435 175.887 152.076 175.798C157.717 175.708 163.07 177.462 168.135 181.059C173.256 184.696 175.809 188.557 175.796 192.643C175.726 196.69 172.44 201.022 165.937 205.64Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path d="M197.056 156.108L290.596 219.945L310.832 205.599L306.6 202.599L289.153 190.23L288.86 183.31L335.236 188.298L359.102 171.378L351.706 170.622L288.049 164.111L286.355 124L263.968 139.871L265.867 173.722L217.292 141.762L201.368 153.051L197.056 156.108Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.905 295L70 207.714L74.2242 204.714L116.393 174.767C129.906 165.17 143.124 159.539 156.048 157.875C168.971 156.211 180.919 159.275 191.893 167.069C198.702 171.905 202.718 177.006 203.941 182.372C205.165 187.658 204.302 192.506 201.354 196.918L201.692 197.158C208.978 194.301 216.935 193.286 225.563 194.113C234.247 194.9 242.613 198.151 250.66 203.866C261.803 211.779 266.398 220.825 264.446 231.004C262.551 241.142 254.96 250.929 241.672 260.366L192.905 295ZM221.999 248.08L200.456 263.38L163.905 237.422L185.448 222.123C192.007 217.465 198.473 215.23 204.846 215.42C211.22 215.529 217.193 217.562 222.764 221.519C228.392 225.516 231.31 229.797 231.521 234.364C231.732 238.85 228.558 243.422 221.999 248.08ZM165.937 211.64L146.77 225.252L114.693 202.472L133.861 188.859C140.363 184.241 146.435 181.887 152.076 181.798C157.717 181.708 163.07 183.462 168.135 187.059C173.256 190.696 175.809 194.557 175.796 198.643C175.726 202.69 172.44 207.022 165.937 211.64Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path d="M310.832 199.599L306.6 202.599L310.832 205.599V199.599Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path d="M359.102 165.378L351.706 170.622L359.102 171.378V165.378Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path d="M201.368 153.051L197.056 150.108V156.108L201.368 153.051Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
<path d="M74.2242 204.714L70 201.714V207.714L74.2242 204.714Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
</g>
<path d="M197.056 150.108L290.596 213.945L310.832 199.599L289.153 184.23L288.86 177.31L335.236 182.298L359.102 165.378L288.049 158.111L286.355 118L263.968 133.871L265.867 167.722L217.292 135.762L197.056 150.108Z" fill="url(#paint2_linear_764_240)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.905 289L70 201.714L116.393 168.767C129.906 159.17 143.124 153.539 156.048 151.875C168.971 150.211 180.919 153.275 191.893 161.069C198.702 165.905 202.718 171.006 203.941 176.372C205.165 181.658 204.302 186.506 201.354 190.918L201.692 191.158C208.978 188.301 216.935 187.286 225.563 188.113C234.247 188.9 242.613 192.151 250.66 197.866C261.803 205.779 266.398 214.825 264.446 225.004C262.551 235.142 254.96 244.929 241.672 254.366L192.905 289ZM221.999 242.08L200.456 257.38L163.905 231.422L185.448 216.123C192.007 211.465 198.473 209.23 204.846 209.42C211.22 209.529 217.193 211.562 222.764 215.519C228.392 219.516 231.31 223.797 231.521 228.364C231.732 232.85 228.558 237.422 221.999 242.08ZM165.937 205.64L146.77 219.252L114.693 196.472L133.861 182.859C140.363 178.241 146.435 175.887 152.076 175.798C157.717 175.708 163.07 177.462 168.135 181.059C173.256 184.696 175.809 188.557 175.796 192.643C175.726 196.69 172.44 201.022 165.937 205.64Z" fill="url(#paint3_linear_764_240)"/>
<defs>
<filter id="filter0_d_764_240" x="66" y="116" width="297.103" height="185" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_764_240"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_764_240" result="shape"/>
</filter>
<linearGradient id="paint0_linear_764_240" x1="213" y1="46" x2="213" y2="347.2" gradientUnits="userSpaceOnUse">
<stop stop-color="#10243E"/>
<stop offset="1" stop-color="#0F1B2D"/>
</linearGradient>
<linearGradient id="paint1_linear_764_240" x1="127.008" y1="96.51" x2="241.48" y2="334.974" gradientUnits="userSpaceOnUse">
<stop stop-color="#262A65"/>
<stop offset="1" stop-color="#104D87"/>
</linearGradient>
<linearGradient id="paint2_linear_764_240" x1="215" y1="98.5" x2="299.5" y2="210.5" gradientUnits="userSpaceOnUse">
<stop offset="0.379808" stop-color="#C2E6FF"/>
<stop offset="0.706731" stop-color="#70B8FF"/>
</linearGradient>
<linearGradient id="paint3_linear_764_240" x1="215" y1="98.5" x2="299.5" y2="210.5" gradientUnits="userSpaceOnUse">
<stop offset="0.379808" stop-color="#C2E6FF"/>
<stop offset="0.706731" stop-color="#70B8FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

@@ -0,0 +1,331 @@
import { TankAttributeChange_AttributeName } from "@protos/blitz_static_tank_upgrade_single_stage";
export enum CharacteristicsGroup {
Firepower,
Maneuverability,
Survivability,
Miscellaneous,
}
type CharacteristicsOrder = {
group: CharacteristicsGroup;
characteristics: {
name: string;
value(
get: (name: TankAttributeChange_AttributeName) => number
): number | string | null;
}[];
}[];
export const characteristicsOrder: CharacteristicsOrder = [
{
group: CharacteristicsGroup.Firepower,
characteristics: [
{
name: "gun_type",
value(get) {
const isPump = get(
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_IS_PUMP
);
if (isPump === 1) return "auto_reloader";
const clipSize = get(
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CLIP_SIZE
);
if (clipSize === 1) return "regular";
return "auto_loader";
},
},
{
name: "dpm",
value(get) {
return -1;
},
},
{
name: "clipping_potential",
value(get) {
const clipSize = get(
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CLIP_SIZE
);
if (clipSize === 1) return null;
// const damage
return -1;
},
},
],
},
];
type _CharacteristicsOrder = {
group: CharacteristicsGroup;
attributes: {
name: TankAttributeChange_AttributeName;
}[];
}[];
export const _characteristicsOrder: _CharacteristicsOrder = [
{
group: CharacteristicsGroup.Firepower,
attributes: [
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_RELOAD_TIME,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_ANGLE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_AIMING_TIME,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_VEHICLE_MOVEMENT,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_VEHICLE_ROTATION,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_TURRET_ROTATION,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_AFTER_SHOT,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_WHILE_GUN_DAMAGED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_PITCH_LIMIT_DOWN,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_PITCH_LIMIT_UP,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_YAW_LIMIT_LEFT,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_YAW_LIMIT_RIGHT,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CLIP_SIZE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CLIP_RATE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_IS_PUMP,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_SLOTS,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_BURST_SIZE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_BURST_RATE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_RELOAD_SPEED_SCALE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_ARMOR_DAMAGE_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_SPEED_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_PIERCING_POWER_LOSS_REDUCTION,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ENGINE_HIT_CHANCE_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CREW_HIT_CHANCE_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_AMMO_BAY_EXPLOSION_CHANCE_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_LARGE_CALIBER_HE_PIERCING_FACTOR,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_PIERCING_MULTIPLIER_AP,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_PIERCING_MULTIPLIER_APCR,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_PIERCING_MULTIPLIER_HC,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_SHELLS_PIERCING_MULTIPLIER_HE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TRACER_SHELLS_ENABLED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ROTATION_RELOAD_SPEED_SCALE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ARMOR_DAMAGE_HE_SHELLS,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MODULE_DAMAGE_HE_SHELLS,
},
],
},
{
group: CharacteristicsGroup.Maneuverability,
attributes: [
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_GUN_ROTATION_SPEED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TURRET_ROTATION_SPEED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_HULL_ROTATION_SPEED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ENGINE_POWER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_BRAKE_FORCE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MASS,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_FORWARD_MAX_SPEED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_BACKWARD_MAX_SPEED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_RESISTANCE_HARD,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_RESISTANCE_MEDIUM,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_RESISTANCE_SOFT,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_SIDE_FRICTION,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_FORWARD_FRICTION,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_RESERVE_TRACK_BACKWARD_SPEED,
},
],
},
{
group: CharacteristicsGroup.Survivability,
attributes: [
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MAX_HEALTH,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_HEALTH_BURN_PER_SEC,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CIRCULAR_VISION_RADIUS,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_MOVING,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_STILL,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_FIRE_PENALTY,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_FACTOR_AT_SHOT,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_FIRE_START_CHANCE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_AVERAGE_THICKNESS,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONSUMABLE_COOLDOWN_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONSUMABLE_DURATION_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONSUMABLE_RECHARGE_SPEED_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_RAMMING_DAMAGE_RESISTANCE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_LARGE_CALIBER_HE_SHELLS_DAMAGE_RESISTANCE,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ENHANCED_TRACKS_ENABLED,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ARMOR_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MODULE_REGEN_PER_SEC_MULTIPLIER,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MODULES_DAMAGED_DEBUFF_EFFICIENCY,
},
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MAX_FIRE_DURATION,
},
],
},
{
group: CharacteristicsGroup.Miscellaneous,
attributes: [
{
name: TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CREW_XP_MULTIPLIER,
},
],
},
];
if (import.meta.env.DEV) {
for (const name of Object.values(TankAttributeChange_AttributeName).filter(
(value) => typeof value === "number"
)) {
if (name === TankAttributeChange_AttributeName.ATTRIBUTE_NAME_UNSPECIFIED) {
continue;
}
const isImplemented = _characteristicsOrder.some((group) =>
group.attributes.some((attribute) => attribute.name === name)
);
if (!isImplemented) {
throw new Error(`Attribute ${name} is not implemented`);
}
}
}
@@ -0,0 +1,82 @@
import type { ButtonProps } from "@radix-ui/themes";
export interface Tool {
id: string;
strings?: string;
button: ButtonProps["color"];
significant?: boolean;
disabled?: boolean;
href?: string;
}
export const tools: Record<string, Tool> = {
tanks: {
id: "tanks",
strings: "tankopedia",
button: "purple",
significant: true,
},
players: {
id: "players",
disabled: true,
button: "blue",
},
compare: {
id: "compare",
button: "crimson",
},
performance: {
id: "performance",
button: "jade",
},
charts: {
id: "charts",
disabled: true,
button: "bronze",
},
playlist: {
id: "playlist",
button: "tomato",
},
mixer: {
id: "mixer",
button: "gray",
},
guess: {
id: "guess",
button: "cyan",
},
gallery: {
id: "gallery",
button: "gold",
},
session: {
id: "session",
button: "blue",
},
discord: {
id: "discord",
href: "https://discord.com/application-directory/1097673957865443370",
button: "indigo",
},
tier_list: {
id: "tier-list",
strings: "tier_list",
button: "orange",
},
embed: {
id: "embed",
button: "red",
},
api: {
id: "api",
disabled: true,
button: "bronze",
},
more: {
id: "more",
href: "https://discord.gg/nDt7AjGJQH",
button: "plum",
},
};
@@ -0,0 +1,13 @@
import type { TankCatalogComponent } from "@protos/blitz_static_tank_component";
import type { Tanks } from "../../protos/tanks";
export abstract class AbstractAPI {
abstract tanks(): Promise<Tanks>;
abstract strings(
locale: string,
prefix?: string
): Promise<Record<string, string>>;
abstract tank(id: string): Promise<TankCatalogComponent>;
}
@@ -0,0 +1,12 @@
import { TankCatalogComponent } from "@protos/blitz_static_tank_component";
import { AbstractAPI } from "./abstract";
export class ClientAPI extends AbstractAPI {
async tank(id: string) {
const response = await fetch(`/api/tanks/${id}.pb`);
const buffer = await response.arrayBuffer();
const array = new Uint8Array(buffer);
return TankCatalogComponent.decode(array);
}
}
@@ -0,0 +1,21 @@
import type { AbstractAPI } from "./abstract";
let dynamicAPI: AbstractAPI;
if (typeof window === "undefined") {
const { ProxyClient } = await import("@blitzkit/closed");
const { ServerAPI } = await import("./server");
const proxyClient = await new ProxyClient(
import.meta.env.WOTB_SERVER
).handshake();
const metadata = await proxyClient.metadata();
dynamicAPI = new ServerAPI(metadata);
} else {
const { ClientAPI } = await import("./client");
dynamicAPI = new ClientAPI();
}
export const api = dynamicAPI;
+115
View File
@@ -0,0 +1,115 @@
import type { MetadataAccessor } from "@blitzkit/closed";
import { sluggify } from "@blitzkit/core";
import type { RemoteStorageComponent } from "@protos/blitz_static_remote_storage_component";
import { parse } from "yaml";
import type { TanksEntry } from "../../protos/tanks";
import { AbstractAPI } from "./abstract";
if (typeof window !== "undefined") {
throw new Error("ServerAPI is being evaluated in the browser");
}
interface LocalizationConfig {
namespaces: string[];
}
export class ServerAPI extends AbstractAPI {
constructor(private metadata: MetadataAccessor) {
super();
}
async strings(locale: string) {
const group = this.metadata.group("ClientConfigsEntity");
if (group.length !== 1) {
throw new RangeError(
`Don't know how to handle ${group.length} ClientConfigsEntities`
);
}
const clientConfig = this.metadata.item(group[0].id);
const localizationResources = clientConfig.LocalizationResources();
if (!localizationResources.remote_storage) {
throw new Error("Localization resources not found");
}
let remoteStorage: RemoteStorageComponent | undefined = undefined;
for (const candidateId of localizationResources.remote_storage
.remote_urls) {
const item = this.metadata.item(candidateId);
const candidate = item.RemoteStorage();
if (
remoteStorage === undefined ||
candidate.download_speed_weight > remoteStorage.download_speed_weight
) {
remoteStorage = candidate;
}
}
if (remoteStorage === undefined) {
throw new Error("No suitable production remote storage found");
}
const config = await fetch(
`${remoteStorage.url}/${remoteStorage.relative_path}/config.yaml`
)
.then((response) => response.text())
.then((text) => parse(text) as LocalizationConfig);
const strings: Record<string, string> = {};
for (const namespace of config.namespaces) {
Object.assign(
strings,
await fetch(
`${remoteStorage.url}/${remoteStorage.relative_path}/${namespace}/${locale}.yaml`
)
.then((response) => response.text())
.then((text) => {
const strings: Record<string, string> = {};
const parsed = parse(text) as Record<string, string>;
for (const key in parsed) {
strings[key] = parsed[key].replaceAll('\\"', '"');
}
return strings;
})
);
}
return strings;
}
async tanks() {
const group = this.metadata.group("TankEntity");
const tanks: TanksEntry[] = [];
const strings = await this.strings("en");
for (const item of group) {
const tankCatalog = item.TankCatalog();
if (!tankCatalog.name) continue;
const name = strings[tankCatalog.name.value];
if (!name) continue;
const id = item.name;
const slug = sluggify(name);
tanks.push({ id, slug });
}
return { tanks };
}
async tank(id: string) {
const item = this.metadata.item(`TankEntity.${id}`);
const tankCatalog = item.TankCatalog();
return tankCatalog;
}
}
@@ -0,0 +1,54 @@
import {
TankAttributeChange_AttributeName,
TankAttributeChange_Modifier,
type TankAttributeChange,
} from "@protos/blitz_static_tank_upgrade_single_stage";
import { times } from "lodash-es";
export type AggregateAttributes = Partial<
Record<TankAttributeChange_AttributeName, number>
>;
function patch(
changes: TankAttributeChange[],
attributes: AggregateAttributes
) {
for (const { attribute_name, value, modifier } of changes) {
switch (modifier) {
case TankAttributeChange_Modifier.MODIFIER_OVERRIDE:
attributes[attribute_name] = value;
break;
case TankAttributeChange_Modifier.MODIFIER_MULTIPLY: {
if (!(attribute_name in attributes)) {
throw new Error(
`Missing attribute ${TankAttributeChange_AttributeName[attribute_name]} to modify`
);
}
}
case TankAttributeChange_Modifier.MODIFIER_MULTIPLY: {
attributes[attribute_name]! *= value;
break;
}
default:
throw new Error(
`Unhandled modified ${TankAttributeChange_Modifier[modifier]}`
);
}
}
}
export function aggregateAttributes(
base: TankAttributeChange[],
stages: TankAttributeChange[][],
stage: number
) {
const attributes: AggregateAttributes = {};
patch(base, attributes);
times(stage, (index) => patch(stages[index], attributes));
return attributes;
}
+19
View File
@@ -0,0 +1,19 @@
import { use } from "react";
const cache = new Map<string, Promise<unknown>>();
export function useAwait<Type>(
creator: () => Promise<Type>,
discriminator: string
) {
let promise;
if (cache.has(discriminator)) {
promise = cache.get(discriminator) as Promise<Type>;
} else {
promise = creator();
cache.set(discriminator, promise);
}
return use(promise);
}
@@ -0,0 +1,14 @@
import { TankCatalogComponent } from "@protos/blitz_static_tank_component";
import type { APIContext, GetStaticPaths } from "astro";
import { api } from "../../../core/api/dynamic";
export const getStaticPaths = (async () => {
const { tanks } = await api.tanks();
return tanks.map(({ id }) => ({ params: { id } }));
}) satisfies GetStaticPaths;
export async function GET({ params }: APIContext<never, { id: string }>) {
const tank = await api.tank(params.id);
return new Response(TankCatalogComponent.encode(tank).finish());
}
@@ -0,0 +1,5 @@
import { _characteristicsOrder } from "../../../../constants/characteristicsOrder";
export function GET() {
return Response.json(_characteristicsOrder);
}
@@ -0,0 +1 @@
go to <a href="/tanks">/tanks</a>
@@ -0,0 +1,73 @@
import { TankAttributeChange_AttributeName } from "@protos/blitz_static_tank_upgrade_single_stage";
import { times } from "lodash-es";
import { Suspense, useMemo } from "react";
import {
CharacteristicsGroup,
_characteristicsOrder,
} from "../../../constants/characteristicsOrder";
import { api } from "../../../core/api/dynamic";
import { aggregateAttributes } from "../../../core/blitz/aggregateAttributes";
import { useAwait } from "../../../hooks/useAwait";
import { Tankopedia } from "../../../stores/tankopedia";
export function Page({ id }: { id: string }) {
return (
<Suspense fallback={null}>
<Content id={id} />
</Suspense>
);
}
function Content({ id }: { id: string }) {
const tank = useAwait(() => api.tank(id), `tank-${id}`);
const stage = Tankopedia.use((state) => state.stage);
const attributes = useMemo(
() =>
aggregateAttributes(
tank.base_stats!.attributes,
tank.upgrade_stages.map((stage) => stage.attributes),
stage
),
[stage]
);
return (
<>
<h1>{tank.name?.value}</h1>
<h2>Characteristics</h2>
<div style={{ display: "flex" }}>
{times(tank.upgrade_stages.length, (index) => (
<button
onClick={() => {
Tankopedia.mutate((draft) => {
draft.stage = index;
});
}}
>
Stage {index + 1} {index === stage && "(selected)"}
</button>
))}
</div>
{_characteristicsOrder.map((group) => (
<>
<h2>{CharacteristicsGroup[group.group]}</h2>
{group.attributes.map(
(attribute) =>
attribute.name in attributes && (
<p>
{TankAttributeChange_AttributeName[attribute.name]}:{" "}
{attributes[attribute.name]}
</p>
)
)}
</>
))}
</>
);
}
@@ -0,0 +1,18 @@
---
import type { GetStaticPaths } from "astro";
import { api } from "../../../core/api/dynamic";
import { Page } from "./_index";
export const getStaticPaths = (async () => {
const { tanks } = await api.tanks();
return tanks.map((tank) => ({
params: { slug: tank.slug },
props: { id: tank.id },
}));
}) satisfies GetStaticPaths;
const { id } = Astro.props;
---
<Page {id} client:load />
@@ -0,0 +1,19 @@
---
import { api } from "../../core/api/dynamic";
const tanksList = await api.tanks();
---
<h1>Tanks</h1>
<ul>
{
tanksList.tanks.map(({ id, slug }) => (
<li>
<a href={`/tanks/${slug}`}>
{slug} ({id})
</a>
</li>
))
}
</ul>
@@ -0,0 +1,12 @@
syntax = "proto3";
package blitzkit;
message Tanks {
repeated TanksEntry tanks = 1;
}
message TanksEntry {
string id = 1;
string slug = 2;
}
@@ -0,0 +1,7 @@
import { Varuna } from "varuna";
interface Tankopedia {
stage: number;
}
export const Tankopedia = new Varuna<Tankopedia>({ stage: 0 });
+8
View File
@@ -0,0 +1,8 @@
{
"extends": ["../../tsconfig.json", "astro/tsconfigs/base"],
"compilerOptions": {
"paths": {
"@protos/*": ["../../packages/closed/protos/*"]
}
}
}
@@ -0,0 +1,38 @@
---
import { tankIcon } from "@blitzkit/core";
import { Flex, Heading, Link, Strong, Text } from "@radix-ui/themes";
---
<Flex justify="center" px="4">
<Link
color="gray"
highContrast
style={{ display: "content" }}
href="/docs/guides/christmas-2025"
underline="none"
>
<Flex
mt="3"
px="5"
py="4"
style={{
borderRadius: "var(--radius-3)",
backgroundImage: "url(https://i.imgur.com/LRYmSkg.png)",
backgroundSize: "cover",
backgroundPosition: "center",
boxSizing: "border-box",
}}
align="center"
gap="5"
>
<img src={tankIcon(25169)} style={{ height: "min(15vw, 5rem)" }} />
<Flex direction="column">
<Heading size={{ initial: "4", sm: "6" }}>Christmas 2025</Heading>
<Text size={{ initial: "2", sm: "3" }}>
Win the <Strong>GSOR the TANK</Strong> and more!
</Text>
</Flex>
</Flex>
</Link>
</Flex>
@@ -0,0 +1,89 @@
import { Code, Flex, Heading, Link, Text } from "@radix-ui/themes";
import { useEffect, useState, type ReactNode } from "react";
import type { MaybeSkeletonComponentProps } from "../types/maybeSkeletonComponentProps";
import { InlineSkeleton } from "./InlineSkeleton";
const TIME = 1764898200 * 1000;
export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
const [timeLeft, setTimeLeft] = useState<number>(TIME - Date.now());
useEffect(() => {
const interval = setInterval(() => {
setTimeLeft(TIME - Date.now());
}, 1000);
return () => {
clearInterval(interval);
};
}, []);
let string: ReactNode;
if (timeLeft > 0) {
const hours = Math.floor(timeLeft / (1000 * 60 * 60));
const minutes = Math.floor((timeLeft / (1000 * 60)) % 60)
.toString()
.padStart(2, "0");
const seconds = Math.floor((timeLeft / 1000) % 60)
.toString()
.padStart(2, "0");
string = (
<>
in{" "}
<Code highContrast>
{hours}h {minutes}m {seconds}s
</Code>
</>
);
} else {
string = "has ended. Come again later!";
}
return (
<Flex justify="center" px="4">
<Link
color="gray"
highContrast
style={{ display: "content" }}
href="https://discord.gg/njQdBhNS?event=1446208951136813117"
underline="none"
>
<Flex
mt="3"
px="5"
py="4"
style={{
borderRadius: "var(--radius-3)",
backgroundImage: "url(https://i.imgur.com/LRYmSkg.png)",
backgroundSize: "cover",
backgroundPosition: "center",
boxSizing: "border-box",
boxShadow: "0 0 var(--space-7) var(--blue-a5)",
}}
align="center"
gap="5"
>
<img
src="https://i.imgur.com/mvmJQgB.png"
style={{
height: "min(15vw, 5rem)",
filter: "drop-shadow(0.5rem 0.5rem 1rem #00000080)",
}}
/>
<Flex direction="column">
<Heading size={{ initial: "4", sm: "6" }}>
Music Box giveaway {!skeleton && string}{" "}
{skeleton && <InlineSkeleton width="10rem" />}
</Heading>
<Text size={{ initial: "2", sm: "3" }}>
Join the BlitzKit Discord server event
</Text>
</Flex>
</Flex>
</Link>
</Flex>
);
}
@@ -1,5 +1,5 @@
import { Markdown } from '../../../../../components/Markdown'; import { Markdown } from "../../../../../components/Markdown";
import { PageWrapper } from '../../../../../components/PageWrapper'; import { PageWrapper } from "../../../../../components/PageWrapper";
interface PageProps { interface PageProps {
content: string; content: string;
@@ -7,7 +7,7 @@ interface PageProps {
export function Page({ content }: PageProps) { export function Page({ content }: PageProps) {
return ( return (
<PageWrapper> <PageWrapper maxWidth="50rem">
<Markdown>{content}</Markdown> <Markdown>{content}</Markdown>
</PageWrapper> </PageWrapper>
); );
@@ -6,6 +6,7 @@ import { literals } from "@blitzkit/i18n/src/literals";
import { Box, Flex, Link } from "@radix-ui/themes"; import { Box, Flex, Link } from "@radix-ui/themes";
import type { GetStaticPaths } from "astro"; import type { GetStaticPaths } from "astro";
import { AesonPlug } from "../../components/AesonPlug"; import { AesonPlug } from "../../components/AesonPlug";
import { Giveaway } from "../../components/Giveaway";
import HomeHero from "../../components/HomeHero.astro"; import HomeHero from "../../components/HomeHero.astro";
import { Plugs } from "../../components/Plugs"; import { Plugs } from "../../components/Plugs";
import ToolCard from "../../components/ToolCard.astro"; import ToolCard from "../../components/ToolCard.astro";