Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5dba69f30a | ||
|
|
023c348b0d | ||
|
|
8313dd811d | ||
|
|
3f7d10c2c6 | ||
|
|
98e83d120a | ||
|
|
dd845d2784 | ||
|
|
dc15df2a40 | ||
|
|
7c838aaf06 | ||
|
|
f181c96518 | ||
|
|
6fbfa2c70b | ||
|
|
17dd50b902 | ||
|
|
9061335292 | ||
|
|
c27d3a3b6a | ||
|
|
c37acf4a93 | ||
|
|
0c1cef87f6 | ||
|
|
e8b777be8a | ||
|
|
2941348412 | ||
|
|
68b2ecfb6d | ||
|
|
e058b09621 | ||
|
|
d5526da1fb | ||
|
|
091305a20f | ||
|
|
85cd70b2d5 | ||
|
|
7997f490fc | ||
|
|
5a0b309b0b | ||
|
|
448e4e0d7d | ||
|
|
43c14665de | ||
|
|
e249408360 | ||
|
|
24e57d7125 | ||
|
|
0ea7714578 | ||
|
|
636a2934a2 | ||
|
|
cbe22035cb | ||
|
|
4c8e5cc8ed | ||
|
|
ee4141838c | ||
|
|
24ff42a672 | ||
|
|
d8748c028e | ||
|
|
b55924ce2b | ||
|
|
66f7a8d369 | ||
|
|
8ed97a3173 | ||
|
|
b4f452b026 | ||
|
|
8d4d730b11 | ||
|
|
8f54bd5971 | ||
|
|
56a09536cd | ||
|
|
9df5efa422 | ||
|
|
ee5461a297 | ||
|
|
5ed5f45240 | ||
|
|
a8cdc96382 | ||
|
|
532d677491 | ||
|
|
610ea60ca2 | ||
|
|
718576d5a9 | ||
|
|
f885fba4bd | ||
|
|
408a14003c | ||
|
|
9416e25ee9 | ||
|
|
8a3bbb3647 | ||
|
|
e16cc63cfe | ||
|
|
b2856eab58 | ||
|
|
55ffe22fd6 | ||
|
|
98e0f28cd9 | ||
|
|
547381286e | ||
|
|
bdaf6e662c | ||
|
|
87438abaa3 | ||
|
|
f837aaf40a | ||
|
|
86e080aae9 | ||
|
|
57efde83df | ||
|
|
6b29584424 | ||
|
|
71e40a0113 | ||
|
|
b5e7170697 | ||
|
|
4122856024 | ||
|
|
5b4c85138e | ||
|
|
727ced967b | ||
|
|
4462ebe82c | ||
|
|
06ce263668 | ||
|
|
7e086cc639 | ||
|
|
540e56a12d | ||
|
|
faf802cf3d | ||
|
|
b6d6fa7212 | ||
|
|
dfa8be63b4 | ||
|
|
9eb6acc624 | ||
|
|
b6204b1c2c | ||
|
|
39f1389d77 | ||
|
|
53b0f04512 | ||
|
|
d2fa93ee71 | ||
|
|
7871eae7a3 | ||
|
|
0bd660f255 | ||
|
|
488857b7d8 | ||
|
|
5e4c5fc230 | ||
|
|
7e6925772e | ||
|
|
b479c09cf8 | ||
|
|
eddc8168ba | ||
|
|
80dfc59017 | ||
|
|
fdc0f34e08 | ||
|
|
c0fdf10eba | ||
|
|
2aba4da1af | ||
|
|
581d889e9b | ||
|
|
6a280982d0 | ||
|
|
45c7d74160 | ||
|
|
9e225d2093 | ||
|
|
d1001df3cf | ||
|
|
d28c56fe1c | ||
|
|
fe68ebf450 | ||
|
|
18cc885869 | ||
|
|
9d4e1a66a1 | ||
|
|
baaae612fd | ||
|
|
a56665f3a3 | ||
|
|
b05e70faee | ||
|
|
5c30169eca |
No files matched your search
@@ -10,7 +10,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build bot
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build website
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ depots
|
|||||||
public/sitemap*
|
public/sitemap*
|
||||||
/firebase.json
|
/firebase.json
|
||||||
target
|
target
|
||||||
packages/website-ue/src/protos/*.ts
|
# packages/core/src/protos/*.ts
|
||||||
/.vercel
|
/.vercel
|
||||||
.astro
|
.astro
|
||||||
.vercel
|
.vercel
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
"astrojs",
|
"astrojs",
|
||||||
"astrolib",
|
"astrolib",
|
||||||
"atgm",
|
"atgm",
|
||||||
|
"Autoloader",
|
||||||
|
"Autoreloader",
|
||||||
"AYUV",
|
"AYUV",
|
||||||
"battleresults",
|
"battleresults",
|
||||||
"bbox",
|
"bbox",
|
||||||
@@ -59,7 +61,6 @@
|
|||||||
"Ddpf",
|
"Ddpf",
|
||||||
"Ddsd",
|
"Ddsd",
|
||||||
"deadrail",
|
"deadrail",
|
||||||
"DEBUFF",
|
|
||||||
"debugflags",
|
"debugflags",
|
||||||
"deburr",
|
"deburr",
|
||||||
"decalmask",
|
"decalmask",
|
||||||
@@ -74,6 +75,7 @@
|
|||||||
"DIDS",
|
"DIDS",
|
||||||
"donotremove",
|
"donotremove",
|
||||||
"drei",
|
"drei",
|
||||||
|
"Droodles",
|
||||||
"dvpd",
|
"dvpd",
|
||||||
"dvpl",
|
"dvpl",
|
||||||
"DVPLCRC",
|
"DVPLCRC",
|
||||||
@@ -100,6 +102,7 @@
|
|||||||
"gtag",
|
"gtag",
|
||||||
"haha",
|
"haha",
|
||||||
"Herdbreaker",
|
"Herdbreaker",
|
||||||
|
"Hetz",
|
||||||
"highp",
|
"highp",
|
||||||
"iife",
|
"iife",
|
||||||
"imgur",
|
"imgur",
|
||||||
@@ -174,7 +177,6 @@
|
|||||||
"ratingleaderboard",
|
"ratingleaderboard",
|
||||||
"raycaster",
|
"raycaster",
|
||||||
"Redirector",
|
"Redirector",
|
||||||
"REGEN",
|
|
||||||
"Relogin",
|
"Relogin",
|
||||||
"researchable",
|
"researchable",
|
||||||
"Resvg",
|
"Resvg",
|
||||||
@@ -189,7 +191,6 @@
|
|||||||
"searchtanks",
|
"searchtanks",
|
||||||
"SHAREDEXP",
|
"SHAREDEXP",
|
||||||
"SKLLD",
|
"SKLLD",
|
||||||
"sluggify",
|
|
||||||
"smoothstep",
|
"smoothstep",
|
||||||
"Smri",
|
"Smri",
|
||||||
"Specularity",
|
"Specularity",
|
||||||
|
|||||||
@@ -176,43 +176,6 @@
|
|||||||
"vite": "^7.1.9",
|
"vite": "^7.1.9",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"packages/website-ue": {
|
|
||||||
"name": "@blitzkit/website-ue",
|
|
||||||
"dependencies": {
|
|
||||||
"@astrojs/check": "^0.9.4",
|
|
||||||
"@astrojs/node": "^9.4.4",
|
|
||||||
"@astrojs/react": "^4.4.0",
|
|
||||||
"@astrolib/seo": "^1.0.0-beta.8",
|
|
||||||
"@blitzkit/closed": "workspace:*",
|
|
||||||
"@blitzkit/core": "workspace:*",
|
|
||||||
"@blitzkit/i18n": "workspace:*",
|
|
||||||
"@radix-ui/colors": "^3.0.0",
|
|
||||||
"@radix-ui/react-icons": "^1.3.2",
|
|
||||||
"@radix-ui/themes": "^3.2.1",
|
|
||||||
"@react-three/drei": "^10.7.6",
|
|
||||||
"@react-three/fiber": "^9.4.0",
|
|
||||||
"@types/lodash-es": "^4.17.12",
|
|
||||||
"@types/react": "^19.2.2",
|
|
||||||
"@types/react-dom": "^19.2.2",
|
|
||||||
"@types/three": "^0.180.0",
|
|
||||||
"@vite-pwa/astro": "^1.1.0",
|
|
||||||
"astro": "^5.14.4",
|
|
||||||
"astro-favicons": "^3.1.5",
|
|
||||||
"fuzzysort": "^3.1.0",
|
|
||||||
"immer": "^10.1.3",
|
|
||||||
"lodash-es": "^4.17.21",
|
|
||||||
"quicklime": "^1.2.0",
|
|
||||||
"react": "^19.2.0",
|
|
||||||
"react-dom": "^19.2.0",
|
|
||||||
"react-promise-suspense": "^0.3.4",
|
|
||||||
"three": "^0.180.0",
|
|
||||||
"three-stdlib": "^2.36.0",
|
|
||||||
"typescript": "^5.9.3",
|
|
||||||
"varuna": "workspace:*",
|
|
||||||
"vite": "^7.1.9",
|
|
||||||
"yaml": "^2.8.1",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"packages": {
|
"packages": {
|
||||||
"@apideck/better-ajv-errors": ["@apideck/[email protected]", "", { "dependencies": { "json-schema": "^0.4.0", "jsonpointer": "^5.0.0", "leven": "^3.1.0" }, "peerDependencies": { "ajv": ">=8" } }, "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA=="],
|
"@apideck/better-ajv-errors": ["@apideck/[email protected]", "", { "dependencies": { "json-schema": "^0.4.0", "jsonpointer": "^5.0.0", "leven": "^3.1.0" }, "peerDependencies": { "ajv": ">=8" } }, "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA=="],
|
||||||
@@ -441,8 +404,6 @@
|
|||||||
|
|
||||||
"@blitzkit/website": ["@blitzkit/website@workspace:packages/website"],
|
"@blitzkit/website": ["@blitzkit/website@workspace:packages/website"],
|
||||||
|
|
||||||
"@blitzkit/website-ue": ["@blitzkit/website-ue@workspace:packages/website-ue"],
|
|
||||||
|
|
||||||
"@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-fdRs9PSrBF7QUntpZpq6BTw58fhgGJojgg39m9oFOJGZT+nip9b0so5cYY1oWl5pvemDLr0cPPsH46vwThEbpQ=="],
|
"@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-fdRs9PSrBF7QUntpZpq6BTw58fhgGJojgg39m9oFOJGZT+nip9b0so5cYY1oWl5pvemDLr0cPPsH46vwThEbpQ=="],
|
||||||
|
|
||||||
"@capsizecss/unpack": ["@capsizecss/[email protected]", "", { "dependencies": { "fontkit": "^2.0.2" } }, "sha512-+ntATQe1AlL7nTOYjwjj6w3299CgRot48wL761TUGYpYgAou3AaONZazp0PKZyCyWhudWsjhq1nvRHOvbMzhTA=="],
|
"@capsizecss/unpack": ["@capsizecss/[email protected]", "", { "dependencies": { "fontkit": "^2.0.2" } }, "sha512-+ntATQe1AlL7nTOYjwjj6w3299CgRot48wL761TUGYpYgAou3AaONZazp0PKZyCyWhudWsjhq1nvRHOvbMzhTA=="],
|
||||||
@@ -2659,8 +2620,6 @@
|
|||||||
|
|
||||||
"@blitzkit/website/vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="],
|
"@blitzkit/website/vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="],
|
||||||
|
|
||||||
"@blitzkit/website-ue/vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg=="],
|
|
||||||
|
|
||||||
"@discordjs/rest/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
"@discordjs/rest/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
||||||
|
|
||||||
"@discordjs/ws/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
"@discordjs/ws/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# BlitzKit 1.29.11
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
|
||||||
|
- The Guesser game's toolbar now scales properly with screen size
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "blitzkit",
|
"name": "blitzkit",
|
||||||
"version": "1.29.7",
|
"version": "1.29.11",
|
||||||
"license": "BlitzKit License",
|
"license": "BlitzKit License",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:assets": "cd packages/scripts && bun run build:assets",
|
"build:assets": "cd packages/scripts && bun run build:assets",
|
||||||
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
||||||
"build:bot": "cd packages/scripts && bun run build:bot",
|
"build:bot": "cd packages/scripts && bun run build:bot",
|
||||||
"build:website": "cd packages/website-ue && 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:catalogitemaccesssor": "cd packages/scripts && bun run build:catalogitemaccesssor",
|
||||||
@@ -16,22 +16,22 @@
|
|||||||
"dev:bot": "bun run build:bot --dev && bun start:bot",
|
"dev:bot": "bun run build:bot --dev && bun start:bot",
|
||||||
"start:bot": "bun dist/bot/main.js",
|
"start:bot": "bun dist/bot/main.js",
|
||||||
"dev:docs": "vitepress dev docs",
|
"dev:docs": "vitepress dev docs",
|
||||||
"dev:website": "cd packages/website-ue && bun run dev",
|
"dev:website": "cd packages/website && bun run dev",
|
||||||
"dev:app": "cd packages/app && bun run dev",
|
"dev:app": "cd packages/app && bun run dev",
|
||||||
"dev": "bun run dev:website",
|
"dev": "bun run dev:website",
|
||||||
"dev:api": "bun --filter=@blitzkit/api run dev",
|
"dev:api": "bun --filter=@blitzkit/api run dev",
|
||||||
"setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader",
|
"setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader",
|
||||||
"setup:patches": "bun --filter=@blitzkit/scripts run setup:patches",
|
"setup:patches": "bun --filter=@blitzkit/scripts run setup:patches",
|
||||||
"start:website": "bun --filter=@blitzkit/website-ue run start",
|
"start:website": "bun --filter=@blitzkit/website run start",
|
||||||
"host:docs": "vitepress preview docs",
|
"host:docs": "vitepress preview docs",
|
||||||
"lint": "tsc",
|
"lint": "tsc",
|
||||||
"lint:website": "cd packages/website-ue && bun run lint",
|
"lint:website": "cd packages/website && bun run lint",
|
||||||
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
|
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
|
||||||
"update": "yarn upgrade --latest",
|
"update": "yarn upgrade --latest",
|
||||||
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
||||||
"discoverids": "scripts/discoverIds.ts",
|
"discoverids": "scripts/discoverIds.ts",
|
||||||
"build:protos": "cd packages/scripts && bun run build:protos",
|
"build:protos": "cd packages/scripts && bun run build:protos",
|
||||||
"preview:website": "cd packages/website-ue && bun run preview",
|
"preview:website": "cd packages/website && bun run preview",
|
||||||
"build:reviews": "cd packages/scripts && bun build:reviews",
|
"build:reviews": "cd packages/scripts && bun build:reviews",
|
||||||
"build:ids": "cd packages/scripts && bun build:ids",
|
"build:ids": "cd packages/scripts && bun build:ids",
|
||||||
"prunestrings": "cd packages/scripts && bun prunestrings",
|
"prunestrings": "cd packages/scripts && bun prunestrings",
|
||||||
|
|||||||
@@ -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
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -1,50 +1,49 @@
|
|||||||
export * from "./assertSecret";
|
export * from './assertSecret';
|
||||||
export * from "./asset";
|
export * from './asset';
|
||||||
export * from "./availableProvisions";
|
export * from './availableProvisions';
|
||||||
export * from "./averageDefinitions";
|
export * from './averageDefinitions';
|
||||||
// export * from './camouflageDefinitions';
|
// export * from './camouflageDefinitions';
|
||||||
// export * from './checkConsumableProvisionInclusivity';
|
// export * from './checkConsumableProvisionInclusivity';
|
||||||
export * from "./coefficient";
|
export * from './coefficient';
|
||||||
export * from "./consumableDefinitions";
|
export * from './consumableDefinitions';
|
||||||
// export * from './context';
|
// export * from './context';
|
||||||
export * from "./createDefaultSkills";
|
export * from './createDefaultSkills';
|
||||||
export * from "./degressiveStat";
|
export * from './degressiveStat';
|
||||||
export * from "./discoveredIdDefinitions";
|
export * from './discoveredIdDefinitions';
|
||||||
export * from "./emblemURL";
|
export * from './emblemURL';
|
||||||
export * from "./equipmentDefinitions";
|
export * from './equipmentDefinitions';
|
||||||
export * from "./eventManager";
|
export * from './eventManager';
|
||||||
export * from "./gameDefinitions";
|
export * from './gameDefinitions';
|
||||||
export * from "./getArchivedLatestSeasonNumber";
|
export * from './getArchivedLatestSeasonNumber';
|
||||||
// export * from './getArchivedRatingInfo';
|
// export * from './getArchivedRatingInfo';
|
||||||
export * from "./getArchivedRatingLeaderboard";
|
export * from './getArchivedRatingLeaderboard';
|
||||||
// export * from './getArchivedRatingMidnightLeaderboard';
|
// export * from './getArchivedRatingMidnightLeaderboard';
|
||||||
export * from "./getTimeDaysAgo";
|
export * from './getTimeDaysAgo';
|
||||||
export * from "./isExplosive";
|
export * from './isExplosive';
|
||||||
export * from "./mapDefinitions";
|
export * from './mapDefinitions';
|
||||||
export * from "./modelDefinitions";
|
export * from './modelDefinitions';
|
||||||
export * from "./normalizeBoundingBox";
|
export * from './normalizeBoundingBox';
|
||||||
// export * from './parseBkni';
|
// export * from './parseBkni';
|
||||||
// export * from './patientFetch';
|
// export * from './patientFetch';
|
||||||
export * from "./patientFetchJSON";
|
export * from './patientFetchJSON';
|
||||||
export * from "./progressiveStat";
|
export * from './progressiveStat';
|
||||||
export * from "./provisionDefinitions";
|
export * from './provisionDefinitions';
|
||||||
export * from "./resolveDpm";
|
export * from './resolveDpm';
|
||||||
export * from "./resolvePenetrationCoefficient";
|
export * from './resolvePenetrationCoefficient';
|
||||||
export * from "./reviews";
|
export * from './reviews';
|
||||||
export * from "./skillDefinitions";
|
export * from './skillDefinitions';
|
||||||
export * from "./sum";
|
export * from './sum';
|
||||||
export * from "./tankDefinitions";
|
export * from './tankDefinitions';
|
||||||
export * from "./tankIcon";
|
export * from './tankIcon';
|
||||||
export * from "./tankNames";
|
export * from './tankNames';
|
||||||
export * from "./unionBoundingBox";
|
export * from './unionBoundingBox';
|
||||||
export * from "./uniqueGuns";
|
export * from './uniqueGuns';
|
||||||
export * from "./unwrapBlitzkitResponse";
|
export * from './unwrapBlitzkitResponse';
|
||||||
export * from "./votes";
|
export * from './votes';
|
||||||
// export * from './withCORSProxy';
|
// export * from './withCORSProxy';
|
||||||
export * from "./createDefaultProvisions";
|
export * from './createDefaultProvisions';
|
||||||
export * from "./gallery";
|
export * from './gallery';
|
||||||
export * from "./metaSortTank";
|
export * from './metaSortTank';
|
||||||
export * from "./popularTanks";
|
export * from './popularTanks';
|
||||||
export * from "./romanize";
|
export * from './romanize';
|
||||||
export * from "./sluggify.ts";
|
export * from './youtubers';
|
||||||
export * from "./youtubers";
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import { deburr } from "lodash-es";
|
|
||||||
|
|
||||||
const nonAlphanumericRegex = /[^a-z0-9]/g;
|
|
||||||
const multipleDashesRegex = /--+/g;
|
|
||||||
const trailingDashRegex = /-$/g;
|
|
||||||
const leadingDashRegex = /^-/g;
|
|
||||||
|
|
||||||
export function sluggify(value: string) {
|
|
||||||
let slug = deburr(value).toLowerCase();
|
|
||||||
slug = slug.replaceAll(nonAlphanumericRegex, "-");
|
|
||||||
slug = slug.replaceAll(multipleDashesRegex, "-");
|
|
||||||
slug = slug.replaceAll(trailingDashRegex, "");
|
|
||||||
slug = slug.replaceAll(leadingDashRegex, "");
|
|
||||||
|
|
||||||
return slug;
|
|
||||||
}
|
|
||||||
@@ -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",
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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.",
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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": "côtée",
|
"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",
|
||||||
@@ -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": {
|
||||||
|
|||||||
@@ -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": {
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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.",
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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.",
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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": "Попробуйте повторить поиск.",
|
||||||
@@ -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": "Убрать со всех"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
"hp": "{value}од",
|
"hp": "{value}од",
|
||||||
"x": "x{value}",
|
"x": "x{value}",
|
||||||
"percentage": "{value}%",
|
"percentage": "{value}%",
|
||||||
"deg_s": "{value}град/c"
|
"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": "Колекційний"
|
||||||
@@ -340,18 +341,18 @@
|
|||||||
"subtitle": "Дослідження",
|
"subtitle": "Дослідження",
|
||||||
"total": "Загалом",
|
"total": "Загалом",
|
||||||
"research": "Дослідження: {cost}",
|
"research": "Дослідження: {cost}",
|
||||||
"upgrades": "Upgrades: {cost}",
|
"upgrades": "Прокачування: {cost}",
|
||||||
"purchase": "Вартість: {cost}",
|
"purchase": "Вартість: {cost}",
|
||||||
"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,11 +431,11 @@
|
|||||||
"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} днів"
|
"listing": "{days} днів"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -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_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,33 +614,33 @@
|
|||||||
},
|
},
|
||||||
"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": {
|
||||||
@@ -668,6 +669,10 @@
|
|||||||
"count_singular": "1 танк",
|
"count_singular": "1 танк",
|
||||||
"count_plural": "Танків: {count} ",
|
"count_plural": "Танків: {count} ",
|
||||||
"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": "Спробуйте шукати заново.",
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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": "请尝试重新搜索。",
|
||||||
@@ -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": "清除所有坦克"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1557,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(" "),
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1657,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(" "),
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ const TS_PROTO_EXECUTABLE_LOCATIONS = [
|
|||||||
const roots = [
|
const roots = [
|
||||||
// "../../packages/core/src/protos",
|
// "../../packages/core/src/protos",
|
||||||
"../../packages/closed/protos",
|
"../../packages/closed/protos",
|
||||||
"../../packages/website-ue/src/protos",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const exec = promisify(execSync);
|
const exec = promisify(execSync);
|
||||||
@@ -67,7 +66,7 @@ for (const root of roots) {
|
|||||||
|
|
||||||
if (command.length + newLine.length < MAX_COMMAND_LENGTH) {
|
if (command.length + newLine.length < MAX_COMMAND_LENGTH) {
|
||||||
command += newLine;
|
command += newLine;
|
||||||
console.log(` ${files.pop()}`);
|
files.pop();
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,114 +0,0 @@
|
|||||||
import node from "@astrojs/node";
|
|
||||||
import react from "@astrojs/react";
|
|
||||||
import { wrapper } from "@blitzkit/i18n";
|
|
||||||
import locales from "@blitzkit/i18n/locales.json";
|
|
||||||
import strings from "@blitzkit/i18n/strings/en.json";
|
|
||||||
import { mauve, mauveDark } from "@radix-ui/colors";
|
|
||||||
import AstroPWA from "@vite-pwa/astro";
|
|
||||||
import favicons from "astro-favicons";
|
|
||||||
import { defineConfig } from "astro/config";
|
|
||||||
import packageJSON from "../../package.json";
|
|
||||||
import { tools } from "./src/core/tools/tools";
|
|
||||||
|
|
||||||
const POSSIBLE_TARGETS = ["app", "web"];
|
|
||||||
|
|
||||||
const target = process.env.PUBLIC_TARGET;
|
|
||||||
|
|
||||||
if (!target || !POSSIBLE_TARGETS.includes(target)) {
|
|
||||||
throw new Error("Invalid target");
|
|
||||||
}
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
devToolbar: { enabled: false },
|
|
||||||
|
|
||||||
vite: { server: { allowedHosts: [] } },
|
|
||||||
output: target === "web" ? "static" : "server",
|
|
||||||
site: "https://blitzkit.app",
|
|
||||||
outDir: "../../dist/website",
|
|
||||||
prefetch: { defaultStrategy: "hover", prefetchAll: true },
|
|
||||||
|
|
||||||
build: { concurrency: 4 },
|
|
||||||
adapter: target === "app" ? node({ mode: "standalone" }) : undefined,
|
|
||||||
|
|
||||||
integrations: [
|
|
||||||
favicons({
|
|
||||||
name: strings.common.name,
|
|
||||||
short_name: strings.common.name,
|
|
||||||
|
|
||||||
background: mauveDark.mauve1,
|
|
||||||
themes: [mauve.mauve1, mauveDark.mauve1],
|
|
||||||
appleStatusBarStyle: "black-translucent",
|
|
||||||
|
|
||||||
version: packageJSON.version,
|
|
||||||
|
|
||||||
shortcuts: Object.values(tools)
|
|
||||||
.filter((tool) => !tool.disabled && !tool.href)
|
|
||||||
.map((tool) => {
|
|
||||||
const stringId = (tool.strings ??
|
|
||||||
tool.id) as keyof typeof strings.website.tools;
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: strings.website.tools[stringId].name,
|
|
||||||
name_localized: wrapper(
|
|
||||||
(strings) => strings.website.tools[stringId].name
|
|
||||||
),
|
|
||||||
description: strings.website.tools[stringId].description,
|
|
||||||
description_localized: wrapper(
|
|
||||||
(strings) => strings.website.tools[stringId].description
|
|
||||||
),
|
|
||||||
short_name: strings.website.tools[stringId].name,
|
|
||||||
short_name_localized: wrapper(
|
|
||||||
(strings) => strings.website.tools[stringId].name
|
|
||||||
),
|
|
||||||
url: `/${tool.id}`,
|
|
||||||
icon: `public/assets/images/tools/${tool.id}.webp`,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
|
|
||||||
manifest: {
|
|
||||||
description: strings.website.home.seo_description,
|
|
||||||
description_localized: wrapper(
|
|
||||||
(strings) => strings.website.home.seo_description
|
|
||||||
),
|
|
||||||
|
|
||||||
dir: "ltr",
|
|
||||||
categories: ["utilities", "games", "developer", "developer tools"],
|
|
||||||
|
|
||||||
id: "com.tresabhi.blitzkit",
|
|
||||||
start_url: "/",
|
|
||||||
launch_handler: { client_mode: "navigate-new" },
|
|
||||||
display: "fullscreen",
|
|
||||||
display_override: ["fullscreen", "standalone", "minimal-ui"],
|
|
||||||
|
|
||||||
lang: locales.default,
|
|
||||||
orientation: "any",
|
|
||||||
},
|
|
||||||
|
|
||||||
icons: {
|
|
||||||
windows: true,
|
|
||||||
android: true,
|
|
||||||
appleIcon: true,
|
|
||||||
appleStartup: true,
|
|
||||||
favicons: true,
|
|
||||||
yandex: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
|
|
||||||
AstroPWA({
|
|
||||||
manifest: false,
|
|
||||||
devOptions: { enabled: true },
|
|
||||||
workbox: {
|
|
||||||
globPatterns: ["**/*.{html,css,js,png,webp,svg,xml,json}"],
|
|
||||||
runtimeCaching: [
|
|
||||||
{
|
|
||||||
urlPattern: ({ url }) =>
|
|
||||||
url.href.startsWith(import.meta.env.PUBLIC_ASSET_BASE),
|
|
||||||
handler: "NetworkFirst",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
|
|
||||||
react(),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@blitzkit/website-ue",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "PUBLIC_TARGET=web astro dev",
|
|
||||||
"build": "PUBLIC_TARGET=web astro build",
|
|
||||||
"preview": "PUBLIC_TARGET=web astro preview",
|
|
||||||
"lint": "PUBLIC_TARGET=web astro check",
|
|
||||||
"astro": "astro"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@astrojs/check": "^0.9.4",
|
|
||||||
"@astrojs/node": "^9.4.4",
|
|
||||||
"@astrojs/react": "^4.4.0",
|
|
||||||
"@astrolib/seo": "^1.0.0-beta.8",
|
|
||||||
"@blitzkit/closed": "workspace:*",
|
|
||||||
"@blitzkit/core": "workspace:*",
|
|
||||||
"@blitzkit/i18n": "workspace:*",
|
|
||||||
"@radix-ui/colors": "^3.0.0",
|
|
||||||
"@radix-ui/react-icons": "^1.3.2",
|
|
||||||
"@radix-ui/themes": "^3.2.1",
|
|
||||||
"@react-three/drei": "^10.7.6",
|
|
||||||
"@react-three/fiber": "^9.4.0",
|
|
||||||
"@types/lodash-es": "^4.17.12",
|
|
||||||
"@types/react": "^19.2.2",
|
|
||||||
"@types/react-dom": "^19.2.2",
|
|
||||||
"@types/three": "^0.180.0",
|
|
||||||
"@vite-pwa/astro": "^1.1.0",
|
|
||||||
"astro": "^5.14.4",
|
|
||||||
"astro-favicons": "^3.1.5",
|
|
||||||
"fuzzysort": "^3.1.0",
|
|
||||||
"immer": "^10.1.3",
|
|
||||||
"lodash-es": "^4.17.21",
|
|
||||||
"quicklime": "^1.2.0",
|
|
||||||
"react": "^19.2.0",
|
|
||||||
"react-dom": "^19.2.0",
|
|
||||||
"react-promise-suspense": "^0.3.4",
|
|
||||||
"three": "^0.180.0",
|
|
||||||
"three-stdlib": "^2.36.0",
|
|
||||||
"typescript": "^5.9.3",
|
|
||||||
"varuna": "workspace:*",
|
|
||||||
"vite": "^7.1.9",
|
|
||||||
"yaml": "^2.8.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 443 KiB |
|
Before Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 715 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 676 KiB |
|
Before Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 367 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 346 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 406 KiB |
|
Before Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 200 KiB |
@@ -1,46 +0,0 @@
|
|||||||
<svg width="426" height="426" viewBox="0 0 426 426" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M416.628 244.997L235.625 372.974C223.13 381.809 202.87 381.809 190.375 372.974L9.37173 244.997C3.1239 240.58 -3.95076e-06 234.79 0 229V196.6H426V229C426 234.79 422.876 240.58 416.628 244.997Z" fill="#0D2847"/>
|
|
||||||
<path d="M416.628 180.603L235.625 52.6262C223.13 43.7913 202.87 43.7913 190.375 52.6262L9.37172 180.603C-3.12391 189.438 -3.12391 203.762 9.37173 212.597L190.375 340.574C202.87 349.409 223.13 349.409 235.625 340.574L416.628 212.597C429.124 203.762 429.124 189.438 416.628 180.603Z" fill="#D9D9D9"/>
|
|
||||||
<path d="M416.628 180.603L235.625 52.6262C223.13 43.7913 202.87 43.7913 190.375 52.6262L9.37172 180.603C-3.12391 189.438 -3.12391 203.762 9.37173 212.597L190.375 340.574C202.87 349.409 223.13 349.409 235.625 340.574L416.628 212.597C429.124 203.762 429.124 189.438 416.628 180.603Z" fill="url(#paint0_linear_764_240)"/>
|
|
||||||
<path d="M416.628 180.603L235.625 52.6262C223.13 43.7913 202.87 43.7913 190.375 52.6262L9.37172 180.603C-3.12391 189.438 -3.12391 203.762 9.37173 212.597L190.375 340.574C202.87 349.409 223.13 349.409 235.625 340.574L416.628 212.597C429.124 203.762 429.124 189.438 416.628 180.603Z" fill="url(#paint1_linear_764_240)"/>
|
|
||||||
<g filter="url(#filter0_d_764_240)">
|
|
||||||
<path d="M197.056 150.108L201.368 153.051L290.596 213.945L306.6 202.599L310.832 199.599L289.153 184.23L288.86 177.31L335.236 182.298L351.706 170.622L359.102 165.378L288.049 158.111L286.355 118L263.968 133.871L265.867 167.722L217.292 135.762L197.056 150.108Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.905 289L74.2242 204.714L70 201.714L116.393 168.767C129.906 159.17 143.124 153.539 156.048 151.875C168.971 150.211 180.919 153.275 191.893 161.069C198.702 165.905 202.718 171.006 203.941 176.372C205.165 181.658 204.302 186.506 201.354 190.918L201.692 191.158C208.978 188.301 216.935 187.286 225.563 188.113C234.247 188.9 242.613 192.151 250.66 197.866C261.803 205.779 266.398 214.825 264.446 225.004C262.551 235.142 254.96 244.929 241.672 254.366L192.905 289ZM221.999 242.08L200.456 257.38L163.905 231.422L185.448 216.123C192.007 211.465 198.473 209.23 204.846 209.42C211.22 209.529 217.193 211.562 222.764 215.519C228.392 219.516 231.31 223.797 231.521 228.364C231.732 232.85 228.558 237.422 221.999 242.08ZM165.937 205.64L146.77 219.252L114.693 196.472L133.861 182.859C140.363 178.241 146.435 175.887 152.076 175.798C157.717 175.708 163.07 177.462 168.135 181.059C173.256 184.696 175.809 188.557 175.796 192.643C175.726 196.69 172.44 201.022 165.937 205.64Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path d="M197.056 156.108L290.596 219.945L310.832 205.599L306.6 202.599L289.153 190.23L288.86 183.31L335.236 188.298L359.102 171.378L351.706 170.622L288.049 164.111L286.355 124L263.968 139.871L265.867 173.722L217.292 141.762L201.368 153.051L197.056 156.108Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.905 295L70 207.714L74.2242 204.714L116.393 174.767C129.906 165.17 143.124 159.539 156.048 157.875C168.971 156.211 180.919 159.275 191.893 167.069C198.702 171.905 202.718 177.006 203.941 182.372C205.165 187.658 204.302 192.506 201.354 196.918L201.692 197.158C208.978 194.301 216.935 193.286 225.563 194.113C234.247 194.9 242.613 198.151 250.66 203.866C261.803 211.779 266.398 220.825 264.446 231.004C262.551 241.142 254.96 250.929 241.672 260.366L192.905 295ZM221.999 248.08L200.456 263.38L163.905 237.422L185.448 222.123C192.007 217.465 198.473 215.23 204.846 215.42C211.22 215.529 217.193 217.562 222.764 221.519C228.392 225.516 231.31 229.797 231.521 234.364C231.732 238.85 228.558 243.422 221.999 248.08ZM165.937 211.64L146.77 225.252L114.693 202.472L133.861 188.859C140.363 184.241 146.435 181.887 152.076 181.798C157.717 181.708 163.07 183.462 168.135 187.059C173.256 190.696 175.809 194.557 175.796 198.643C175.726 202.69 172.44 207.022 165.937 211.64Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path d="M310.832 199.599L306.6 202.599L310.832 205.599V199.599Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path d="M359.102 165.378L351.706 170.622L359.102 171.378V165.378Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path d="M201.368 153.051L197.056 150.108V156.108L201.368 153.051Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
<path d="M74.2242 204.714L70 201.714V207.714L74.2242 204.714Z" fill="#111927" fill-opacity="0.5" shape-rendering="crispEdges"/>
|
|
||||||
</g>
|
|
||||||
<path d="M197.056 150.108L290.596 213.945L310.832 199.599L289.153 184.23L288.86 177.31L335.236 182.298L359.102 165.378L288.049 158.111L286.355 118L263.968 133.871L265.867 167.722L217.292 135.762L197.056 150.108Z" fill="url(#paint2_linear_764_240)"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.905 289L70 201.714L116.393 168.767C129.906 159.17 143.124 153.539 156.048 151.875C168.971 150.211 180.919 153.275 191.893 161.069C198.702 165.905 202.718 171.006 203.941 176.372C205.165 181.658 204.302 186.506 201.354 190.918L201.692 191.158C208.978 188.301 216.935 187.286 225.563 188.113C234.247 188.9 242.613 192.151 250.66 197.866C261.803 205.779 266.398 214.825 264.446 225.004C262.551 235.142 254.96 244.929 241.672 254.366L192.905 289ZM221.999 242.08L200.456 257.38L163.905 231.422L185.448 216.123C192.007 211.465 198.473 209.23 204.846 209.42C211.22 209.529 217.193 211.562 222.764 215.519C228.392 219.516 231.31 223.797 231.521 228.364C231.732 232.85 228.558 237.422 221.999 242.08ZM165.937 205.64L146.77 219.252L114.693 196.472L133.861 182.859C140.363 178.241 146.435 175.887 152.076 175.798C157.717 175.708 163.07 177.462 168.135 181.059C173.256 184.696 175.809 188.557 175.796 192.643C175.726 196.69 172.44 201.022 165.937 205.64Z" fill="url(#paint3_linear_764_240)"/>
|
|
||||||
<defs>
|
|
||||||
<filter id="filter0_d_764_240" x="66" y="116" width="297.103" height="185" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
||||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
||||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
||||||
<feOffset dy="2"/>
|
|
||||||
<feGaussianBlur stdDeviation="2"/>
|
|
||||||
<feComposite in2="hardAlpha" operator="out"/>
|
|
||||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
||||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_764_240"/>
|
|
||||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_764_240" result="shape"/>
|
|
||||||
</filter>
|
|
||||||
<linearGradient id="paint0_linear_764_240" x1="213" y1="46" x2="213" y2="347.2" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#10243E"/>
|
|
||||||
<stop offset="1" stop-color="#0F1B2D"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint1_linear_764_240" x1="127.008" y1="96.51" x2="241.48" y2="334.974" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#262A65"/>
|
|
||||||
<stop offset="1" stop-color="#104D87"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint2_linear_764_240" x1="215" y1="98.5" x2="299.5" y2="210.5" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop offset="0.379808" stop-color="#C2E6FF"/>
|
|
||||||
<stop offset="0.706731" stop-color="#70B8FF"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint3_linear_764_240" x1="215" y1="98.5" x2="299.5" y2="210.5" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop offset="0.379808" stop-color="#C2E6FF"/>
|
|
||||||
<stop offset="0.706731" stop-color="#70B8FF"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 7.3 KiB |
@@ -1,13 +0,0 @@
|
|||||||
import type { TankCatalogComponent } from "@protos/blitz_static_tank_component";
|
|
||||||
import type { Tanks } from "../../protos/tanks";
|
|
||||||
|
|
||||||
export abstract class AbstractAPI {
|
|
||||||
abstract tanks(): Promise<Tanks>;
|
|
||||||
|
|
||||||
abstract strings(
|
|
||||||
locale: string,
|
|
||||||
prefix?: string
|
|
||||||
): Promise<Record<string, string>>;
|
|
||||||
|
|
||||||
abstract tank(id: string): Promise<TankCatalogComponent>;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { TankCatalogComponent } from "@protos/blitz_static_tank_component";
|
|
||||||
import { AbstractAPI } from "./abstract";
|
|
||||||
|
|
||||||
export class ClientAPI extends AbstractAPI {
|
|
||||||
async tank(id: string) {
|
|
||||||
const response = await fetch(`/api/tanks/${id}.pb`);
|
|
||||||
const buffer = await response.arrayBuffer();
|
|
||||||
const array = new Uint8Array(buffer);
|
|
||||||
|
|
||||||
return TankCatalogComponent.decode(array);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import type { AbstractAPI } from "./abstract";
|
|
||||||
|
|
||||||
let dynamicAPI: AbstractAPI;
|
|
||||||
|
|
||||||
if (typeof window === "undefined") {
|
|
||||||
const { ProxyClient } = await import("@blitzkit/closed");
|
|
||||||
const { ServerAPI } = await import("./server");
|
|
||||||
|
|
||||||
const proxyClient = await new ProxyClient(
|
|
||||||
import.meta.env.WOTB_SERVER
|
|
||||||
).handshake();
|
|
||||||
const metadata = await proxyClient.metadata();
|
|
||||||
|
|
||||||
dynamicAPI = new ServerAPI(metadata);
|
|
||||||
} else {
|
|
||||||
const { ClientAPI } = await import("./client");
|
|
||||||
|
|
||||||
dynamicAPI = new ClientAPI();
|
|
||||||
}
|
|
||||||
|
|
||||||
export const api = dynamicAPI;
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
import type { MetadataAccessor } from "@blitzkit/closed";
|
|
||||||
import { sluggify } from "@blitzkit/core";
|
|
||||||
import type { RemoteStorageComponent } from "@protos/blitz_static_remote_storage_component";
|
|
||||||
import { parse } from "yaml";
|
|
||||||
import type { TanksEntry } from "../../protos/tanks";
|
|
||||||
import { AbstractAPI } from "./abstract";
|
|
||||||
|
|
||||||
if (typeof window !== "undefined") {
|
|
||||||
throw new Error("ServerAPI is being evaluated in the browser");
|
|
||||||
}
|
|
||||||
|
|
||||||
interface LocalizationConfig {
|
|
||||||
namespaces: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ServerAPI extends AbstractAPI {
|
|
||||||
constructor(private metadata: MetadataAccessor) {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
async strings(locale: string) {
|
|
||||||
const group = this.metadata.group("ClientConfigsEntity");
|
|
||||||
|
|
||||||
if (group.length !== 1) {
|
|
||||||
throw new RangeError(
|
|
||||||
`Don't know how to handle ${group.length} ClientConfigsEntities`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const clientConfig = this.metadata.item(group[0].id);
|
|
||||||
const localizationResources = clientConfig.LocalizationResources();
|
|
||||||
|
|
||||||
if (!localizationResources.remote_storage) {
|
|
||||||
throw new Error("Localization resources not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
let remoteStorage: RemoteStorageComponent | undefined = undefined;
|
|
||||||
|
|
||||||
for (const candidateId of localizationResources.remote_storage
|
|
||||||
.remote_urls) {
|
|
||||||
const item = this.metadata.item(candidateId);
|
|
||||||
const candidate = item.RemoteStorage();
|
|
||||||
|
|
||||||
if (
|
|
||||||
remoteStorage === undefined ||
|
|
||||||
candidate.download_speed_weight > remoteStorage.download_speed_weight
|
|
||||||
) {
|
|
||||||
remoteStorage = candidate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (remoteStorage === undefined) {
|
|
||||||
throw new Error("No suitable production remote storage found");
|
|
||||||
}
|
|
||||||
|
|
||||||
const strings: Record<string, string> = {};
|
|
||||||
const configPath = `${remoteStorage.url}/${remoteStorage.relative_path}/config.yaml`;
|
|
||||||
|
|
||||||
try {
|
|
||||||
const config = await fetch(configPath)
|
|
||||||
.then((response) => response.text())
|
|
||||||
.then((text) => parse(text) as LocalizationConfig);
|
|
||||||
|
|
||||||
for (const namespace of config.namespaces) {
|
|
||||||
Object.assign(
|
|
||||||
strings,
|
|
||||||
await fetch(
|
|
||||||
`${remoteStorage.url}/${remoteStorage.relative_path}/${namespace}/${locale}.yaml`
|
|
||||||
)
|
|
||||||
.then((response) => response.text())
|
|
||||||
.then((text) => {
|
|
||||||
const strings: Record<string, string> = {};
|
|
||||||
const parsed = parse(text) as Record<string, string>;
|
|
||||||
|
|
||||||
for (const key in parsed) {
|
|
||||||
strings[key] = parsed[key].replaceAll('\\"', '"');
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.warn(
|
|
||||||
`Failed to fetch config from ${configPath}. Returning empty strings. This will throw an error in production. Error:`,
|
|
||||||
error
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings;
|
|
||||||
}
|
|
||||||
|
|
||||||
async tanks() {
|
|
||||||
const group = this.metadata.group("TankEntity");
|
|
||||||
const tanks: TanksEntry[] = [];
|
|
||||||
const strings = await this.strings("en");
|
|
||||||
|
|
||||||
for (const item of group) {
|
|
||||||
const tankCatalog = item.TankCatalog();
|
|
||||||
|
|
||||||
if (!tankCatalog.name) continue;
|
|
||||||
|
|
||||||
const name = strings[tankCatalog.name.value];
|
|
||||||
|
|
||||||
if (!name) continue;
|
|
||||||
|
|
||||||
const id = item.name;
|
|
||||||
const slug = sluggify(name);
|
|
||||||
|
|
||||||
tanks.push({ id, slug });
|
|
||||||
}
|
|
||||||
|
|
||||||
return { tanks };
|
|
||||||
}
|
|
||||||
|
|
||||||
async tank(id: string) {
|
|
||||||
const item = this.metadata.item(`TankEntity.${id}`);
|
|
||||||
const tankCatalog = item.TankCatalog();
|
|
||||||
|
|
||||||
return tankCatalog;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,210 +0,0 @@
|
|||||||
import { StandardSinglePrice } from "@protos/blitz_static_standard_single_price";
|
|
||||||
import { PenetrationGroup } from "@protos/blitz_static_tank_penetration_group";
|
|
||||||
import {
|
|
||||||
PenetrationGroupUpgrade,
|
|
||||||
PitchLimit,
|
|
||||||
ShellUpgrade,
|
|
||||||
ShellUpgrageSingleChange,
|
|
||||||
StageParameters,
|
|
||||||
TankAttributeChange,
|
|
||||||
TankAttributeChange_AttributeName,
|
|
||||||
TankAttributeChange_Modifier,
|
|
||||||
VisualChanges,
|
|
||||||
} from "@protos/blitz_static_tank_upgrade_single_stage";
|
|
||||||
|
|
||||||
function patch(stage0: StageParameters, stage1: StageParameters) {
|
|
||||||
if (stage1.stage_number !== ++stage0.stage_number) {
|
|
||||||
throw new Error("Change stage number must be 1 greater than base");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const attribute1 of stage1.attributes) {
|
|
||||||
let value1: number;
|
|
||||||
|
|
||||||
switch (attribute1.modifier) {
|
|
||||||
case TankAttributeChange_Modifier.MODIFIER_OVERRIDE:
|
|
||||||
value1 = attribute1.value;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TankAttributeChange_Modifier.MODIFIER_MULTIPLY:
|
|
||||||
case TankAttributeChange_Modifier.MODIFIER_ADD:
|
|
||||||
const attribute0 = stage0.attributes.find(
|
|
||||||
(attribute0) =>
|
|
||||||
attribute0.attribute_name === attribute1.attribute_name
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!attribute0) {
|
|
||||||
throw new Error(
|
|
||||||
`Missing attribute ${
|
|
||||||
TankAttributeChange_AttributeName[attribute1.attribute_name]
|
|
||||||
} (${attribute1.attribute_name}) to modify`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
case TankAttributeChange_Modifier.MODIFIER_MULTIPLY: {
|
|
||||||
value1 = attribute0!.value! * attribute1.value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case TankAttributeChange_Modifier.MODIFIER_ADD: {
|
|
||||||
value1 = attribute0!.value! + attribute1.value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new Error(
|
|
||||||
`Unhandled modified ${
|
|
||||||
TankAttributeChange_Modifier[attribute1.modifier]
|
|
||||||
}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const attribute0 = TankAttributeChange.create({
|
|
||||||
modifier: TankAttributeChange_Modifier.MODIFIER_OVERRIDE,
|
|
||||||
attribute_name: attribute1.attribute_name,
|
|
||||||
value: value1,
|
|
||||||
});
|
|
||||||
const index0 = stage0.attributes.findIndex(
|
|
||||||
(attribute) => attribute.attribute_name === attribute1.attribute_name
|
|
||||||
);
|
|
||||||
|
|
||||||
if (index0 === -1) {
|
|
||||||
stage0.attributes.push(attribute0);
|
|
||||||
} else {
|
|
||||||
stage0.attributes[index0] = attribute0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const penetrationGroupUpgrade1 of stage1.penetration_groups_upgrades) {
|
|
||||||
const penetrationGroupUpgrade0 = stage0.penetration_groups_upgrades.find(
|
|
||||||
(group) => group.tank_part === penetrationGroupUpgrade1.tank_part
|
|
||||||
);
|
|
||||||
|
|
||||||
if (penetrationGroupUpgrade0) {
|
|
||||||
penetrationGroupUpgrade0.primary_armor = [
|
|
||||||
...penetrationGroupUpgrade1.primary_armor,
|
|
||||||
];
|
|
||||||
|
|
||||||
for (const penetrationGroup1 of penetrationGroupUpgrade1.penetration_groups) {
|
|
||||||
const penetrationGroup0 =
|
|
||||||
penetrationGroupUpgrade0.penetration_groups.find(
|
|
||||||
(baseGroup) => baseGroup.group_name === penetrationGroup1.group_name
|
|
||||||
);
|
|
||||||
|
|
||||||
if (penetrationGroup0) {
|
|
||||||
penetrationGroup0.common_data = penetrationGroup1.common_data;
|
|
||||||
penetrationGroup0.armor = penetrationGroup1.armor;
|
|
||||||
} else {
|
|
||||||
penetrationGroupUpgrade0.penetration_groups.push(
|
|
||||||
PenetrationGroup.create(penetrationGroup1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
stage0.penetration_groups_upgrades.push(
|
|
||||||
PenetrationGroupUpgrade.create(penetrationGroupUpgrade1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stage1.modules_upgrades.length > 0) {
|
|
||||||
throw new Error("Modules upgrades not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const shellUpgrades1 of stage1.shells_upgrades) {
|
|
||||||
let shellUpgrades0 = stage0.shells_upgrades.find(
|
|
||||||
(baseShell) => baseShell.shell_id === shellUpgrades1.shell_id
|
|
||||||
);
|
|
||||||
|
|
||||||
if (shellUpgrades0) {
|
|
||||||
shellUpgrades0.shell_type = shellUpgrades1.shell_type;
|
|
||||||
|
|
||||||
for (const changedShellUpgrade of shellUpgrades1.changes) {
|
|
||||||
const shellUpgrade0 = shellUpgrades0.changes.find(
|
|
||||||
(baseShellUpgrade) =>
|
|
||||||
baseShellUpgrade.attribute_name ===
|
|
||||||
changedShellUpgrade.attribute_name
|
|
||||||
);
|
|
||||||
|
|
||||||
if (shellUpgrade0) {
|
|
||||||
shellUpgrade0.value = changedShellUpgrade.value;
|
|
||||||
} else {
|
|
||||||
shellUpgrades0.changes.push(
|
|
||||||
ShellUpgrageSingleChange.create(changedShellUpgrade)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
shellUpgrades0.silver_price =
|
|
||||||
shellUpgrades1.silver_price === undefined
|
|
||||||
? undefined
|
|
||||||
: StandardSinglePrice.create(shellUpgrades1.silver_price);
|
|
||||||
} else {
|
|
||||||
stage0.shells_upgrades.push(ShellUpgrade.create(shellUpgrades1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stage1.pump_reload_times.length > 0) {
|
|
||||||
throw new Error("Pump reload times not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stage1.pitch_limits_up.length > 0 && stage0.pitch_limits_up.length > 0) {
|
|
||||||
throw new Error("Pitch limits not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const pitchLimitUp1 of stage1.pitch_limits_up) {
|
|
||||||
stage0.pitch_limits_up.push(PitchLimit.create(pitchLimitUp1));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
stage1.pitch_limits_down.length > 0 &&
|
|
||||||
stage0.pitch_limits_down.length > 0
|
|
||||||
) {
|
|
||||||
throw new Error("Pitch limits not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const pitchLimitDown1 of stage1.pitch_limits_down) {
|
|
||||||
stage0.pitch_limits_down.push(PitchLimit.create(pitchLimitDown1));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const visualChange1 of stage1.visual_changes) {
|
|
||||||
const visualChange0 = stage0.visual_changes.find(
|
|
||||||
(baseVisualChange) =>
|
|
||||||
baseVisualChange.tank_part === visualChange1.tank_part
|
|
||||||
);
|
|
||||||
|
|
||||||
if (visualChange0) {
|
|
||||||
visualChange0.name = visualChange1.name;
|
|
||||||
} else {
|
|
||||||
stage0.visual_changes.push(VisualChanges.create(visualChange1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function aggregateStageParameters(
|
|
||||||
base: StageParameters,
|
|
||||||
stages: StageParameters[],
|
|
||||||
stage: number
|
|
||||||
) {
|
|
||||||
const stage0 = StageParameters.create();
|
|
||||||
|
|
||||||
patch(stage0, base);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bug in Reforged: base stats are stage 1, so is the first upgrade. Manually
|
|
||||||
* setting it to stage 0 below and if the bug's been fixed, throw an error
|
|
||||||
* in dev mode to allow clean up in the future. Also, update the initial
|
|
||||||
* stage number to -1.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (stage0.stage_number === 0 && import.meta.env.DEV) {
|
|
||||||
throw new Error(
|
|
||||||
"Base stats are now stage 0. In-game bug fixed, please remove hack."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
stage0.stage_number = 0;
|
|
||||||
|
|
||||||
stages.forEach((stage) => patch(stage0, stage));
|
|
||||||
|
|
||||||
return stage0;
|
|
||||||
}
|
|
||||||
@@ -1,335 +0,0 @@
|
|||||||
import {
|
|
||||||
ShellUpgrageSingleChange_AttributeName,
|
|
||||||
TankAttributeChange_AttributeName,
|
|
||||||
} from "@protos/blitz_static_tank_upgrade_single_stage";
|
|
||||||
|
|
||||||
export type CharacteristicOutput = number | null;
|
|
||||||
|
|
||||||
type Characteristic = (helpers: {
|
|
||||||
characteristic: (name: CharacteristicName) => CharacteristicOutput;
|
|
||||||
attribute: (name: TankAttributeChange_AttributeName) => number;
|
|
||||||
attributeSafe: (name: TankAttributeChange_AttributeName) => number | null;
|
|
||||||
shell: (name: ShellUpgrageSingleChange_AttributeName) => number;
|
|
||||||
shellSafe: (name: ShellUpgrageSingleChange_AttributeName) => number | null;
|
|
||||||
}) => CharacteristicOutput;
|
|
||||||
|
|
||||||
export type CharacteristicName = keyof typeof characteristics;
|
|
||||||
|
|
||||||
export enum GunType {
|
|
||||||
Regular,
|
|
||||||
AutoLoader,
|
|
||||||
AutoReloader,
|
|
||||||
}
|
|
||||||
|
|
||||||
export const characteristics = {
|
|
||||||
clip_size({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CLIP_SIZE
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
gun_type({ attribute, characteristic }) {
|
|
||||||
const isPump = attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_IS_PUMP
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isPump === 1) return GunType.AutoReloader;
|
|
||||||
|
|
||||||
const clipSize = characteristic("clip_size")!;
|
|
||||||
|
|
||||||
if (clipSize === 1) return GunType.Regular;
|
|
||||||
|
|
||||||
return GunType.AutoLoader;
|
|
||||||
},
|
|
||||||
|
|
||||||
damage({ shell }) {
|
|
||||||
return shell(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_ARMOR_DAMAGE
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
module_damage({ shell }) {
|
|
||||||
return shell(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_MODULE_DAMAGE
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
penetration({ shell }) {
|
|
||||||
return shell(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_PIERCING_POWER
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
reload({ characteristic, attribute }) {
|
|
||||||
const gunType = characteristic("gun_type")!;
|
|
||||||
|
|
||||||
if (gunType === GunType.AutoReloader) return null;
|
|
||||||
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_RELOAD_TIME
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
intra_clip({ characteristic, attribute }) {
|
|
||||||
const gunType = characteristic("gun_type")!;
|
|
||||||
|
|
||||||
if (gunType === GunType.Regular) return null;
|
|
||||||
|
|
||||||
const clipRate = attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CLIP_RATE
|
|
||||||
);
|
|
||||||
|
|
||||||
return 60 / clipRate;
|
|
||||||
},
|
|
||||||
|
|
||||||
dpm({ characteristic }) {
|
|
||||||
let dps: number;
|
|
||||||
const gunType = characteristic("gun_type")!;
|
|
||||||
const damage = characteristic("damage")!;
|
|
||||||
|
|
||||||
switch (gunType) {
|
|
||||||
case GunType.Regular: {
|
|
||||||
const reload = characteristic("reload")!;
|
|
||||||
|
|
||||||
dps = damage / reload;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case GunType.AutoLoader: {
|
|
||||||
const reload = characteristic("reload")!;
|
|
||||||
const intraClip = characteristic("intra_clip")!;
|
|
||||||
const clipSize = characteristic("clip_size")!;
|
|
||||||
|
|
||||||
dps = (damage * clipSize) / (reload + (clipSize - 1) * intraClip);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new Error("Unknown gun type");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 60 * dps;
|
|
||||||
},
|
|
||||||
|
|
||||||
caliber({ shell }) {
|
|
||||||
return shell(ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_CALIBER);
|
|
||||||
},
|
|
||||||
|
|
||||||
normalization({ shellSafe }) {
|
|
||||||
return shellSafe(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_NORMALIZATION
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
ricochet({ shell }) {
|
|
||||||
return shell(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_RICOCHET_ANGLE
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
shell_velocity({ shell }) {
|
|
||||||
return shell(ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_SPEED);
|
|
||||||
},
|
|
||||||
|
|
||||||
shell_range({ shellSafe }) {
|
|
||||||
const maxDistance = shellSafe(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_MAX_DISTANCE
|
|
||||||
);
|
|
||||||
return maxDistance === null ? Infinity : maxDistance;
|
|
||||||
},
|
|
||||||
|
|
||||||
shell_capacity({ shellSafe }) {
|
|
||||||
const count = shellSafe(
|
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_MAX_COUNT
|
|
||||||
);
|
|
||||||
return count === -1 || count === null ? Infinity : count;
|
|
||||||
},
|
|
||||||
|
|
||||||
aim_time({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_AIMING_TIME
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
dispersion_still({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_ANGLE
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
dispersion_moving({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_VEHICLE_MOVEMENT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
dispersion_hull_traversing({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_VEHICLE_ROTATION
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
dispersion_turret_traversing({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_TURRET_ROTATION
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
dispersion_shooting({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_AFTER_SHOT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
dispersion_gun_damaged({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_DISPERSION_FACTOR_WHILE_GUN_DAMAGED
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
gun_depression({ attributeSafe }) {
|
|
||||||
return (
|
|
||||||
attributeSafe(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_PITCH_LIMIT_DOWN
|
|
||||||
) ?? -Infinity
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
gun_elevation({ attributeSafe }) {
|
|
||||||
return (
|
|
||||||
attributeSafe(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_PITCH_LIMIT_UP
|
|
||||||
) ?? -Infinity
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
speed_forward({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_FORWARD_MAX_SPEED
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
speed_backward({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_BACKWARD_MAX_SPEED
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
engine_power({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_ENGINE_POWER
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
weight({ attribute }) {
|
|
||||||
return attribute(TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MASS);
|
|
||||||
},
|
|
||||||
|
|
||||||
terrain_coefficient_hard({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_RESISTANCE_HARD
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
terrain_coefficient_medium({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_RESISTANCE_MEDIUM
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
terrain_coefficient_soft({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TERRAIN_RESISTANCE_SOFT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
power_to_weight_hard() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
power_to_weight_medium() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
power_to_weight_soft() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
turret_traverse_speed({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_TURRET_ROTATION_SPEED
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
hull_traverse_speed_hard() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
hull_traverse_speed_medium() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
hull_traverse_speed_soft() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
health({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_MAX_HEALTH
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
fire_chance({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_FIRE_START_CHANCE
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
view_range({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CIRCULAR_VISION_RADIUS
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
camouflage_still({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_STILL
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
camouflage_moving({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_MOVING
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
camouflage_shooting_still({ attribute }) {
|
|
||||||
return attribute(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_FACTOR_AT_SHOT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
camouflage_shooting_moving() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
camouflage_on_fire({ attributeSafe }) {
|
|
||||||
return (
|
|
||||||
attributeSafe(
|
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_FIRE_PENALTY
|
|
||||||
) ?? -Infinity
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
height() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
length() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
volume() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
} satisfies Record<string, Characteristic>;
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
import type { CharacteristicName } from "./characteristics";
|
|
||||||
|
|
||||||
export enum BetterDirection {
|
|
||||||
Higher,
|
|
||||||
Lower,
|
|
||||||
}
|
|
||||||
|
|
||||||
type CharacteristicsOrder = {
|
|
||||||
group: string;
|
|
||||||
order: (
|
|
||||||
| {
|
|
||||||
name: CharacteristicName;
|
|
||||||
decimals?: number;
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
toy: string;
|
|
||||||
}
|
|
||||||
)[];
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export const characteristicsGroups: CharacteristicsOrder = [
|
|
||||||
{
|
|
||||||
group: "firepower",
|
|
||||||
order: [
|
|
||||||
{ name: "gun_type" },
|
|
||||||
{ name: "dpm", decimals: 0 },
|
|
||||||
{ name: "damage" },
|
|
||||||
{ name: "module_damage" },
|
|
||||||
{ name: "penetration" },
|
|
||||||
{ name: "clip_size" },
|
|
||||||
{ name: "reload" },
|
|
||||||
{ name: "intra_clip" },
|
|
||||||
|
|
||||||
{ toy: "reload" },
|
|
||||||
|
|
||||||
{ name: "caliber" },
|
|
||||||
{ name: "normalization" },
|
|
||||||
{ name: "ricochet" },
|
|
||||||
|
|
||||||
{ toy: "ricochet" },
|
|
||||||
|
|
||||||
{ name: "shell_velocity" },
|
|
||||||
{ name: "shell_range" },
|
|
||||||
{ name: "shell_capacity" },
|
|
||||||
|
|
||||||
{ name: "aim_time" },
|
|
||||||
|
|
||||||
{ name: "dispersion_still" },
|
|
||||||
{ name: "dispersion_moving" },
|
|
||||||
{ name: "dispersion_hull_traversing" },
|
|
||||||
{ name: "dispersion_turret_traversing" },
|
|
||||||
{ name: "dispersion_shooting" },
|
|
||||||
{ name: "dispersion_gun_damaged" },
|
|
||||||
|
|
||||||
{ name: "gun_depression" },
|
|
||||||
{ name: "gun_elevation" },
|
|
||||||
|
|
||||||
{ toy: "flexibility" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
group: "maneuverability",
|
|
||||||
order: [
|
|
||||||
{ name: "speed_forward" },
|
|
||||||
{ name: "speed_backward" },
|
|
||||||
|
|
||||||
{ name: "engine_power" },
|
|
||||||
{ name: "weight" },
|
|
||||||
|
|
||||||
{ name: "terrain_coefficient_hard" },
|
|
||||||
{ name: "terrain_coefficient_medium" },
|
|
||||||
{ name: "terrain_coefficient_soft" },
|
|
||||||
|
|
||||||
{ name: "power_to_weight_hard" },
|
|
||||||
{ name: "power_to_weight_medium" },
|
|
||||||
{ name: "power_to_weight_soft" },
|
|
||||||
|
|
||||||
{ name: "turret_traverse_speed" },
|
|
||||||
{ name: "hull_traverse_speed_hard" },
|
|
||||||
{ name: "hull_traverse_speed_medium" },
|
|
||||||
{ name: "hull_traverse_speed_soft" },
|
|
||||||
|
|
||||||
{ toy: "traverse" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
group: "survivability",
|
|
||||||
order: [
|
|
||||||
{ name: "health" },
|
|
||||||
{ name: "fire_chance" },
|
|
||||||
{ name: "view_range" },
|
|
||||||
|
|
||||||
{ toy: "view_range" },
|
|
||||||
|
|
||||||
{ name: "camouflage_still" },
|
|
||||||
{ name: "camouflage_moving" },
|
|
||||||
{ name: "camouflage_shooting_still" },
|
|
||||||
{ name: "camouflage_shooting_moving" },
|
|
||||||
{ name: "camouflage_on_fire" },
|
|
||||||
|
|
||||||
{ name: "height" },
|
|
||||||
{ name: "length" },
|
|
||||||
{ name: "volume" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
group: "miscellaneous",
|
|
||||||
order: [],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
import {
|
|
||||||
ShellUpgrageSingleChange_AttributeName,
|
|
||||||
TankAttributeChange_AttributeName,
|
|
||||||
type StageParameters,
|
|
||||||
} from "@protos/blitz_static_tank_upgrade_single_stage";
|
|
||||||
import {
|
|
||||||
characteristics,
|
|
||||||
type CharacteristicName,
|
|
||||||
type CharacteristicOutput,
|
|
||||||
} from "./characteristics";
|
|
||||||
import type { TankState } from "./tankState";
|
|
||||||
|
|
||||||
export function computeCharacteristics(
|
|
||||||
parameters: StageParameters,
|
|
||||||
state: TankState
|
|
||||||
) {
|
|
||||||
const computed: Partial<Record<CharacteristicName, CharacteristicOutput>> =
|
|
||||||
{};
|
|
||||||
|
|
||||||
function characteristic(name: CharacteristicName) {
|
|
||||||
if (name in computed) return computed[name] as CharacteristicOutput;
|
|
||||||
throw new Error(`${name} not computed yet`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function attributeSafe(name: TankAttributeChange_AttributeName) {
|
|
||||||
const attribute = parameters.attributes.find(
|
|
||||||
(attribute) => attribute.attribute_name === name
|
|
||||||
);
|
|
||||||
|
|
||||||
return attribute ? attribute.value : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function attribute(name: TankAttributeChange_AttributeName) {
|
|
||||||
const attribute = attributeSafe(name);
|
|
||||||
|
|
||||||
if (attribute === null) {
|
|
||||||
throw new Error(
|
|
||||||
`Attribute ${TankAttributeChange_AttributeName[name]} (${name}) not found`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return attribute;
|
|
||||||
}
|
|
||||||
|
|
||||||
function shellSafe(name: ShellUpgrageSingleChange_AttributeName) {
|
|
||||||
const shell = parameters.shells_upgrades.find(
|
|
||||||
(shell) => shell.shell_id === state.shell
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!shell) {
|
|
||||||
throw new Error(
|
|
||||||
`Shell ${ShellUpgrageSingleChange_AttributeName[name]} (${name}) not found`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const attribute = shell.changes.find(
|
|
||||||
(change) => change.attribute_name === name
|
|
||||||
);
|
|
||||||
|
|
||||||
return attribute ? attribute.value : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function shell(name: ShellUpgrageSingleChange_AttributeName) {
|
|
||||||
const attribute = shellSafe(name);
|
|
||||||
|
|
||||||
if (attribute === null) {
|
|
||||||
throw new Error(
|
|
||||||
`Shell attribute ${ShellUpgrageSingleChange_AttributeName[name]} (${name}) not found`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return attribute;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const _name in characteristics) {
|
|
||||||
const name = _name as CharacteristicName;
|
|
||||||
const value = characteristics[name]({
|
|
||||||
characteristic,
|
|
||||||
attribute,
|
|
||||||
attributeSafe,
|
|
||||||
shell,
|
|
||||||
shellSafe,
|
|
||||||
});
|
|
||||||
computed[name] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return computed as Record<CharacteristicName, CharacteristicOutput>;
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export interface TankState {
|
|
||||||
stage: number;
|
|
||||||
|
|
||||||
shell: number;
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
import type { ButtonProps } from "@radix-ui/themes";
|
|
||||||
|
|
||||||
export interface Tool {
|
|
||||||
id: string;
|
|
||||||
strings?: string;
|
|
||||||
|
|
||||||
button: ButtonProps["color"];
|
|
||||||
significant?: boolean;
|
|
||||||
disabled?: boolean;
|
|
||||||
href?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const tools: Record<string, Tool> = {
|
|
||||||
tanks: {
|
|
||||||
id: "tanks",
|
|
||||||
strings: "tankopedia",
|
|
||||||
button: "purple",
|
|
||||||
significant: true,
|
|
||||||
},
|
|
||||||
players: {
|
|
||||||
id: "players",
|
|
||||||
disabled: true,
|
|
||||||
button: "blue",
|
|
||||||
},
|
|
||||||
compare: {
|
|
||||||
id: "compare",
|
|
||||||
button: "crimson",
|
|
||||||
},
|
|
||||||
performance: {
|
|
||||||
id: "performance",
|
|
||||||
button: "jade",
|
|
||||||
},
|
|
||||||
charts: {
|
|
||||||
id: "charts",
|
|
||||||
disabled: true,
|
|
||||||
button: "bronze",
|
|
||||||
},
|
|
||||||
playlist: {
|
|
||||||
id: "playlist",
|
|
||||||
button: "tomato",
|
|
||||||
},
|
|
||||||
mixer: {
|
|
||||||
id: "mixer",
|
|
||||||
button: "gray",
|
|
||||||
},
|
|
||||||
guess: {
|
|
||||||
id: "guess",
|
|
||||||
button: "cyan",
|
|
||||||
},
|
|
||||||
gallery: {
|
|
||||||
id: "gallery",
|
|
||||||
button: "gold",
|
|
||||||
},
|
|
||||||
session: {
|
|
||||||
id: "session",
|
|
||||||
button: "blue",
|
|
||||||
},
|
|
||||||
discord: {
|
|
||||||
id: "discord",
|
|
||||||
href: "https://discord.com/application-directory/1097673957865443370",
|
|
||||||
button: "indigo",
|
|
||||||
},
|
|
||||||
tier_list: {
|
|
||||||
id: "tier-list",
|
|
||||||
strings: "tier_list",
|
|
||||||
button: "orange",
|
|
||||||
},
|
|
||||||
embed: {
|
|
||||||
id: "embed",
|
|
||||||
button: "red",
|
|
||||||
},
|
|
||||||
api: {
|
|
||||||
id: "api",
|
|
||||||
disabled: true,
|
|
||||||
button: "bronze",
|
|
||||||
},
|
|
||||||
more: {
|
|
||||||
id: "more",
|
|
||||||
href: "https://discord.gg/nDt7AjGJQH",
|
|
||||||
button: "plum",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { use } from "react";
|
|
||||||
|
|
||||||
const cache = new Map<string, Promise<unknown>>();
|
|
||||||
|
|
||||||
export function useAwait<Type>(
|
|
||||||
creator: () => Promise<Type>,
|
|
||||||
discriminator: string
|
|
||||||
) {
|
|
||||||
let promise;
|
|
||||||
|
|
||||||
if (cache.has(discriminator)) {
|
|
||||||
promise = cache.get(discriminator) as Promise<Type>;
|
|
||||||
} else {
|
|
||||||
promise = creator();
|
|
||||||
cache.set(discriminator, promise);
|
|
||||||
}
|
|
||||||
|
|
||||||
return use(promise);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<slot />
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import { TankCatalogComponent } from "@protos/blitz_static_tank_component";
|
|
||||||
import type { APIContext, GetStaticPaths } from "astro";
|
|
||||||
import { api } from "../../../core/api/dynamic";
|
|
||||||
|
|
||||||
export const getStaticPaths = (async () => {
|
|
||||||
const { tanks } = await api.tanks();
|
|
||||||
|
|
||||||
return tanks.map(({ id }) => ({ params: { id } }));
|
|
||||||
}) satisfies GetStaticPaths;
|
|
||||||
|
|
||||||
export async function GET({ params }: APIContext<never, { id: string }>) {
|
|
||||||
const tank = await api.tank(params.id);
|
|
||||||
return new Response(TankCatalogComponent.encode(tank).finish());
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import { _characteristicsOrder } from "../../../../core/tankopedia/characteristics";
|
|
||||||
|
|
||||||
export function GET() {
|
|
||||||
return Response.json(_characteristicsOrder);
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
go to <a href="/tanks">/tanks</a>
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
import { times } from "lodash-es";
|
|
||||||
import { Suspense, useMemo } from "react";
|
|
||||||
import { api } from "../../../core/api/dynamic";
|
|
||||||
import { aggregateStageParameters } from "../../../core/tankopedia/aggregateStageParameters";
|
|
||||||
import { characteristicsGroups } from "../../../core/tankopedia/characteristicsGroups";
|
|
||||||
import { computeCharacteristics } from "../../../core/tankopedia/computeCharacteristics";
|
|
||||||
import { useAwait } from "../../../hooks/useAwait";
|
|
||||||
import { Tankopedia } from "../../../stores/tankopedia";
|
|
||||||
|
|
||||||
export function Page({ id }: { id: string }) {
|
|
||||||
return (
|
|
||||||
<Suspense fallback={null}>
|
|
||||||
<Content id={id} />
|
|
||||||
</Suspense>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Content({ id }: { id: string }) {
|
|
||||||
const tank = useAwait(() => api.tank(id), `tank-${id}`);
|
|
||||||
|
|
||||||
const protagonist = Tankopedia.use((state) => state.protagonist);
|
|
||||||
const parameters = useMemo(
|
|
||||||
() =>
|
|
||||||
aggregateStageParameters(
|
|
||||||
tank.base_stats!,
|
|
||||||
tank.upgrade_stages.slice(0, protagonist.stage),
|
|
||||||
protagonist.shell
|
|
||||||
),
|
|
||||||
[protagonist]
|
|
||||||
);
|
|
||||||
const characteristics = useMemo(
|
|
||||||
() => computeCharacteristics(parameters, protagonist),
|
|
||||||
[protagonist]
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<h1>{id}</h1>
|
|
||||||
|
|
||||||
<div style={{ display: "flex", flexWrap: "wrap" }}>
|
|
||||||
{times(tank.upgrade_stages.length + 1, (index) => (
|
|
||||||
<button
|
|
||||||
key={index}
|
|
||||||
onClick={() => {
|
|
||||||
Tankopedia.mutate((draft) => {
|
|
||||||
draft.protagonist.stage = index;
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Stage {index} {index === protagonist.stage && "(selected)"}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div style={{ display: "flex", flexWrap: "wrap" }}>
|
|
||||||
{parameters.shells_upgrades.map((shell) => (
|
|
||||||
<button
|
|
||||||
key={shell.shell_id}
|
|
||||||
onClick={() => {
|
|
||||||
Tankopedia.mutate((draft) => {
|
|
||||||
draft.protagonist.shell = shell.shell_id;
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Shell {shell.shell_id}{" "}
|
|
||||||
{shell.shell_id === protagonist.shell && "(selected)"}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{characteristicsGroups.map(({ group, order }) => (
|
|
||||||
<>
|
|
||||||
<h2 key={group}>{group}</h2>
|
|
||||||
|
|
||||||
{order.map((entry) => {
|
|
||||||
if ("toy" in entry) {
|
|
||||||
return <p>toy: {entry.toy}</p>;
|
|
||||||
} else {
|
|
||||||
const characteristic = characteristics[entry.name];
|
|
||||||
|
|
||||||
if (characteristic === null) return null;
|
|
||||||
|
|
||||||
let rendered: string | number;
|
|
||||||
|
|
||||||
if (Number.isFinite(characteristic)) {
|
|
||||||
if (entry.decimals === undefined) {
|
|
||||||
rendered = characteristic;
|
|
||||||
} else {
|
|
||||||
rendered = characteristic.toFixed(entry.decimals);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
rendered = `${Math.sign(characteristic) === 1 ? "" : "-"}∞`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<p key={entry.name}>
|
|
||||||
{entry.name}: {rendered}
|
|
||||||
</p>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})}
|
|
||||||
</>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
import type { GetStaticPaths } from "astro";
|
|
||||||
import { api } from "../../../core/api/dynamic";
|
|
||||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
|
||||||
import { Page } from "./_index";
|
|
||||||
|
|
||||||
export const getStaticPaths = (async () => {
|
|
||||||
const { tanks } = await api.tanks();
|
|
||||||
|
|
||||||
return tanks.map((tank) => ({
|
|
||||||
params: { slug: tank.slug },
|
|
||||||
props: { id: tank.id },
|
|
||||||
}));
|
|
||||||
}) satisfies GetStaticPaths;
|
|
||||||
|
|
||||||
const { id } = Astro.props;
|
|
||||||
---
|
|
||||||
|
|
||||||
<BaseLayout>
|
|
||||||
<Page {id} client:load />
|
|
||||||
</BaseLayout>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
import { api } from "../../core/api/dynamic";
|
|
||||||
|
|
||||||
const tanksList = await api.tanks();
|
|
||||||
---
|
|
||||||
|
|
||||||
<h1>Tanks</h1>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{
|
|
||||||
tanksList.tanks.map(({ id, slug }) => (
|
|
||||||
<li>
|
|
||||||
<a href={`/tanks/${slug}`}>
|
|
||||||
{slug} ({id})
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
syntax = "proto3";
|
|
||||||
|
|
||||||
package blitzkit;
|
|
||||||
|
|
||||||
message Tanks {
|
|
||||||
repeated TanksEntry tanks = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message TanksEntry {
|
|
||||||
string id = 1;
|
|
||||||
string slug = 2;
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { Varuna } from "varuna";
|
|
||||||
import type { TankState } from "../core/tankopedia/tankState";
|
|
||||||
|
|
||||||
interface Tankopedia {
|
|
||||||
protagonist: TankState;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Tankopedia = new Varuna<Tankopedia>({
|
|
||||||
protagonist: { stage: 0, shell: 0 },
|
|
||||||
});
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["../../tsconfig.json", "astro/tsconfigs/base"],
|
|
||||||
"compilerOptions": {
|
|
||||||
"paths": {
|
|
||||||
"@protos/*": ["../../packages/closed/protos/*"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -277,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",
|
||||||
}}
|
}}
|
||||||
@@ -345,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={() => {
|
||||||
@@ -473,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",
|
||||||
}}
|
}}
|
||||||
@@ -536,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={() => {
|
||||||
|
|||||||
@@ -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 (
|
||||||
|
|||||||
@@ -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",
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -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,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':
|
||||||
|
|||||||
@@ -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]}
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SmartCanvas
|
<SmartCanvas
|
||||||
|
resize={{ debounce: 0 }}
|
||||||
ref={canvas}
|
ref={canvas}
|
||||||
scene={{ fog: new Fog("black", 30, 50) }}
|
scene={{ fog: new Fog("black", 30, 50) }}
|
||||||
gl={{
|
gl={{
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
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,
|
||||||
@@ -40,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 { 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,23 +1,31 @@
|
|||||||
import { asset } from "@blitzkit/core";
|
import {
|
||||||
import { CaretRightIcon, UpdateIcon } from "@radix-ui/react-icons";
|
asset,
|
||||||
|
GunDefinition,
|
||||||
|
TankDefinition,
|
||||||
|
TIER_ROMAN_NUMERALS,
|
||||||
|
TurretDefinition,
|
||||||
|
} from "@blitzkit/core";
|
||||||
|
import { literals } from "@blitzkit/i18n";
|
||||||
|
import { CaretRightIcon, CaretUpIcon, UpdateIcon } from "@radix-ui/react-icons";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
Flex,
|
Flex,
|
||||||
|
IconButton,
|
||||||
|
Popover,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
Text,
|
Text,
|
||||||
type ButtonProps,
|
type ButtonProps,
|
||||||
} from "@radix-ui/themes";
|
} from "@radix-ui/themes";
|
||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { MixerScene } from "../../../components/MixerScene";
|
import { MixerScene } from "../../../components/MixerScene";
|
||||||
|
import { ModuleButton } from "../../../components/ModuleButtons/ModuleButton";
|
||||||
import { PageWrapper } from "../../../components/PageWrapper";
|
import { PageWrapper } from "../../../components/PageWrapper";
|
||||||
import { ScreenshotButton } from "../../../components/ScreenshotButton";
|
import { ScreenshotButton } from "../../../components/ScreenshotButton";
|
||||||
import {
|
import { TankSearch } from "../../../components/TankSearch";
|
||||||
TankSearch,
|
|
||||||
type TankSearchProps,
|
|
||||||
} from "../../../components/TankSearch";
|
|
||||||
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
|
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
|
||||||
|
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
|
||||||
import { curateMixer } from "../../../core/blitzkit/curateMixer";
|
import { curateMixer } from "../../../core/blitzkit/curateMixer";
|
||||||
import {
|
import {
|
||||||
LocaleProvider,
|
LocaleProvider,
|
||||||
@@ -31,6 +39,7 @@ import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonCo
|
|||||||
const modelDefinition = await awaitableModelDefinitions.then(
|
const modelDefinition = await awaitableModelDefinitions.then(
|
||||||
({ models }) => models[1]
|
({ models }) => models[1]
|
||||||
);
|
);
|
||||||
|
const tankDefinitions = await awaitableTankDefinitions;
|
||||||
|
|
||||||
export function Page({
|
export function Page({
|
||||||
locale,
|
locale,
|
||||||
@@ -50,57 +59,147 @@ export function Page({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ModuleButton({
|
type ModuleButtonProps = Omit<ButtonProps, "onSelect"> &
|
||||||
|
MaybeSkeletonComponentProps & {
|
||||||
|
tank: number;
|
||||||
|
onSelect: (
|
||||||
|
tank: TankDefinition,
|
||||||
|
turret?: TurretDefinition,
|
||||||
|
gun?: GunDefinition
|
||||||
|
) => void;
|
||||||
|
turret?: number;
|
||||||
|
gun?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
function ModuleChooser({
|
||||||
skeleton,
|
skeleton,
|
||||||
tank,
|
tank,
|
||||||
onSelect,
|
onSelect,
|
||||||
|
turret,
|
||||||
|
gun,
|
||||||
...props
|
...props
|
||||||
}: Omit<ButtonProps, "onSelect"> &
|
}: ModuleButtonProps) {
|
||||||
MaybeSkeletonComponentProps & {
|
|
||||||
tank: number;
|
|
||||||
onSelect: TankSearchProps["onSelect"];
|
|
||||||
}) {
|
|
||||||
const { strings } = useLocale();
|
const { strings } = useLocale();
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
const tankDefinition = tankDefinitions.tanks[tank];
|
||||||
|
const turretDefinition = tankDefinition.turrets.find((t) => t.id === turret);
|
||||||
|
const gunDefinition = turretDefinition?.guns.find((g) => g.id === gun);
|
||||||
|
const subSelector =
|
||||||
|
turret !== undefined &&
|
||||||
|
(tankDefinition.turrets.length > 1 ||
|
||||||
|
(gun !== undefined && turretDefinition!.guns.length > 1));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Root open={open} onOpenChange={setOpen}>
|
<Flex>
|
||||||
<Dialog.Trigger>
|
<Dialog.Root open={open} onOpenChange={setOpen}>
|
||||||
<Button
|
<Dialog.Trigger>
|
||||||
variant="surface"
|
<Button
|
||||||
size="4"
|
variant="surface"
|
||||||
style={{ overflow: "clip" }}
|
size={{ initial: "3", md: "4" }}
|
||||||
{...props}
|
style={{
|
||||||
>
|
overflow: "clip",
|
||||||
{skeleton ? (
|
borderTopRightRadius: subSelector ? 0 : undefined,
|
||||||
<Skeleton width="4em" height="2em" />
|
borderBottomRightRadius: subSelector ? 0 : undefined,
|
||||||
) : (
|
}}
|
||||||
<img
|
{...props}
|
||||||
|
>
|
||||||
|
{skeleton ? (
|
||||||
|
<Skeleton width="4em" height="2em" />
|
||||||
|
) : (
|
||||||
|
<img
|
||||||
|
style={{
|
||||||
|
width: "4em",
|
||||||
|
height: "4em",
|
||||||
|
objectFit: "contain",
|
||||||
|
}}
|
||||||
|
src={asset(`icons/tanks/big/${tank}.webp`)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
</Dialog.Trigger>
|
||||||
|
|
||||||
|
<Dialog.Content>
|
||||||
|
<Dialog.Title>
|
||||||
|
{strings.website.common.tank_search.select_dialog_title}
|
||||||
|
</Dialog.Title>
|
||||||
|
|
||||||
|
<TankSearch
|
||||||
|
compact
|
||||||
|
onSelect={(tank) => {
|
||||||
|
onSelect?.(tank);
|
||||||
|
setOpen(false);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Dialog.Content>
|
||||||
|
</Dialog.Root>
|
||||||
|
|
||||||
|
{subSelector && (
|
||||||
|
<Popover.Root>
|
||||||
|
<Popover.Trigger>
|
||||||
|
<IconButton
|
||||||
|
variant="surface"
|
||||||
|
size={{ initial: "3", md: "4" }}
|
||||||
style={{
|
style={{
|
||||||
width: "4em",
|
overflow: "clip",
|
||||||
height: "4em",
|
borderTopLeftRadius: 0,
|
||||||
objectFit: "contain",
|
borderBottomLeftRadius: 0,
|
||||||
|
marginLeft: -1,
|
||||||
}}
|
}}
|
||||||
src={asset(`icons/tanks/big/${tank}.webp`)}
|
{...props}
|
||||||
/>
|
>
|
||||||
)}
|
<CaretUpIcon />
|
||||||
</Button>
|
</IconButton>
|
||||||
</Dialog.Trigger>
|
</Popover.Trigger>
|
||||||
|
|
||||||
<Dialog.Content>
|
<Popover.Content>
|
||||||
<Dialog.Title>
|
<Flex direction="column" gap="2">
|
||||||
{strings.website.common.tank_search.select_dialog_title}
|
{tankDefinition.turrets.length > 1 && (
|
||||||
</Dialog.Title>
|
<Flex gap="2">
|
||||||
|
{tankDefinition.turrets.map((turret) => (
|
||||||
|
<ModuleButton
|
||||||
|
variant={
|
||||||
|
turret.id === turretDefinition?.id ? "solid" : undefined
|
||||||
|
}
|
||||||
|
key={turret.id}
|
||||||
|
module="turret"
|
||||||
|
discriminator={TIER_ROMAN_NUMERALS[turret.tier]}
|
||||||
|
onClick={() => {
|
||||||
|
onSelect?.(tankDefinition, turret);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Flex>
|
||||||
|
)}
|
||||||
|
|
||||||
<TankSearch
|
{turretDefinition && turretDefinition.guns.length > 1 && (
|
||||||
compact
|
<Flex gap="2">
|
||||||
onSelect={(tank) => {
|
{turretDefinition.guns.map((gun) => (
|
||||||
onSelect?.(tank);
|
<ModuleButton
|
||||||
setOpen(false);
|
variant={
|
||||||
}}
|
gun.id === gunDefinition?.id ? "solid" : undefined
|
||||||
/>
|
}
|
||||||
</Dialog.Content>
|
key={gun.id}
|
||||||
</Dialog.Root>
|
module="gun"
|
||||||
|
discriminator={TIER_ROMAN_NUMERALS[gun.tier]}
|
||||||
|
secondaryDiscriminator={
|
||||||
|
<Text style={{ fontSize: "0.75em" }}>
|
||||||
|
{literals(strings.common.units.mm, {
|
||||||
|
value: gun.shells[0].caliber.toFixed(0),
|
||||||
|
})}
|
||||||
|
</Text>
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
onSelect?.(tankDefinition, turretDefinition, gun);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Flex>
|
||||||
|
)}
|
||||||
|
</Flex>
|
||||||
|
</Popover.Content>
|
||||||
|
</Popover.Root>
|
||||||
|
)}
|
||||||
|
</Flex>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,9 +212,12 @@ function ModuleSeparator() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Content({ skeleton }: MaybeSkeletonComponentProps) {
|
function Content({ skeleton }: MaybeSkeletonComponentProps) {
|
||||||
const hull = Mixer.use((state) => state.hull);
|
const hullTankId = Mixer.use((state) => state.hull);
|
||||||
const turretId = Mixer.use((state) => state.turret.tank.id);
|
const turretTankId = Mixer.use((state) => state.turret.tank.id);
|
||||||
const gunId = Mixer.use((state) => state.gun.tank.id);
|
const turretTurretId = Mixer.use((state) => state.turret.turret.id);
|
||||||
|
const gunTankId = Mixer.use((state) => state.gun.tank.id);
|
||||||
|
const gunTurretId = Mixer.use((state) => state.gun.turret.id);
|
||||||
|
const gunGunId = Mixer.use((state) => state.gun.gun.id);
|
||||||
const canvas = useRef<HTMLCanvasElement>(null!);
|
const canvas = useRef<HTMLCanvasElement>(null!);
|
||||||
const { strings } = useLocale();
|
const { strings } = useLocale();
|
||||||
|
|
||||||
@@ -136,7 +238,7 @@ function Content({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
>
|
>
|
||||||
<Flex gap="2">
|
<Flex gap="2">
|
||||||
<ScreenshotButton
|
<ScreenshotButton
|
||||||
name={hull.slug}
|
name={hullTankId.slug}
|
||||||
canvas={canvas}
|
canvas={canvas}
|
||||||
highContrast
|
highContrast
|
||||||
variant="surface"
|
variant="surface"
|
||||||
@@ -160,9 +262,9 @@ function Content({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<ModuleButton
|
<ModuleChooser
|
||||||
skeleton={skeleton}
|
skeleton={skeleton}
|
||||||
tank={hull.id}
|
tank={hullTankId.id}
|
||||||
onSelect={(tank) => {
|
onSelect={(tank) => {
|
||||||
Mixer.mutate((draft) => {
|
Mixer.mutate((draft) => {
|
||||||
draft.hull = tank;
|
draft.hull = tank;
|
||||||
@@ -170,28 +272,34 @@ function Content({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ModuleSeparator />
|
<ModuleSeparator />
|
||||||
<ModuleButton
|
<ModuleChooser
|
||||||
skeleton={skeleton}
|
skeleton={skeleton}
|
||||||
tank={turretId}
|
tank={turretTankId}
|
||||||
onSelect={(tank) => {
|
turret={turretTurretId}
|
||||||
|
onSelect={(tank, turret) => {
|
||||||
Mixer.mutate((draft) => {
|
Mixer.mutate((draft) => {
|
||||||
draft.turret = {
|
draft.turret = {
|
||||||
tank,
|
tank,
|
||||||
turret: tank.turrets.at(-1)!,
|
turret: turret ?? tank.turrets.at(-1)!,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ModuleSeparator />
|
<ModuleSeparator />
|
||||||
<ModuleButton
|
<ModuleChooser
|
||||||
skeleton={skeleton}
|
skeleton={skeleton}
|
||||||
tank={gunId}
|
tank={gunTankId}
|
||||||
onSelect={(tank) => {
|
turret={gunTurretId}
|
||||||
|
gun={gunGunId}
|
||||||
|
onSelect={(tank, turret, gun) => {
|
||||||
Mixer.mutate((draft) => {
|
Mixer.mutate((draft) => {
|
||||||
draft.gun = {
|
draft.gun = {
|
||||||
tank,
|
tank,
|
||||||
turret: tank.turrets.at(-1)!,
|
turret: turret ?? tank.turrets.at(-1)!,
|
||||||
gun: tank.turrets.at(-1)!.guns.at(-1)!,
|
gun:
|
||||||
|
gun ??
|
||||||
|
turret?.guns.at(-1) ??
|
||||||
|
tank.turrets.at(-1)!.guns.at(-1)!,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { TankDefinition } from "@blitzkit/core";
|
import type { TankDefinition } from "@blitzkit/core";
|
||||||
|
import { times } from "lodash-es";
|
||||||
import { Varuna } from "varuna";
|
import { Varuna } from "varuna";
|
||||||
|
|
||||||
export enum GuessState {
|
export enum GuessState {
|
||||||
@@ -12,6 +13,9 @@ export interface Guess {
|
|||||||
guessState: GuessState;
|
guessState: GuessState;
|
||||||
totalGuesses: number;
|
totalGuesses: number;
|
||||||
correctGuesses: number;
|
correctGuesses: number;
|
||||||
|
streak: number;
|
||||||
|
helpingReveal: boolean;
|
||||||
|
tiers: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Guess = new Varuna<Guess, TankDefinition>((tank) => ({
|
export const Guess = new Varuna<Guess, TankDefinition>((tank) => ({
|
||||||
@@ -19,4 +23,7 @@ export const Guess = new Varuna<Guess, TankDefinition>((tank) => ({
|
|||||||
guessState: GuessState.NotGuessed,
|
guessState: GuessState.NotGuessed,
|
||||||
totalGuesses: 0,
|
totalGuesses: 0,
|
||||||
correctGuesses: 0,
|
correctGuesses: 0,
|
||||||
|
streak: 0,
|
||||||
|
helpingReveal: false,
|
||||||
|
tiers: times(10, (index) => index + 1),
|
||||||
}));
|
}));
|
||||||
@@ -21,6 +21,10 @@ export interface TankFilters {
|
|||||||
searching: boolean;
|
searching: boolean;
|
||||||
gunType: CaseType<GunDefinition>[];
|
gunType: CaseType<GunDefinition>[];
|
||||||
shells: [ShellType | null, ShellType | null, ShellType | null];
|
shells: [ShellType | null, ShellType | null, ShellType | null];
|
||||||
|
consumables: number[];
|
||||||
|
provisions: number[];
|
||||||
|
abilities: number[];
|
||||||
|
powers: number[];
|
||||||
|
|
||||||
showTesting: boolean;
|
showTesting: boolean;
|
||||||
showNonTesting: boolean;
|
showNonTesting: boolean;
|
||||||
@@ -37,6 +41,10 @@ export const TankFilters = new Varuna<TankFilters>({
|
|||||||
searching: false,
|
searching: false,
|
||||||
gunType: [],
|
gunType: [],
|
||||||
shells: [null, null, null],
|
shells: [null, null, null],
|
||||||
|
consumables: [],
|
||||||
|
provisions: [],
|
||||||
|
abilities: [],
|
||||||
|
powers: [],
|
||||||
|
|
||||||
showTesting: true,
|
showTesting: true,
|
||||||
showNonTesting: true,
|
showNonTesting: true,
|
||||||
|
|||||||