Compare commits

..
178 Commits
Author SHA1 Message Date
TrèsAbhi 5dba69f30a New Crowdin updates (#210) 2026-02-03 15:00:55 -06:00
TrèsAbhi 023c348b0d New Crowdin updates (#209)
* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (Russian)
2026-01-21 11:00:30 -06:00
TrèsAbhi 8313dd811d feat: logs 2026-01-16 19:31:53 -06:00
TrèsAbhi 3f7d10c2c6 fix: guesser sizing 2026-01-16 19:31:09 -06:00
TrèsAbhi 98e83d120a New translations en.json (Russian) (#208) 2026-01-16 18:46:33 -06:00
TrèsAbhi dd845d2784 New translations en.json (Chinese Simplified) (#207) 2026-01-12 22:06:59 -06:00
TrèsAbhi dc15df2a40 New Crowdin updates (#206) 2026-01-09 14:06:11 -06:00
TrèsAbhi 7c838aaf06 New Crowdin updates (#205)
* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Japanese)

* New translations en.json (Polish)

* New translations en.json (Portuguese)

* New translations en.json (Russian)

* New translations en.json (Ukrainian)

* New translations en.json (Chinese Simplified)
2026-01-08 10:13:55 -06:00
TrèsAbhi f181c96518 Merge pull request #204 from blitzkit/dev
dev
2026-01-08 03:48:00 +00:00
TrèsAbhi 6fbfa2c70b Merge branch 'main' into dev 2026-01-07 20:16:06 -06:00
TrèsAbhi 17dd50b902 feat: logs 2026-01-07 20:15:45 -06:00
TrèsAbhi 9061335292 feat: deduplicate game mode consumales and powers 2026-01-07 20:11:54 -06:00
TrèsAbhi c27d3a3b6a Merge pull request #203 from Hitjack007/filter-by-module-damage
Fixed Module dmage filter showing alpha damage
2026-01-07 03:22:49 +00:00
Mark Greene c37acf4a93 Fixed Module dmage filter showing alpha damage 2026-01-07 15:41:55 +13:00
TrèsAbhi 0c1cef87f6 Merge pull request #200 from blitzkit/tresabhi-patch-1
Rename build job to 'Build website'
2026-01-05 05:18:30 +00:00
TrèsAbhi e8b777be8a Rename build job to 'Build bot' 2026-01-04 19:08:35 -06:00
TrèsAbhi 2941348412 Rename build job to 'Build website' 2026-01-04 19:08:04 -06:00
TrèsAbhi 68b2ecfb6d Merge branch 'main' into dev 2026-01-04 15:19:35 -06:00
TrèsAbhi e058b09621 Merge pull request #199 from blitzkit/main-i18n 2026-01-04 21:18:48 +00:00
TrèsAbhi d5526da1fb Merge pull request #198 from Hitjack007/dev 2026-01-04 21:18:31 +00:00
TrèsAbhi 091305a20f feat: break streak on tier change 2026-01-04 15:18:00 -06:00
TrèsAbhi 85cd70b2d5 feat: disable selecting 0 tiers 2026-01-04 15:16:57 -06:00
TrèsAbhi 7997f490fc feat: clean up tiers ui 2026-01-04 15:11:20 -06:00
TrèsAbhi 5a0b309b0b feat: combine tabs 2026-01-04 14:58:59 -06:00
TrèsAbhi 448e4e0d7d New translations en.json (Russian) 2026-01-04 12:33:13 +00:00
Mark Greene 43c14665de Fix 2026-01-04 14:50:11 +13:00
Mark Greene e249408360 Fixed Filters not centering 2026-01-04 14:22:20 +13:00
Mark Greene 24e57d7125 Added Tier Filter to Guesser 2026-01-04 10:18:48 +13:00
TrèsAbhi 0ea7714578 feat: redo credits 2026-01-03 13:36:15 -06:00
Mark Greene 636a2934a2 Reworked Game Mode Ability Filters 2026-01-03 22:07:01 +13:00
TrèsAbhi cbe22035cb Merge pull request #194 from blitzkit/main-i18n 2026-01-02 18:47:42 +00:00
TrèsAbhi 4c8e5cc8ed New translations en.json (Chinese Simplified) 2026-01-02 18:46:54 +00:00
TrèsAbhi ee4141838c New translations en.json (Ukrainian) 2026-01-02 18:46:53 +00:00
TrèsAbhi 24ff42a672 New translations en.json (Russian) 2026-01-02 18:46:52 +00:00
TrèsAbhi d8748c028e New translations en.json (Portuguese) 2026-01-02 18:46:51 +00:00
TrèsAbhi b55924ce2b New translations en.json (Polish) 2026-01-02 18:46:50 +00:00
TrèsAbhi 66f7a8d369 New translations en.json (Japanese) 2026-01-02 18:46:49 +00:00
TrèsAbhi 8ed97a3173 New translations en.json (Spanish) 2026-01-02 18:46:47 +00:00
TrèsAbhi b4f452b026 New translations en.json (French) 2026-01-02 18:46:46 +00:00
TrèsAbhi 8d4d730b11 feat: logs 2026-01-02 12:43:07 -06:00
TrèsAbhi 8f54bd5971 fix: use role filters 2026-01-02 12:39:45 -06:00
TrèsAbhi 56a09536cd fix: use roles 2026-01-02 12:09:23 -06:00
TrèsAbhi 9df5efa422 feat: enable gamemode exclusive 2026-01-02 11:32:27 -06:00
TrèsAbhi ee5461a297 feat: reset button 2026-01-02 11:28:11 -06:00
TrèsAbhi 5ed5f45240 feat: 90rem 2025-12-31 14:42:13 -06:00
TrèsAbhi a8cdc96382 fix: some filtering 2025-12-31 14:41:13 -06:00
TrèsAbhi 532d677491 feat: provision filters 2025-12-31 14:37:14 -06:00
TrèsAbhi 610ea60ca2 feat: provisions and powers 2025-12-31 14:31:48 -06:00
TrèsAbhi 718576d5a9 feat: provisions 2025-12-31 14:27:48 -06:00
TrèsAbhi f885fba4bd fix: keys 2025-12-31 14:20:44 -06:00
TrèsAbhi 408a14003c fix: allow interactbility oustisde of dropdoiwn 2025-12-31 14:19:10 -06:00
TrèsAbhi 9416e25ee9 feat: start of logs 2025-12-31 14:18:58 -06:00
TrèsAbhi 8a3bbb3647 feat: clear button 2025-12-31 14:08:37 -06:00
TrèsAbhi e16cc63cfe feat: bigger icons 2025-12-31 14:06:08 -06:00
TrèsAbhi b2856eab58 feat: localize 2025-12-31 14:02:28 -06:00
TrèsAbhi 55ffe22fd6 feat: gamemode abilities 2025-12-31 13:56:31 -06:00
TrèsAbhi 98e0f28cd9 feat: consumables 2025-12-31 13:51:54 -06:00
TrèsAbhi 547381286e feat: testing filters 2025-12-31 13:42:19 -06:00
TrèsAbhi bdaf6e662c fix: surface 2025-12-31 13:40:34 -06:00
TrèsAbhi 87438abaa3 feat: simplify 2025-12-31 13:38:18 -06:00
TrèsAbhi f837aaf40a fix: use dropdown 2025-12-30 20:56:42 -06:00
TrèsAbhi 86e080aae9 feat: shells 2025-12-30 20:48:51 -06:00
TrèsAbhi 57efde83df Merge pull request #193 from Hitjack007/filter-by-provision 2025-12-31 02:39:06 +00:00
TrèsAbhi 6b29584424 feat: minor adjusments 2025-12-30 20:38:32 -06:00
TrèsAbhi 71e40a0113 feat: tank types 2025-12-30 20:30:18 -06:00
TrèsAbhi b5e7170697 feat: gun types 2025-12-30 20:23:06 -06:00
TrèsAbhi 4122856024 fix: reduce gap 2025-12-30 20:13:37 -06:00
TrèsAbhi 5b4c85138e feat: classes 2025-12-30 20:12:25 -06:00
TrèsAbhi 727ced967b feat: extract components 2025-12-30 20:05:00 -06:00
TrèsAbhi 4462ebe82c feat: tiers filter 2025-12-30 20:00:18 -06:00
TrèsAbhi 06ce263668 feat: compact nations selector 2025-12-30 19:53:06 -06:00
TrèsAbhi 7e086cc639 Merge pull request #192 from Hitjack007/main 2025-12-31 01:04:11 +00:00
TrèsAbhi 540e56a12d feat: format all 2025-12-30 19:03:00 -06:00
TrèsAbhi faf802cf3d revert: Modules.tsx 2025-12-30 19:02:05 -06:00
TrèsAbhi b6d6fa7212 Remove unused React import from FilterControl.tsx 2025-12-30 09:52:11 -06:00
TrèsAbhi dfa8be63b4 Pet peeve 2025-12-30 09:51:10 -06:00
TrèsAbhi 9eb6acc624 Fix formatting of consumables array in tankFilters 2025-12-30 09:49:06 -06:00
Mark Greene b6204b1c2c Added ability to filter tanks by available provisions 2025-12-30 20:45:44 +13:00
TrèsAbhi 39f1389d77 Remove unused provision logging comments
Removed commented-out logging code for provisions.
2025-12-29 21:27:41 -06:00
Mark Greene 53b0f04512 Revert changes 2025-12-30 15:53:25 +13:00
Mark Greene d2fa93ee71 Revert changes 2025-12-30 15:51:57 +13:00
Mark Greene 7871eae7a3 revert changes 2025-12-30 15:50:43 +13:00
Mark Greene 0bd660f255 Revert changes 2025-12-30 15:48:44 +13:00
Mark Greene 488857b7d8 Merge branch 'blitzkit:main' into main 2025-12-30 15:45:38 +13:00
Mark Greene 5e4c5fc230 Fixed Provisions not affecting terrain resistances and added commented-out helper function to log provisions later if needed. 2025-12-30 15:43:16 +13:00
TrèsAbhi 7e6925772e fix: plural 2025-12-27 20:02:51 -06:00
TrèsAbhi b479c09cf8 feat: logs 2025-12-27 20:01:29 -06:00
TrèsAbhi eddc8168ba feat: helping reveal 2025-12-27 19:51:50 -06:00
TrèsAbhi 80dfc59017 feat: streaks in guesser 2025-12-27 19:39:10 -06:00
TrèsAbhi fdc0f34e08 feat: clear all provisions and consumables 2025-12-27 19:36:12 -06:00
TrèsAbhi c0fdf10eba fix: tiny compare table buttons 2025-12-27 19:33:17 -06:00
TrèsAbhi 2aba4da1af fix: selector 2025-12-27 19:26:16 -06:00
TrèsAbhi 581d889e9b feat: module selection 2025-12-27 19:21:22 -06:00
TrèsAbhi 6a280982d0 fix: remove ue code 2025-12-27 18:50:14 -06:00
TrèsAbhi 45c7d74160 revert: icon scale 2025-12-27 18:45:09 -06:00
Mark Greene 9e225d2093 Fixed Provison Button Sizes 2025-12-28 12:12:56 +13:00
Mark Greene d1001df3cf Add randomise function to modules 2025-12-28 10:06:53 +13:00
Mark Greene d28c56fe1c Add Randomise function to module selection 2025-12-28 10:04:21 +13:00
TrèsAbhi fe68ebf450 Merge pull request #189 from Hitjack007/main
Fix Turret chnage not affecting DPM
2025-12-27 04:17:26 +00:00
TrèsAbhi 18cc885869 feat: hide bug in exclaim
Removed redundant comment about fixing a bug.
2025-12-26 21:13:06 -06:00
Mark Greene 9d4e1a66a1 Fix Turret chnage not affecting DPM 2025-12-27 15:35:16 +13:00
TrèsAbhi de8d3396b1 fix: use normalized dvpl path 2025-12-16 12:35:56 -06:00
TrèsAbhi baaae612fd Merge branch 'main' into dev 2025-12-15 22:29:04 -06:00
TrèsAbhi 4b5a511216 fix: use resolve 2025-12-15 22:26:37 -06:00
TrèsAbhi 57dacddcfd fix: use resolve 2025-12-15 22:26:14 -06:00
TrèsAbhi a56665f3a3 Merge branch 'main' into dev 2025-12-15 22:24:41 -06:00
TrèsAbhi c27e903c31 New translations en.json (Chinese Simplified) (#187) 2025-12-15 22:24:06 -06:00
TrèsAbhi 476f180a1a New translations en.json (French) (#186) 2025-12-14 20:02:16 -06:00
TrèsAbhi b05e70faee feat: clear all provisions 2025-12-10 23:03:30 -06:00
TrèsAbhi 5c30169eca fix: canvas smooth resize 2025-12-10 22:57:21 -06:00
TrèsAbhi 1226ce89a7 fix: shallow testing 2025-12-10 17:46:58 -06:00
TrèsAbhi dcc8207fb6 fix: deconstructor 2025-12-10 17:31:03 -06:00
TrèsAbhi c50f40a887 fix: default 2025-12-10 17:15:35 -06:00
TrèsAbhi 85f7d420a0 feat: logs 2025-12-10 17:14:18 -06:00
TrèsAbhi 1aec1b2885 feat: add zip abilities 2025-12-10 17:13:12 -06:00
TrèsAbhi 51226c8503 Merge branch 'main' into dev 2025-12-10 16:54:49 -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 eed9d23646 fix: use root node modules 2025-12-01 16:58:18 -06:00
TrèsAbhi 8c1bf450a8 fix: use map's ahs 2025-11-29 15:22:13 -06:00
TrèsAbhi 9ffc040723 feat: implement all methods 2025-11-29 15:16:09 -06:00
TrèsAbhi f33a73e1bb feat: zip reader 2025-11-29 14:34:06 -06:00
TrèsAbhi 2101dba7c6 New Crowdin updates (#184)
* New translations en.json (Russian)

* New translations en.json (Russian)

* New translations en.json (Russian)
2025-11-28 18:12:19 -06:00
TrèsAbhi 1b398a5f66 fix: initialize Tankopedia with model definitions for improved data handling 2025-11-28 12:55:55 -06:00
TrèsAbhi d8f9a2633d New Crowdin updates (#183)
* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Japanese)

* New translations en.json (Polish)

* New translations en.json (Portuguese)

* New translations en.json (Russian)

* New translations en.json (Ukrainian)

* New translations en.json (Chinese Simplified)
2025-11-27 21:53:42 -06:00
TrèsAbhi 2e79ccf7eb feat: update ts-proto executable handling to support multiple locations 2025-11-27 17:59:34 -06:00
TrèsAbhi be778acf39 feat: logs 2025-11-27 17:56:28 -06:00
TrèsAbhi 8d10d7cffa feat: integrate CompareCell component into TankRow and Tanks for improved performance metrics display 2025-11-27 17:48:58 -06:00
TrèsAbhi 5b9041a972 feat: performance tank table occupy more real estate 2025-11-27 17:34:29 -06:00
TrèsAbhi 1e60b1f61f fix: remove unused PerformanceInfo component from performance page 2025-11-27 17:33:44 -06:00
TrèsAbhi 13a636c023 fix: update playerCountPeriod to use "total" value 2025-11-27 17:33:05 -06:00
TrèsAbhi 8bc0693f3b fix: compare table occupy minimum width 2025-11-27 17:31:28 -06:00
TrèsAbhi 9b842c501c feat: update guessing game text for clarity 2025-11-27 17:26:10 -06:00
TrèsAbhi 8aadda4fb8 feat: add ToolOpenGraph component to guess page 2025-11-27 17:25:54 -06:00
TrèsAbhi 58c70f98e1 refactor: remove 'naked' prop from Controls and TankSandbox components 2025-11-27 17:24:12 -06:00
TrèsAbhi 54b73d11ce Merge branch 'main' into dev 2025-11-27 17:16:12 -06:00
TrèsAbhi d1ac5644a4 feat: logs 2025-11-27 14:14:18 -06:00
TrèsAbhi ae35c1516c Merge branch 'main' into fix-lighting 2025-11-27 14:12:38 -06:00
TrèsAbhi fd364d434f feat: hemispehre 2025-11-27 14:10:57 -06:00
TrèsAbhi fd37f72f8c feat: some simplification 2025-11-27 13:54:36 -06:00
TrèsAbhi 1427f61c52 feat: complete transition 2025-11-27 13:42:37 -06:00
TrèsAbhi cd4fa366a0 feat: requestedDisplay 2025-11-27 13:20:06 -06:00
TrèsAbhi 344e7caa81 feat: overhead lighting 2025-11-27 13:05:08 -06:00
TrèsAbhi fe7b2aea02 Add files via upload 2025-11-27 15:57:34 +00:00
TrèsAbhi fced1e96ef feat: remove transition skeleton 2025-11-26 21:10:54 -06:00
TrèsAbhi 778efb2372 feat: transiton and reveal 2025-11-26 21:10:03 -06:00
TrèsAbhi b67fd5b58c feat: new lighting 2025-11-26 20:48:25 -06:00
TrèsAbhi 2559782a28 fix: ground phasing through 2025-11-26 20:25:45 -06:00
TrèsAbhi fb829d4b81 Merge branch 'main' into dev 2025-11-26 19:22:48 -06:00
TrèsAbhi a692d1ee0b Merge branch 'main' into dev 2025-11-26 13:58:44 -06:00
TrèsAbhi 6c8fbf7245 fix: use package node modules 2025-11-13 12:53:19 -06:00
TrèsAbhi 2ea22512d4 feat: new protos 2025-11-13 12:47:51 -06:00
TrèsAbhi 697d1fa1b4 Merge branch 'main' into dev 2025-11-13 12:40:59 -06:00
TrèsAbhi 2c03b530d2 feat: group array 2025-11-06 09:37:14 -06:00
TrèsAbhi 182471c4d6 feat: buildCatalogItemAccessor 2025-11-02 18:10:11 -06:00
TrèsAbhi aecc2adb07 feat: generalize colored delta cells 2025-10-26 22:01:42 -05:00
TrèsAbhi f8ee2b64a6 feat: simplify ownership and test filters 2025-10-26 21:49:48 -05:00
TrèsAbhi 7c4e28bd09 fix: show remove played even when logged out 2025-10-26 21:43:23 -05:00
109 changed files with 3526 additions and 1903 deletions

No files matched your search

+6 -5
View File
@@ -16,10 +16,11 @@ on:
- blitzkit/assets-dev - blitzkit/assets-dev
default: blitzkit/assets default: blitzkit/assets
archive_url: asset_source:
type: string type: string
required: false required: false
description: Archive URL to download instead of Steam client description: "Archive URL or Steam to download (example: steam:APP_ID/DEPOT_ID or zip:URL_TO_ZIP)"
default: "steam:444200/444202"
schedule: schedule:
- cron: "0 2 * * *" - cron: "0 2 * * *"
@@ -64,18 +65,18 @@ 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
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Build assets - name: Build assets
run: bun run build:assets --all-targets --manual run: bun run build:assets --all-targets --source=${{ github.event.inputs.asset_source || 'steam:444200/444202' }}
+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 }}
+4 -4
View File
@@ -10,15 +10,15 @@ concurrency:
jobs: jobs:
build: build:
name: Build name: Build bot
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 }}
+4 -4
View File
@@ -35,14 +35,14 @@ env:
jobs: jobs:
build: build:
name: Build name: Build website
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
+4
View File
@@ -65,6 +65,7 @@
"deburr", "deburr",
"decalmask", "decalmask",
"decompressor", "decompressor",
"décor",
"dedup", "dedup",
"defence", "defence",
"degressive", "degressive",
@@ -74,6 +75,7 @@
"DIDS", "DIDS",
"donotremove", "donotremove",
"drei", "drei",
"Droodles",
"dvpd", "dvpd",
"dvpl", "dvpl",
"DVPLCRC", "DVPLCRC",
@@ -96,9 +98,11 @@
"gameplay", "gameplay",
"glsl", "glsl",
"GLTF", "GLTF",
"GSOR",
"gtag", "gtag",
"haha", "haha",
"Herdbreaker", "Herdbreaker",
"Hetz",
"highp", "highp",
"iife", "iife",
"imgur", "imgur",
+5
View File
@@ -122,6 +122,7 @@
"steam-user": "^5.2.3", "steam-user": "^5.2.3",
"three": "^0.180.0", "three": "^0.180.0",
"ts-proto": "^2.7.7", "ts-proto": "^2.7.7",
"unzipit": "^1.4.3",
"yaml": "^2.8.1", "yaml": "^2.8.1",
}, },
}, },
@@ -2413,6 +2414,8 @@
"unstorage": ["[email protected]", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^4.0.3", "destr": "^2.0.5", "h3": "^1.15.4", "lru-cache": "^10.4.3", "node-fetch-native": "^1.6.7", "ofetch": "^1.4.1", "ufo": "^1.6.1" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6.0.3 || ^7.0.0", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", "@vercel/kv": "^1.0.1", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/functions", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-KKGwRTT0iVBCErKemkJCLs7JdxNVfqTPc/85ae1XES0+bsHbc/sFBfVi5kJp156cc51BHinIH2l3k0EZ24vOBQ=="], "unstorage": ["[email protected]", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^4.0.3", "destr": "^2.0.5", "h3": "^1.15.4", "lru-cache": "^10.4.3", "node-fetch-native": "^1.6.7", "ofetch": "^1.4.1", "ufo": "^1.6.1" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6.0.3 || ^7.0.0", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", "@vercel/kv": "^1.0.1", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/functions", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-KKGwRTT0iVBCErKemkJCLs7JdxNVfqTPc/85ae1XES0+bsHbc/sFBfVi5kJp156cc51BHinIH2l3k0EZ24vOBQ=="],
"unzipit": ["[email protected]", "", { "dependencies": { "uzip-module": "^1.0.2" } }, "sha512-gsq2PdJIWWGhx5kcdWStvNWit9FVdTewm4SEG7gFskWs+XCVaULt9+BwuoBtJiRE8eo3L1IPAOrbByNLtLtIlg=="],
"upath": ["[email protected]", "", {}, "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="], "upath": ["[email protected]", "", {}, "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="],
"update-browserslist-db": ["[email protected]", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="], "update-browserslist-db": ["[email protected]", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="],
@@ -2431,6 +2434,8 @@
"utility-types": ["[email protected]", "", {}, "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw=="], "utility-types": ["[email protected]", "", {}, "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw=="],
"uzip-module": ["[email protected]", "", {}, "sha512-AMqwWZaknLM77G+VPYNZLEruMGWGzyigPK3/Whg99B3S6vGHuqsyl5ZrOv1UUF3paGK1U6PM0cnayioaryg/fA=="],
"varuna": ["varuna@workspace:packages/varuna"], "varuna": ["varuna@workspace:packages/varuna"],
"vfile": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], "vfile": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],
+44 -16
View File
@@ -1,19 +1,47 @@
# BlitzKit Credits # BlitzKit Credits
BlitzKit is a one man band **TrèsAbhi** but I am far from solo. BlitzKit is a one man band **TrèsAbhi** but I am far from solo. Helpers, in the order of contribution over time:
| Role | People | ### S0AP
| ------------------------------ | ------------------------------ |
| Bot verification | S0AP | BlitzKit Discord bot verification, testing, advertisement, and the initial encouragement to create BlitzKit.
| General testing | Prince_NA |
| Bot advertisement platform | S0AP | ### Prince_NA
| Bot rendering pipeline | Vovko |
| Game asset decompression | Maddox | BlitzKit Discord bot and website testing and general advise.
| Game 3D model parsing | Pyogenics |
| Game file layout | Aeson | ### Vovko
| 3-caliber rule edge cases | Minitelrose, ChickenMan7777 |
| Embed UX | \_34, HisRoyalFatness, Synx | BlitzKit Discord bot and website rendering pipeline.
| Tankopedia pre-release testing | [OPTML], Aeson, \_34, xkdkw |
| Website advertisement platform | Aeson | ### Maddox
| Compare pre-release testing | [OPTML] |
| Redacted | GonnaHetzMe | Game file decompression.
### Pyogenics
Game 3D model parsing.
### Aeson
Game file layout, general advise, advertisement, and Tankopedia pre-release testing.
### Minitelrose, ChickenMan7777
3-caliber rule edge cases.
### HisRoyalFatness, Synx
Embed UX.
### [OPTML] clan, \_34, xkdkw, Droodles Blitz
Tankopedia pre-release testing.
### GonnaHetzMe
Redacted by request.
### Mark Greene
GitHub contributor on bug fixes and feature additions.
+14
View File
@@ -0,0 +1,14 @@
# BlitzKit 1.29.10
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
## Features
- Combined game mode passive and active abilities into a single dropdown
- [Mark Greene] Added tier filters to the Guess game
- Changing tiers will break your streak
## Fixes
- [Mark Greene] module damage is now properly shown when sorting with it in the tank search
- Duplicate abilities in the tank filters are now removed
+5
View File
@@ -0,0 +1,5 @@
# BlitzKit 1.29.11
## Fixes
- The Guesser game's toolbar now scales properly with screen size
+11
View File
@@ -0,0 +1,11 @@
# BlitzKit 1.29.5
## Features
- Added new lighting to be a bit softer on tanks
- Added a button with the sun icon to toggle high graphics
- Added a new reveal and transition animation between tabs
## Fixes
- Track wheels on some tanks no longer look translucent
+18
View File
@@ -0,0 +1,18 @@
# BlitzKit 1.29.6
## Features
- Simplified the ownership and test tank filters in the tank search
- Renamed "Guess the tank" to simply "Guess"
- The player count value in the Performance tool is now set to Total by default
- Added Compare-like red/green highlighting to the Performance tool
## Changes
- Removed the last updated info bar in Performance for some more screen real estate
## Fixes
- The remove played tanks in the Playlist tool now shows even when logged out
- The Guess game now has a page title
- The compare table now occupies the minimum width possible instead of expanding all columns excessively
+5
View File
@@ -0,0 +1,5 @@
# BlitzKit 1.29.7
## Features
- Re-introduced the ability to deploy BlitzKit OpenTests
+19
View File
@@ -0,0 +1,19 @@
# BlitzKit 1.29.8
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
## Features
- Added an option to clear provisions and consumables from all tanks in Compare
- Added the ability to choose stock turrets and guns in Mixer if a tank has any
- Added streaks to Guesser
- Introduced an option to partially reveal tanks in Guesser
- This removes the darkness effect but keeps the name hidden
- This will reset your streak to 0
- Regardless of getting the right guess on the tank's name, your response will be counted as incorrect if partially revealed
## Fixes
- The Tankopedia now smoothly resizes when enlarging on interaction
- [Mark Greene] Stock turrets now correctly mount the corresponding stock gun
- The consumable and provision buttons in Compare are no longer tiny
+14
View File
@@ -0,0 +1,14 @@
# BlitzKit 1.29.9
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
## Features
- Reworked tank search filters to be far more compact to make way for new filters
- [Mark Greene] Added the ability to filter tanks by consumables
- Added the ability to filter tanks by provisions and game-mode abilities and powers
## Fixes
- Consumable and provision icons in Compare are now properly sized
- [Mark Greene] Provisions now properly affect terrain resistances
+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.
+2 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "blitzkit", "name": "blitzkit",
"version": "1.29.4", "version": "1.29.11",
"license": "BlitzKit License", "license": "BlitzKit License",
"private": true, "private": true,
"scripts": { "scripts": {
@@ -10,6 +10,7 @@
"build:website": "cd packages/website && bun run build", "build:website": "cd packages/website && 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:ratingleaderboard": "cd packages/scripts && bun run build:ratingleaderboard", "build:ratingleaderboard": "cd packages/scripts && bun run build:ratingleaderboard",
"build:app": "cd packages/app && bun run build", "build:app": "cd packages/app && bun run build",
"dev:bot": "bun run build:bot --dev && bun start:bot", "dev:bot": "bun run build:bot --dev && bun start:bot",
@@ -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;
} }
-25
View File
@@ -1,25 +0,0 @@
export enum BlitzVFSSourceType {
Steam,
}
type BlitzVFSSource = {
type: BlitzVFSSourceType;
username: string;
password: string;
app: number;
os: "windows";
};
export class BlitzVFS {
constructor(private source: BlitzVFSSource) {}
async init() {
return this;
}
async file(path: string) {
return new Uint8Array();
}
}
@@ -4,63 +4,54 @@ import {
GunDefinition, GunDefinition,
Provision, Provision,
TankDefinition, TankDefinition,
} from '../protos'; } from "../protos";
export function checkConsumableProvisionInclusivity( export function checkConsumableProvisionInclusivity(
consumableProvision: Consumable | Provision, consumableProvision: Consumable | Provision,
tank: TankDefinition, tank: TankDefinition,
gun: GunDefinition, gun: GunDefinition
) { ) {
const included = const included = consumableProvision.include?.every((rule) => {
!consumableProvision.game_mode_exclusive && switch (rule.filter_type!.$case) {
consumableProvision.include?.every((rule) => { case "tiers":
switch (rule.filter_type!.$case) { return (
case 'tiers': rule.filter_type!.value.min <= tank.tier &&
return ( tank.tier <= rule.filter_type!.value.max
rule.filter_type!.value.min <= tank.tier && );
tank.tier <= rule.filter_type!.value.max
);
case 'ids': case "ids":
return rule.filter_type!.value.ids.includes(tank.id); return rule.filter_type!.value.ids.includes(tank.id);
case 'nations': case "nations":
return rule.filter_type!.value.nations.includes(tank.nation); return rule.filter_type!.value.nations.includes(tank.nation);
case 'categories': case "categories":
throw new SyntaxError('Category filtering found in include rule'); throw new SyntaxError("Category filtering found in include rule");
} }
}); });
const excluded = const excluded = consumableProvision.exclude?.some((rule) => {
consumableProvision.game_mode_exclusive || switch (rule.filter_type!.$case) {
consumableProvision.exclude?.some((rule) => { case "tiers":
switch (rule.filter_type!.$case) { return (
case 'tiers': rule.filter_type!.value.min <= tank.tier &&
return ( tank.tier <= rule.filter_type!.value.max
rule.filter_type!.value.min <= tank.tier && );
tank.tier <= rule.filter_type!.value.max
);
case 'ids': case "ids":
return rule.filter_type!.value.ids.includes(tank.id); return rule.filter_type!.value.ids.includes(tank.id);
case 'nations': case "nations":
return rule.filter_type!.value.nations.includes(tank.nation); return rule.filter_type!.value.nations.includes(tank.nation);
case 'categories': case "categories":
return rule.filter_type!.value.categories.some((category) => { return rule.filter_type!.value.categories.some((category) => {
switch (category) { switch (category) {
case ConsumableTankCategoryFilterCategory.CLIP: case ConsumableTankCategoryFilterCategory.CLIP:
return gun.gun_type!.$case !== 'regular'; return gun.gun_type!.$case !== "regular";
} }
}); });
} }
}); });
return ( return consumableProvision.include?.length > 0 && included && !excluded;
!consumableProvision.game_mode_exclusive &&
consumableProvision.include?.length > 0 &&
included &&
!excluded
);
} }
@@ -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
+26 -8
View File
@@ -15,7 +15,8 @@
"hp": "{value}hp", "hp": "{value}hp",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}°/s",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
@@ -26,8 +27,8 @@
"shells": { "shells": {
"ap": "AP", "ap": "AP",
"apcr": "APCR", "ap_cr": "APCR",
"heat": "HEAT", "hc": "HEAT",
"he": "HE" "he": "HE"
}, },
@@ -759,11 +760,17 @@
"count_singular": "1 tank", "count_singular": "1 tank",
"count_plural": "{count} tanks", "count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}", "sorting_by": "Sorting by {name}",
"clear": "Clear",
"tier": "Tier {tier}",
"passive": "{name} (Passive)",
"active": "{name} (Active)",
"no_tanks_found": { "no_tanks_found": {
"body": "No tanks found.", "body": "No tanks found.",
"search_again": "Try searching again.", "search_again": "Try searching again.",
"clear_filters": "Try clearing filters." "clear_filters": "Try clearing filters."
}, },
"sort": { "sort": {
"meta.none": "none", "meta.none": "none",
"survivability.health": "health", "survivability.health": "health",
@@ -906,8 +913,8 @@
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -917,7 +924,16 @@
"next": "Next", "next": "Next",
"no_results": "No results" "no_results": "No results"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} correct, {streak} streak",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancel",
"reveal": "Reveal"
},
"clear": "Clear",
"select_all": "Select all",
"tier": "Tier {tier}"
}, },
"tankopedia": { "tankopedia": {
@@ -1267,10 +1283,12 @@
"upgrade": "Upgrade" "upgrade": "Upgrade"
}, },
"provisions": { "provisions": {
"clear": "Clear" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "Clear" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
} }
} }
}, },
+24 -8
View File
@@ -13,7 +13,8 @@
"hp": "{value}hp", "hp": "{value}hp",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}°/s",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "Auto cargador", "auto_loader": "Auto cargador",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "AP", "ap": "AP",
"apcr": "APCR", "ap_cr": "APCR",
"heat": "AEAC", "hc": "HEAT",
"he": "AE" "he": "AE"
}, },
"player_count_period": { "player_count_period": {
@@ -668,6 +669,10 @@
"count_singular": "1 tanque", "count_singular": "1 tanque",
"count_plural": "{count} tanks", "count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}", "sorting_by": "Sorting by {name}",
"clear": "Limpiar",
"tier": "Tier {tier}",
"passive": "{name} (Passive)",
"active": "{name} (Active)",
"no_tanks_found": { "no_tanks_found": {
"body": "No se encontraron tanques.", "body": "No se encontraron tanques.",
"search_again": "Intenta buscar de nuevo.", "search_again": "Intenta buscar de nuevo.",
@@ -803,8 +808,8 @@
"randomize": "Randomize" "randomize": "Randomize"
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "Next", "next": "Next",
"no_results": "Sin resultados" "no_results": "Sin resultados"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} correct, {streak} streak",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancelar",
"reveal": "Reveal"
},
"clear": "Limpiar",
"select_all": "Seleccionar todo",
"tier": "Tier {tier}"
}, },
"tankopedia": { "tankopedia": {
"search": "Search a stat...", "search": "Search a stat...",
@@ -1135,10 +1149,12 @@
"upgrade": "Mejorar" "upgrade": "Mejorar"
}, },
"provisions": { "provisions": {
"clear": "Limpiar" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "Limpiar" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
} }
} }
}, },
+111 -95
View File
@@ -1,7 +1,7 @@
{ {
"test": { "test": {
"default": "teste", "default": "teste",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.", "long": "Ceci est une longue chaîne de test. Vous ne DEVEZ JAMAIS le voir dans l'interface utilisateur. Mon fruit préféré est {fruit}, car il a la couleur {color}. Je l'aime tellement que je vais dire son nom 3 fois ! {fruit}! {fruit}! {fruit} ! Encore une fois, c'est {color}, pas {not_color}.",
"fox": "Le renard brun et rapide saute par-dessus le chien paresseux." "fox": "Le renard brun et rapide saute par-dessus le chien paresseux."
}, },
"common": { "common": {
@@ -10,10 +10,11 @@
"m": "{value}m", "m": "{value}m",
"mm": "{value}mm", "mm": "{value}mm",
"deg": "{value}°", "deg": "{value}°",
"hp": "{value}hp", "hp": "{value}pv",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}°/s",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "Chargement auto", "auto_loader": "Chargement auto",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "AP", "ap": "AP",
"apcr": "APCR", "ap_cr": "APCR",
"heat": "HEAT", "hc": "HEAT",
"he": "HE" "he": "HE"
}, },
"player_count_period": { "player_count_period": {
@@ -186,11 +187,11 @@
"bot": { "bot": {
"common": { "common": {
"errors": { "errors": {
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.", "clan_not_found": "# Impossible de trouver le clan\nImpossible de trouver «{search} ». Essayez de sélectionner un clan dans le résultat de la recherche.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.", "player_not_found": "# Impossible de trouver l'utilisateur\nJe n'ai pas pu trouver l'utilisateur \"{search}\". Essayez de choisir un utilisateur dans le résultat de la recherche, en tapant un nom d'utilisateur valide, ou en utilisant la commande `/link`.",
"player_not_linked": "# Utilisez `/link` pour commencer\nJe ne sais pas qui vous êtes, mais vous pouvez me le dire aujourd'hui !", "player_not_linked": "# Utilisez `/link` pour commencer\nJe ne sais pas qui vous êtes, mais vous pouvez me le dire aujourd'hui !",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".", "tank_name_not_found": "# Char introuvable\nImpossible de trouver le char sous le nom \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.", "tank_id_not_found": "# Char introuvable\nImpossible de trouver le char avec l'ID \"{search}\". Essayez de taper le nom du char au lieu d'un nombre.",
"no_tank_stats": "# Aucune statistique de tank disponible\nCe joueur n'a pas de statistiques disponibles. Ce n'est peut-être pas le joueur que vous cherchez.", "no_tank_stats": "# Aucune statistique de tank disponible\nCe joueur n'a pas de statistiques disponibles. Ce n'est peut-être pas le joueur que vous cherchez.",
"get_help": "Aidez le serveur Discord", "get_help": "Aidez le serveur Discord",
"uncaught_error": "# Blitzkit a rencontré une erreur !\nNous sommes désolés de cela. N'hésitez pas à [rejoindre le serveur officiel Discord](https://discord.gg/nDt7AjGJQH) pour obtenir de l'aide.", "uncaught_error": "# Blitzkit a rencontré une erreur !\nNous sommes désolés de cela. N'hésitez pas à [rejoindre le serveur officiel Discord](https://discord.gg/nDt7AjGJQH) pour obtenir de l'aide.",
@@ -284,19 +285,19 @@
"name": "rang", "name": "rang",
"description": "Rang", "description": "Rang",
"choices": { "choices": {
"tier": "Tier {tier_1} - {tier_2}" "tier": "Rang {tier_}1 - {tier_}2"
} }
} }
}, },
"periods": { "periods": {
"career": "Carrière", "career": "Carrière",
"today": "Aujourd'hui", "today": "Aujourd'hui",
"days": "{days} days", "days": "{days} jours",
"custom": "{day_1} - {day_2} days" "custom": "{day_1} - {day_2} jours"
}, },
"filters": { "filters": {
"none": "Aucun filtre", "none": "Aucun filtre",
"tier": "Tier {tier}" "tier": "Rang {tier}"
}, },
"no_data": { "no_data": {
"battles_in_period": "", "battles_in_period": "",
@@ -339,19 +340,19 @@
"body": { "body": {
"subtitle": "Recherche", "subtitle": "Recherche",
"total": "Total", "total": "Total",
"research": "Research: {cost}", "research": "Recherche : {cost}",
"upgrades": "Upgrades: {cost}", "upgrades": "Améliorations : {cost}",
"purchase": "Purchase: {cost}", "purchase": "Achat : {cost}",
"equipment": "Equipment: {cost}", "equipment": "Équipement : {cost}",
"estimation": "# Ceci est une estimation !\n\nCette liste peut inclure des chars déjà recherchés en raison de l'information inexacte fournie par Wargaming. Essayez de fournir un `char de départ` depuis la ligne lorsque vous utilisez la commande si vous le pouvez." "estimation": "# Ceci est une estimation !\n\nCette liste peut inclure des chars déjà recherchés en raison de l'information inexacte fournie par Wargaming. Essayez de fournir un `char de départ` depuis la ligne lorsque vous utilisez la commande si vous le pouvez."
}, },
"errors": { "errors": {
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.", "non_tech_tree": "# {tank} n'est pas dans l'arbre technologique\n\nVous ne pouvez pas rechercher un char premium/de collection.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.", "tier_1": "# {tank} est un char de rang I\n\nLe char de rang 1 sont déverrouillé gratuitement pour tous les joueurs.",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.", "already_researched": "# {tank} est déjà recherché\n\nEssayez de fournir un `char de départ` en utilisant la commande pour voir la progression d'une lignée.",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.", "start_end_equal": "# {tank} a été fourni deux fois\n\nAssurez-vous que `starting-tank` et `target-tank` sont différents.",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.", "tanks_not_on_line": "{tank_}1 et {tank_}2 ne sont pas sur la même ligne \n\nAssurez-vous que `starting-tank` et `target-tank` sont sur la même ligne d'arbre technologique.",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank." "unordered": "# {tank_1} niveau supérieur à {tank_2}\n\nAssurez-vous de fournir {tank_2} comme le `starting-tank` à la place car c'est le char de niveau inférieur."
} }
}, },
"about": { "about": {
@@ -394,7 +395,7 @@
"wn8": "WN8", "wn8": "WN8",
"winrate": "Taux de victoires", "winrate": "Taux de victoires",
"damage": "Dégâts", "damage": "Dégâts",
"unknown_tank": "Unknown tank {id}" "unknown_tank": "Char {id} inconnu"
} }
}, },
"debug": { "debug": {
@@ -430,12 +431,12 @@
"options": { "options": {
"threshold": { "threshold": {
"name": "seuil", "name": "seuil",
"description": "The number of days inactive (default: {days} days)" "description": "Le nombre de jours inactifs (par défaut: {days} jours)"
} }
}, },
"body": { "body": {
"subtitle": "Inactive for {days}+ days", "subtitle": "Inactif depuis plus de {days} jours",
"listing": "{days} days" "listing": "{days} jours"
} }
}, },
"full_stats": { "full_stats": {
@@ -478,7 +479,7 @@
"body": { "body": {
"accounts_linked": "Comptes liés", "accounts_linked": "Comptes liés",
"no_role_permissions": { "no_role_permissions": {
"title": "{name} failed to verify", "title": "La vérification de {name} a échouée",
"description": "Je n'ai pas l'autorisation de gérer les rôles." "description": "Je n'ai pas l'autorisation de gérer les rôles."
} }
}, },
@@ -493,11 +494,11 @@
"options": { "options": {
"limit": { "limit": {
"name": "limite", "name": "limite",
"description": "The max number of clan results (default: {limit})" "description": "Nombre maximum de résultats du clan (par défaut: {limit})"
} }
}, },
"body": { "body": {
"title": "Clan search for {search} in region {region}", "title": "Recherche de clan {search} dans la région {region}",
"no_results": "Pas de clan trouvé" "no_results": "Pas de clan trouvé"
} }
}, },
@@ -507,11 +508,11 @@
"options": { "options": {
"limit": { "limit": {
"name": "limite", "name": "limite",
"description": "The max number of player results (default: {limit})" "description": "Le nombre maximum de résultats de joueur (par défaut: {limit})"
} }
}, },
"body": { "body": {
"title": "Player search for {search} in region {region}", "title": "Recherche de {search} dans la région {region}",
"no_results": "Pas de joueur de trouvé" "no_results": "Pas de joueur de trouvé"
} }
}, },
@@ -531,13 +532,13 @@
"options": { "options": {
"limit": { "limit": {
"name": "limite", "name": "limite",
"description": "How many neighbors to display (default: {count})" "description": "Combien de voisins afficher (par défaut : {count})"
}, },
"season": { "season": {
"name": "saison", "name": "saison",
"description": "Numéro de saison (défaut : courant)", "description": "Numéro de saison (défaut : courant)",
"choices": { "choices": {
"current": "{season} (current)" "current": "{season} (actuel)"
} }
}, },
"league": { "league": {
@@ -546,12 +547,12 @@
} }
}, },
"body": { "body": {
"top_players": "Top {count} players", "top_players": "Top {count} joueurs",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.", "no_participation": "# {player} n'a pas joué de cotées dans la saison {season}\n\nCe joueur n'a pas participé à cette saison ou n'a pas dépassé l'étalonnage.",
"no_ongoing_season": "Pas de saison en cours\n\nIl n'y a pas de saison de notation en cours actuellement.", "no_ongoing_season": "Pas de saison en cours\n\nIl n'y a pas de saison de notation en cours actuellement.",
"deleted_player": "Deleted {id}", "deleted_player": "{id} supprimé",
"neighbors": "évaluer les voisins", "neighbors": "évaluer les voisins",
"more": "+ {count} more" "more": "+ {count} plus"
} }
}, },
"today": { "today": {
@@ -566,7 +567,7 @@
"name": "chars possédés", "name": "chars possédés",
"description": "Affiche tous les chars d'un niveau", "description": "Affiche tous les chars d'un niveau",
"body": { "body": {
"title": "# {name}'s owned tier {tier} tanks\n\n" "title": "# Les chars du palier {tier} possédés par {name}"
} }
}, },
"permissions": { "permissions": {
@@ -602,92 +603,96 @@
"name": "info-joueur", "name": "info-joueur",
"description": "Informations de base sur un joueur", "description": "Informations de base sur un joueur",
"body": { "body": {
"title": "{name}'s information", "title": "Informations de {name}",
"nickname": "Nickname", "nickname": "Pseudo",
"battles": "Batailles", "battles": "Batailles",
"winrate": "Taux de victoires", "winrate": "Taux de victoires",
"account_id": "Account ID", "account_id": "Account ID",
"created": "Created", "created": "Créé",
"last_battle": "Last battle" "last_battle": "Dernière bataille"
} }
}, },
"rating": { "rating": {
"name": "rating", "name": "côtée",
"description": "Rating player's statistics", "description": "Statistiques des batailles cotées du joueur",
"subcommands": { "subcommands": {
"today": { "today": {
"name": "aujourd'hui", "name": "aujourd'hui",
"description": "Today's rating statistics" "description": "Statistiques des batailles cotées d'aujourd'hui"
}, },
"season": { "season": {
"name": "saison", "name": "saison",
"description": "This season's rating statistics" "description": "Statistiques des batailles cotées de cette saison"
} }
}, },
"body": { "body": {
"subtitle": { "subtitle": {
"today": "Today's rating statistics", "today": "Statistiques de batailles cotées d'aujourd'hui",
"season": "This season's rating statistics" "season": "Statistiques de batailles cotées cette saison"
} }
}, },
"errors": { "errors": {
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.", "no_participation": "# {name} n’a pas joué en cotée\n\nCe joueur n’a pas participé au mode cotée cette saison.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours." "unrecorded_stats": "# Statistiques actuellement indisponibles\n\nWargaming rencontre peut-être une interruption de service.\nSi une saison est en cours, les statistiques devraient être disponibles sous 24 heures."
} }
} }
} }
}, },
"website": { "website": {
"redirect": { "redirect": {
"title": "301: moved permanently", "title": "301 : déplacé définitivement",
"body": "This page has moved. Redirecting..." "body": "Cette page a été déplacée. Redirection en cours…"
}, },
"settings": { "settings": {
"title": "Settings", "title": "Paramètres",
"description": "Change BlitzKit settings", "description": "Modifier les paramètres de BlitzKit",
"dev_mode": "Development mode", "dev_mode": "Mode développement",
"language": "Language" "language": "Langue"
}, },
"common": { "common": {
"player_search": { "player_search": {
"hint": "Search players...", "hint": "Recherche de joueurs...",
"no_results": "No results", "no_results": "Aucun résultat",
"searching": "Searching..." "searching": "Recherche..."
}, },
"copy_button": { "copy_button": {
"copied": "Copied!" "copied": "Copié !"
}, },
"tank_search": { "tank_search": {
"select_dialog_title": "Search for tanks", "select_dialog_title": "Recherche de chars",
"swap_dialog_title": "Swap tank", "swap_dialog_title": "Échanger le char",
"clear_filters": "Clear filters", "clear_filters": "Supprimer les filtres",
"login": "Login to use this", "login": "Connectez-vous pour utiliser ceci",
"search_bar_hint": "Search tanks...", "search_bar_hint": "Recherche des tanks...",
"recent": "Recently viewed", "recent": "Vu récemment",
"select_all": "Select all", "select_all": "Sélectionner tout",
"count_singular": "1 tank", "count_singular": "1 char",
"count_plural": "{count} tanks", "count_plural": "{count} chars",
"sorting_by": "Sorting by {name}", "sorting_by": "Trier par {name}",
"clear": "Effacer",
"tier": "Rang {tier}",
"passive": "{name} (Passif)",
"active": "{name} (actif)",
"no_tanks_found": { "no_tanks_found": {
"body": "No tanks found.", "body": "Aucun tank trouvé.",
"search_again": "Try searching again.", "search_again": "Essayez de chercher à nouveau.",
"clear_filters": "Try clearing filters." "clear_filters": "Essayez de supprimer les filtres."
}, },
"sort": { "sort": {
"meta.none": "none", "meta.none": "aucun",
"survivability.health": "health", "survivability.health": "santé",
"survivability.viewRange": "view range", "survivability.viewRange": "portée de vue",
"survivability.camouflageStill": "camouflage still", "survivability.camouflageStill": "camouflage à l’arrêt",
"survivability.camouflageMoving": "camouflage moving", "survivability.camouflageMoving": "camouflage en movement",
"survivability.camouflageShooting": "camouflage shooting", "survivability.camouflageShooting": "camouflage en tirant",
"survivability.volume": "volume", "survivability.volume": "volume",
"survivability.length": "length", "survivability.length": "longueur",
"fire.dpm": "standard DPM", "fire.dpm": "DPM standard",
"fire.dpmPremium": "premium DPM", "fire.dpmPremium": "DPM premium",
"fire.reload": "reload", "fire.reload": "rechargement",
"fire.caliber": "caliber", "fire.caliber": "calibration",
"fire.standardPenetration": "standard penetration", "fire.standardPenetration": "pénétration standard",
"fire.premiumPenetration": "premium penetration", "fire.premiumPenetration": "pénétration premium",
"fire.tertiaryPenetration": "tertiary penetration", "fire.tertiaryPenetration": "tertiary penetration",
"fire.damage": "damage", "fire.damage": "damage",
"fire.moduleDamage": "module damage", "fire.moduleDamage": "module damage",
@@ -803,8 +808,8 @@
"randomize": "Randomize" "randomize": "Randomize"
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -812,9 +817,18 @@
"skip": "Skip", "skip": "Skip",
"guess": "Guess", "guess": "Guess",
"next": "Next", "next": "Next",
"no_results": "No results" "no_results": "Aucun résultat"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} guessed correctly",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancel",
"reveal": "Reveal"
},
"clear": "Clear",
"select_all": "Sélectionner tout",
"tier": "Rang {tier}"
}, },
"tankopedia": { "tankopedia": {
"search": "Search a stat...", "search": "Search a stat...",
@@ -1135,10 +1149,12 @@
"upgrade": "Upgrade" "upgrade": "Upgrade"
}, },
"provisions": { "provisions": {
"clear": "Clear" "clear": "Clear",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "Clear" "clear": "Clear",
"clear_all": "Clear all tanks"
} }
} }
}, },
@@ -1195,8 +1211,8 @@
"seo_description": "Track your stats in real time as you play World of Tanks Blitz", "seo_description": "Track your stats in real time as you play World of Tanks Blitz",
"search": { "search": {
"lookup": "Look up a player to get started", "lookup": "Look up a player to get started",
"hint": "Search players...", "hint": "Recherche de joueurs...",
"searching": "Searching...", "searching": "Recherche...",
"no_results": "Pas de joueur de trouvé" "no_results": "Pas de joueur de trouvé"
}, },
"controls": { "controls": {
+30 -14
View File
@@ -13,7 +13,8 @@
"hp": "{value}hp", "hp": "{value}hp",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}°/s",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "自動装填砲", "auto_loader": "自動装填砲",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "AP", "ap": "AP",
"apcr": "APCR", "ap_cr": "APCR",
"heat": "HEAT", "hc": "HEAT",
"he": "HE" "he": "HE"
}, },
"player_count_period": { "player_count_period": {
@@ -186,11 +187,11 @@
"bot": { "bot": {
"common": { "common": {
"errors": { "errors": {
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.", "clan_not_found": "",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.", "player_not_found": "# ユーザーが見つかりませんでした\nユーザー「{search}」が見つかりませんでした。検索結果からユーザーを選択するか、有効なユーザー名を入力するか、/link コマンドを使用してください。",
"player_not_linked": "# `/link`を使用して始めましょう\nはじめまして!あなたが誰か、私に教えてください。", "player_not_linked": "# `/link`を使用して始めましょう\nはじめまして!あなたが誰か、私に教えてください。",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".", "tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.", "tank_id_not_found": "# 車両が見つかりません\nID「{search}」の戦車が見つかりませんでした。数字ではなく戦車の名前を入力してみてください。",
"no_tank_stats": "# 利用可能な車輌統計がありません\nこのプレイヤーには利用可能な統計がありません。あなたが探しているプレイヤーではない可能性があります。", "no_tank_stats": "# 利用可能な車輌統計がありません\nこのプレイヤーには利用可能な統計がありません。あなたが探しているプレイヤーではない可能性があります。",
"get_help": "Discordサーバーに参加する", "get_help": "Discordサーバーに参加する",
"uncaught_error": "# BlitzKitがエラーに遭遇しました!\n申し訳ありません。お気軽に[公式Discordサーバー](https://discord.gg/nDt7AjGJQH)にお問い合わせください。", "uncaught_error": "# BlitzKitがエラーに遭遇しました!\n申し訳ありません。お気軽に[公式Discordサーバー](https://discord.gg/nDt7AjGJQH)にお問い合わせください。",
@@ -394,7 +395,7 @@
"wn8": "WN8", "wn8": "WN8",
"winrate": "勝率", "winrate": "勝率",
"damage": "ダメージ", "damage": "ダメージ",
"unknown_tank": "Unknown tank {id}" "unknown_tank": "不明な車両{id}"
} }
}, },
"debug": { "debug": {
@@ -559,7 +560,7 @@
"description": "Today's played tanks and statistics" "description": "Today's played tanks and statistics"
}, },
"stats": { "stats": {
"name": "stats", "name": "",
"description": "Quick statistics for a period" "description": "Quick statistics for a period"
}, },
"owned_tanks": { "owned_tanks": {
@@ -668,6 +669,10 @@
"count_singular": "1 輌", "count_singular": "1 輌",
"count_plural": "{count} tanks", "count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}", "sorting_by": "Sorting by {name}",
"clear": "クリア",
"tier": "Tier {tier}",
"passive": "{name} (Passive)",
"active": "{name} (Active)",
"no_tanks_found": { "no_tanks_found": {
"body": "該当する車輌が存在しません。", "body": "該当する車輌が存在しません。",
"search_again": "もう一度検索してください。", "search_again": "もう一度検索してください。",
@@ -778,7 +783,7 @@
"tank": "車輌名", "tank": "車輌名",
"last_played": "Last played", "last_played": "Last played",
"battles": "Career battles", "battles": "Career battles",
"unrecorded": "--", "unrecorded": "",
"wins": "勝利" "wins": "勝利"
}, },
"large_warning": { "large_warning": {
@@ -803,8 +808,8 @@
"randomize": "Randomize" "randomize": "Randomize"
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "Next", "next": "Next",
"no_results": "該当なし" "no_results": "該当なし"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} correct, {streak} streak",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancel",
"reveal": "Reveal"
},
"clear": "クリア",
"select_all": "全て選択",
"tier": "Tier {tier}"
}, },
"tankopedia": { "tankopedia": {
"search": "Search a stat...", "search": "Search a stat...",
@@ -1135,10 +1149,12 @@
"upgrade": "最終装備" "upgrade": "最終装備"
}, },
"provisions": { "provisions": {
"clear": "クリア" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "クリア" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
} }
} }
}, },
+24 -8
View File
@@ -13,7 +13,8 @@
"hp": "{value}hp", "hp": "{value}hp",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}°/s",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "Auto loader", "auto_loader": "Auto loader",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "AP", "ap": "AP",
"apcr": "APCR", "ap_cr": "APCR",
"heat": "HEAT", "hc": "HEAT",
"he": "OB" "he": "OB"
}, },
"player_count_period": { "player_count_period": {
@@ -668,6 +669,10 @@
"count_singular": "1 tank", "count_singular": "1 tank",
"count_plural": "{count} tanks", "count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}", "sorting_by": "Sorting by {name}",
"clear": "Clear",
"tier": "Tier {tier}",
"passive": "{name} (Passive)",
"active": "{name} (Active)",
"no_tanks_found": { "no_tanks_found": {
"body": "No tanks found.", "body": "No tanks found.",
"search_again": "Try searching again.", "search_again": "Try searching again.",
@@ -803,8 +808,8 @@
"randomize": "Randomize" "randomize": "Randomize"
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "Next", "next": "Next",
"no_results": "Brak wyników" "no_results": "Brak wyników"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} correct, {streak} streak",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancel",
"reveal": "Reveal"
},
"clear": "Clear",
"select_all": "Select all",
"tier": "Tier {tier}"
}, },
"tankopedia": { "tankopedia": {
"search": "Search a stat...", "search": "Search a stat...",
@@ -1135,10 +1149,12 @@
"upgrade": "Upgrade" "upgrade": "Upgrade"
}, },
"provisions": { "provisions": {
"clear": "Clear" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "Clear" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
} }
} }
}, },
+24 -8
View File
@@ -13,7 +13,8 @@
"hp": "{value}hp", "hp": "{value}hp",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}°/s",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "Autocarregador", "auto_loader": "Autocarregador",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "AP", "ap": "AP",
"apcr": "APCR", "ap_cr": "APCR",
"heat": "HEAT", "hc": "HEAT",
"he": "HE" "he": "HE"
}, },
"player_count_period": { "player_count_period": {
@@ -668,6 +669,10 @@
"count_singular": "1 tanque", "count_singular": "1 tanque",
"count_plural": "{count} tanks", "count_plural": "{count} tanks",
"sorting_by": "Sorting by {name}", "sorting_by": "Sorting by {name}",
"clear": "Limpar",
"tier": "Tier {tier}",
"passive": "{name} (Passive)",
"active": "{name} (Active)",
"no_tanks_found": { "no_tanks_found": {
"body": "Nenhum tanque encontrado.", "body": "Nenhum tanque encontrado.",
"search_again": "Tente pesquisar novamente.", "search_again": "Tente pesquisar novamente.",
@@ -803,8 +808,8 @@
"randomize": "Randomize" "randomize": "Randomize"
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "Next", "next": "Next",
"no_results": "Sem resultados" "no_results": "Sem resultados"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} correct, {streak} streak",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancelar",
"reveal": "Reveal"
},
"clear": "Limpar",
"select_all": "Selecionar todos",
"tier": "Tier {tier}"
}, },
"tankopedia": { "tankopedia": {
"search": "Search a stat...", "search": "Search a stat...",
@@ -1135,10 +1149,12 @@
"upgrade": "Melhorar" "upgrade": "Melhorar"
}, },
"provisions": { "provisions": {
"clear": "Limpar" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "Limpar" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
} }
} }
}, },
+25 -9
View File
@@ -13,7 +13,8 @@
"hp": "{value}оп", "hp": "{value}оп",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/с" "deg_s": "{value}°/с",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "Барабан", "auto_loader": "Барабан",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "ББ", "ap": "ББ",
"apcr": "БП", "ap_cr": "БП",
"heat": "КС", "hc": "ОФ",
"he": "ОФ" "he": "ОФ"
}, },
"player_count_period": { "player_count_period": {
@@ -296,7 +297,7 @@
}, },
"filters": { "filters": {
"none": "Без фильтров", "none": "Без фильтров",
"tier": " {tier} уровня" "tier": "{tier} уровень"
}, },
"no_data": { "no_data": {
"battles_in_period": "За этот период боёв не было", "battles_in_period": "За этот период боёв не было",
@@ -668,6 +669,10 @@
"count_singular": "1 танк", "count_singular": "1 танк",
"count_plural": "Танков: {count}", "count_plural": "Танков: {count}",
"sorting_by": "Сортировать по {name}", "sorting_by": "Сортировать по {name}",
"clear": "Очистить",
"tier": "{tier} уровень",
"passive": "{name} (Пассивный)",
"active": "{name} (Активный)",
"no_tanks_found": { "no_tanks_found": {
"body": "Танков не найдено.", "body": "Танков не найдено.",
"search_again": "Попробуйте повторить поиск.", "search_again": "Попробуйте повторить поиск.",
@@ -803,8 +808,8 @@
"randomize": "Случайно" "randomize": "Случайно"
}, },
"guess": { "guess": {
"name": "Угадай танк", "name": "Угадать",
"button": "Угадать", "button": "Что это за танк?",
"description": "Мини-игра «Силуэт»", "description": "Мини-игра «Силуэт»",
"seo_description": "Играйте угадывая силуэт танка из World of Tanks Blitz", "seo_description": "Играйте угадывая силуэт танка из World of Tanks Blitz",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "Следующий", "next": "Следующий",
"no_results": "Ничего не найденo" "no_results": "Ничего не найденo"
}, },
"stats": "{correct} / {total} угадано верно" "stats": "{correct} / {total} правильно, серия: {streak}",
"help": {
"title": "Частично раскрыть танк?",
"description": "Показывает танк не показывая название. Этот раунд будет считаться проигранным и прекратит серию!",
"cancel": "Отмена",
"reveal": "Раскрыть"
},
"clear": "Очистить",
"select_all": "Выбрать всё",
"tier": "{tier} уровень"
}, },
"tankopedia": { "tankopedia": {
"search": "Поиск характеристик...", "search": "Поиск характеристик...",
@@ -1135,10 +1149,12 @@
"upgrade": "Топ" "upgrade": "Топ"
}, },
"provisions": { "provisions": {
"clear": "Очистить" "clear": "Убрать",
"clear_all": "Убрать со всех"
}, },
"consumables": { "consumables": {
"clear": "Очистить" "clear": "Убрать",
"clear_all": "Убрать со всех"
} }
} }
}, },
+128 -112
View File
@@ -1,19 +1,20 @@
{ {
"test": { "test": {
"default": "тест", "default": "тест",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.", "long": "{fruit}",
"fox": "Швидка бура лисиця перестрибує через лінивого собаку." "fox": "Швидка бура лисиця перестрибує через лінивого собаку."
}, },
"common": { "common": {
"name": "BlitzKit", "name": "BlitzKit",
"units": { "units": {
"m": "{value}m", "m": "{value}м",
"mm": "{value}mm", "mm": "{value}мм",
"deg": "{value}°", "deg": "{value}°",
"hp": "{value}hp", "hp": "{value}од",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}°/s" "deg_s": "{value}град/c",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "Магазинна система заряджання", "auto_loader": "Магазинна система заряджання",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "ББ", "ap": "ББ",
"apcr": "БП", "ap_cr": "APCR",
"heat": "КС", "hc": "HEAT",
"he": "ОФ" "he": "ОФ"
}, },
"player_count_period": { "player_count_period": {
@@ -78,11 +79,11 @@
"10": "Супер винятковий" "10": "Супер винятковий"
}, },
"nations": { "nations": {
"ussr": "СРСР", "ussr": "С.Р.С.Р.",
"germany": "Німеччина", "germany": "Німеччина",
"usa": "США", "usa": "С.Ш.А.",
"china": "Китай", "china": "Китай",
"uk": "Велика Британія", "uk": "Сполучене Королівство ",
"france": "Франція", "france": "Франція",
"japan": "Японія", "japan": "Японія",
"european": "Європейська нація", "european": "Європейська нація",
@@ -120,7 +121,7 @@
"3": "ПТ-САУ" "3": "ПТ-САУ"
}, },
"tree_type": { "tree_type": {
"-1": "не розпізнано", "-1": "не розпізнаний",
"0": "Звичайний", "0": "Звичайний",
"1": "Преміум", "1": "Преміум",
"2": "Колекційний" "2": "Колекційний"
@@ -186,11 +187,11 @@
"bot": { "bot": {
"common": { "common": {
"errors": { "errors": {
"clan_not_found": "# Could not find clan\nCouldn't find \"{search}\". Try selecting a clan from the search result.", "clan_not_found": "# Не вдалося знайти клан\nНе вдалося знайти \"{search}\". Спробуйте обрати клан з результату пошуку.",
"player_not_found": "# Could not find user\nI couldn't find user \"{search}\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.", "player_not_found": "# Не вдалося знайти користувача\nНе вдалося знайти користувача \"{search}\". Спробуйте вибрати користувача із результатів пошуку, ввівши правильне ім'я користувача, або скористайтеся командою `/link`.",
"player_not_linked": "# Використайте команду \"/link\" щоб почати\nЯ не знаю, хто ви, але ви можете сказати мені сьогодні!", "player_not_linked": "# Використайте команду \"/link\" щоб почати\nЯ не знаю, хто ви, але ви можете сказати мені сьогодні!",
"tank_name_not_found": "# Tank not found\nCould not find tank by the name \"{search}\".", "tank_name_not_found": "# Танк не знайдено\nНе вдалося знайти танк із назвою «{search}».",
"tank_id_not_found": "# Tank not found\nCould not find tank by the ID \"{search}\". Try typing the name of the tank instead of a number.", "tank_id_not_found": "# Танк не знайдено\nНе вдалося знайти танк з ID «{search}». Спробуйте ввести назву танка замість номера.",
"no_tank_stats": "# Немає статистики для танка\nЦей гравець не має статистики.\nМожливо, це не той гравець, якого ви шукаєте.", "no_tank_stats": "# Немає статистики для танка\nЦей гравець не має статистики.\nМожливо, це не той гравець, якого ви шукаєте.",
"get_help": "Допомогти Discord серверу", "get_help": "Допомогти Discord серверу",
"uncaught_error": "# Упс! BlitzKit зіткнувся з помилкою!\nНам дуже шкода. Можете попросити допомоги на [офіційному сервері Discord](https://discord.gg/nDt7AjGJQH).", "uncaught_error": "# Упс! BlitzKit зіткнувся з помилкою!\nНам дуже шкода. Можете попросити допомоги на [офіційному сервері Discord](https://discord.gg/nDt7AjGJQH).",
@@ -284,19 +285,19 @@
"name": "рівень", "name": "рівень",
"description": "Рівень", "description": "Рівень",
"choices": { "choices": {
"tier": "Tier {tier_1} - {tier_2}" "tier": "Рівень {tier_1} - {tier_2}"
} }
} }
}, },
"periods": { "periods": {
"career": "Кар'єра", "career": "Кар'єра",
"today": "Сьогодні", "today": "Сьогодні",
"days": "{days} days", "days": "{days} днів",
"custom": "{day_1} - {day_2} days" "custom": "{day_1} - {day_2} днів"
}, },
"filters": { "filters": {
"none": "Немає фільтрів", "none": "Немає фільтрів",
"tier": "Tier {tier}" "tier": "Рівень {tier}"
}, },
"no_data": { "no_data": {
"battles_in_period": "За цей період боїв не було", "battles_in_period": "За цей період боїв не було",
@@ -339,19 +340,19 @@
"body": { "body": {
"subtitle": "Дослідження", "subtitle": "Дослідження",
"total": "Загалом", "total": "Загалом",
"research": "Research: {cost}", "research": "Дослідження: {cost}",
"upgrades": "Upgrades: {cost}", "upgrades": "Прокачування: {cost}",
"purchase": "Purchase: {cost}", "purchase": "Вартість: {cost}",
"equipment": "Equipment: {cost}", "equipment": "Спорядження: {cost}",
"estimation": "# Це оцінка!\n\nЦей список може включати вже досліджені танки через неточну інформацію для вантажу. Спробуйте використати \"початковий танк\" з рядка за допомогою команди." "estimation": "# Це оцінка!\n\nЦей список може включати вже досліджені танки через неточну інформацію для вантажу. Спробуйте використати \"початковий танк\" з рядка за допомогою команди."
}, },
"errors": { "errors": {
"non_tech_tree": "# {tank} is not on the tech tree\n\nYou cannot research a premium/collector tank.", "non_tech_tree": "#{tank} відсутній в дереві дослідження\n\nВи не можете дослідити преміум/колеційний танк.",
"tier_1": "# {tank} is a tier I\n\nTier I tanks are always unlocked for free for all players.", "tier_1": "#{tank} І рівня \n\nТанки І рівня завжди розблоковані для всіх гравців безкоштовно",
"already_researched": "# {tank} is already researched\n\nTry providing a `starting-tank` when using the command to view the totals for a line you have already researched.", "already_researched": "# {tank} вже було досліджено\n\nСпробуйте використати `початковий-танк` коли використовуєте команду для перегляду загальної гілки, яку ви вже дослідили",
"start_end_equal": "# {tank} was provided twice\n\nMake sure `starting-tank` and `target-tank` are different.", "start_end_equal": "#{tank} було введено двічі \n\nПереконайтесь що `початковий-танк` та `ціль-танк` різні",
"tanks_not_on_line": "# {tank_1} and {tank_2} are not on the same line\n\nMake sure `starting-tank` and `target-tank` are on the same tech-tree line.", "tanks_not_on_line": "# {tank_1} та {tank_2} не в одній гілці\n\nПереконайтесь що `початковий-танк` та `ціль-танк` знаходяться в єдиній гілці дерева дослідження",
"unordered": "# {tank_1} higher tiered to {tank_2}\n\nMake sure to provide {tank_2} as the `starting-tank` instead as it is the lower tiered tank." "unordered": "# {tank_1} вище рівнем відносно {tank_2}\n\nОбов’язково вкажіть {tank_2} як `початковий-танк`, оскільки це танк нижчого рівня."
} }
}, },
"about": { "about": {
@@ -394,7 +395,7 @@
"wn8": "WN8", "wn8": "WN8",
"winrate": "Відсоток перемог", "winrate": "Відсоток перемог",
"damage": "Шкода", "damage": "Шкода",
"unknown_tank": "Unknown tank {id}" "unknown_tank": "Невідомий танк {id}"
} }
}, },
"debug": { "debug": {
@@ -430,12 +431,12 @@
"options": { "options": {
"threshold": { "threshold": {
"name": "поріг", "name": "поріг",
"description": "The number of days inactive (default: {days} days)" "description": "Кількість днів неактивності (за замовчуванням: {days} днів)"
} }
}, },
"body": { "body": {
"subtitle": "Inactive for {days}+ days", "subtitle": "Неактивний {days}+ днів",
"listing": "{days} days" "listing": "{days} днів"
} }
}, },
"full_stats": { "full_stats": {
@@ -478,7 +479,7 @@
"body": { "body": {
"accounts_linked": "Прив'язані акаунти", "accounts_linked": "Прив'язані акаунти",
"no_role_permissions": { "no_role_permissions": {
"title": "{name} failed to verify", "title": "{name} не вдалося перевірити",
"description": "У мене немає дозволу керувати ролями." "description": "У мене немає дозволу керувати ролями."
} }
}, },
@@ -493,11 +494,11 @@
"options": { "options": {
"limit": { "limit": {
"name": "ліміт", "name": "ліміт",
"description": "The max number of clan results (default: {limit})" "description": "Максимальна кількість результатів клану (за замовчуванням: {limit})"
} }
}, },
"body": { "body": {
"title": "Clan search for {search} in region {region}", "title": "Пошук клану для {search} в регіоні {region}",
"no_results": "Жодного клану не знайдено" "no_results": "Жодного клану не знайдено"
} }
}, },
@@ -507,11 +508,11 @@
"options": { "options": {
"limit": { "limit": {
"name": "ліміт", "name": "ліміт",
"description": "The max number of player results (default: {limit})" "description": "Максимальна кількість результатів гравця (за замовчуванням: {limit})"
} }
}, },
"body": { "body": {
"title": "Player search for {search} in region {region}", "title": "Пошук гравця для {search} у регіоні {region}",
"no_results": "Гравця не знайдено" "no_results": "Гравця не знайдено"
} }
}, },
@@ -520,8 +521,8 @@
"description": "Статистика рейтингових боїв", "description": "Статистика рейтингових боїв",
"subcommands": { "subcommands": {
"neighbors": { "neighbors": {
"name": "neighbors", "name": "сусіди",
"description": "Neighboring players on the leaderboard" "description": "Сусідуючі гравці в лідерборді"
}, },
"league": { "league": {
"name": "ліга", "name": "ліга",
@@ -531,32 +532,32 @@
"options": { "options": {
"limit": { "limit": {
"name": "ліміт", "name": "ліміт",
"description": "How many neighbors to display (default: {count})" "description": "Скільки сусідів відобразити (за замовчуванням: {count})"
}, },
"season": { "season": {
"name": "сезон", "name": "сезон",
"description": "Базова інформація про гравця", "description": "Базова інформація про гравця",
"choices": { "choices": {
"current": "{season} (current)" "current": "{season} (поточний)"
} }
}, },
"league": { "league": {
"name": "ліга", "name": "ліга",
"description": "The league to display" "description": "Ліга для відображення"
} }
}, },
"body": { "body": {
"top_players": "Top {count} players", "top_players": "Топ {count} гравців",
"no_participation": "# {player} didn't play rating in season {season}\n\nThis player did not participate in this season or did not get past calibration.", "no_participation": "# {player} не грав у рейтингу в сезоні {season}\n\nЦей гравець не брав участь у цьому сезоні або не проходив калібрування",
"no_ongoing_season": "# No ongoing season\n\nThere isn't a currently running rating season.", "no_ongoing_season": "# Немає поточного сезону\n\nВ даний час немає сезону рейтингу.",
"deleted_player": "Deleted {id}", "deleted_player": "",
"neighbors": "Rating neighbors", "neighbors": "Сусіди по рейтингу",
"more": "+ {count} more" "more": "+ {count} ще"
} }
}, },
"today": { "today": {
"name": "сьогодні", "name": "сьогодні",
"description": "Today's played tanks and statistics" "description": "Сьогодні зіграні танки та статистика"
}, },
"stats": { "stats": {
"name": "статистика", "name": "статистика",
@@ -566,43 +567,43 @@
"name": "отримані танки", "name": "отримані танки",
"description": "Показує всі ваші танки даного рівня", "description": "Показує всі ваші танки даного рівня",
"body": { "body": {
"title": "# {name}'s owned tier {tier} tanks\n\n" "title": "# {name} отриманих рівнів {tier} танків\n\n"
} }
}, },
"permissions": { "permissions": {
"name": "дозволи", "name": "дозволи",
"description": "Checks wether the bot has the required permissions to function", "description": "Перевіряє чи бот має необхідні дозволи для роботи",
"body": { "body": {
"title": "# Permissions\n\n{body}", "title": "# Дозволи\n\n{body}",
"view_channels": "View channels: needed to find the message the refresh button was used on", "view_channels": "Перегляньте канали: необхідне для знаходження повідомлення, на якому використовувалася кнопка оновлення",
"read_message_history": "Read message history: needed to find the message to refresh", "read_message_history": "Прочитайте історію повідомлень: потрібно знайти повідомлення для оновлення",
"attach_files": "Attach files: needed to add images to image-based commands", "attach_files": "Закріпіть файли: потрібно для додавання зображень до команд на основі зображень",
"external_emojis": "External emojis: needed to add national flags and tank class emojis" "external_emojis": "Зовнішні емодзі: потрібні для додавання емодзі національних прапорів та класів техніки"
} }
}, },
"ping": { "ping": {
"name": "", "name": "",
"description": "Check wether the bot is alive.", "description": "Перевірити чи бот живий",
"body": { "body": {
"pong": "Pong 🏓", "pong": "Понг🏓",
"pong_with_time": "Pong 🏓 - {time}ms" "pong_with_time": "Понг🏓 - {time}мс"
}, },
"subcommands": { "subcommands": {
"blitzkit": { "blitzkit": {
"name": "blitzkit", "name": "BlitzKit",
"description": "Ping BlitzKit" "description": "Ping BlitzKit"
}, },
"wotb": { "wotb": {
"name": "wotb", "name": "WoTB",
"description": "Ping World of Tanks Blitz" "description": "Ping World of Tanks Blitz"
} }
} }
}, },
"player_info": { "player_info": {
"name": "player-info", "name": "інформація про гравця",
"description": "Базова інформація про гравця", "description": "Базова інформація про гравця",
"body": { "body": {
"title": "{name}'s information", "title": "інформація про {name}",
"nickname": "Нік", "nickname": "Нік",
"battles": "Бої", "battles": "Бої",
"winrate": "Відсоток перемог", "winrate": "Відсоток перемог",
@@ -613,39 +614,39 @@
}, },
"rating": { "rating": {
"name": "рейтинг", "name": "рейтинг",
"description": "Rating player's statistics", "description": "Статистика рейтингових боїв гравця ",
"subcommands": { "subcommands": {
"today": { "today": {
"name": "сьогодні", "name": "сьогодні",
"description": "Today's rating statistics" "description": "Сьогоднішня статистика рейтингових боїв"
}, },
"season": { "season": {
"name": "сезон", "name": "сезон",
"description": "This season's rating statistics" "description": "Статистика рейтингових боїв поточного сезону"
} }
}, },
"body": { "body": {
"subtitle": { "subtitle": {
"today": "Today's rating statistics", "today": "Сьогоднішня статистика рейтингових боїв",
"season": "This season's rating statistics" "season": "Статистика рейтингових боїв даного сезону"
} }
}, },
"errors": { "errors": {
"no_participation": "# {name} hasn't played rating\n\nThis player hasn't participated in the rating gamemode this season.", "no_participation": "# {name} не грав рейтингові бої\n\nЦей гравець не брав участь у рейтинговому режимі цього сезону.",
"unrecorded_stats": "# Statistics currently unavailable\n\nWargaming may be currently be facing server downtime. If there is an on-going season, statistics should be available withing 24 hours." "unrecorded_stats": "# Статистика на цей момент недоступна\n\nWargaming наразі зіткнулась з технічними несправностями. Якщо зараз проходить сезон, статистика буде доступною в найближчі 24 години."
} }
} }
} }
}, },
"website": { "website": {
"redirect": { "redirect": {
"title": "301: moved permanently", "title": "301: переміщено назавжди",
"body": "This page has moved. Redirecting..." "body": "This page has moved. Redirecting..."
}, },
"settings": { "settings": {
"title": "Settings", "title": "Налаштування",
"description": "Change BlitzKit settings", "description": "Змінити налаштування BlitzKit ",
"dev_mode": "Development mode", "dev_mode": "Режим розробника",
"language": "Мова" "language": "Мова"
}, },
"common": { "common": {
@@ -658,16 +659,20 @@
"copied": "Скопійовано!" "copied": "Скопійовано!"
}, },
"tank_search": { "tank_search": {
"select_dialog_title": "Search for tanks", "select_dialog_title": "Знайти танк",
"swap_dialog_title": "Swap tank", "swap_dialog_title": "Swap tank",
"clear_filters": "Clear filters", "clear_filters": "Очистити",
"login": "Login to use this", "login": "Увійдіть, щоб скористатися",
"search_bar_hint": "Шукайте техніку...", "search_bar_hint": "Шукайте техніку...",
"recent": "Недавно переглянуті", "recent": "Недавно переглянуті",
"select_all": "Вибрати все", "select_all": "Вибрати все",
"count_singular": "1 танк", "count_singular": "1 танк",
"count_plural": "{count} tanks", "count_plural": "Танків: {count} ",
"sorting_by": "Sorting by {name}", "sorting_by": "Відсортувати за {name}",
"clear": "Clear",
"tier": "Рівень {tier}",
"passive": "{name} (Passive)",
"active": "{name} (Active)",
"no_tanks_found": { "no_tanks_found": {
"body": "Нічого не знайдено.", "body": "Нічого не знайдено.",
"search_again": "Спробуйте шукати заново.", "search_again": "Спробуйте шукати заново.",
@@ -731,7 +736,7 @@
"home": { "home": {
"pwa": { "pwa": {
"title": "Install the BlitzKit App", "title": "Install the BlitzKit App",
"new": "NEW", "new": "",
"checking": "Checking compatibility...", "checking": "Checking compatibility...",
"instructions": "Instructions for Apple devices.", "instructions": "Instructions for Apple devices.",
"install": "Install", "install": "Install",
@@ -763,20 +768,20 @@
}, },
"tools": { "tools": {
"playlist": { "playlist": {
"reset": "Reset", "reset": "Скинути",
"shuffle": "Shuffle", "shuffle": "Перемішати",
"remove": "Remove played", "remove": "Видалити зіграні",
"tracking": "BlitzKit is tracking your battles", "tracking": "BlitzKit is tracking your battles",
"sort": { "sort": {
"button": "Сортувати за", "button": "Сортувати за",
"last_played": "Last played", "last_played": "Остання гра",
"least_played": "Least played" "least_played": "Найменше зіграно"
}, },
"table": { "table": {
"index": "#", "index": "#",
"never": "Never", "never": "Ніколи",
"tank": "Танк", "tank": "Танк",
"last_played": "Last played", "last_played": "Остання гра",
"battles": "Career battles", "battles": "Career battles",
"unrecorded": "--", "unrecorded": "--",
"wins": "Перемоги" "wins": "Перемоги"
@@ -784,14 +789,14 @@
"large_warning": { "large_warning": {
"title": "That's a lot of tanks!", "title": "That's a lot of tanks!",
"description": "Are you sure you want to create a playlist of {count} tanks? That's {time} hours of gameplay at 50% winrate!", "description": "Are you sure you want to create a playlist of {count} tanks? That's {time} hours of gameplay at 50% winrate!",
"cancel": "Cancel", "cancel": "Скасувати",
"proceed": "Proceed" "proceed": "Продовжити"
}, },
"generate": "Generate playlist", "generate": "Згенерувати плейлист",
"name": "Playlist", "name": "Плейлист",
"description": "Tank playlist generator", "description": "Tank playlist generator",
"seo_description": "Don't know what to play in World of Tanks Blitz? Use BlitzKit Playlist to get suggestions!", "seo_description": "Don't know what to play in World of Tanks Blitz? Use BlitzKit Playlist to get suggestions!",
"button": "Generate", "button": "Створити",
"pool_size": "{count} possible tanks" "pool_size": "{count} possible tanks"
}, },
"mixer": { "mixer": {
@@ -803,8 +808,8 @@
"randomize": "Randomize" "randomize": "Randomize"
}, },
"guess": { "guess": {
"name": "Guess the tank", "name": "Guess",
"button": "Guess away", "button": "What could it be?",
"description": "Silhouette mini-game", "description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz", "seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "Next", "next": "Next",
"no_results": "Немає результатів" "no_results": "Немає результатів"
}, },
"stats": "{correct} / {total} guessed correctly" "stats": "{correct} / {total} correct, {streak} streak",
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
"cancel": "Cancel",
"reveal": "Reveal"
},
"clear": "Clear",
"select_all": "Вибрати все",
"tier": "Рівень {tier}"
}, },
"tankopedia": { "tankopedia": {
"search": "Search a stat...", "search": "Search a stat...",
@@ -823,33 +837,33 @@
"description": "Танкова енциклопедія", "description": "Танкова енциклопедія",
"seo_description": "Характеристики, броня та інше для всіх танків WoT Blitz", "seo_description": "Характеристики, броня та інше для всіх танків WoT Blitz",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)", "tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
"tank_seo_description": "{name} armor, statistics, equipment, provisions, and more. {dpm} DPM, {alpha}hp alpha, {penetration}mm penetration, {speed}kph top speed, {health}hp health.", "tank_seo_description": "{name} броня, характеристики, обладнання, амуніція і т.д. {dpm} шкода на хвилину, {alpha} разова шкода, {penetration}мм пробиття, {speed} км/год максимальна швидкість, {health} міцність.",
"visualizers": { "visualizers": {
"reload": { "reload": {
"skip": "Skip" "skip": "Пропустити"
}, },
"assault": { "assault": {
"title": "Assault shells" "title": "Штурмові снаряди"
}, },
"rotator": { "rotator": {
"hull": "Hull", "hull": "Корпус",
"turret": "Turret", "turret": "Башта",
"hard": "Hard", "hard": "Жорстко",
"medium": "Середній", "medium": "Середній",
"soft": "Soft", "soft": "Ніжно",
"effective": "Effective" "effective": "Ефективний"
}, },
"ricochet": { "ricochet": {
"angle": "Angle", "angle": "Кут",
"normalization": "Нормалізація", "normalization": "Нормалізація",
"effective_angle": "Effective angle", "effective_angle": "Ефективний кут",
"armor": "Броня", "armor": "Броня",
"no_ricochet": "Explosive shells don't ricochet" "no_ricochet": "Фугасні снаряди не рикошетять"
}, },
"view_range": { "view_range": {
"camo": "Camo", "camo": "Камуфляж",
"ghost_factory": "Ghost Factory", "ghost_factory": "Промзона",
"dead_rail": "Dead Rail" "dead_rail": "Ешелон"
}, },
"flexibility": { "flexibility": {
"yaw": "Yaw", "yaw": "Yaw",
@@ -1135,10 +1149,12 @@
"upgrade": "Upgrade" "upgrade": "Upgrade"
}, },
"provisions": { "provisions": {
"clear": "Clear" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
}, },
"consumables": { "consumables": {
"clear": "Clear" "clear": "Clear this tank",
"clear_all": "Clear all tanks"
} }
} }
}, },
+24 -8
View File
@@ -13,7 +13,8 @@
"hp": "{value} 生命值", "hp": "{value} 生命值",
"x": "x{value}", "x": "x{value}",
"percentage": "{value}%", "percentage": "{value}%",
"deg_s": "{value}度°/秒" "deg_s": "{value}度°/秒",
"plus": "+{value}"
}, },
"gun_types": { "gun_types": {
"auto_loader": "弹夹型坦克", "auto_loader": "弹夹型坦克",
@@ -22,8 +23,8 @@
}, },
"shells": { "shells": {
"ap": "穿甲弹", "ap": "穿甲弹",
"apcr": "硬式复合穿甲弹", "ap_cr": "硬式复合穿甲弹",
"heat": "反战车高爆弹", "hc": "反战车高爆弹",
"he": "高爆弹" "he": "高爆弹"
}, },
"player_count_period": { "player_count_period": {
@@ -668,6 +669,10 @@
"count_singular": "1辆战车", "count_singular": "1辆战车",
"count_plural": "{count} 辆坦克", "count_plural": "{count} 辆坦克",
"sorting_by": "按 {name} 排序", "sorting_by": "按 {name} 排序",
"clear": "清除",
"tier": "{tier} 阶",
"passive": "{name} (被动)",
"active": "{name} (主动)",
"no_tanks_found": { "no_tanks_found": {
"body": "找不到战车。", "body": "找不到战车。",
"search_again": "请尝试重新搜索。", "search_again": "请尝试重新搜索。",
@@ -803,8 +808,8 @@
"randomize": "随机搭配" "randomize": "随机搭配"
}, },
"guess": { "guess": {
"name": "猜坦克", "name": "猜测",
"button": "猜猜看", "button": "这会是什么?",
"description": "坦克剪影小游戏", "description": "坦克剪影小游戏",
"seo_description": "看剪影猜坦克", "seo_description": "看剪影猜坦克",
"search": { "search": {
@@ -814,7 +819,16 @@
"next": "下一个", "next": "下一个",
"no_results": "沒有結果" "no_results": "沒有結果"
}, },
"stats": "猜对了 {correct} / {total}" "stats": "猜对了 {correct} / {total}",
"help": {
"title": "显示坦克?",
"description": "显示坦克而不显示名字。这轮会被视为不正确,并打破你的连续记录!",
"cancel": "取消",
"reveal": "显示"
},
"clear": "清除",
"select_all": "全选",
"tier": "{tier} 阶"
}, },
"tankopedia": { "tankopedia": {
"search": "搜索属性……", "search": "搜索属性……",
@@ -1135,10 +1149,12 @@
"upgrade": "顶级配置" "upgrade": "顶级配置"
}, },
"provisions": { "provisions": {
"clear": "清除" "clear": "清除",
"clear_all": "清除所有坦克"
}, },
"consumables": { "consumables": {
"clear": "清除" "clear": "清除",
"clear_all": "清除所有坦克"
} }
} }
}, },
+2
View File
@@ -31,6 +31,7 @@
"steam-user": "^5.2.3", "steam-user": "^5.2.3",
"three": "^0.180.0", "three": "^0.180.0",
"ts-proto": "^2.7.7", "ts-proto": "^2.7.7",
"unzipit": "^1.4.3",
"yaml": "^2.8.1" "yaml": "^2.8.1"
}, },
"private": true, "private": true,
@@ -44,6 +45,7 @@
"build:bot": "bun src/buildBot.ts", "build:bot": "bun src/buildBot.ts",
"build:ratingleaderboard": "bun src/buildRatingLeaderboard.ts", "build:ratingleaderboard": "bun src/buildRatingLeaderboard.ts",
"build:proxyclient": "bun src/buildProxyClient.ts", "build:proxyclient": "bun src/buildProxyClient.ts",
"build:catalogitemaccesssor": "bun src/buildCatalogItemAccessor.ts",
"prunestrings": "bun src/pruneStrings.ts", "prunestrings": "bun src/pruneStrings.ts",
"build:protos": "bun src/protos.ts", "build:protos": "bun src/protos.ts",
"patchnotes": "bun src/patchNotes.ts" "patchnotes": "bun src/patchNotes.ts"
@@ -5,10 +5,12 @@ import { vfs } from "./constants";
export async function boosterIcons() { export async function boosterIcons() {
console.log("Building booster icons..."); console.log("Building booster icons...");
using uploader = new AssetUploader("booster icons"); const uploader = new AssetUploader("booster icons");
const boosterFiles = (vfs.dir(`Data/Gfx/Shared/boosters`)).filter( const boosterFiles = vfs
(file) => !file.includes("@2x.txt") && !file.startsWith("texture0") .dir("Data/Gfx/Shared/boosters")
); .filter(
(file) => !file.includes("@2x.txt") && !file.startsWith("texture0")
);
const image = sharp( const image = sharp(
await vfs.file(`Data/Gfx/Shared/boosters/texture0.packed.webp`) await vfs.file(`Data/Gfx/Shared/boosters/texture0.packed.webp`)
); );
+30 -9
View File
@@ -1,12 +1,33 @@
import { assertSecret } from "@blitzkit/core"; import { assertSecret } from "@blitzkit/core";
import { SteamVFS } from "../core/steam/vfs"; import { AbstractVFS } from "../core/vfs/abstract";
import { SteamVFS } from "../core/vfs/steam";
import { ZipVFS } from "../core/vfs/zip";
const APP = 444200; const steamPattern = /steam:(\d+)\/(\d+)/;
const DEPOT = 444202; const zipPattern = /zip:(.+)/;
export const vfs = await new SteamVFS( const source = Bun.argv
assertSecret(import.meta.env.STEAM_USERNAME), .find((arg) => arg.startsWith("--source="))
assertSecret(import.meta.env.STEAM_PASSWORD), ?.split("=")[1];
APP,
DEPOT let resolved: AbstractVFS;
).init();
if (!source) {
throw new Error("No source specified");
} else if (steamPattern.test(source)) {
const [, app, depot] = source.match(steamPattern)!.map(Number);
resolved = await new SteamVFS(
assertSecret(import.meta.env.STEAM_USERNAME),
assertSecret(import.meta.env.STEAM_PASSWORD),
app,
depot
).init();
} else if (zipPattern.test(source)) {
const [, url] = source.match(zipPattern)!;
resolved = await new ZipVFS(url).init();
} else {
throw new Error("No valid source specified");
}
export const vfs = resolved;
@@ -62,7 +62,7 @@ export async function consumableProvisionIcons() {
.replace(".psd", "") .replace(".psd", "")
.replace(".txt", ""); .replace(".txt", "");
if (vfs.has(`Data/${configPath}.packed.webp`)) { if (vfs.resolve(`Data/${configPath}.packed.webp`)) {
const image = sharp( const image = sharp(
await vfs.file(`Data/${configPath}.packed.webp`) await vfs.file(`Data/${configPath}.packed.webp`)
); );
@@ -131,7 +131,7 @@ export async function consumableProvisionIcons() {
.replace(".psd", "") .replace(".psd", "")
.replace(".txt", ""); .replace(".txt", "");
if (vfs.has(`Data/${configPath}.packed.webp`)) { if (vfs.resolve(`Data/${configPath}.packed.webp`)) {
const image = sharp( const image = sharp(
await vfs.file(`Data/${configPath}.packed.webp`) await vfs.file(`Data/${configPath}.packed.webp`)
); );
+143 -149
View File
@@ -534,11 +534,11 @@ const blitzModuleTypeToBlitzkit: Record<keyof BlitzModuleType, ModuleType> = {
export async function definitions() { export async function definitions() {
console.log("Building definitions..."); console.log("Building definitions...");
using uploader = new AssetUploader("definitions"); const uploader = new AssetUploader("definitions");
const gameDefinitions: GameDefinitions = { const gameDefinitions: GameDefinitions = {
version: (await vfs.text('Data/version.txt')).split(" ")[0], version: (await vfs.text("Data/version.txt")).split(" ")[0],
nations: ( nations: (
await vfs.yaml<AvailableNationsYaml>('Data/available_nations.yaml') await vfs.yaml<AvailableNationsYaml>("Data/available_nations.yaml")
).available_nations, ).available_nations,
gameModes: {}, gameModes: {},
roles: {}, roles: {},
@@ -561,10 +561,12 @@ export async function definitions() {
[TankClass.TANK_DESTROYER]: { skills: [] }, [TankClass.TANK_DESTROYER]: { skills: [] },
}, },
}; };
const nations = vfs.dir('Data/XML/item_defs/vehicles').filter((nation) => nation !== "common") const nations = vfs
.dir("Data/XML/item_defs/vehicles")
.filter((nation) => nation !== "common");
const tankStringIdMap: Record<string, number> = {}; const tankStringIdMap: Record<string, number> = {};
const optionalDevices = await vfs.xml<{ root: OptionalDevices }>( const optionalDevices = await vfs.xml<{ root: OptionalDevices }>(
'Data/XML/item_defs/vehicles/common/optional_devices.xml' "Data/XML/item_defs/vehicles/common/optional_devices.xml"
); );
const stringsI18n: Record<string, Record<string, string>> = {}; const stringsI18n: Record<string, Record<string, string>> = {};
@@ -617,9 +619,7 @@ export async function definitions() {
const provisions: ProvisionsCommon = {}; const provisions: ProvisionsCommon = {};
for (const match of ( for (const match of (
await vfs.text( await vfs.text(`Data/XML/item_defs/vehicles/common/consumables/list.xml`)
`Data/XML/item_defs/vehicles/common/consumables/list.xml`
)
).matchAll(/<items path="(.+)\.xml"\/>/g)) { ).matchAll(/<items path="(.+)\.xml"\/>/g)) {
if (match[1] === "prototypes") continue; if (match[1] === "prototypes") continue;
@@ -634,9 +634,7 @@ export async function definitions() {
} }
for (const match of ( for (const match of (
await vfs.text( await vfs.text(`Data/XML/item_defs/vehicles/common/provisions/list.xml`)
`Data/XML/item_defs/vehicles/common/provisions/list.xml`
)
).matchAll(/<items path="(.+)\.xml"\/>/g)) { ).matchAll(/<items path="(.+)\.xml"\/>/g)) {
if (match[1] === "prototypes") continue; if (match[1] === "prototypes") continue;
@@ -1559,87 +1557,85 @@ export async function definitions() {
const includeRaw = consumable.vehicleFilter?.include.vehicle; const includeRaw = consumable.vehicleFilter?.include.vehicle;
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle; const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
if (!entry.game_mode_exclusive) { if (includeRaw) {
if (includeRaw) { entry.include = [];
entry.include = [];
if ("minLevel" in includeRaw) { if ("minLevel" in includeRaw) {
entry.include.push({ entry.include.push({
filter_type: { filter_type: {
$case: "tiers", $case: "tiers",
value: { value: {
min: includeRaw.minLevel, min: includeRaw.minLevel,
max: includeRaw.maxLevel, max: includeRaw.maxLevel,
},
}, },
}); },
} else if ("name" in includeRaw) { });
entry.include.push({ } else if ("name" in includeRaw) {
filter_type: { entry.include.push({
$case: "ids", filter_type: {
value: { $case: "ids",
ids: includeRaw.name.split(/ +/).map((key) => { value: {
return tankStringIdMap[key]; ids: includeRaw.name.split(/ +/).map((key) => {
}), return tankStringIdMap[key];
}, }),
}, },
}); },
} else throw new SyntaxError("Unhandled include type"); });
} else throw new SyntaxError("Unhandled include type");
if (consumable.vehicleFilter?.include.nations) { if (consumable.vehicleFilter?.include.nations) {
entry.include.push({ entry.include.push({
filter_type: { filter_type: {
$case: "nations", $case: "nations",
value: { value: {
nations: consumable.vehicleFilter.include.nations.split(" "), nations: consumable.vehicleFilter.include.nations.split(" "),
},
}, },
}); },
} });
} }
}
if (excludeRaw) { if (excludeRaw) {
entry.exclude = []; entry.exclude = [];
if ("name" in excludeRaw) { if ("name" in excludeRaw) {
entry.exclude!.push({ entry.exclude!.push({
filter_type: { filter_type: {
$case: "ids", $case: "ids",
value: { value: {
ids: excludeRaw.name.split(/ +/).map((key) => { ids: excludeRaw.name.split(/ +/).map((key) => {
return tankStringIdMap[key]; return tankStringIdMap[key];
}), }),
},
}, },
}); },
} else if ("extendedTags" in excludeRaw) { });
entry.exclude!.push({ } else if ("extendedTags" in excludeRaw) {
filter_type: { entry.exclude!.push({
$case: "categories", filter_type: {
value: { $case: "categories",
categories: excludeRaw.extendedTags value: {
.split(" ") categories: excludeRaw.extendedTags
.map( .split(" ")
(item) => .map(
blitzTankFilterDefinitionCategoryToBlitzkit[ (item) =>
item as BlitzTankFilterDefinitionCategory blitzTankFilterDefinitionCategoryToBlitzkit[
] item as BlitzTankFilterDefinitionCategory
), ]
}, ),
}, },
}); },
} else throw new SyntaxError("Unhandled exclude type"); });
} else throw new SyntaxError("Unhandled exclude type");
if (consumable.vehicleFilter?.exclude?.nations) { if (consumable.vehicleFilter?.exclude?.nations) {
entry.exclude!.push({ entry.exclude!.push({
filter_type: { filter_type: {
$case: "nations", $case: "nations",
value: { value: {
nations: consumable.vehicleFilter.exclude.nations.split(" "), nations: consumable.vehicleFilter.exclude.nations.split(" "),
},
}, },
}); },
} });
} }
} }
}); });
@@ -1659,87 +1655,85 @@ export async function definitions() {
const includeRaw = provision.vehicleFilter?.include.vehicle; const includeRaw = provision.vehicleFilter?.include.vehicle;
const excludeRaw = provision.vehicleFilter?.exclude?.vehicle; const excludeRaw = provision.vehicleFilter?.exclude?.vehicle;
if (!entry.game_mode_exclusive) { if (includeRaw) {
if (includeRaw) { entry.include = [];
entry.include = [];
if ("minLevel" in includeRaw) { if ("minLevel" in includeRaw) {
entry.include.push({ entry.include.push({
filter_type: { filter_type: {
$case: "tiers", $case: "tiers",
value: { value: {
min: includeRaw.minLevel, min: includeRaw.minLevel,
max: includeRaw.maxLevel, max: includeRaw.maxLevel,
},
}, },
}); },
} else if ("name" in includeRaw) { });
entry.include.push({ } else if ("name" in includeRaw) {
filter_type: { entry.include.push({
$case: "ids", filter_type: {
value: { $case: "ids",
ids: includeRaw.name.split(/ +/).map((key) => { value: {
return tankStringIdMap[key]; ids: includeRaw.name.split(/ +/).map((key) => {
}), return tankStringIdMap[key];
}, }),
}, },
}); },
} else throw new SyntaxError("Unhandled include type"); });
} else throw new SyntaxError("Unhandled include type");
if (provision.vehicleFilter?.include.nations) { if (provision.vehicleFilter?.include.nations) {
entry.include.push({ entry.include.push({
filter_type: { filter_type: {
$case: "nations", $case: "nations",
value: { value: {
nations: provision.vehicleFilter.include.nations.split(" "), nations: provision.vehicleFilter.include.nations.split(" "),
},
}, },
}); },
} });
} }
}
if (excludeRaw) { if (excludeRaw) {
entry.exclude = []; entry.exclude = [];
if ("name" in excludeRaw) { if ("name" in excludeRaw) {
entry.exclude!.push({ entry.exclude!.push({
filter_type: { filter_type: {
$case: "ids", $case: "ids",
value: { value: {
ids: excludeRaw.name ids: excludeRaw.name
.split(/ +/) .split(/ +/)
.map((key) => tankStringIdMap[key]), .map((key) => tankStringIdMap[key]),
},
}, },
}); },
} else if ("extendedTags" in excludeRaw) { });
entry.exclude!.push({ } else if ("extendedTags" in excludeRaw) {
filter_type: { entry.exclude!.push({
$case: "categories", filter_type: {
value: { $case: "categories",
categories: excludeRaw.extendedTags value: {
.split(" ") categories: excludeRaw.extendedTags
.map( .split(" ")
(item) => .map(
blitzTankFilterDefinitionCategoryToBlitzkit[ (item) =>
item as BlitzTankFilterDefinitionCategory blitzTankFilterDefinitionCategoryToBlitzkit[
] item as BlitzTankFilterDefinitionCategory
), ]
}, ),
}, },
}); },
} else throw new SyntaxError("Unhandled exclude type"); });
} else throw new SyntaxError("Unhandled exclude type");
if (provision.vehicleFilter?.exclude?.nations) { if (provision.vehicleFilter?.exclude?.nations) {
entry.exclude!.push({ entry.exclude!.push({
filter_type: { filter_type: {
$case: "nations", $case: "nations",
value: { value: {
nations: provision.vehicleFilter.exclude.nations.split(" "), nations: provision.vehicleFilter.exclude.nations.split(" "),
},
}, },
}); },
} });
} }
} }
@@ -28,7 +28,7 @@ export async function skillIcons() {
const avatar = await vfs.xml<{ root: Avatar }>( const avatar = await vfs.xml<{ root: Avatar }>(
`Data/XML/item_defs/tankmen/avatar.xml` `Data/XML/item_defs/tankmen/avatar.xml`
); );
using uploader = new AssetUploader("skill icons"); const uploader = new AssetUploader("skill icons");
for (const key in avatar.root.skills) { for (const key in avatar.root.skills) {
const skill = avatar.root.skills[key]; const skill = avatar.root.skills[key];
+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 = `${projectDir}/packages/bot/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 });
@@ -0,0 +1,62 @@
import { readdir, readFile, writeFile } from "fs/promises";
const SOURCES = "../../packages/closed/protos";
const TARGET = "../../packages/closed/src/unreal/catalogItemAccessor.ts";
const componentPattern = /^message (\w+)Component {/gm;
const files = await readdir(SOURCES).then((files) =>
files.filter(
(file) =>
file.startsWith("blitz_static_") && file.endsWith("_component.proto")
)
);
const imports: { name: string; file: string }[] = [];
for (const file of files) {
const content = await readFile(`${SOURCES}/${file}`).then((buffer) =>
buffer.toString()
);
const components = content.matchAll(componentPattern);
for (const match of components) {
const name = match[1];
const duplicate = imports.find((_import) => _import.name === name);
if (duplicate) {
console.warn(
`Duplicate component ${name} across ${duplicate.file}.proto and ${file}`
);
continue;
}
const importFile = file.replace(".proto", "");
imports.push({ name, file: importFile });
}
}
let content = "";
for (const _import of imports) {
content += `import { ${_import.name}Component } from "@protos/${_import.file}";\n`;
}
content +=
'import { BaseCatalogItemAccessor } from "./baseCatalogItemAccessor";\n\n';
content +=
"export class CatalogItemAccessor extends BaseCatalogItemAccessor {\n";
for (const _import of imports) {
const strippedName = _import.name.replace("BlitzStatic", "");
const defaultName = strippedName[0].toLowerCase() + strippedName.slice(1);
content += ` ${strippedName}(name = "${defaultName}Component") {\n`;
content += ` return this.component(name, ${_import.name}Component);\n`;
content += " }\n";
}
content += "}\n";
await writeFile(TARGET, content);
+6 -9
View File
@@ -4,21 +4,18 @@ const IMPORT = "@protos/auto_legacy_proxy_client";
const SOURCE = "../../packages/closed/protos/auto_legacy_proxy_client.proto"; const SOURCE = "../../packages/closed/protos/auto_legacy_proxy_client.proto";
const TARGET = "../../packages/closed/src/unreal/methodPopulatedProxyClient.ts"; const TARGET = "../../packages/closed/src/unreal/methodPopulatedProxyClient.ts";
const requestPattern = /message (\w+)Request {/g; const requestPattern = /^message (\w+)Request {/gm;
const source = await readFile(SOURCE).then((buffer) => buffer.toString()); const source = await readFile(SOURCE).then((buffer) => buffer.toString());
const requests = source.matchAll(requestPattern); const requests = source.matchAll(requestPattern);
const imports: string[] = []; const imports: string[] = [];
const methods: { name: string; method: string }[] = []; const names: string[] = [];
for (const match of requests) { for (const match of requests) {
const name = match[1]; const name = match[1];
// const method =
// name.charAt(0).toLowerCase() + name.slice(1).replace(/Async$/, "");
const method = name;
imports.push(`${name}Request`, `${name}Response`); imports.push(`${name}Request`, `${name}Response`);
methods.push({ name, method }); names.push(name);
} }
let content = ""; let content = "";
@@ -31,9 +28,9 @@ content += 'import { BaseProxyClient } from "./baseProxyClient";\n\n';
content += content +=
"export abstract class MethodPopulatedProxyClient extends BaseProxyClient {\n"; "export abstract class MethodPopulatedProxyClient extends BaseProxyClient {\n";
content += methods content += names
.map(({ name, method }) => { .map((name) => {
return ` ${method}(data: ${name}Request) { return ` ${name}(data: ${name}Request) {
return this.request("${name}Request", ${name}Request, data, ${name}Response); return this.request("${name}Request", ${name}Request, data, ${name}Response);
}\n`; }\n`;
}) })
@@ -6,7 +6,7 @@ import {
} from "@blitzkit/core"; } from "@blitzkit/core";
import { Accessor, Document, Node, Scene } from "@gltf-transform/core"; import { Accessor, Document, Node, Scene } from "@gltf-transform/core";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { SteamVFS } from "../steam/vfs"; import { SteamVFS } from "../vfs/vfs";
import { import {
vertexAttributeGLTFName, vertexAttributeGLTFName,
vertexAttributeGltfVectorSizes, vertexAttributeGltfVectorSizes,
@@ -9,7 +9,7 @@ import { Document, Material, Node, Scene } from "@gltf-transform/core";
import { dedup, prune } from "@gltf-transform/functions"; import { dedup, prune } from "@gltf-transform/functions";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { dirname } from "path"; import { dirname } from "path";
import { SteamVFS } from "../../steam/vfs"; import { SteamVFS } from "../../vfs/vfs";
import { readBaseColor } from "../readBaseColor"; import { readBaseColor } from "../readBaseColor";
import { readNormal } from "../readNormal"; import { readNormal } from "../readNormal";
import { readRoughnessMetallic } from "../readRoughnessMetallic"; import { readRoughnessMetallic } from "../readRoughnessMetallic";
@@ -3,7 +3,7 @@ import { vfs } from "../../../buildAssets/constants";
export async function readTexture(path: string) { export async function readTexture(path: string) {
const ddsTexturePath = path.replace(".tex", ".dx11.dds"); const ddsTexturePath = path.replace(".tex", ".dx11.dds");
const isDds = vfs.has(ddsTexturePath); const isDds = vfs.resolve(ddsTexturePath);
const resolvedTexturePath = isDds const resolvedTexturePath = isDds
? ddsTexturePath ? ddsTexturePath
: ddsTexturePath.replace(".dds", ".pvr"); : ddsTexturePath.replace(".dds", ".pvr");
+84
View File
@@ -0,0 +1,84 @@
import { readDVPL } from "@blitzkit/core";
import { XMLParser } from "fast-xml-parser";
import { normalize } from "path/posix";
import { parse } from "yaml";
export abstract class AbstractVFS {
textDecoder = new TextDecoder();
private xmlParser = new XMLParser();
abstract init(): Promise<typeof this>;
abstract dispose(): void;
abstract has(path: string): boolean;
abstract raw(path: string): Promise<Uint8Array>;
abstract paths(): string[];
resolve(path: string) {
const normalized = normalize(path);
if (this.has(normalized)) return normalized;
const dvplPath = `${normalized}.dvpl`;
if (this.has(dvplPath)) return dvplPath;
return null;
}
assert(path: string) {
const resolved = this.resolve(path);
if (resolved === null) throw new Error(`File not found: ${path}`);
return resolved;
}
async file(file: string) {
const resolved = this.assert(file);
const raw = await this.raw(resolved);
let buffer = raw;
if (resolved.endsWith(".dvpl")) {
buffer = new Uint8Array(readDVPL(Buffer.from(raw)));
}
return buffer;
}
dir(path: string) {
const parentSegments = path.split("/").length;
const children = new Set<string>();
for (const child of this.paths()) {
if (!child.startsWith(path) || child === path) continue;
const childSegments = child.split("/");
const nextSegment = childSegments[parentSegments];
children.add(nextSegment);
}
return Array.from(children);
}
async text(path: string) {
const file = await this.file(path);
return this.textDecoder.decode(file);
}
async yaml<Type>(path: string) {
const file = await this.text(path);
return parse(file) as Type;
}
async xml<Type>(path: string) {
const file = await this.text(path);
return this.xmlParser.parse(file) as Type;
}
[Symbol.dispose]() {
this.dispose();
}
}
@@ -1,8 +1,5 @@
import { readDVPL } from "@blitzkit/core/src/blitz";
import { XMLParser } from "fast-xml-parser";
import { normalize } from "path/posix";
import SteamUser, { EConnectionProtocol } from "steam-user"; import SteamUser, { EConnectionProtocol } from "steam-user";
import { parse } from "yaml"; import { AbstractVFS } from "./abstract";
interface SteamManifestFile { interface SteamManifestFile {
chunks: { chunks: {
@@ -33,11 +30,8 @@ interface SteamManifest {
crc_clear: number; crc_clear: number;
} }
export class SteamVFS { export class SteamVFS extends AbstractVFS {
private steam = new SteamUser({ protocol: EConnectionProtocol.TCP }); private steam = new SteamUser({ protocol: EConnectionProtocol.TCP });
private textDecoder = new TextDecoder();
private xmlParser = new XMLParser();
private manifest: Map<string, SteamManifestFile> = new Map(); private manifest: Map<string, SteamManifestFile> = new Map();
constructor( constructor(
@@ -45,7 +39,9 @@ export class SteamVFS {
private password: string, private password: string,
private app: number, private app: number,
private depot: number private depot: number
) {} ) {
super();
}
async init() { async init() {
this.steam.logOn({ this.steam.logOn({
@@ -71,10 +67,8 @@ export class SteamVFS {
); );
}); });
const paths: string[] = [];
for (const file of manifest.files) { for (const file of manifest.files) {
const path = file.filename.replaceAll("\\", "/"); const path = file.filename.replaceAll("\\", "/");
paths.push(path);
this.manifest.set(path, file); this.manifest.set(path, file);
} }
@@ -82,74 +76,23 @@ export class SteamVFS {
} }
has(path: string) { has(path: string) {
const normalized = normalize(path); return this.manifest.has(path);
const dvplPath = `${normalized}.dvpl`;
return (
(this.manifest.has(dvplPath) && dvplPath) ||
(this.manifest.has(normalized) && normalized)
);
} }
assert(requested: string) { async raw(path: string) {
const path = this.has(requested);
if (!path) throw new Error(`File not found: ${requested}`);
return path;
}
dir(path: string) {
const parentSegments = path.split("/").length;
const children: string[] = [];
for (const child of this.manifest.keys()) {
const childSegments = child.split("/");
if (
child.startsWith(path) &&
parentSegments + 1 === childSegments.length
) {
children.push(childSegments.at(-1)!);
}
}
return children;
}
async file(requested: string) {
const path = this.assert(requested);
const fileManifest = this.manifest.get(path)!; const fileManifest = this.manifest.get(path)!;
const downloaded: { type: "complete"; file: Buffer } = const downloaded: { type: "complete"; file: Buffer } =
// @ts-expect-error // @ts-expect-error
await this.steam.downloadFile(this.app, this.depot, fileManifest); await this.steam.downloadFile(this.app, this.depot, fileManifest);
let buffer = downloaded.file;
if (path.endsWith(".dvpl")) buffer = readDVPL(downloaded.file); return new Uint8Array(downloaded.file);
return new Uint8Array(buffer);
} }
async text(path: string) { paths() {
const file = await this.file(path); return Array.from(this.manifest.keys());
return this.textDecoder.decode(file);
}
async yaml<Type>(path: string) {
const file = await this.text(path);
return parse(file) as Type;
}
async xml<Type>(path: string) {
const file = await this.text(path);
return this.xmlParser.parse(file) as Type;
} }
dispose() { dispose() {
this.steam.logOff(); this.steam.logOff();
} }
[Symbol.dispose]() {
this.dispose();
}
} }
+38
View File
@@ -0,0 +1,38 @@
import { normalize } from "path/posix";
import { HTTPRangeReader, unzip, ZipEntry } from "unzipit";
import { AbstractVFS } from "./abstract";
export class ZipVFS extends AbstractVFS {
entries = new Map<string, ZipEntry>();
constructor(private url: string, private root = "app/") {
super();
}
async init() {
const reader = new HTTPRangeReader(this.url);
const { entries } = await unzip(reader);
for (const entry of Object.values(entries)) {
const normalized = normalize(entry.name.slice(this.root.length));
this.entries.set(normalized, entry);
}
return this;
}
has(path: string) {
return this.entries.has(path);
}
async raw(path: string) {
const arrayBuffer = await this.entries.get(path)!.arrayBuffer();
return new Uint8Array(arrayBuffer);
}
paths() {
return Array.from(this.entries.keys());
}
dispose() {}
}
+22 -6
View File
@@ -4,6 +4,10 @@ import { readdir, rm } from "fs/promises";
import { promisify } from "util"; import { promisify } from "util";
const MAX_COMMAND_LENGTH = 2 ** 11; const MAX_COMMAND_LENGTH = 2 ** 11;
const TS_PROTO_EXECUTABLE_LOCATIONS = [
"./node_modules/.bin/protoc-gen-ts_proto",
"../../node_modules/.bin/protoc-gen-ts_proto",
];
const roots = [ const roots = [
// "../../packages/core/src/protos", // "../../packages/core/src/protos",
@@ -12,12 +16,24 @@ const roots = [
const exec = promisify(execSync); const exec = promisify(execSync);
let executableFileExtension: string; let tsProtoExecutableLocation: string | undefined = undefined;
if (existsSync("../../node_modules/.bin/protoc-gen-ts_proto.exe")) { for (const location of TS_PROTO_EXECUTABLE_LOCATIONS) {
executableFileExtension = ".exe"; if (existsSync(location)) {
} else { tsProtoExecutableLocation = location;
executableFileExtension = ""; break;
} else if (existsSync(`${location}.exe`)) {
tsProtoExecutableLocation = `${location}.exe`;
break;
}
}
if (!tsProtoExecutableLocation) {
throw new Error(
`Could not find ts-proto executable. Checked locations: ${TS_PROTO_EXECUTABLE_LOCATIONS.join(
", "
)}`
);
} }
for (const root of roots) { for (const root of roots) {
@@ -32,7 +48,7 @@ for (const root of roots) {
while (files.length > 0) { while (files.length > 0) {
let command = [ let command = [
"protoc", "protoc",
`--plugin=../../node_modules/.bin/protoc-gen-ts_proto${executableFileExtension}`, `--plugin=${tsProtoExecutableLocation}`,
"--ts_proto_opt=esModuleInterop=true", "--ts_proto_opt=esModuleInterop=true",
"--ts_proto_opt=oneof=unions-value", "--ts_proto_opt=oneof=unions-value",
// "--ts_proto_opt=removeEnumPrefix=true", // "--ts_proto_opt=removeEnumPrefix=true",
Binary file not shown.
@@ -67,7 +67,9 @@ export const PrimaryArmorScene = memo(() => {
<group ref={turretContainer}> <group ref={turretContainer}>
{armorNodes.map((node) => { {armorNodes.map((node) => {
const isCurrentTurret = node.name.startsWith( const isCurrentTurret = node.name.startsWith(
`turret_${turretModelDefinition.model_id.toString().padStart(2, "0")}` `turret_${turretModelDefinition.model_id
.toString()
.padStart(2, "0")}`
); );
const isVisible = isCurrentTurret; const isVisible = isCurrentTurret;
const armorId = nameToArmorId(node.name); const armorId = nameToArmorId(node.name);
@@ -4,6 +4,7 @@ import {
resolvePenetrationCoefficient, resolvePenetrationCoefficient,
} from "@blitzkit/core"; } from "@blitzkit/core";
import { invalidate, useFrame } from "@react-three/fiber"; import { invalidate, useFrame } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime";
import { useEffect } from "react"; import { useEffect } from "react";
import { import {
MeshBasicMaterial, MeshBasicMaterial,
@@ -21,6 +22,7 @@ import { jsxTree } from "../../../../core/blitzkit/jsxTree";
import { Duel, type EquipmentMatrix } from "../../../../stores/duel"; import { Duel, type EquipmentMatrix } from "../../../../stores/duel";
import { Tankopedia } from "../../../../stores/tankopedia"; import { Tankopedia } from "../../../../stores/tankopedia";
import { TankopediaPersistent } from "../../../../stores/tankopediaPersistent"; import { TankopediaPersistent } from "../../../../stores/tankopediaPersistent";
import { transitionEvent } from "../../../Tankopedia/HeroSection/components/TankSandbox/components/Lighting";
import fragmentShader from "./shaders/fragment.glsl?raw"; import fragmentShader from "./shaders/fragment.glsl?raw";
import vertexShader from "./shaders/vertex.glsl?raw"; import vertexShader from "./shaders/vertex.glsl?raw";
import { spacedArmorRenderTarget } from "./target"; import { spacedArmorRenderTarget } from "./target";
@@ -72,6 +74,8 @@ export function PrimaryArmorSceneComponent({
resolution: { value: new Vector2() }, resolution: { value: new Vector2() },
spacedArmorBuffer: { value: null }, spacedArmorBuffer: { value: null },
spacedArmorDepth: { value: null }, spacedArmorDepth: { value: null },
opacity: { value: 0 },
}, },
]), ]),
}); });
@@ -154,6 +158,10 @@ export function PrimaryArmorSceneComponent({
if (!noInvalidate) invalidate(); if (!noInvalidate) invalidate();
} }
function handleTransitionEvent(event: QuicklimeEvent<number>) {
material.uniforms.opacity.value = event.data;
}
handleShellChange(); handleShellChange();
handleGreenPenetrationChange(TankopediaPersistent.state.greenPenetration); handleGreenPenetrationChange(TankopediaPersistent.state.greenPenetration);
handleAdvancedHighlightingChange( handleAdvancedHighlightingChange(
@@ -164,6 +172,8 @@ export function PrimaryArmorSceneComponent({
handleProtagonistEquipmentChange(Duel.state.protagonist.equipmentMatrix); handleProtagonistEquipmentChange(Duel.state.protagonist.equipmentMatrix);
handleAntagonistEquipmentChange(Duel.state.antagonist.equipmentMatrix); handleAntagonistEquipmentChange(Duel.state.antagonist.equipmentMatrix);
transitionEvent.on(handleTransitionEvent);
const unsubscribes = [ const unsubscribes = [
Duel.on((state) => state.antagonist.shell, handleShellChange), Duel.on((state) => state.antagonist.shell, handleShellChange),
Tankopedia.on((state) => state.customShell, handleShellChange), Tankopedia.on((state) => state.customShell, handleShellChange),
@@ -184,12 +194,13 @@ export function PrimaryArmorSceneComponent({
(state) => state.antagonist.equipmentMatrix, (state) => state.antagonist.equipmentMatrix,
(equipment) => handleAntagonistEquipmentChange(equipment) (equipment) => handleAntagonistEquipmentChange(equipment)
), ),
() => transitionEvent.off(handleTransitionEvent),
]; ];
return () => { return () => {
unsubscribes.forEach((unsubscribe) => unsubscribe()); unsubscribes.forEach((unsubscribe) => unsubscribe());
}; };
}); }, []);
useFrame(({ gl, camera }) => { useFrame(({ gl, camera }) => {
gl.getSize(material.uniforms.resolution.value).multiplyScalar( gl.getSize(material.uniforms.resolution.value).multiplyScalar(
@@ -1,12 +1,9 @@
precision mediump float; precision mediump float;
#define USE_FOG
#include <fog_pars_fragment>
varying vec3 vNormal; varying vec3 vNormal;
varying vec3 vViewPosition; varying vec3 vViewPosition;
uniform float opacity;
uniform float thickness; uniform float thickness;
uniform float penetration; uniform float penetration;
uniform float caliber; uniform float caliber;
@@ -119,5 +116,5 @@ void main() {
gl_FragColor = vec4(baseColor, (1.0 - penetrationChance) * alpha); gl_FragColor = vec4(baseColor, (1.0 - penetrationChance) * alpha);
} }
#include <fog_fragment> gl_FragColor.a *= opacity;
} }
@@ -1,9 +1,5 @@
precision mediump float; precision mediump float;
#define USE_FOG
#include <fog_pars_vertex>
varying vec3 vNormal; varying vec3 vNormal;
varying vec3 vViewPosition; varying vec3 vViewPosition;
@@ -14,6 +10,4 @@ void main() {
vNormal = normalMatrix * normal; vNormal = normalMatrix * normal;
gl_Position = projectionMatrix * mvPosition; gl_Position = projectionMatrix * mvPosition;
#include <fog_vertex>
} }
@@ -24,6 +24,7 @@ import {
} from "../../../core/blitzkit/modelTransform"; } from "../../../core/blitzkit/modelTransform";
import { discardClippingPlane } from "../../../core/three/discardClippingPlane"; import { discardClippingPlane } from "../../../core/three/discardClippingPlane";
import { Tankopedia } from "../../../stores/tankopedia"; import { Tankopedia } from "../../../stores/tankopedia";
import { transitionEvent } from "../../Tankopedia/HeroSection/components/TankSandbox/components/Lighting";
import { ArmorType } from "./SpacedArmorScene"; import { ArmorType } from "./SpacedArmorScene";
import type { import type {
ArmorUserData, ArmorUserData,
@@ -108,10 +109,11 @@ export function StaticArmorSceneComponent({
() => () =>
new MeshBasicMaterial({ new MeshBasicMaterial({
color, color,
opacity, transparent: true,
transparent: opacity < 1,
depthWrite, depthWrite,
...(props.clip ? { clippingPlanes: [props.clip] } : {}), ...(props.clip ? { clippingPlanes: [props.clip] } : {}),
opacity: 0,
userData: { opacity0: opacity },
}), }),
[thickness] [thickness]
); );
@@ -121,6 +123,8 @@ export function StaticArmorSceneComponent({
color: color color: color
.clone() .clone()
.multiplyScalar(props.type === ArmorType.Spaced ? 2 ** 2 : 2 ** -1), .multiplyScalar(props.type === ArmorType.Spaced ? 2 ** 2 : 2 ** -1),
opacity: 0,
transparent: true,
}), }),
[thickness] [thickness]
); );
@@ -163,11 +167,22 @@ export function StaticArmorSceneComponent({
surfaceMaterial.needsUpdate = true; surfaceMaterial.needsUpdate = true;
} }
function handleTransitionEvent(event: QuicklimeEvent<number>) {
surfaceMaterial.opacity = surfaceMaterial.userData.opacity0 * event.data;
outlineMaterial.opacity = event.data;
surfaceMaterial.transparent = surfaceMaterial.opacity < 1;
outlineMaterial.transparent = outlineMaterial.opacity < 1;
}
transitionEvent.on(handleTransitionEvent);
const unsubscribes = [ const unsubscribes = [
Tankopedia.on( Tankopedia.on(
(state) => state.highlightArmor?.name, (state) => state.highlightArmor?.name,
handleHighlightArmor handleHighlightArmor
), ),
() => transitionEvent.off(handleTransitionEvent),
]; ];
if (props.clip) { if (props.clip) {
@@ -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>
@@ -3,6 +3,7 @@ import { Flex, Heading, IconButton, Table } from "@radix-ui/themes";
import type { TankCharacteristics } from "../../core/blitzkit/tankCharacteristics"; import type { TankCharacteristics } from "../../core/blitzkit/tankCharacteristics";
import { useLocale } from "../../hooks/useLocale"; import { useLocale } from "../../hooks/useLocale";
import { CompareEphemeral } from "../../stores/compareEphemeral"; import { CompareEphemeral } from "../../stores/compareEphemeral";
import { CompareCellDirection } from "../CompareCell";
import { StickyColumnHeaderCell } from "../StickyColumnHeaderCell"; import { StickyColumnHeaderCell } from "../StickyColumnHeaderCell";
import { CompareRow } from "./CompareRow"; import { CompareRow } from "./CompareRow";
import { CompareSectionTitle } from "./CompareSectionTitle"; import { CompareSectionTitle } from "./CompareSectionTitle";
@@ -79,7 +80,7 @@ export function Body({ stats }: BodyProps) {
<CompareRow <CompareRow
stats={stats} stats={stats}
name={strings.website.tools.tankopedia.characteristics.values.reload} name={strings.website.tools.tankopedia.characteristics.values.reload}
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
value={(stats) => value={(stats) =>
stats.shellReload ?? stats.shellReload ??
stats.shellReloads!.reduce((a, b) => a + b, 0) / stats.shellReloads!.reduce((a, b) => a + b, 0) /
@@ -95,7 +96,7 @@ export function Body({ stats }: BodyProps) {
<> <>
<CompareRow <CompareRow
stats={stats} stats={stats}
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
value="intraClip" value="intraClip"
decimals={2} decimals={2}
/> />
@@ -107,7 +108,7 @@ export function Body({ stats }: BodyProps) {
<CompareRow <CompareRow
stats={stats} stats={stats}
value="shellRicochet" value="shellRicochet"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={0} decimals={0}
/> />
<CompareRow stats={stats} value="shellVelocity" decimals={0} /> <CompareRow stats={stats} value="shellVelocity" decimals={0} />
@@ -116,48 +117,48 @@ export function Body({ stats }: BodyProps) {
<CompareRow <CompareRow
stats={stats} stats={stats}
value="aimTime" value="aimTime"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={2} decimals={2}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
value="dispersion" value="dispersion"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={3} decimals={3}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="dispersionMoving" value="dispersionMoving"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={3} decimals={3}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="dispersionHullTraversing" value="dispersionHullTraversing"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={3} decimals={3}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="dispersionTurretTraversing" value="dispersionTurretTraversing"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={3} decimals={3}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="dispersionShooting" value="dispersionShooting"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={3} decimals={3}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="dispersionGunDamaged" value="dispersionGunDamaged"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={3} decimals={3}
/> />
<CompareRow stats={stats} value="gunDepression" decimals={1} /> <CompareRow stats={stats} value="gunDepression" decimals={1} />
@@ -186,21 +187,21 @@ export function Body({ stats }: BodyProps) {
<CompareRow <CompareRow
stats={stats} stats={stats}
value="hardTerrainCoefficientRaw" value="hardTerrainCoefficientRaw"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={2} decimals={2}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="mediumTerrainCoefficientRaw" value="mediumTerrainCoefficientRaw"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={2} decimals={2}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="softTerrainCoefficientRaw" value="softTerrainCoefficientRaw"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={2} decimals={2}
/> />
<CompareRow <CompareRow
@@ -246,7 +247,7 @@ export function Body({ stats }: BodyProps) {
<CompareRow <CompareRow
stats={stats} stats={stats}
value="fireChance" value="fireChance"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
display={(stats) => (stats.fireChance * 100).toFixed(0)} display={(stats) => (stats.fireChance * 100).toFixed(0)}
deltaNominalDisplay={(delta) => (delta * 100).toFixed(0)} deltaNominalDisplay={(delta) => (delta * 100).toFixed(0)}
/> />
@@ -288,28 +289,28 @@ export function Body({ stats }: BodyProps) {
<CompareRow <CompareRow
stats={stats} stats={stats}
value="volume" value="volume"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={1} decimals={1}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="width" value="width"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={1} decimals={1}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="height" value="height"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={1} decimals={1}
/> />
<CompareRow <CompareRow
stats={stats} stats={stats}
indent indent
value="length" value="length"
deltaType="lowerIsBetter" deltaType={CompareCellDirection.LOWER_IS_BETTER}
decimals={1} decimals={1}
/> />
</Table.Body> </Table.Body>
@@ -6,17 +6,17 @@ import {
import { Flex, IconButton, Table, Text } from "@radix-ui/themes"; import { Flex, IconButton, Table, Text } from "@radix-ui/themes";
import { useRef } from "react"; import { useRef } from "react";
import type { TankCharacteristics } from "../../core/blitzkit/tankCharacteristics"; import type { TankCharacteristics } from "../../core/blitzkit/tankCharacteristics";
import { Var } from "../../core/radix/var";
import { useLocale } from "../../hooks/useLocale"; import { useLocale } from "../../hooks/useLocale";
import { CompareEphemeral } from "../../stores/compareEphemeral"; import { CompareEphemeral } from "../../stores/compareEphemeral";
import { ComparePersistent } from "../../stores/comparePersistent"; import { ComparePersistent } from "../../stores/comparePersistent";
import { CompareCell, CompareCellDirection } from "../CompareCell";
import { StickyRowHeaderCell } from "../StickyRowHeaderCell"; import { StickyRowHeaderCell } from "../StickyRowHeaderCell";
type CompareRowProps = { type CompareRowProps = {
display?: ( display?: (
member: Awaited<TankCharacteristics> member: Awaited<TankCharacteristics>
) => number | string | undefined; ) => number | string | undefined;
deltaType?: "higherIsBetter" | "lowerIsBetter"; deltaType?: CompareCellDirection;
decimals?: number; decimals?: number;
deltaNominalDisplay?: (delta: number) => string | number; deltaNominalDisplay?: (delta: number) => string | number;
indent?: boolean; indent?: boolean;
@@ -33,7 +33,7 @@ type CompareRowProps = {
export function CompareRow({ export function CompareRow({
display, display,
deltaType = "higherIsBetter", deltaType = CompareCellDirection.HIGHER_IS_BETTER,
decimals, decimals,
deltaNominalDisplay, deltaNominalDisplay,
indent, indent,
@@ -108,33 +108,18 @@ export function CompareRow({
{values.map((value, index) => { {values.map((value, index) => {
const delta = value - values[0]; const delta = value - values[0];
const deltaPercentage = value / values[0] - 1; const deltaPercentage = value / values[0] - 1;
const normalizedDeltaPercentage = Math.round(
Math.min(100, Math.abs(deltaPercentage) * 2 * 100 + 25)
);
const resolvedDisplayValue = display const resolvedDisplayValue = display
? display(stats[index]) ? display(stats[index])
: decimals === undefined : decimals === undefined
? value ? value
: value?.toFixed(decimals); : value?.toFixed(decimals);
return ( return (
<Table.Cell <CompareCell
key={index} key={index}
style={{ truth={values[0]}
backgroundColor: value={value}
index === 0 || direction={deltaType}
value === undefined ||
values[0] === undefined ||
value === values[0]
? undefined
: (
deltaType === "higherIsBetter"
? value > values[0]
: value < values[0]
)
? `color-mix(in srgb, ${Var("green-7")} ${normalizedDeltaPercentage}%, ${Var("green-3")})`
: `color-mix(in srgb, ${Var("red-7")} ${normalizedDeltaPercentage}%, ${Var("red-3")})`,
}}
> >
<Flex <Flex
align="center" align="center"
@@ -160,8 +145,8 @@ export function CompareRow({
deltaNominalDisplay deltaNominalDisplay
? deltaNominalDisplay(delta) ? deltaNominalDisplay(delta)
: decimals === undefined : decimals === undefined
? delta ? delta
: delta.toFixed(decimals) : delta.toFixed(decimals)
}`} }`}
) )
</Text> </Text>
@@ -179,7 +164,7 @@ export function CompareRow({
</> </>
)} )}
</Flex> </Flex>
</Table.Cell> </CompareCell>
); );
})} })}
</Table.Row> </Table.Row>
@@ -51,19 +51,17 @@ export function CompareTable({ stats }: CompareTableProps) {
variant="surface" variant="surface"
style={{ style={{
position: "absolute", position: "absolute",
width: "100%", maxWidth: "100%",
height: "100%", height: "100%",
borderRadius: 0, borderBottomRightRadius: 0,
borderBottomLeftRadius: 0,
}} }}
> >
<Table.Header> <Table.Header>
<Table.Row> <Table.Row>
<StickyColumnHeaderCell width="0" style={{ height: "100%" }}> <StickyColumnHeaderCell width="0" style={{ height: "100%" }}>
<Flex <Flex
style={{ style={{ width: "100%", height: "100%" }}
width: "100%",
height: "100%",
}}
align="center" align="center"
justify="center" justify="center"
> >
@@ -107,8 +105,8 @@ export function CompareTable({ stats }: CompareTableProps) {
crewSkills[skill] === 0 crewSkills[skill] === 0
? Var("gray-11") ? Var("gray-11")
: permanentSkills.includes(skill) : permanentSkills.includes(skill)
? Var("crimson-11") ? Var("crimson-11")
: Var("amber-11"), : Var("amber-11"),
}} }}
/> />
))} ))}
@@ -279,14 +277,14 @@ export function CompareTable({ stats }: CompareTableProps) {
</Popover.Content> </Popover.Content>
</Popover.Root> </Popover.Root>
<Flex align="center" justify="center" gap="3"> <Flex justify="center" gap="3">
<Popover.Root> <Popover.Root>
<Popover.Trigger> <Popover.Trigger>
<Button <Button
variant="ghost" variant="ghost"
radius="large" radius="large"
style={{ style={{
height: "100%", height: "2rem",
width: 12, width: 12,
position: "relative", position: "relative",
}} }}
@@ -347,7 +345,24 @@ export function CompareTable({ stats }: CompareTableProps) {
}); });
}} }}
/> />
<Flex justify="end" mt="4">
<Flex justify="end" mt="4" gap="3">
<Button
variant="ghost"
onClick={() => {
CompareEphemeral.mutate((draft) => {
draft.members.map((member) => {
member.provisions = [];
});
});
}}
>
{
strings.website.tools.compare.table.provisions
.clear_all
}
</Button>
<Button <Button
variant="ghost" variant="ghost"
onClick={() => { onClick={() => {
@@ -475,7 +490,7 @@ export function CompareTable({ stats }: CompareTableProps) {
variant="ghost" variant="ghost"
radius="large" radius="large"
style={{ style={{
height: "100%", height: "2rem",
width: 12, width: 12,
position: "relative", position: "relative",
}} }}
@@ -538,7 +553,23 @@ export function CompareTable({ stats }: CompareTableProps) {
} }
/> />
<Flex justify="end" mt="4"> <Flex justify="end" mt="4" gap="4">
<Button
variant="ghost"
onClick={() => {
CompareEphemeral.mutate((draft) => {
draft.members.map((member) => {
member.consumables = [];
});
});
}}
>
{
strings.website.tools.compare.table.consumables
.clear_all
}
</Button>
<Button <Button
variant="ghost" variant="ghost"
onClick={() => { onClick={() => {
@@ -102,7 +102,7 @@ export function TankCard({ index, tank }: TankCardProps) {
}, []); }, []);
return ( return (
<StickyColumnHeaderCell> <StickyColumnHeaderCell width="0">
<Flex direction="column" align="center" justify="between" gap="2"> <Flex direction="column" align="center" justify="between" gap="2">
<TankControl index={index} key={tank.id} slug={tank.slug} /> <TankControl index={index} key={tank.id} slug={tank.slug} />
@@ -0,0 +1,41 @@
import { Table } from "@radix-ui/themes";
import type { CellProps } from "@radix-ui/themes/components/table";
export enum CompareCellDirection {
HIGHER_IS_BETTER,
LOWER_IS_BETTER,
}
interface CompareCellProps extends CellProps {
value: number;
truth: number;
direction?: CompareCellDirection;
}
export function CompareCell({
value,
truth,
style,
direction = CompareCellDirection.HIGHER_IS_BETTER,
...props
}: CompareCellProps) {
const percentage = value / truth - 1;
const shiftedPercentage = Math.round(
Math.min(100, Math.abs(percentage) * 2 * 100 + 25)
);
return (
<Table.Cell
style={{
backgroundColor:
value === truth
? undefined
: (direction === CompareCellDirection.HIGHER_IS_BETTER) ===
value > truth
? `color-mix(in srgb, var(--green-7) ${shiftedPercentage}%, var(--green-3))`
: `color-mix(in srgb, var(--red-7) ${shiftedPercentage}%, var(--red-3))`,
}}
{...props}
/>
);
}
@@ -1,6 +1,6 @@
import type { Consumable } from '@blitzkit/core'; import type { Consumable } from "@blitzkit/core";
import { Flex, type FlexProps } from '@radix-ui/themes'; import { Flex, type FlexProps } from "@radix-ui/themes";
import { ConsumableButton } from './ModuleButtons/ConsumableButton'; import { ConsumableButton } from "./ModuleButtons/ConsumableButton";
type ConsumablesManagerProps = FlexProps & { type ConsumablesManagerProps = FlexProps & {
consumables: Consumable[]; consumables: Consumable[];
@@ -27,6 +27,8 @@ export function ConsumablesManager({
return ( return (
<Flex wrap="wrap" gap="2" {...props}> <Flex wrap="wrap" gap="2" {...props}>
{consumables.map((consumable) => { {consumables.map((consumable) => {
if (consumable.game_mode_exclusive) return null;
const isSelected = selected.some((id) => id === consumable.id); const isSelected = selected.some((id) => id === consumable.id);
return ( return (
@@ -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>
);
}
@@ -9,12 +9,15 @@ const CONTRAST = 2 ** 2;
export function GuessRenderer() { export function GuessRenderer() {
const guessState = Guess.use((state) => state.guessState); const guessState = Guess.use((state) => state.guessState);
const isRevealed = guessState !== GuessState.NotGuessed; const helpingReveal = Guess.use((state) => state.helpingReveal);
const isRevealed = helpingReveal || guessState !== GuessState.NotGuessed;
return ( return (
<SmartCanvas <SmartCanvas
style={{ style={{
filter: `grayscale(${isRevealed ? 0 : 1}) contrast(${isRevealed ? 1 : CONTRAST}) brightness(${isRevealed ? 1 : BRIGHTNESS})`, filter: `grayscale(${isRevealed ? 0 : 1}) contrast(${
isRevealed ? 1 : CONTRAST
}) brightness(${isRevealed ? 1 : BRIGHTNESS})`,
transitionDuration: isRevealed ? "2s" : undefined, transitionDuration: isRevealed ? "2s" : undefined,
transitionProperty: "filter", transitionProperty: "filter",
}} }}
+190 -55
View File
@@ -7,20 +7,27 @@ import {
import { literals } from "@blitzkit/i18n"; import { literals } from "@blitzkit/i18n";
import { import {
ArrowRightIcon, ArrowRightIcon,
EyeOpenIcon,
MagnifyingGlassIcon, MagnifyingGlassIcon,
MixerVerticalIcon,
PaperPlaneIcon, PaperPlaneIcon,
StarFilledIcon,
TrashIcon,
} from "@radix-ui/react-icons"; } from "@radix-ui/react-icons";
import { import {
AlertDialog,
Box, Box,
Button, Button,
Card, Card,
DropdownMenu,
Flex, Flex,
IconButton,
Spinner, Spinner,
Text, Text,
TextField, TextField,
} from "@radix-ui/themes"; } from "@radix-ui/themes";
import fuzzysort from "fuzzysort"; import fuzzysort from "fuzzysort";
import { debounce } from "lodash-es"; import { debounce, times } from "lodash-es";
import { useCallback, useEffect, useRef, useState } from "react"; import { useCallback, useEffect, useRef, useState } from "react";
import { awaitableTankDefinitions } from "../core/awaitables/tankDefinitions"; import { awaitableTankDefinitions } from "../core/awaitables/tankDefinitions";
import { awaitableTankNames } from "../core/awaitables/tankNames"; import { awaitableTankNames } from "../core/awaitables/tankNames";
@@ -43,11 +50,14 @@ export function Guesser() {
const guessState = Guess.use((state) => state.guessState); const guessState = Guess.use((state) => state.guessState);
const correctGuesses = Guess.use((state) => state.correctGuesses); const correctGuesses = Guess.use((state) => state.correctGuesses);
const totalGuesses = Guess.use((state) => state.totalGuesses); const totalGuesses = Guess.use((state) => state.totalGuesses);
const helpingReveal = Guess.use((state) => state.helpingReveal);
const streak = Guess.use((state) => state.streak);
const { strings, unwrap } = useLocale(); const { strings, unwrap } = useLocale();
const input = useRef<HTMLInputElement>(null); const input = useRef<HTMLInputElement>(null);
const [searching, setSearching] = useState(false); const [searching, setSearching] = useState(false);
const [results, setResults] = useState<TankDefinition[] | null>(null); const [results, setResults] = useState<TankDefinition[] | null>(null);
const [selected, setSelected] = useState<TankDefinition | null>(null); const [selected, setSelected] = useState<TankDefinition | null>(null);
const tiers = Guess.use((state) => state.tiers);
const requestSearch = useCallback(() => { const requestSearch = useCallback(() => {
setSelected(null); setSelected(null);
@@ -92,76 +102,150 @@ export function Guesser() {
width="100%" width="100%"
p="4" p="4"
maxWidth="25rem" maxWidth="25rem"
gap="4" gap="3"
> >
{results !== null && ( <Box position="relative">
<Card variant="classic"> {results !== null && (
<Box py="2" px="3"> <Card variant="classic">
{results.length === 0 && ( <Box py="2" px="3">
<Flex justify="center"> {results.length === 0 && (
<Text color="gray"> <Flex justify="center">
{strings.website.tools.guess.search.no_results} <Text color="gray">
</Text> {strings.website.tools.guess.search.no_results}
</Flex> </Text>
)} </Flex>
)}
<SearchResults.Root> <SearchResults.Root>
{results.map((result) => { {results.map((result) => {
const Icon = classIcons[result.class]; const Icon = classIcons[result.class];
return ( return (
<SearchResults.Item <SearchResults.Item
key={result.id} key={result.id}
onClick={() => { onClick={() => {
if (!input.current) return; if (!input.current) return;
input.current.value = unwrap(result.name); input.current.value = unwrap(result.name);
setSelected(result); setSelected(result);
setResults(null); setResults(null);
}} }}
text={unwrap(result.name)} text={unwrap(result.name)}
prefix={ prefix={
<img <img
style={{ width: "1em", height: "1em" }} style={{ width: "1em", height: "1em" }}
src={asset(`flags/circle/${result.nation}.webp`)} src={asset(`flags/circle/${result.nation}.webp`)}
/> />
} }
discriminator={ discriminator={
<Flex <Flex
align="center" align="center"
gap="1" gap="1"
width="38px" width="38px"
justify="center" justify="center"
> >
<Icon width="1em" height="1em" /> <Icon width="1em" height="1em" />
{TIER_ROMAN_NUMERALS[result.tier]} {TIER_ROMAN_NUMERALS[result.tier]}
</Flex> </Flex>
} }
/> />
); );
})} })}
</SearchResults.Root> </SearchResults.Root>
</Box> </Box>
</Card> </Card>
)} )}
</Box>
<Flex justify="center" style={{ userSelect: "none" }}> <Flex justify="center" style={{ userSelect: "none" }}>
<Text> <Text>
{literals(strings.website.tools.guess.stats, { {literals(strings.website.tools.guess.stats, {
correct: correctGuesses, correct: correctGuesses,
total: totalGuesses, total: totalGuesses,
streak: streak,
})} })}
</Text> </Text>
</Flex> </Flex>
<Flex gap="3"> <Flex gap={{ initial: "2", sm: "3" }}>
<DropdownMenu.Root modal={false}>
<DropdownMenu.Trigger>
<IconButton
size={{ initial: "2", sm: "3" }}
variant="surface"
color="gray"
>
<MixerVerticalIcon />
</IconButton>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
{times(10, (index) => {
const tier = 10 - index;
const isSelected = tiers.includes(tier);
return (
<DropdownMenu.CheckboxItem
checked={isSelected}
key={tier}
onClick={(event) => {
event.preventDefault();
Guess.mutate((draft) => {
if (isSelected) {
if (draft.tiers.length === 1) return;
draft.tiers = draft.tiers.filter((t) => t !== tier);
} else {
draft.tiers = [...draft.tiers, tier];
}
draft.streak = 0;
});
}}
>
{literals(strings.website.tools.guess.tier, {
tier: TIER_ROMAN_NUMERALS[tier],
})}
</DropdownMenu.CheckboxItem>
);
})}
<DropdownMenu.Separator />
<DropdownMenu.Item
onClick={(event) => {
event.preventDefault();
Guess.mutate((draft) => {
draft.tiers = Guess.initial.tiers;
});
}}
>
<StarFilledIcon /> {strings.website.tools.guess.select_all}
</DropdownMenu.Item>
<DropdownMenu.Item
color="red"
onClick={(event) => {
event.preventDefault();
Guess.mutate((draft) => {
draft.tiers = [];
});
}}
>
<TrashIcon /> {strings.website.tools.guess.clear}
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>
<TextField.Root <TextField.Root
disabled={guessState !== GuessState.NotGuessed} disabled={guessState !== GuessState.NotGuessed}
ref={input} ref={input}
onChange={requestSearch} onChange={requestSearch}
style={{ flex: 1 }} style={{ flex: 1, maxWidth: "14rem" }}
placeholder={strings.website.tools.guess.search.placeholder} placeholder={strings.website.tools.guess.search.placeholder}
size="3" size={{ initial: "2", sm: "3" }}
variant="classic" variant="classic"
> >
<TextField.Slot> <TextField.Slot>
@@ -169,8 +253,50 @@ export function Guesser() {
</TextField.Slot> </TextField.Slot>
</TextField.Root> </TextField.Root>
<AlertDialog.Root>
<AlertDialog.Trigger>
<IconButton
size={{ initial: "2", sm: "3" }}
disabled={guessState !== GuessState.NotGuessed}
>
<EyeOpenIcon />
</IconButton>
</AlertDialog.Trigger>
<AlertDialog.Content>
<AlertDialog.Title>
{strings.website.tools.guess.help.title}
</AlertDialog.Title>
<AlertDialog.Description>
{strings.website.tools.guess.help.description}
</AlertDialog.Description>
<Flex justify="end" gap="2">
<AlertDialog.Cancel>
<Button variant="outline">
{strings.website.tools.guess.help.cancel}
</Button>
</AlertDialog.Cancel>
<AlertDialog.Action>
<Button
color="tomato"
onClick={() => {
Guess.mutate((draft) => {
draft.helpingReveal = true;
draft.streak = 0;
});
}}
>
{strings.website.tools.guess.help.reveal}
</Button>
</AlertDialog.Action>
</Flex>
</AlertDialog.Content>
</AlertDialog.Root>
<Button <Button
size="3" size={{ initial: "2", sm: "3" }}
color={ color={
guessState === GuessState.NotGuessed && selected === null guessState === GuessState.NotGuessed && selected === null
? "red" ? "red"
@@ -178,7 +304,8 @@ export function Guesser() {
} }
onClick={() => { onClick={() => {
if (guessState === GuessState.NotGuessed) { if (guessState === GuessState.NotGuessed) {
const correct = selected !== null && selected.id === tank.id; const correct =
selected !== null && selected.id === tank.id && !helpingReveal;
Guess.mutate((draft) => { Guess.mutate((draft) => {
draft.guessState = correct draft.guessState = correct
@@ -186,9 +313,16 @@ export function Guesser() {
: GuessState.Incorrect; : GuessState.Incorrect;
draft.totalGuesses++; draft.totalGuesses++;
draft.correctGuesses += correct ? 1 : 0; draft.correctGuesses += correct ? 1 : 0;
draft.streak = correct ? draft.streak + 1 : 0;
}); });
} else { } else {
const id = Number(ids[Math.floor(Math.random() * ids.length)]); const filteredIds = ids.filter((id) => {
const tank = tankDefinitions.tanks[Number(id)];
return tiers.includes(tank.tier);
});
const id = Number(
filteredIds[Math.floor(Math.random() * filteredIds.length)]
);
const tank = tankDefinitions.tanks[id]; const tank = tankDefinitions.tanks[id];
Guess.mutate((draft) => { Guess.mutate((draft) => {
@@ -196,6 +330,7 @@ export function Guesser() {
draft.tank = tank; draft.tank = tank;
draft.guessState = GuessState.NotGuessed; draft.guessState = GuessState.NotGuessed;
draft.helpingReveal = false;
input.current.value = ""; input.current.value = "";
}); });
@@ -1,3 +1,5 @@
import { Box, Text } from "@radix-ui/themes";
import { Html } from "@react-three/drei";
import { memo, type ComponentProps } from "react"; import { memo, type ComponentProps } from "react";
interface Props extends ComponentProps<"spotLight"> { interface Props extends ComponentProps<"spotLight"> {
@@ -8,10 +10,20 @@ export const HelpingSpotLight = memo<Props>(({ debug, ...props }) => {
return ( return (
<> <>
{debug && ( {debug && (
<mesh position={props.position}> <group position={props.position}>
<icosahedronGeometry args={[0.1, 2]} /> <mesh>
<meshBasicMaterial color={props.color} /> <icosahedronGeometry args={[0.1, 2]} />
</mesh> <meshBasicMaterial color={props.color} />
</mesh>
<Html center>
<Box pb="9">
<Text wrap="nowrap">
{props.intensity} @ {JSON.stringify(props.userData)}
</Text>
</Box>
</Html>
</group>
)} )}
<spotLight {...props} /> <spotLight {...props} />
@@ -1,20 +1,22 @@
import { Flex } from '@radix-ui/themes'; import { Flex } from "@radix-ui/themes";
import type { MaybeSkeletonComponentProps } from '../../types/maybeSkeletonComponentProps'; import type { MaybeSkeletonComponentProps } from "../../types/maybeSkeletonComponentProps";
import { StickyTableRoot } from '../StickyTableRoot'; import { StickyTableRoot } from "../StickyTableRoot";
import { Header } from './Header'; import { Header } from "./Header";
import { Tanks } from './Tanks'; import { Tanks } from "./Tanks";
export function TankTable({ skeleton }: MaybeSkeletonComponentProps) { export function TankTable({ skeleton }: MaybeSkeletonComponentProps) {
return ( return (
<Flex justify="center" maxWidth="100%" flexGrow="1" position="relative"> <Flex justify="center" maxWidth="100%" flexGrow="1" position="relative">
<StickyTableRoot <StickyTableRoot
size={{ initial: '1', sm: '2' }} size={{ initial: "1", sm: "2" }}
variant="surface" variant="surface"
style={{ style={{
position: 'absolute', position: "absolute",
maxWidth: '100%', maxWidth: "100%",
maxHeight: '100%', maxHeight: "100%",
height: '100%', height: "100%",
borderBottomRightRadius: 0,
borderBottomLeftRadius: 0,
}} }}
> >
<Header /> <Header />
@@ -1,24 +1,26 @@
import { TankDefinition, formatCompact } from '@blitzkit/core'; import { TankDefinition, formatCompact } from "@blitzkit/core";
import { Table } from '@radix-ui/themes'; import { Table } from "@radix-ui/themes";
import { memo } from 'react'; import { memo } from "react";
import { awaitableAverageDefinitions } from '../../core/awaitables/averageDefinitions'; import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions";
import { useAveragesExclusionRatio } from '../../hooks/useAveragesExclusionRatio'; import { useAveragesExclusionRatio } from "../../hooks/useAveragesExclusionRatio";
import { useLocale } from '../../hooks/useLocale'; import { useLocale } from "../../hooks/useLocale";
import { Performance } from '../../stores/performance'; import { Performance } from "../../stores/performance";
import { TankRowHeaderCell } from '../TankRowHeaderCell'; import { CompareCell, CompareCellDirection } from "../CompareCell";
import { TankRowHeaderCell } from "../TankRowHeaderCell";
interface TankRowProps { interface TankRowProps {
tank: TankDefinition; tank: TankDefinition;
average: Record<string, number>;
} }
const averageDefinitions = await awaitableAverageDefinitions; const averageDefinitions = await awaitableAverageDefinitions;
export const TankRow = memo<TankRowProps>( export const TankRow = memo<TankRowProps>(
({ tank }) => { ({ tank, average }) => {
const averages = averageDefinitions.averages[tank.id]; const averages = averageDefinitions.averages[tank.id];
const ratio = useAveragesExclusionRatio(); const ratio = useAveragesExclusionRatio();
const playerCountPeriod = Performance.use( const playerCountPeriod = Performance.use(
(state) => state.playerCountPeriod, (state) => state.playerCountPeriod
); );
const { locale } = useLocale(); const { locale } = useLocale();
@@ -26,59 +28,108 @@ export const TankRow = memo<TankRowProps>(
<Table.Row> <Table.Row>
<TankRowHeaderCell tank={tank} /> <TankRowHeaderCell tank={tank} />
<Table.Cell align="center"> <CompareCell
value={averages.mu.wins / averages.mu.battles}
truth={average.winrate}
align="center"
>
{((averages.mu.wins / averages.mu.battles) * 100).toFixed(1)}% {((averages.mu.wins / averages.mu.battles) * 100).toFixed(1)}%
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <Table.Cell align="center">
{formatCompact( {formatCompact(
locale, locale,
Math.round(ratio * averages.samples[playerCountPeriod]), Math.round(ratio * averages.samples[playerCountPeriod])
)} )}
</Table.Cell> </Table.Cell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.damage_dealt / averages.mu.battles}
truth={average.damage}
align="center"
>
{Math.round( {Math.round(
averages.mu.damage_dealt / averages.mu.battles, averages.mu.damage_dealt / averages.mu.battles
).toLocaleString(locale)} ).toLocaleString(locale)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.survived_battles / averages.mu.battles}
truth={average.survival}
align="center"
>
{Math.round( {Math.round(
(averages.mu.survived_battles / averages.mu.battles) * 100, (averages.mu.survived_battles / averages.mu.battles) * 100
)} )}
% %
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.xp / averages.mu.battles}
truth={average.xp}
align="center"
>
{Math.round(averages.mu.xp / averages.mu.battles).toLocaleString( {Math.round(averages.mu.xp / averages.mu.battles).toLocaleString(
locale, locale
)} )}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.frags / averages.mu.battles}
truth={average.kills}
align="center"
>
{(averages.mu.frags / averages.mu.battles).toFixed(2)} {(averages.mu.frags / averages.mu.battles).toFixed(2)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.spotted / averages.mu.battles}
truth={average.spots}
align="center"
>
{(averages.mu.spotted / averages.mu.battles).toFixed(2)} {(averages.mu.spotted / averages.mu.battles).toFixed(2)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.hits / averages.mu.shots}
truth={average.accuracy}
align="center"
>
{Math.round((averages.mu.hits / averages.mu.shots) * 100)}% {Math.round((averages.mu.hits / averages.mu.shots) * 100)}%
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.shots / averages.mu.battles}
truth={average.shots}
align="center"
>
{(averages.mu.shots / averages.mu.battles).toFixed(1)} {(averages.mu.shots / averages.mu.battles).toFixed(1)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.hits / averages.mu.battles}
truth={average.hits}
align="center"
>
{(averages.mu.hits / averages.mu.battles).toFixed(1)} {(averages.mu.hits / averages.mu.battles).toFixed(1)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.damage_dealt / averages.mu.damage_received}
truth={average.damageRatio}
align="center"
>
{(averages.mu.damage_dealt / averages.mu.damage_received).toFixed(2)} {(averages.mu.damage_dealt / averages.mu.damage_received).toFixed(2)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.damage_received / averages.mu.battles}
truth={average.damageReceived}
direction={CompareCellDirection.LOWER_IS_BETTER}
align="center"
>
{Math.round( {Math.round(
averages.mu.damage_received / averages.mu.battles, averages.mu.damage_received / averages.mu.battles
).toLocaleString(locale)} ).toLocaleString(locale)}
</Table.Cell> </CompareCell>
<Table.Cell align="center"> <CompareCell
value={averages.mu.capture_points / averages.mu.battles}
truth={average.capturePoints}
align="center"
>
{(averages.mu.capture_points / averages.mu.battles).toFixed(2)} {(averages.mu.capture_points / averages.mu.battles).toFixed(2)}
</Table.Cell> </CompareCell>
</Table.Row> </Table.Row>
); );
}, },
(prev, next) => prev.tank.id === next.tank.id, (prev, next) => prev.tank.id === next.tank.id
); );
@@ -1,17 +1,27 @@
import { formatCompact, type BlitzkitStats } from "@blitzkit/core";
import { Table } from "@radix-ui/themes"; import { Table } from "@radix-ui/themes";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { Fragment, Suspense, useEffect, useMemo, useState } from "react"; import {
Fragment,
Suspense,
useCallback,
useEffect,
useMemo,
useState,
} from "react";
import usePromise from "react-promise-suspense"; import usePromise from "react-promise-suspense";
import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions"; import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions";
import { awaitableTankDefinitions } from "../../core/awaitables/tankDefinitions"; import { awaitableTankDefinitions } from "../../core/awaitables/tankDefinitions";
import { filterTanks } from "../../core/blitzkit/filterTanks"; import { filterTanks } from "../../core/blitzkit/filterTanks";
import { useAveragesExclusionRatio } from "../../hooks/useAveragesExclusionRatio";
import { useLocale } from "../../hooks/useLocale";
import { Performance } from "../../stores/performance"; import { Performance } from "../../stores/performance";
import { TankFilters } from "../../stores/tankFilters"; import { TankFilters } from "../../stores/tankFilters";
import { TankPerformanceSort } from "../../stores/tankPerformanceSort"; import { TankPerformanceSort } from "../../stores/tankPerformanceSort";
import type { MaybeSkeletonComponentProps } from "../../types/maybeSkeletonComponentProps"; import type { MaybeSkeletonComponentProps } from "../../types/maybeSkeletonComponentProps";
import { StickyRowHeaderCell } from "../StickyRowHeaderCell";
import { RowLoader } from "./RowLoader"; import { RowLoader } from "./RowLoader";
import { TankRow } from "./TankRow"; import { TankRow } from "./TankRow";
import { Total } from "./Total";
const PREVIEW_COUNT = 10; const PREVIEW_COUNT = 10;
const DEFAULT_LOADED_ROWS = 25; const DEFAULT_LOADED_ROWS = 25;
@@ -145,9 +155,83 @@ export function Tanks({ skeleton }: MaybeSkeletonComponentProps) {
setLoadedRows(DEFAULT_LOADED_ROWS); setLoadedRows(DEFAULT_LOADED_ROWS);
}, [filters, sort]); }, [filters, sort]);
const playerCountPeriod = Performance.use((state) => state.playerCountPeriod);
const { strings, locale } = useLocale();
const ratio = useAveragesExclusionRatio();
const sum = useCallback(
(slice: (tank: BlitzkitStats) => number) => {
return tanksSorted.reduce(
(acc, tank) => acc + tank.samples[playerCountPeriod] * slice(tank.mu),
0
);
},
[tanksSorted]
);
const battles = sum(({ battles }) => battles);
const winrate = sum(({ wins }) => wins) / battles;
const damage = sum(({ damage_dealt }) => damage_dealt) / battles;
const survival = sum(({ survived_battles }) => survived_battles) / battles;
const xp = sum(({ xp }) => xp) / battles;
const kills = sum(({ frags }) => frags) / battles;
const spots = sum(({ spotted }) => spotted) / battles;
const hits = sum(({ hits }) => hits) / battles;
const shots = sum(({ shots }) => shots) / battles;
const accuracy = hits / shots;
const damageReceived =
sum(({ damage_received }) => damage_received) / battles;
const damageRatio = damage / damageReceived;
const capturePoints = sum(({ capture_points }) => capture_points) / battles;
const average = {
battles,
winrate,
damage,
survival,
xp,
kills,
spots,
hits,
shots,
accuracy,
damageReceived,
damageRatio,
capturePoints,
};
return ( return (
<Table.Body> <Table.Body>
<Total tanks={tanksSorted} /> <Table.Row>
<StickyRowHeaderCell style={{ overflow: "hidden", display: "flex" }}>
{strings.website.tools.performance.table.tanks.total}
</StickyRowHeaderCell>
<Table.Cell align="center">{(winrate * 100).toFixed(1)}%</Table.Cell>
<Table.Cell align="center">
{formatCompact(
locale,
ratio * averageDefinitions.samples[playerCountPeriod]
)}
</Table.Cell>
<Table.Cell align="center">
{Math.round(damage).toLocaleString(locale)}
</Table.Cell>
<Table.Cell align="center">
{Math.round(survival * 100).toFixed(1)}%
</Table.Cell>
<Table.Cell align="center">
{Math.round(xp).toLocaleString(locale)}
</Table.Cell>
<Table.Cell align="center">{kills.toFixed(2)}</Table.Cell>
<Table.Cell align="center">{spots.toFixed(2)}</Table.Cell>
<Table.Cell align="center">{(accuracy * 100).toFixed(0)}%</Table.Cell>
<Table.Cell align="center">{shots.toFixed(1)}</Table.Cell>
<Table.Cell align="center">{hits.toFixed(1)}</Table.Cell>
<Table.Cell align="center">{damageRatio.toFixed(2)}</Table.Cell>
<Table.Cell align="center">
{Math.round(damageReceived).toLocaleString(locale)}
</Table.Cell>
<Table.Cell align="center">{capturePoints.toFixed(2)}</Table.Cell>
</Table.Row>
{tanksSorted.slice(0, loadedRows).map((averages) => { {tanksSorted.slice(0, loadedRows).map((averages) => {
const tank = tankDefinitions.tanks[averages.id]; const tank = tankDefinitions.tanks[averages.id];
@@ -157,7 +241,7 @@ export function Tanks({ skeleton }: MaybeSkeletonComponentProps) {
return ( return (
<Fragment key={tank.id}> <Fragment key={tank.id}>
<Suspense fallback={<RowLoader />}> <Suspense fallback={<RowLoader />}>
<TankRow tank={tank} /> <TankRow average={average} tank={tank} />
</Suspense> </Suspense>
</Fragment> </Fragment>
); );
@@ -1,91 +0,0 @@
import {
AverageDefinitionsEntry,
formatCompact,
type BlitzkitStats,
} from "@blitzkit/core";
import { Table } from "@radix-ui/themes";
import { memo, useCallback } from "react";
import { awaitableAverageDefinitions } from "../../core/awaitables/averageDefinitions";
import { useAveragesExclusionRatio } from "../../hooks/useAveragesExclusionRatio";
import { useLocale } from "../../hooks/useLocale";
import { Performance } from "../../stores/performance";
import { StickyRowHeaderCell } from "../StickyRowHeaderCell";
export interface AverageDefinitionsEntryWithId extends AverageDefinitionsEntry {
id: number;
}
interface TotalProps {
tanks: AverageDefinitionsEntryWithId[];
}
const averageDefinitions = await awaitableAverageDefinitions;
export const Total = memo<TotalProps>(
({ tanks }) => {
const playerCountPeriod = Performance.use(
(state) => state.playerCountPeriod
);
const { strings, locale } = useLocale();
const ratio = useAveragesExclusionRatio();
const sum = useCallback(
(slice: (tank: BlitzkitStats) => number) => {
return tanks.reduce(
(acc, tank) => acc + tank.samples[playerCountPeriod] * slice(tank.mu),
0
);
},
[tanks]
);
const battles = sum(({ battles }) => battles);
const winrate = sum(({ wins }) => wins) / battles;
const damage = sum(({ damage_dealt }) => damage_dealt) / battles;
const survival = sum(({ survived_battles }) => survived_battles) / battles;
const xp = sum(({ xp }) => xp) / battles;
const kills = sum(({ frags }) => frags) / battles;
const spots = sum(({ spotted }) => spotted) / battles;
const hits = sum(({ hits }) => hits) / battles;
const shots = sum(({ shots }) => shots) / battles;
const accuracy = hits / shots;
const damageReceived =
sum(({ damage_received }) => damage_received) / battles;
const damageRatio = damage / damageReceived;
const capturePoints = sum(({ capture_points }) => capture_points) / battles;
return (
<Table.Row>
<StickyRowHeaderCell style={{ overflow: "hidden", display: "flex" }}>
{strings.website.tools.performance.table.tanks.total}
</StickyRowHeaderCell>
<Table.Cell align="center">{(winrate * 100).toFixed(1)}%</Table.Cell>
<Table.Cell align="center">
{formatCompact(
locale,
ratio * averageDefinitions.samples[playerCountPeriod]
)}
</Table.Cell>
<Table.Cell align="center">
{Math.round(damage).toLocaleString(locale)}
</Table.Cell>
<Table.Cell align="center">
{Math.round(survival * 100).toFixed(1)}%
</Table.Cell>
<Table.Cell align="center">
{Math.round(xp).toLocaleString(locale)}
</Table.Cell>
<Table.Cell align="center">{kills.toFixed(2)}</Table.Cell>
<Table.Cell align="center">{spots.toFixed(2)}</Table.Cell>
<Table.Cell align="center">{(accuracy * 100).toFixed(0)}%</Table.Cell>
<Table.Cell align="center">{shots.toFixed(1)}</Table.Cell>
<Table.Cell align="center">{hits.toFixed(1)}</Table.Cell>
<Table.Cell align="center">{damageRatio.toFixed(2)}</Table.Cell>
<Table.Cell align="center">
{Math.round(damageReceived).toLocaleString(locale)}
</Table.Cell>
<Table.Cell align="center">{capturePoints.toFixed(2)}</Table.Cell>
</Table.Row>
);
},
(prev, next) => prev.tanks === next.tanks
);
@@ -37,26 +37,26 @@ export function PlaylistActions() {
{strings.website.tools.playlist.shuffle} {strings.website.tools.playlist.shuffle}
</Button> </Button>
<Button
size={{ initial: "1", xs: "2" }}
variant="outline"
onClick={() => {
Playlist.mutate((draft) => {
draft.list = draft.list?.filter(
(entry) =>
(!entry.now ||
!entry.then ||
entry.now.battles === entry.then.battles) &&
!entry.checked
);
});
}}
>
{strings.website.tools.playlist.remove}
</Button>
{wargaming && ( {wargaming && (
<> <>
<Button
size={{ initial: "1", xs: "2" }}
variant="outline"
onClick={() => {
Playlist.mutate((draft) => {
draft.list = draft.list?.filter(
(entry) =>
(!entry.now ||
!entry.then ||
entry.now.battles === entry.then.battles) &&
!entry.checked
);
});
}}
>
{strings.website.tools.playlist.remove}
</Button>
<DropdownMenu.Root> <DropdownMenu.Root>
<DropdownMenu.Trigger> <DropdownMenu.Trigger>
<Button size={{ initial: "1", xs: "2" }}> <Button size={{ initial: "1", xs: "2" }}>
@@ -1,5 +1,6 @@
import { Flex } from '@radix-ui/themes'; import { Flex } from "@radix-ui/themes";
import { ProvisionButton } from './ModuleButtons/ProvisionButton'; import { awaitableProvisionDefinitions } from "../core/awaitables/provisionDefinitions";
import { ProvisionButton } from "./ModuleButtons/ProvisionButton";
interface ProvisionsManagerProps { interface ProvisionsManagerProps {
provisions: number[]; provisions: number[];
@@ -8,6 +9,8 @@ interface ProvisionsManagerProps {
onChange?: (provisions: number[]) => void; onChange?: (provisions: number[]) => void;
} }
const provisionDefinitions = await awaitableProvisionDefinitions;
export function ProvisionsManager({ export function ProvisionsManager({
provisions, provisions,
selected, selected,
@@ -15,15 +18,18 @@ export function ProvisionsManager({
disabled, disabled,
}: ProvisionsManagerProps) { }: ProvisionsManagerProps) {
return ( return (
<Flex wrap="wrap" gap="2" justify={{ initial: 'center', sm: 'start' }}> <Flex wrap="wrap" gap="2" justify={{ initial: "center", sm: "start" }}>
{provisions.map((provision) => { {provisions.map((id) => {
const isSelected = selected.includes(provision); const isSelected = selected.includes(id);
const provision = provisionDefinitions.provisions[id];
if (provision.game_mode_exclusive) return null;
return ( return (
<ProvisionButton <ProvisionButton
key={provision} key={id}
disabled={disabled && !isSelected} disabled={disabled && !isSelected}
provision={provision} provision={id}
selected={isSelected} selected={isSelected}
onClick={() => { onClick={() => {
if (!onChange) return; if (!onChange) return;
@@ -31,9 +37,9 @@ export function ProvisionsManager({
const draft = [...selected]; const draft = [...selected];
if (isSelected) { if (isSelected) {
draft.splice(draft.indexOf(provision), 1); draft.splice(draft.indexOf(id), 1);
} else { } else {
draft.push(provision); draft.push(id);
} }
onChange(draft); onChange(draft);
@@ -41,7 +41,7 @@ export function TankSearchCard({ tank, onSelect }: TankSearchCardProps) {
case 'fire.damage': case 'fire.damage':
return shell0.armor_damage.toFixed(0); return shell0.armor_damage.toFixed(0);
case 'fire.moduleDamage': case 'fire.moduleDamage':
return shell0.armor_damage.toFixed(0); return shell0.module_damage.toFixed(0);
case 'fire.dispersionMoving': case 'fire.dispersionMoving':
return tracks.dispersion_move.toFixed(3); return tracks.dispersion_move.toFixed(3);
case 'fire.dispersionStill': case 'fire.dispersionStill':
File diff suppressed because it is too large. Load diff
@@ -429,7 +429,7 @@ export const TankSearch = memo<TankSearchProps>(
}, [tankFilters, tankopediaSort]); }, [tankFilters, tankopediaSort]);
return ( return (
<Flex direction="column" gap="4" flexGrow="1" {...props}> <Flex direction="column" gap="2" flexGrow="1" {...props}>
<SearchBar <SearchBar
skeleton={skeleton} skeleton={skeleton}
topResult={tanks?.[0]} topResult={tanks?.[0]}
@@ -487,7 +487,7 @@ export const TankSearch = memo<TankSearchProps>(
)} )}
</Flex> </Flex>
{tankFilters.testing === "only" && ( {tankFilters.showTesting && !tankFilters.showNonTesting && (
<Flex justify="center" mt="4"> <Flex justify="center" mt="4">
<Callout.Root color="amber"> <Callout.Root color="amber">
<Callout.Icon> <Callout.Icon>
@@ -176,11 +176,17 @@ export function Modules() {
(turret) => turret.id === unlock.id (turret) => turret.id === unlock.id
)!; )!;
if ( // Check if current gun exists in new turret
!draft.protagonist.turret.guns.some( const gunInNewTurret = draft.protagonist.turret.guns.find(
(gun) => gun.id === draft.protagonist.gun.id (gun) => gun.id === draft.protagonist.gun.id
) );
) {
if (gunInNewTurret) {
// Gun exists - get it FROM this turret
draft.protagonist.gun = gunInNewTurret;
draft.protagonist.shell = gunInNewTurret.shells[0];
} else {
// Gun doesn't exist - select top gun from new turret
draft.protagonist.gun = draft.protagonist.turret.guns.at(-1)!; draft.protagonist.gun = draft.protagonist.turret.guns.at(-1)!;
draft.protagonist.shell = draft.protagonist.gun.shells[0]; draft.protagonist.shell = draft.protagonist.gun.shells[0];
} }
@@ -1,10 +1,10 @@
import { asset } from '@blitzkit/core'; import { asset } from "@blitzkit/core";
import { Box, Flex, Heading, Text } from '@radix-ui/themes'; import { Box, Flex, Heading, Text } from "@radix-ui/themes";
import { awaitableConsumableDefinitions } from '../../core/awaitables/consumableDefinitions'; import { awaitableConsumableDefinitions } from "../../core/awaitables/consumableDefinitions";
import { awaitableGameDefinitions } from '../../core/awaitables/gameDefinitions'; import { awaitableGameDefinitions } from "../../core/awaitables/gameDefinitions";
import { awaitableProvisionDefinitions } from '../../core/awaitables/provisionDefinitions'; import { awaitableProvisionDefinitions } from "../../core/awaitables/provisionDefinitions";
import { useLocale } from '../../hooks/useLocale'; import { useLocale } from "../../hooks/useLocale";
import { Duel } from '../../stores/duel'; import { Duel } from "../../stores/duel";
const [gameDefinitions, consumableDefinitions, provisionDefinitions] = const [gameDefinitions, consumableDefinitions, provisionDefinitions] =
await Promise.all([ await Promise.all([
@@ -39,22 +39,22 @@ export function GameModeSection() {
overflow="hidden" overflow="hidden"
direction="column" direction="column"
style={{ style={{
borderRadius: 'var(--radius-3)', borderRadius: "var(--radius-3)",
background: `url(${asset( background: `url(${asset(
`icons/game_mode_banners/${id}.webp`, `icons/game_mode_banners/${id}.webp`
)})`, )})`,
backgroundSize: 'cover', backgroundSize: "cover",
backgroundPosition: 'center', backgroundPosition: "center",
}} }}
> >
<Box <Box
flexGrow="1" flexGrow="1"
style={{ style={{
background: `url(${asset( background: `url(${asset(
`icons/game_mode_banners/${id}.webp`, `icons/game_mode_banners/${id}.webp`
)})`, )})`,
backgroundSize: 'cover', backgroundSize: "cover",
backgroundPosition: 'center', backgroundPosition: "center",
}} }}
/> />
@@ -64,8 +64,8 @@ export function GameModeSection() {
height="98px" height="98px"
flexShrink="0" flexShrink="0"
style={{ style={{
backdropFilter: 'blur(4rem)', backdropFilter: "blur(4rem)",
WebkitBackdropFilter: 'blur(4rem)', WebkitBackdropFilter: "blur(4rem)",
}} }}
align="center" align="center"
justify="center" justify="center"
@@ -83,9 +83,9 @@ export function GameModeSection() {
<Flex align="center" gap="1"> <Flex align="center" gap="1">
<img <img
style={{ style={{
width: '1.5em', width: "1.5em",
height: '1.5em', height: "1.5em",
objectFit: 'contain', objectFit: "contain",
}} }}
src={asset(`icons/provisions/${id}.webp`)} src={asset(`icons/provisions/${id}.webp`)}
alt={unwrap(provisions.name)} alt={unwrap(provisions.name)}
@@ -95,6 +95,7 @@ export function GameModeSection() {
</Text> </Text>
); );
})} })}
{gameDefinitions.roles[value].consumables.map((id) => { {gameDefinitions.roles[value].consumables.map((id) => {
const consumable = consumableDefinitions.consumables[id]; const consumable = consumableDefinitions.consumables[id];
@@ -103,9 +104,9 @@ export function GameModeSection() {
<Flex align="center" gap="1"> <Flex align="center" gap="1">
<img <img
style={{ style={{
width: '1.5em', width: "1.5em",
height: '1.5em', height: "1.5em",
objectFit: 'contain', objectFit: "contain",
}} }}
src={asset(`icons/consumables/${id}.webp`)} src={asset(`icons/consumables/${id}.webp`)}
alt={unwrap(consumable.name)} alt={unwrap(consumable.name)}
@@ -108,10 +108,10 @@ export function CustomShellButton() {
{strings.common.shells.ap} {strings.common.shells.ap}
</Select.Item> </Select.Item>
<Select.Item value={`${ShellType.APCR}`}> <Select.Item value={`${ShellType.APCR}`}>
{strings.common.shells.apcr} {strings.common.shells.ap_cr}
</Select.Item> </Select.Item>
<Select.Item value={`${ShellType.HEAT}`}> <Select.Item value={`${ShellType.HEAT}`}>
{strings.common.shells.heat} {strings.common.shells.hc}
</Select.Item> </Select.Item>
<Select.Item value={`${ShellType.HE}`}> <Select.Item value={`${ShellType.HE}`}>
{strings.common.shells.he} {strings.common.shells.he}
@@ -12,6 +12,7 @@ import {
EyeOpenIcon, EyeOpenIcon,
ShadowInnerIcon, ShadowInnerIcon,
ShadowNoneIcon, ShadowNoneIcon,
SunIcon,
} from "@radix-ui/react-icons"; } from "@radix-ui/react-icons";
import { import {
Button, Button,
@@ -55,7 +56,7 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
const hasCustomShell = Tankopedia.use( const hasCustomShell = Tankopedia.use(
(state) => state.customShell !== undefined (state) => state.customShell !== undefined
); );
const display = Tankopedia.use((state) => state.display); const requestedDisplay = Tankopedia.use((state) => state.requestedDisplay);
const isFullScreen = useFullScreen(); const isFullScreen = useFullScreen();
const advancedHighlighting = TankopediaPersistent.use( const advancedHighlighting = TankopediaPersistent.use(
(state) => state.advancedHighlighting (state) => state.advancedHighlighting
@@ -73,6 +74,7 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
const { strings, unwrap } = useLocale(); const { strings, unwrap } = useLocale();
const revealed = Tankopedia.use((state) => state.revealed); const revealed = Tankopedia.use((state) => state.revealed);
const disturbed = Tankopedia.use((state) => state.disturbed); const disturbed = Tankopedia.use((state) => state.disturbed);
const highGraphics = TankopediaPersistent.use((state) => state.highGraphics);
return ( return (
<> <>
@@ -84,7 +86,9 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
gap="2" gap="2"
direction="column" direction="column"
top="50%" top="50%"
right={display === TankopediaDisplay.DynamicArmor ? "3" : "-4rem"} right={
requestedDisplay === TankopediaDisplay.DynamicArmor ? "3" : "-4rem"
}
style={{ style={{
position: "absolute", position: "absolute",
transform: "translateY(-50%)", transform: "translateY(-50%)",
@@ -296,7 +300,7 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
> >
{disturbed && ( {disturbed && (
<> <>
{display === TankopediaDisplay.DynamicArmor && ( {requestedDisplay === TankopediaDisplay.DynamicArmor && (
<IconButton <IconButton
size="2" size="2"
highContrast highContrast
@@ -349,6 +353,20 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
</DropdownMenu.Content> </DropdownMenu.Content>
</DropdownMenu.Root> </DropdownMenu.Root>
<IconButton
size="2"
highContrast
onClick={() => {
TankopediaPersistent.mutate((draft) => {
draft.highGraphics = !draft.highGraphics;
});
}}
color={highGraphics ? undefined : "gray"}
variant={highGraphics ? "solid" : "surface"}
>
<SunIcon />
</IconButton>
<ScreenshotButton <ScreenshotButton
color="gray" color="gray"
size="2" size="2"
@@ -384,11 +402,11 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
<Flex gap="3" align="center" mt="2"> <Flex gap="3" align="center" mt="2">
<SegmentedControl.Root <SegmentedControl.Root
variant="classic" variant="classic"
value={`${disturbed ? display : -1}`} value={`${disturbed ? requestedDisplay : -1}`}
onValueChange={(value) => { onValueChange={(value) => {
Tankopedia.mutate((draft) => { Tankopedia.mutate((draft) => {
draft.disturbed = true; draft.disturbed = true;
draft.display = Number(value); draft.requestedDisplay = Number(value);
}); });
}} }}
> >
@@ -430,7 +448,7 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
</SegmentedControl.Item> </SegmentedControl.Item>
</SegmentedControl.Root> </SegmentedControl.Root>
{display === TankopediaDisplay.DynamicArmor && ( {requestedDisplay === TankopediaDisplay.DynamicArmor && (
<Dialog.Root <Dialog.Root
open={antagonistSelectorOpen} open={antagonistSelectorOpen}
onOpenChange={setAntagonistSelectorOpen} onOpenChange={setAntagonistSelectorOpen}
@@ -22,14 +22,12 @@ const poseDistances: Record<Pose, number> = {
const modelDefinitions = await awaitableModelDefinitions; const modelDefinitions = await awaitableModelDefinitions;
interface ControlsProps { interface ControlsProps {
naked?: boolean;
autoRotate?: boolean; autoRotate?: boolean;
zoomable?: boolean; zoomable?: boolean;
enableRotate?: boolean; enableRotate?: boolean;
} }
export function Controls({ export function Controls({
naked,
autoRotate = true, autoRotate = true,
zoomable = true, zoomable = true,
enableRotate = true, enableRotate = true,
@@ -79,11 +77,7 @@ export function Controls({
protagonistHullOrigin.y + protagonistHullOrigin.y +
protagonistTurretOrigin.y + protagonistTurretOrigin.y +
protagonistGunOrigin.y; protagonistGunOrigin.y;
const inspectModeInitialPosition = new Vector3( const inspectModeInitialPosition = new Vector3(-8, 2, -13);
-8,
naked ? gunHeight + 10 : 2,
-13
);
const t0 = useRef(Date.now() / 1000); const t0 = useRef(Date.now() / 1000);
useFrame(() => { useFrame(() => {
@@ -236,14 +230,10 @@ export function Controls({
orbitControls.current.rotateSpeed = 0.25; orbitControls.current.rotateSpeed = 0.25;
camera.position.copy(inspectModeInitialPosition); camera.position.copy(inspectModeInitialPosition);
orbitControls.current.target.set( orbitControls.current.target.set(0, gunHeight * 0.6, 0);
0,
gunHeight * (naked ? 1 / 4 : 3 / 4),
0
);
orbitControls.current.enablePan = true; orbitControls.current.enablePan = true;
orbitControls.current.enableZoom = true; orbitControls.current.enableZoom = true;
camera.fov = naked ? 20 : 25; camera.fov = 25;
camera.updateProjectionMatrix(); camera.updateProjectionMatrix();
} }
@@ -1,40 +0,0 @@
import { invalidate, useThree } from "@react-three/fiber";
import { useEffect } from "react";
import type { Fog } from "three";
import { fogAnimationTime, fogFar0, fogFar1, forNear0, forNear1 } from "..";
import { Tankopedia } from "../../../../../../stores/tankopedia";
export function InitialFogReveal() {
const fog = useThree((state) => state.scene.fog as Fog | null);
useEffect(() => {
Tankopedia.mutate((draft) => {
draft.revealed = true;
});
if (!fog) return;
const t0 = Date.now();
const interval = setInterval(() => {
const t = (Date.now() - t0) / 1000;
const x = t / fogAnimationTime;
const near = forNear1 + (forNear0 - forNear1) * x;
const far = fogFar1 + (fogFar0 - fogFar1) * x;
fog.near = near;
fog.far = far;
invalidate();
if (x >= 1) {
fog.near = forNear0;
fog.far = fogFar0;
clearInterval(interval);
}
}, 1000 / 60);
return () => clearInterval(interval);
}, []);
return null;
}
@@ -1,82 +1,118 @@
import { useHelper } from "@react-three/drei"; import { useFrame, useThree } from "@react-three/fiber";
import { useFrame } from "@react-three/fiber";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { useRef, useState } from "react"; import { Quicklime } from "quicklime";
import { Color, SpotLight, SpotLightHelper } from "three"; import { useEffect, useRef } from "react";
import { degToRad } from "three/src/math/MathUtils.js"; import { HemisphereLight, SpotLight, type Group } from "three";
import { isHalloween } from "../../../../../../core/blitzkit/isHalloween"; import { clamp, degToRad, lerp } from "three/src/math/MathUtils.js";
import { Tankopedia } from "../../../../../../stores/tankopedia";
import { TankopediaPersistent } from "../../../../../../stores/tankopediaPersistent";
import { HelpingSpotLight } from "../../../../../HelpingSpotLight"; import { HelpingSpotLight } from "../../../../../HelpingSpotLight";
const ANGLE = Math.PI * 2 ** -2;
const REVEAL_ANIMATION_TIME = 3;
const TRANSITION_ANIMATION_TIME = 0.5;
const LIGHTS_COUNT = 5; const LIGHTS_COUNT = 5;
const THETA_OFFSET = degToRad(-152);
const LIGHT_DISTANCE = 13; const LIGHT_DISTANCE = 13;
const LIGHT_HEIGHT_0 = 4; const LIGHT_HEIGHT_0 = 4;
const LIGHT_HEIGHT_1 = 2; const LIGHT_HEIGHT_1 = 2;
const INTENSITY = 50; const INTENSITY_0 = 3.5;
const INTENSITY_1 = 1.5;
const HEMISPHERE_INTENSITY = 2;
const N = 128; export const transitionEvent = new Quicklime<number>(0);
const TARGET_FRAME_RATE = 30;
export function Lighting() { export function Lighting() {
const [cast, setCast] = useState(true); const wrapper = useRef<Group>(null!);
const t0 = useRef(0); const t0 = useRef(0);
const topLight = useRef<SpotLight>(null!); const transition = useRef(false);
const frontLight = useRef<SpotLight>(null!); const clock = useThree((state) => state.clock);
const display = Tankopedia.use((state) => state.display);
const requestedDisplay = Tankopedia.use((state) => state.requestedDisplay);
const animationTime = useRef(REVEAL_ANIMATION_TIME);
const highGraphics = TankopediaPersistent.use((state) => state.highGraphics);
useHelper(topLight, SpotLightHelper, "red"); useEffect(() => {
useHelper(frontLight, SpotLightHelper, "green"); Tankopedia.mutate((draft) => {
draft.revealed = true;
});
const last = useRef<number>(0); t0.current = clock.elapsedTime - REVEAL_ANIMATION_TIME;
const samples = useRef<number[]>([]); }, []);
useFrame(({ clock, frameloop }) => { useFrame(({ invalidate }) => {
if (frameloop === "never") { if (transition.current) {
transition.current = false;
t0.current = clock.elapsedTime; t0.current = clock.elapsedTime;
samples.current = [];
return;
}
if (!cast || clock.elapsedTime - t0.current < TARGET_FRAME_RATE * N) {
return;
} }
const dt = clock.elapsedTime - last.current; const x = clamp(
last.current = clock.elapsedTime; (clock.elapsedTime - t0.current) / animationTime.current,
0,
2
);
const t = (0.5 * Math.sin(Math.PI * (x + 0.5)) + 0.5) ** 2;
const fps = 1 / dt; if (t !== transitionEvent.last) {
samples.current.push(fps); transitionEvent.dispatch(t);
}
if (samples.current.length > N) samples.current.shift(); for (const child of wrapper.current.children) {
if (child instanceof SpotLight) {
child.angle = ANGLE * t;
} else if (child instanceof HemisphereLight) {
child.intensity = HEMISPHERE_INTENSITY * t;
}
}
const avg = if (x < 2) invalidate();
samples.current.reduce((a, b) => a + b, 0) / samples.current.length;
if (avg < TARGET_FRAME_RATE) setCast(false); if (
x > 1 &&
Tankopedia.state.display !== Tankopedia.state.requestedDisplay
) {
Tankopedia.mutate((draft) => {
draft.display = requestedDisplay;
});
}
}); });
useEffect(() => {
if (requestedDisplay === display) return;
transition.current = true;
animationTime.current = TRANSITION_ANIMATION_TIME;
}, [requestedDisplay]);
return ( return (
<> <group ref={wrapper}>
<hemisphereLight intensity={0} color="#ffffff" groundColor="#afafaf" />
{times(LIGHTS_COUNT, (index) => { {times(LIGHTS_COUNT, (index) => {
const x = index / (LIGHTS_COUNT - 1); const x = index / (LIGHTS_COUNT - 1);
const theta = 2 * Math.PI * (index / LIGHTS_COUNT) - degToRad(152); const theta = 2 * Math.PI * (index / LIGHTS_COUNT) + THETA_OFFSET;
const position = [ const position = [
LIGHT_DISTANCE * Math.sin(theta), LIGHT_DISTANCE * Math.sin(theta),
LIGHT_HEIGHT_0 * (1 - x) + LIGHT_HEIGHT_1 * x, lerp(LIGHT_HEIGHT_0, LIGHT_HEIGHT_1, x),
LIGHT_DISTANCE * Math.cos(theta), LIGHT_DISTANCE * Math.cos(theta),
] as const; ] as const;
const color = new Color(); const intensity = lerp(INTENSITY_0, INTENSITY_1, x);
return ( return (
<HelpingSpotLight <HelpingSpotLight
userData={{ index }}
key={index} key={index}
position={position} position={position}
intensity={INTENSITY} intensity={intensity}
penumbra={1} penumbra={1}
castShadow={cast} castShadow={highGraphics}
decay={1} decay={0}
color={color} color="#ffffff"
angle={0}
/> />
); );
})} })}
</> </group>
); );
} }
@@ -4,7 +4,7 @@ import { Quicklime, type QuicklimeEvent } from "quicklime";
import { useEffect, useRef } from "react"; import { useEffect, useRef } from "react";
import { Mesh, MeshStandardMaterial } from "three"; import { Mesh, MeshStandardMaterial } from "three";
const SIZE = 2 ** 5; const SIZE = 2 ** 6;
export const screenshotReadyEvent = new Quicklime(false); export const screenshotReadyEvent = new Quicklime(false);
@@ -36,6 +36,7 @@ export function SceneProps() {
receiveShadow receiveShadow
visible={!screenshotReadyEvent.last!} visible={!screenshotReadyEvent.last!}
ref={mesh} ref={mesh}
renderOrder={-1}
> >
<planeGeometry args={[SIZE, SIZE]} /> <planeGeometry args={[SIZE, SIZE]} />
<meshStandardMaterial <meshStandardMaterial
@@ -43,7 +44,7 @@ export function SceneProps() {
ref={material} ref={material}
color="black" color="black"
roughness={1} roughness={1}
metalness={1} metalness={0}
/> />
</mesh> </mesh>
); );
@@ -106,7 +106,9 @@ export function TankModel() {
const isTurret = node.name.startsWith("turret_"); const isTurret = node.name.startsWith("turret_");
const isCurrentTurret = const isCurrentTurret =
node.name === node.name ===
`turret_${turretModelDefinition.model_id.toString().padStart(2, "0")}`; `turret_${turretModelDefinition.model_id
.toString()
.padStart(2, "0")}`;
const isVisible = isCurrentTurret; const isVisible = isCurrentTurret;
const position = new Vector2(); const position = new Vector2();
const delta = new Vector2(); const delta = new Vector2();
@@ -1,12 +1,9 @@
import { BLITZKIT_TANK_ICON_SIZE } from "@blitzkit/core";
import { invalidate } from "@react-three/fiber";
import { import {
forwardRef, forwardRef,
Suspense, Suspense,
useEffect, useEffect,
useImperativeHandle, useImperativeHandle,
useRef, useRef,
useState,
} from "react"; } from "react";
import { Fog } from "three"; import { Fog } from "three";
import { applyPitchYawLimits } from "../../../../../core/blitz/applyPitchYawLimits"; import { applyPitchYawLimits } from "../../../../../core/blitz/applyPitchYawLimits";
@@ -29,26 +26,16 @@ import { SmartCanvas } from "../../../../SmartCanvas";
import { AutoClear } from "./components/AutoClear"; import { AutoClear } from "./components/AutoClear";
import { Controls } from "./components/Control"; import { Controls } from "./components/Control";
import { InitialAligner } from "./components/InitialAligner"; import { InitialAligner } from "./components/InitialAligner";
import { InitialFogReveal } from "./components/InitialFogReveal";
import { Lighting } from "./components/Lighting"; import { Lighting } from "./components/Lighting";
import { SceneProps } from "./components/SceneProps"; import { SceneProps } from "./components/SceneProps";
import { TankModel } from "./components/TankModel"; import { TankModel } from "./components/TankModel";
import { TransitionSkeleton } from "./components/TransitionSkeleton";
interface TankSandboxProps { interface TankSandboxProps {
thicknessRange: ThicknessRange; thicknessRange: ThicknessRange;
naked?: boolean;
} }
export const forNear0 = 30;
export const fogFar0 = 50;
export const forNear1 = 0;
export const fogFar1 = 0;
export const fogAnimationTime = 2.5;
export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>( export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
({ thicknessRange, naked }, ref) => { ({ thicknessRange }, ref) => {
const fog = useRef(new Fog("black", forNear1, fogFar1));
const canvas = useRef<HTMLCanvasElement>(null); const canvas = useRef<HTMLCanvasElement>(null);
const hasImprovedVerticalStabilizer = useEquipment(122); const hasImprovedVerticalStabilizer = useEquipment(122);
const hasDownImprovedVerticalStabilizer = useEquipment(124); const hasDownImprovedVerticalStabilizer = useEquipment(124);
@@ -58,40 +45,11 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
const turretModelDefinition = const turretModelDefinition =
tankModelDefinition.turrets[protagonistTurret.id]; tankModelDefinition.turrets[protagonistTurret.id];
const gunModelDefinition = turretModelDefinition.guns[protagonistGun.id]; const gunModelDefinition = turretModelDefinition.guns[protagonistGun.id];
const rawDisplay = Tankopedia.use((state) => state.display); const display = Tankopedia.use((state) => state.display);
const [display, setDisplay] = useState(rawDisplay);
const hideTankModelUnderArmor = TankopediaPersistent.use( const hideTankModelUnderArmor = TankopediaPersistent.use(
(state) => state.hideTankModelUnderArmor (state) => state.hideTankModelUnderArmor
); );
useEffect(() => {
if (rawDisplay === display) return;
const t0 = Date.now();
const interval = setInterval(() => {
const t = (Date.now() - t0) / 1000;
const x = t / fogAnimationTime;
const y = Math.sin(Math.PI * x);
const near = forNear0 + (forNear1 - forNear0) * y;
const far = fogFar0 + (fogFar1 - fogFar0) * y;
fog.current.near = near;
fog.current.far = far;
invalidate();
if (rawDisplay !== display && x >= 0.5) setDisplay(rawDisplay);
if (x >= 1) {
fog.current.near = forNear0;
fog.current.far = fogFar0;
clearInterval(interval);
}
}, 1000 / 60);
return () => clearInterval(interval);
}, [rawDisplay]);
useImperativeHandle(ref, () => canvas.current!, []); useImperativeHandle(ref, () => canvas.current!, []);
function handlePointerDown() { function handlePointerDown() {
@@ -188,10 +146,13 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
} }
}, [display]); }, [display]);
console.log(TankopediaDisplay[display]);
return ( return (
<SmartCanvas <SmartCanvas
resize={{ debounce: 0 }}
ref={canvas} ref={canvas}
scene={{ fog: naked ? undefined : fog.current }} scene={{ fog: new Fog("black", 30, 50) }}
gl={{ gl={{
clippingPlanes: [], clippingPlanes: [],
localClippingEnabled: true, localClippingEnabled: true,
@@ -207,30 +168,29 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
}} }}
style={{ style={{
userSelect: "none", userSelect: "none",
width: naked ? BLITZKIT_TANK_ICON_SIZE.width : "100%", width: "100%",
height: naked ? BLITZKIT_TANK_ICON_SIZE.height : "100%", height: "100%",
outline: naked ? "1rem red solid" : undefined, outline: undefined,
}} }}
> >
{!naked && <SceneProps />} <Lighting />
<SceneProps />
{(display === TankopediaDisplay.Model || {(display === TankopediaDisplay.Model ||
(display === TankopediaDisplay.DynamicArmor && (display === TankopediaDisplay.DynamicArmor &&
!hideTankModelUnderArmor)) && <TankModel />} !hideTankModelUnderArmor)) && <TankModel />}
<TransitionSkeleton />
<ShotDisplay /> <ShotDisplay />
<ArmorPlateDisplay /> <ArmorPlateDisplay />
<AutoClear /> <AutoClear />
<Suspense> <Suspense>
{/* Controls within Suspense to allow for frame-perfect start of camera auto-rotate */} {/* Controls within Suspense to allow for frame-perfect start of camera auto-rotate */}
<Controls naked={naked} /> <Controls />
<InitialFogReveal />
{display === TankopediaDisplay.DynamicArmor && <Armor />} {display === TankopediaDisplay.DynamicArmor && <Armor />}
{display === TankopediaDisplay.StaticArmor && ( {display === TankopediaDisplay.StaticArmor && (
<StaticArmor thicknessRange={thicknessRange} /> <StaticArmor thicknessRange={thicknessRange} />
)} )}
<Lighting />
</Suspense> </Suspense>
<InitialAligner /> <InitialAligner />
@@ -1,6 +1,6 @@
import { Box, Flex } from "@radix-ui/themes"; import { Box, Flex } from "@radix-ui/themes";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { Suspense, useEffect, useMemo, useRef } from "react"; import { useEffect, useMemo, useRef } from "react";
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions"; import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
import { useFullScreen } from "../../../hooks/useFullScreen"; import { useFullScreen } from "../../../hooks/useFullScreen";
import { Duel } from "../../../stores/duel"; import { Duel } from "../../../stores/duel";
@@ -99,11 +99,11 @@ export function HeroSection({ skeleton }: MaybeSkeletonComponentProps) {
isFullScreen isFullScreen
? "100vh" ? "100vh"
: disturbed : disturbed
? "calc(100svh - 8rem)" ? "calc(100svh - 8rem)"
: { : {
initial: "28rem", initial: "28rem",
md: "calc(100svh - 14rem)", md: "calc(100svh - 14rem)",
} }
} }
maxWidth={isFullScreen ? undefined : "120rem"} maxWidth={isFullScreen ? undefined : "120rem"}
flexGrow="1" flexGrow="1"
@@ -120,30 +120,17 @@ export function HeroSection({ skeleton }: MaybeSkeletonComponentProps) {
position="relative" position="relative"
> >
<Box position="absolute" width="100%" height="100%" overflow="hidden"> <Box position="absolute" width="100%" height="100%" overflow="hidden">
<Box <Box width="100%" height="100%" position="relative">
width="100%"
height="100%"
position="relative"
style={{
transitionDuration: "1s",
}}
>
<Box <Box
style={{ position="absolute"
width: "100%", width="100%"
height: "100%", height="100%"
transitionDuration: "2s", top="0"
opacity: revealed ? 1 : 0, left="0"
filter: disturbed
? undefined
: `drop-shadow(0 1rem 1rem black)`,
}}
> >
<Suspense> {!skeleton && (
{!skeleton && ( <TankSandbox ref={canvas} thicknessRange={thicknessRange} />
<TankSandbox ref={canvas} thicknessRange={thicknessRange} /> )}
)}
</Suspense>
</Box> </Box>
</Box> </Box>
@@ -1,25 +1,31 @@
import type { TankDefinition } from "@blitzkit/core"; import type { TankDefinition } from "@blitzkit/core";
import { checkConsumableProvisionInclusivity } from "@blitzkit/core/src/blitzkit/checkConsumableProvisionInclusivity";
import { times } from "lodash-es"; import { times } from "lodash-es";
import { awaitableConsumableDefinitions } from "../../core/awaitables/consumableDefinitions";
import type { TankFilters } from "../../stores/tankFilters"; import type { TankFilters } from "../../stores/tankFilters";
import { awaitableGameDefinitions } from "../awaitables/gameDefinitions";
import { awaitableProvisionDefinitions } from "../awaitables/provisionDefinitions";
const SHELLS = times(3, (index) => index); const SHELLS = times(3, (index) => index);
const consumableDefinitions = await awaitableConsumableDefinitions;
const provisionDefinitions = await awaitableProvisionDefinitions;
const gameDefinitions = await awaitableGameDefinitions;
export async function filterTank( export async function filterTank(
filters: TankFilters, filters: TankFilters,
tank: TankDefinition, tank: TankDefinition,
owned: number[] = [] owned: number[] = []
) { ) {
return ( return (
(filters.ownership === "all" || ((filters.showOwned && owned.includes(tank.id)) ||
(filters.ownership === "owned" && owned.includes(tank.id)) || (filters.showUnowned && !owned.includes(tank.id))) &&
(filters.ownership === "unowned" && !owned.includes(tank.id))) &&
(filters.tiers.length === 0 || filters.tiers.includes(tank.tier)) && (filters.tiers.length === 0 || filters.tiers.includes(tank.tier)) &&
(filters.nations.length === 0 || filters.nations.includes(tank.nation)) && (filters.nations.length === 0 || filters.nations.includes(tank.nation)) &&
(filters.classes.length === 0 || filters.classes.includes(tank.class)) && (filters.classes.length === 0 || filters.classes.includes(tank.class)) &&
(filters.types.length === 0 || filters.types.includes(tank.type)) && (filters.types.length === 0 || filters.types.includes(tank.type)) &&
(filters.testing === "include" || ((filters.showTesting && tank.testing) ||
(filters.testing === "only" && tank.testing) || (filters.showNonTesting && !tank.testing)) &&
(filters.testing === "exclude" && !tank.testing)) &&
(filters.gunType.length === 0 || (filters.gunType.length === 0 ||
(filters.gunType.includes("regular") && (filters.gunType.includes("regular") &&
tank.turrets.some((turret) => tank.turrets.some((turret) =>
@@ -42,6 +48,42 @@ export async function filterTank(
gun.shells[index].type === filters.shells[index] gun.shells[index].type === filters.shells[index]
) )
) )
) ) &&
(filters.consumables.length === 0 ||
filters.consumables.every((consumable) =>
tank.turrets.some((turret) =>
turret.guns.some((gun) =>
checkConsumableProvisionInclusivity(
consumableDefinitions.consumables[consumable],
tank,
gun
)
)
)
)) &&
(filters.provisions.length === 0 ||
filters.provisions.every((provision) =>
tank.turrets.some((turret) =>
turret.guns.some((gun) =>
checkConsumableProvisionInclusivity(
provisionDefinitions.provisions[provision],
tank,
gun
)
)
)
)) &&
(filters.abilities.length === 0 ||
Object.values(tank.roles).some((id) =>
gameDefinitions.roles[id as unknown as number].consumables.some(
(consumable) => filters.abilities.includes(consumable)
)
)) &&
(filters.powers.length === 0 ||
Object.values(tank.roles).some((id) =>
gameDefinitions.roles[id as unknown as number].provisions.some(
(consumable) => filters.powers.includes(consumable)
)
))
); );
} }
@@ -19,9 +19,9 @@ import {
type TankDefinition, type TankDefinition,
type TrackDefinition, type TrackDefinition,
type TurretDefinition, type TurretDefinition,
} from '@blitzkit/core'; } from "@blitzkit/core";
import { coefficient } from '@blitzkit/core/src/blitzkit/coefficient'; import { coefficient } from "@blitzkit/core/src/blitzkit/coefficient";
import type { EquipmentMatrix } from '../../stores/duel'; import type { EquipmentMatrix } from "../../stores/duel";
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>; export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
export type TankCharacteristicsKey = keyof TankCharacteristics; export type TankCharacteristicsKey = keyof TankCharacteristics;
@@ -76,7 +76,7 @@ export function tankCharacteristics(
tankModelDefinition: ModelDefinition; tankModelDefinition: ModelDefinition;
equipmentDefinitions: EquipmentDefinitions; equipmentDefinitions: EquipmentDefinitions;
provisionDefinitions: ProvisionDefinitions; provisionDefinitions: ProvisionDefinitions;
}, }
) { ) {
const preset = equipmentDefinitions.presets[tank.equipment_preset]; const preset = equipmentDefinitions.presets[tank.equipment_preset];
const turretModelDefinition = tankModelDefinition.turrets[turret.id]; const turretModelDefinition = tankModelDefinition.turrets[turret.id];
@@ -86,7 +86,7 @@ export function tankCharacteristics(
return preset.slots.some((slot, index) => { return preset.slots.some((slot, index) => {
const choice = equipmentMatrix[Math.floor(index / 3)][index % 3]; const choice = equipmentMatrix[Math.floor(index / 3)][index % 3];
if (choice === 0) return false; if (choice === 0) return false;
const equipped = slot[choice === -1 ? 'left' : 'right']; const equipped = slot[choice === -1 ? "left" : "right"];
return equipped === id; return equipped === id;
}); });
} }
@@ -138,7 +138,7 @@ export function tankCharacteristics(
provisionDefinitions.provisions[provision].crew provisionDefinitions.provisions[provision].crew
? total + provisionDefinitions.provisions[provision].crew! / 100 ? total + provisionDefinitions.provisions[provision].crew! / 100
: total, : total,
0, 0
) + (hasImprovedVentilation ? 0.08 : 0); ) + (hasImprovedVentilation ? 0.08 : 0);
const commanderMastery = 1 + provisionCrewBonus; const commanderMastery = 1 + provisionCrewBonus;
const loaderMastery = const loaderMastery =
@@ -158,19 +158,19 @@ export function tankCharacteristics(
coefficient( coefficient(
[applyReactiveArmor && shell.type !== ShellType.HE, -0.27], [applyReactiveArmor && shell.type !== ShellType.HE, -0.27],
[applyDynamicArmor, -0.1], [applyDynamicArmor, -0.1],
[applySpallLiner && shell.type === ShellType.HE, -0.2], [applySpallLiner && shell.type === ShellType.HE, -0.2]
); );
const assaultDamageCoefficient = const assaultDamageCoefficient =
gun.assault_ranges && gun.assault_ranges.types.includes(shell.type) gun.assault_ranges && gun.assault_ranges.types.includes(shell.type)
? (gun.assault_ranges.ranges.find( ? gun.assault_ranges.ranges.find(
({ distance }) => distance >= assaultDistance, ({ distance }) => distance >= assaultDistance
)?.factor ?? 0) )?.factor ?? 0
: 1; : 1;
const moduleDamageCoefficient = coefficient([hasTungsten, 0.15]); const moduleDamageCoefficient = coefficient([hasTungsten, 0.15]);
const reloadCoefficient = const reloadCoefficient =
(coefficient([hasGunRammer, -0.05]) * (coefficient([hasGunRammer, -0.05]) *
coefficient([true, degressiveStat(loaderMastery)])) / coefficient([true, degressiveStat(loaderMastery)])) /
coefficient([hasAdrenaline && gun.gun_type!.$case === 'regular', 0.17]); coefficient([hasAdrenaline && gun.gun_type!.$case === "regular", 0.17]);
const penetrationCoefficient = coefficient([ const penetrationCoefficient = coefficient([
hasCalibratedShells, hasCalibratedShells,
resolvePenetrationCoefficient(true, shell.type) - 1, resolvePenetrationCoefficient(true, shell.type) - 1,
@@ -178,16 +178,16 @@ export function tankCharacteristics(
const healthCoefficient = coefficient( const healthCoefficient = coefficient(
[hasSandbagArmor, 0.03], [hasSandbagArmor, 0.03],
[hasEnhancedSandbagArmor, 0.06], [hasEnhancedSandbagArmor, 0.06],
[hasImprovedAssembly, 0.04], [hasImprovedAssembly, 0.04]
); );
const shellVelocityCoefficient = coefficient( const shellVelocityCoefficient = coefficient(
[hasSupercharger, 0.35], [hasSupercharger, 0.35],
[hasImprovedGunPowder, 0.3], [hasImprovedGunPowder, 0.3]
); );
const aimTimeCoefficient = const aimTimeCoefficient =
coefficient( coefficient(
[hasEnhancedGunLayingDrive, -0.15], [hasEnhancedGunLayingDrive, -0.15],
[hasReticleCalibration, -0.3], [hasReticleCalibration, -0.3]
) * coefficient([true, degressiveStat(gunnerMastery)]); ) * coefficient([true, degressiveStat(gunnerMastery)]);
const dispersionStillCoefficient = const dispersionStillCoefficient =
coefficient([hasRefinedGun, -0.15], [hasReticleCalibration, -0.3]) * coefficient([hasRefinedGun, -0.15], [hasReticleCalibration, -0.3]) *
@@ -198,19 +198,19 @@ export function tankCharacteristics(
]); ]);
const dispersionHullTraverseCoefficient = coefficient( const dispersionHullTraverseCoefficient = coefficient(
[hasVerticalStabilizer, -0.15], [hasVerticalStabilizer, -0.15],
[true, -crewSkills.smooth_turn / 100], [true, -crewSkills.smooth_turn / 100]
); );
const dispersionAfterShotCoefficient = coefficient( const dispersionAfterShotCoefficient = coefficient(
[hasVerticalStabilizer, -0.15], [hasVerticalStabilizer, -0.15],
[true, -crewSkills.soft_recoil / 100], [true, -crewSkills.soft_recoil / 100]
); );
const dispersionMovingCoefficient = coefficient( const dispersionMovingCoefficient = coefficient(
[hasVerticalStabilizer, -0.15], [hasVerticalStabilizer, -0.15],
[true, -crewSkills.smooth_driving / 100], [true, -crewSkills.smooth_driving / 100]
); );
const dispersionTurretTraverseCoefficient = coefficient( const dispersionTurretTraverseCoefficient = coefficient(
[hasVerticalStabilizer, -0.15], [hasVerticalStabilizer, -0.15],
[true, -crewSkills.smooth_turret * (2 / 100)], [true, -crewSkills.smooth_turret * (2 / 100)]
); );
const enginePowerCoefficient = coefficient( const enginePowerCoefficient = coefficient(
[ [
@@ -225,7 +225,7 @@ export function tankCharacteristics(
[hasStandardFuel, 0.03], [hasStandardFuel, 0.03],
[hasImprovedFuel, 0.1], [hasImprovedFuel, 0.1],
[hasGearOil, 0.03], [hasGearOil, 0.03],
[hasImprovedGearOil, 0.06], [hasImprovedGearOil, 0.06]
); );
const turretTraverseCoefficient = const turretTraverseCoefficient =
coefficient([hasStandardFuel, 0.03], [hasImprovedFuel, 0.1]) * coefficient([hasStandardFuel, 0.03], [hasImprovedFuel, 0.1]) *
@@ -234,36 +234,41 @@ export function tankCharacteristics(
coefficient( coefficient(
[hasImprovedControl, 0.11], [hasImprovedControl, 0.11],
[hasImprovedEnginePowerBoost, 0.01], [hasImprovedEnginePowerBoost, 0.01],
[true, crewSkills.virtuoso / 100], [true, crewSkills.virtuoso / 100]
) * coefficient([true, progressiveStat(driverMastery)]); ) * coefficient([true, progressiveStat(driverMastery)]);
const resistanceHardCoefficient = coefficient([hasImprovedSuspension, -0.2]);
const resistanceMediumCoefficient = coefficient([ const resistanceHardCoefficient =
hasImprovedSuspension, coefficient([hasImprovedSuspension, -0.2]) *
-0.15, coefficient([true, degressiveStat(driverMastery)]);
]); const resistanceMediumCoefficient =
const resistanceSoftCoefficient = coefficient([hasImprovedSuspension, -0.3]); coefficient([hasImprovedSuspension, -0.15]) *
coefficient([true, degressiveStat(driverMastery)]);
const resistanceSoftCoefficient =
coefficient([hasImprovedSuspension, -0.3]) *
coefficient([true, degressiveStat(driverMastery)]);
const viewRangeCoefficient = const viewRangeCoefficient =
coefficient([ coefficient([
hasImprovedOptics, hasImprovedOptics,
tank.class === TankClass.HEAVY tank.class === TankClass.HEAVY
? 0.06 ? 0.06
: tank.class === TankClass.MEDIUM : tank.class === TankClass.MEDIUM
? 0.08 ? 0.08
: tank.class === TankClass.LIGHT : tank.class === TankClass.LIGHT
? 0.11 ? 0.11
: 0.04, : 0.04,
]) * coefficient([true, progressiveStat(commanderMastery)]); ]) * coefficient([true, progressiveStat(commanderMastery)]);
const fireChanceCoefficient = coefficient([hasProtectiveKit, -0.2]); const fireChanceCoefficient = coefficient([hasProtectiveKit, -0.2]);
const speedForwardsSum = sum( const speedForwardsSum = sum(
[hasImprovedEnginePowerBoost, 4], [hasImprovedEnginePowerBoost, 4],
[hasGearOil, 2], [hasGearOil, 2],
[hasImprovedGearOil, 4], [hasImprovedGearOil, 4]
); );
const speedBackwardsSum = sum( const speedBackwardsSum = sum(
[hasImprovedEnginePowerBoost, 8], [hasImprovedEnginePowerBoost, 8],
[hasGearOil, 2], [hasGearOil, 2],
[hasImprovedGearOil, 4], [hasImprovedGearOil, 4]
); );
const camouflageCoefficientMoving = sum( const camouflageCoefficientMoving = sum(
[ [
@@ -273,8 +278,8 @@ export function tankCharacteristics(
tank.class === TankClass.TANK_DESTROYER tank.class === TankClass.TANK_DESTROYER
? 0.04 ? 0.04
: tank.class === TankClass.HEAVY : tank.class === TankClass.HEAVY
? 0.03 ? 0.03
: 0.02, : 0.02,
]), ]),
], ],
[ [
@@ -282,11 +287,11 @@ export function tankCharacteristics(
tank.class === TankClass.HEAVY tank.class === TankClass.HEAVY
? 0.02 ? 0.02
: tank.class === TankClass.MEDIUM : tank.class === TankClass.MEDIUM
? 0.04 ? 0.04
: tank.class === TankClass.LIGHT : tank.class === TankClass.LIGHT
? 0.07 ? 0.07
: 0.1, : 0.1,
], ]
); );
const camouflageCoefficientStill = sum( const camouflageCoefficientStill = sum(
[ [
@@ -297,10 +302,10 @@ export function tankCharacteristics(
tank.class === TankClass.TANK_DESTROYER tank.class === TankClass.TANK_DESTROYER
? 0.04 ? 0.04
: tank.class === TankClass.HEAVY : tank.class === TankClass.HEAVY
? 0.03 ? 0.03
: 0.02, : 0.02,
], ],
[true, crewSkills.camouflage * (3 / 100)], [true, crewSkills.camouflage * (3 / 100)]
), ),
], ],
[ [
@@ -308,18 +313,18 @@ export function tankCharacteristics(
tank.class === TankClass.HEAVY tank.class === TankClass.HEAVY
? 0.04 ? 0.04
: tank.class === TankClass.MEDIUM : tank.class === TankClass.MEDIUM
? 0.08 ? 0.08
: tank.class === TankClass.LIGHT : tank.class === TankClass.LIGHT
? 0.14 ? 0.14
: 0.2, : 0.2,
], ]
); );
const size = normalizeBoundingBox( const size = normalizeBoundingBox(
unionBoundingBox( unionBoundingBox(
tankModelDefinition.bounding_box, tankModelDefinition.bounding_box,
turretModelDefinition.bounding_box, turretModelDefinition.bounding_box
), )
); );
const weightKg = const weightKg =
tank.weight + engine.weight + track.weight + turret.weight + gun.weight; tank.weight + engine.weight + track.weight + turret.weight + gun.weight;
@@ -339,14 +344,14 @@ export function tankCharacteristics(
shell, shell,
damageCoefficient, damageCoefficient,
reloadCoefficient, reloadCoefficient,
intraClipCoefficient, intraClipCoefficient
); );
const intraClip = const intraClip =
gun.gun_type?.$case === 'regular' gun.gun_type?.$case === "regular"
? undefined ? undefined
: gun.gun_type!.value.intra_clip * intraClipCoefficient; : gun.gun_type!.value.intra_clip * intraClipCoefficient;
const mostOptimalShellIndex = const mostOptimalShellIndex =
gun.gun_type!.$case === 'auto_reloader' gun.gun_type!.$case === "auto_reloader"
? gun.gun_type!.value.shell_reloads.reduce<null | { ? gun.gun_type!.value.shell_reloads.reduce<null | {
index: number; index: number;
reload: number; reload: number;
@@ -364,7 +369,7 @@ export function tankCharacteristics(
shell.armor_damage * damageCoefficientWithoutAssault; shell.armor_damage * damageCoefficientWithoutAssault;
const damage = shell.armor_damage * damageCoefficient; const damage = shell.armor_damage * damageCoefficient;
const dpmEffective = const dpmEffective =
gun.gun_type!.$case === 'auto_reloader' gun.gun_type!.$case === "auto_reloader"
? gun.gun_type!.value.shell_reloads[0] > ? gun.gun_type!.value.shell_reloads[0] >
gun.gun_type!.value.shell_reloads[1] + gun.gun_type!.value.intra_clip gun.gun_type!.value.shell_reloads[1] + gun.gun_type!.value.intra_clip
? ((armorDamageCoefficient * shell.armor_damage) / ? ((armorDamageCoefficient * shell.armor_damage) /
@@ -389,23 +394,23 @@ export function tankCharacteristics(
gun.gun_type!.value.shell_reloads.slice(1).length gun.gun_type!.value.shell_reloads.slice(1).length
: undefined; : undefined;
const shells = const shells =
gun.gun_type!.$case === 'regular' ? 1 : gun.gun_type!.value.shell_count; gun.gun_type!.$case === "regular" ? 1 : gun.gun_type!.value.shell_count;
const shellReloads = const shellReloads =
gun.gun_type!.$case === 'auto_reloader' gun.gun_type!.$case === "auto_reloader"
? gun.gun_type!.value.shell_reloads.map( ? gun.gun_type!.value.shell_reloads.map(
(reload) => reload * reloadCoefficient, (reload) => reload * reloadCoefficient
) )
: undefined; : undefined;
const shellReload = const shellReload =
gun.gun_type!.$case === 'auto_reloader' gun.gun_type!.$case === "auto_reloader"
? undefined ? undefined
: (gun.gun_type!.$case === 'regular' : (gun.gun_type!.$case === "regular"
? gun.gun_type!.value.reload ? gun.gun_type!.value.reload
: gun.gun_type!.value.clip_reload) * reloadCoefficient; : gun.gun_type!.value.clip_reload) * reloadCoefficient;
const caliber = shell.caliber; const caliber = shell.caliber;
const penetration = shell.penetration.near * penetrationCoefficient; const penetration = shell.penetration.near * penetrationCoefficient;
const clipDamage = const clipDamage =
gun.gun_type!.$case === 'regular' gun.gun_type!.$case === "regular"
? undefined ? undefined
: gun.gun_type!.value.shell_count * damage; : gun.gun_type!.value.shell_count * damage;
const moduleDamage = shell.module_damage * moduleDamageCoefficient; const moduleDamage = shell.module_damage * moduleDamageCoefficient;
@@ -599,45 +604,45 @@ export const characteristicsOrder: {
items: TankCharacteristicsKey[]; items: TankCharacteristicsKey[];
}[] = [ }[] = [
{ {
name: 'Firepower', name: "Firepower",
items: [ items: [
'gunType', "gunType",
'dpm', "dpm",
'shells', "shells",
'shellReload', "shellReload",
'shellReloads', "shellReloads",
'intraClip', "intraClip",
'penetration', "penetration",
'penetrationAt250m', "penetrationAt250m",
'damage', "damage",
'clipDamage', "clipDamage",
'moduleDamage', "moduleDamage",
'caliber', "caliber",
'shellNormalization', "shellNormalization",
'shellRicochet', "shellRicochet",
'shellVelocity', "shellVelocity",
'shellRange', "shellRange",
'shellCapacity', "shellCapacity",
'aimTime', "aimTime",
'dispersion', "dispersion",
'dispersionMoving', "dispersionMoving",
'dispersionHullTraversing', "dispersionHullTraversing",
'dispersionTurretTraversing', "dispersionTurretTraversing",
'dispersionShooting', "dispersionShooting",
'dispersionGunDamaged', "dispersionGunDamaged",
'gunDepression', "gunDepression",
'gunElevation', "gunElevation",
'gunFrontalDepression', "gunFrontalDepression",
'gunFrontalElevation', "gunFrontalElevation",
'gunRearDepression', "gunRearDepression",
'gunRearElevation', "gunRearElevation",
'azimuthLeft', "azimuthLeft",
'azimuthRight', "azimuthRight",
], ],
}, },
{ {
name: 'Crew', name: "Crew",
items: ['crewCount'], items: ["crewCount"],
}, },
]; ];
@@ -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>
); );
@@ -1,5 +1,5 @@
import { Box, Flex, Heading } from "@radix-ui/themes"; import { Box, Flex, Heading } from "@radix-ui/themes";
import { Suspense } from "react"; import { Suspense, useEffect } from "react";
import { GuessBackground } from "../../../components/GuessBackground"; import { GuessBackground } from "../../../components/GuessBackground";
import { Guesser } from "../../../components/Guesser"; import { Guesser } from "../../../components/Guesser";
import { GuessRenderer } from "../../../components/GuessRenderer"; import { GuessRenderer } from "../../../components/GuessRenderer";
@@ -62,6 +62,31 @@ function Content({ skeleton }: MaybeSkeletonComponentProps) {
const name = unwrap(tank.name); const name = unwrap(tank.name);
const fontSize = `min(48vh, ${55 / name.length}vw)`; const fontSize = `min(48vh, ${55 / name.length}vw)`;
const transitionDuration = isRevealed ? "2s" : undefined; const transitionDuration = isRevealed ? "2s" : undefined;
const tiers = Guess.use((state) => state.tiers);
useEffect(() => {
const isTankAlreadyCompliant = tiers.includes(tank.tier);
if (isTankAlreadyCompliant) return;
const filteredIds = ids.filter((id) => {
const tank = tankDefinitions.tanks[Number(id)];
return tiers.includes(tank.tier);
});
if (filteredIds.length === 0) return;
const id = Number(
filteredIds[Math.floor(Math.random() * filteredIds.length)]
);
const newTank = tankDefinitions.tanks[id];
Guess.mutate((draft) => {
draft.tank = newTank;
draft.guessState = GuessState.NotGuessed;
draft.helpingReveal = false;
});
}, [tiers]);
return ( return (
<Flex flexGrow="1" position="relative" overflow="hidden"> <Flex flexGrow="1" position="relative" overflow="hidden">
@@ -1,4 +1,6 @@
--- ---
import ToolOpenGraph from "../../../components/ToolOpenGraph.astro";
import { tools } from "../../../constants/tools";
import BaseLayout from "../../../layouts/BaseLayout.astro"; import BaseLayout from "../../../layouts/BaseLayout.astro";
import { Page } from "./_index"; import { Page } from "./_index";
@@ -7,6 +9,8 @@ export { getStaticPaths } from "../index.astro";
const { locale } = Astro.props; const { locale } = Astro.props;
--- ---
<ToolOpenGraph {locale} tool={tools.guess} />
<BaseLayout {locale} noFooter> <BaseLayout {locale} noFooter>
<Page {locale} client:only="react"> <Page {locale} client:only="react">
<Page {locale} skeleton slot="fallback" /> <Page {locale} skeleton slot="fallback" />
Loaded 100 of 109 files, more files were not shown because too many files have changed in this diff. Show more