Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bac29d843c | ||
|
|
5807473fb6 | ||
|
|
091607b0a8 | ||
|
|
4d45029bfa | ||
|
|
89d272166f | ||
|
|
590f4a5df3 | ||
|
|
e326985ec4 | ||
|
|
dcd77d5666 | ||
|
|
d45425ec57 | ||
|
|
46fd061aff | ||
|
|
752b11e56d | ||
|
|
049ef58691 | ||
|
|
bb64d718c2 | ||
|
|
0d6c508382 | ||
|
|
7f77b4006d | ||
|
|
c11285e985 | ||
|
|
a4ee9cf2bd | ||
|
|
b3ad122542 | ||
|
|
41fb822571 | ||
|
|
9236c54b4b | ||
|
|
92ef7f4020 | ||
|
|
96c8d3d801 | ||
|
|
2cdbd0b810 | ||
|
|
61a4711029 | ||
|
|
f04cfb8875 | ||
|
|
7ea6032244 | ||
|
|
a1bc1bc630 | ||
|
|
34b96f4003 | ||
|
|
3f4306b3b3 | ||
|
|
40b732803e | ||
|
|
ac673cd47f | ||
|
|
76445c67b2 | ||
|
|
8f399e5c54 | ||
|
|
14dc40a3e7 | ||
|
|
3daa56e100 | ||
|
|
37c257c8c4 | ||
|
|
dfc6a2bada | ||
|
|
9b8b06ca70 | ||
|
|
f7ffb2d34d | ||
|
|
2b7e88e30c | ||
|
|
af172c95f2 | ||
|
|
f8794de782 | ||
|
|
5fe295b209 | ||
|
|
41418eb8e0 | ||
|
|
f6f8e2b4df | ||
|
|
a4fca4085e | ||
|
|
26f71df9f9 | ||
|
|
d32b8cc3f5 | ||
|
|
0922614dbc | ||
|
|
ae4b2e1bb3 | ||
|
|
3b75d7b523 | ||
|
|
0cbd67ff38 | ||
|
|
068f481b93 | ||
|
|
1430c32440 | ||
|
|
d14afc8b39 | ||
|
|
cba591b368 | ||
|
|
42b5ab6f02 | ||
|
|
c1363be70a | ||
|
|
72e358f034 | ||
|
|
b4a689dfbb | ||
|
|
19e535969e | ||
|
|
eebc373b46 | ||
|
|
ecb1a7c21e | ||
|
|
625d8d1595 | ||
|
|
602bf37411 | ||
|
|
fc9050e7fe | ||
|
|
654887dd66 | ||
|
|
b540ab7814 | ||
|
|
0ee9c99a28 | ||
|
|
ab9149a11f | ||
|
|
924c130516 | ||
|
|
33366a8f79 | ||
|
|
342497563f | ||
|
|
a495a5f208 | ||
|
|
10b0e29a26 | ||
|
|
007d4e9540 | ||
|
|
273fea1599 | ||
|
|
ed36eedbfb | ||
|
|
7df53d845d | ||
|
|
1b5c79c2b8 | ||
|
|
51900f4c80 | ||
|
|
b9388cc544 | ||
|
|
05648ea040 | ||
|
|
73080fd60a | ||
|
|
14be326c41 | ||
|
|
8132f2d91e | ||
|
|
1258cd1fa2 | ||
|
|
b00a63a9f8 | ||
|
|
989e3d395a | ||
|
|
8ec7fcb90a | ||
|
|
830e1597e7 | ||
|
|
3131217600 | ||
|
|
0b740e3f60 | ||
|
|
1416d64e34 | ||
|
|
bc6257a0c3 | ||
|
|
3d8cfc3aeb | ||
|
|
1c4ef7c129 | ||
|
|
a649995cdc | ||
|
|
df53f687f7 | ||
|
|
cae63a70b0 | ||
|
|
de80519f06 | ||
|
|
f935adb70e | ||
|
|
3902c63a65 | ||
|
|
e7b81f39b8 | ||
|
|
9692110733 | ||
|
|
ae2839cb83 | ||
|
|
eb0c35d6c6 | ||
|
|
1f0392681a | ||
|
|
53eebc7a43 | ||
|
|
d8925a47b5 | ||
|
|
60f482d820 | ||
|
|
c2fd81c98e | ||
|
|
0fbc868738 | ||
|
|
ff0cfbaf0a | ||
|
|
4642b74bca | ||
|
|
88d49bd5a3 | ||
|
|
6fd2423445 | ||
|
|
a0dba52649 | ||
|
|
80d76e3729 | ||
|
|
7915b39d9d | ||
|
|
c94a84222d | ||
|
|
1bca762781 | ||
|
|
12ff9a90eb | ||
|
|
5ad5c701c9 | ||
|
|
a365fa5e50 | ||
|
|
57d77bf2b4 |
No files matched your search
@@ -26,6 +26,7 @@ body:
|
||||
description: What branch of BlitzKit were you using? Please see the "Branch" section of the footer at the very bottom of any page.
|
||||
options:
|
||||
- Production
|
||||
- Beta
|
||||
- Preview
|
||||
- OpenTest
|
||||
default: 0
|
||||
|
||||
@@ -2,6 +2,11 @@ name: Website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- production
|
||||
|
||||
pull_request:
|
||||
|
||||
schedule:
|
||||
- cron: "0 4 * * *"
|
||||
@@ -93,7 +98,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
chunk: [default, api]
|
||||
chunk: [default, api, models_tanks, models_legendary, models_maps]
|
||||
|
||||
steps:
|
||||
- name: Free disk space
|
||||
@@ -102,7 +107,8 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.branch || 'production' }}
|
||||
# the PR's ref, or the manual input, or production (selected when cron)
|
||||
ref: ${{ github.event.pull_request.head.sha || inputs.branch || 'production' }}
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
@@ -122,9 +128,14 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Download Client
|
||||
- name: Download client
|
||||
run: bun run download-client
|
||||
|
||||
- name: Download SmartDLC
|
||||
if: ${{ env.CLIENT_PROVIDER == 'steam' }}
|
||||
|
||||
run: bun run download-smart-dlc
|
||||
|
||||
- name: Build
|
||||
run: bun run --bun build
|
||||
env:
|
||||
@@ -139,13 +150,15 @@ jobs:
|
||||
|
||||
- name: Trigger deployment
|
||||
|
||||
# Deploy if:
|
||||
# 1. Running cron from main using content from production to target production
|
||||
# 2. Running manually and targeting non-production
|
||||
# workflow should trigger if:
|
||||
# - is by cron and is on main: triggering to production
|
||||
# - is by push and is on production: triggering to production
|
||||
# - is by manual and is on anything: triggering to anything
|
||||
if: >-
|
||||
${{
|
||||
github.ref == 'refs/heads/production' ||
|
||||
(inputs.environment != '' && inputs.environment != 'production')
|
||||
(github.event_name == 'schedule' && github.ref == 'refs/heads/main')
|
||||
|| (github.event_name == 'push' && github.ref == 'refs/heads/production')
|
||||
|| (github.event_name == 'workflow_dispatch')
|
||||
}}
|
||||
|
||||
env:
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
"fullstats",
|
||||
"fuzzysort",
|
||||
"gamemode",
|
||||
"gamemodes",
|
||||
"gameplay",
|
||||
"glsl",
|
||||
"GLTF",
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# BlitzKit Credits
|
||||
|
||||
BlitzKit is a one man band **TrèsAbhi** but I am far from solo. Helpers, in the order of contribution over time:
|
||||
|
||||
### S0AP
|
||||
|
||||
BlitzKit Discord bot verification, testing, advertisement, and the initial encouragement to create BlitzKit.
|
||||
|
||||
### Prince_NA
|
||||
|
||||
BlitzKit Discord bot and website testing and general advise.
|
||||
|
||||
### Vovko
|
||||
|
||||
BlitzKit Discord bot and website rendering pipeline.
|
||||
|
||||
### Maddox
|
||||
|
||||
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.
|
||||
@@ -1,14 +1,14 @@
|
||||
# BlitzKit 1.29.10
|
||||
|
||||
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
|
||||
Thank you to [HitJack](https://github.com/Hitjack007) for your contributions this update.
|
||||
|
||||
## Features
|
||||
|
||||
- Combined game mode passive and active abilities into a single dropdown
|
||||
- Added tier filters to the Guess game [Mark Greene]
|
||||
- Added tier filters to the Guess game [HitJack]
|
||||
- Changing tiers will break your streak
|
||||
|
||||
## Fixes
|
||||
|
||||
- module damage is now properly shown when sorting with it in the tank search [Mark Greene]
|
||||
- module damage is now properly shown when sorting with it in the tank search [HitJack]
|
||||
- Duplicate abilities in the tank filters are now removed
|
||||
@@ -1,6 +1,6 @@
|
||||
# BlitzKit 1.29.8
|
||||
|
||||
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
|
||||
Thank you to [HitJack](https://github.com/Hitjack007) for your contributions this update.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -15,5 +15,5 @@ Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions
|
||||
## Fixes
|
||||
|
||||
- The Tankopedia now smoothly resizes when enlarging on interaction
|
||||
- Stock turrets now correctly mount the corresponding stock gun [Mark Greene]
|
||||
- Stock turrets now correctly mount the corresponding stock gun [HitJack]
|
||||
- The consumable and provision buttons in Compare are no longer tiny
|
||||
@@ -1,14 +1,14 @@
|
||||
# BlitzKit 1.29.9
|
||||
|
||||
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
|
||||
Thank you to [HitJack](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
|
||||
- Added the ability to filter tanks by consumables [Mark Greene]
|
||||
- Added the ability to filter tanks by consumables [HitJack]
|
||||
- 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
|
||||
- Provisions now properly affect terrain resistances [Mark Greene]
|
||||
- Provisions now properly affect terrain resistances [HitJack]
|
||||
@@ -1,6 +1,6 @@
|
||||
# BlitzKit 1.30.7
|
||||
|
||||
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
|
||||
Thank you to [HitJack](https://github.com/Hitjack007) for your contributions this update.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -8,13 +8,13 @@ Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions
|
||||
|
||||
## Fixes
|
||||
|
||||
- Clicking on the armor multiple times with HE no longer crashes BlitzKit [Mark Greene]
|
||||
- Ricochets that later intersect with external modules no longer falsely claim a successful damaging penetration [Mark Greene]
|
||||
- Clicking on the armor multiple times with HE no longer crashes BlitzKit [HitJack]
|
||||
- Ricochets that later intersect with external modules no longer falsely claim a successful damaging penetration [HitJack]
|
||||
- The lighting animation no longer stops prematurely when BlitzKit is unfocused
|
||||
- The spot light angle has been increased to more evenly light up larger tanks
|
||||
- BlitzKit once again uses soft shadows, reducing the pixelated shadows
|
||||
- Fixed the weird patterns that formed on the tracks of tanks under self-shadows
|
||||
- Increased the floor size and light decay to create the illusion that the floor is infinite
|
||||
- Safari no longer crashes when unloading textures for unloaded tanks [Mark Greene]
|
||||
- Safari no longer crashes when unloading textures for unloaded tanks [HitJack]
|
||||
- The gun depression transition between two constraints (like often behind tanks) now uses a gentler zoned and can never be 0
|
||||
- Armor plate names in Static Armor are now properly capitalized in English and translated to other languages [Mark Greene]
|
||||
- Armor plate names in Static Armor are now properly capitalized in English and translated to other languages [HitJack]
|
||||
@@ -1,75 +1,75 @@
|
||||
# BlitzKit 1.32.0
|
||||
|
||||
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
|
||||
Thank you to [HitJack](https://github.com/Hitjack007) for your contributions this update.
|
||||
|
||||
## Features
|
||||
|
||||
### Tankopedia & Armor
|
||||
|
||||
- Added a spall liner button to the Tankopedia beside the other equipment [Mark Greene]
|
||||
- Listed track repair times in the Tankopedia [Mark Greene]
|
||||
- The penetration chance is now displayed when penetration testing armor [Mark Greene]
|
||||
- Added a new setting to disable automatically loading tanks in Tankopedia [Mark Greene]
|
||||
- Added a spall liner button to the Tankopedia beside the other equipment [HitJack]
|
||||
- Listed track repair times in the Tankopedia [HitJack]
|
||||
- The penetration chance is now displayed when penetration testing armor [HitJack]
|
||||
- Added a new setting to disable automatically loading tanks in Tankopedia [HitJack]
|
||||
|
||||
### Tank Performance & Mechanics
|
||||
|
||||
- Added Peekaboo DPM [Mark Greene]
|
||||
- Added Peekaboo DPM [HitJack]
|
||||
- Your Peekaboo DPM is lower than your normal DPM if your reload is faster than 10s as you'll have to wait for the remaining 10s for you to get unspotted before you can poke and shoot
|
||||
|
||||
### Tank Filters
|
||||
|
||||
- The test and owned tank filters are now more intuitive as clicking on them now turns the clicked option on instead of off [Mark Greene]
|
||||
- The test and owned tank filters are now more intuitive as clicking on them now turns the clicked option on instead of off [HitJack]
|
||||
|
||||
### Game Compatibility
|
||||
|
||||
- Added compatibility for tier XI tanks [Mark Greene]
|
||||
- Added compatibility for tier XI tanks [HitJack]
|
||||
|
||||
## Fixes
|
||||
|
||||
### Tankopedia & Armor
|
||||
|
||||
- The armor no longer disappears when you turn on Dynamic Armor System [Mark Greene]
|
||||
- Camouflage values in Tankopedia are now more descriptive when shooting [Mark Greene]
|
||||
- The penetration chance is now displayed when penetration testing armor [Mark Greene]
|
||||
- Listed track repair times in the Tankopedia [Mark Greene]
|
||||
- Added a spall liner button to the Tankopedia beside the other equipment [Mark Greene]
|
||||
- The flags in the Tankopedia tech tree are no longer offset to the top left [Mark Greene]
|
||||
- The loading bar below the name of the tanks in Tankopedia is now sufficiently spaced below [Mark Greene]
|
||||
- The armor no longer disappears when you turn on Dynamic Armor System [HitJack]
|
||||
- Camouflage values in Tankopedia are now more descriptive when shooting [HitJack]
|
||||
- The penetration chance is now displayed when penetration testing armor [HitJack]
|
||||
- Listed track repair times in the Tankopedia [HitJack]
|
||||
- Added a spall liner button to the Tankopedia beside the other equipment [HitJack]
|
||||
- The flags in the Tankopedia tech tree are no longer offset to the top left [HitJack]
|
||||
- The loading bar below the name of the tanks in Tankopedia is now sufficiently spaced below [HitJack]
|
||||
- Removed the vertical sliver of pixels found to the right of the Equalizer toggle in Tankopedia
|
||||
|
||||
### Tank Search & Filters
|
||||
|
||||
- The search bar no longer redirects to a seemingly random tank when clicking enter when searching [Mark Greene]
|
||||
- Tank search now properly handles the full names of tanks like the Super Pershing [Mark Greene]
|
||||
- The tank search now remains consistent in order even when an added filter does not add/remove tanks from the list [Mark Greene]
|
||||
- The test and owned tank filters are now more intuitive as clicking on them now turns the clicked option on instead of off [Mark Greene]
|
||||
- The search bar no longer redirects to a seemingly random tank when clicking enter when searching [HitJack]
|
||||
- Tank search now properly handles the full names of tanks like the Super Pershing [HitJack]
|
||||
- The tank search now remains consistent in order even when an added filter does not add/remove tanks from the list [HitJack]
|
||||
- The test and owned tank filters are now more intuitive as clicking on them now turns the clicked option on instead of off [HitJack]
|
||||
|
||||
### Visuals & UI
|
||||
|
||||
- Removed the Beta badge from the Equalizer button [Mark Greene]
|
||||
- Removed the Beta badge from the Equalizer button [HitJack]
|
||||
- Updated the background image for the Equalizer button to the actual banner of the new game mode
|
||||
- The contact shadows on the ground no longer grow & darken when switching between tabs [Mark Greene]
|
||||
- Additionally, the contact shadows stays visible at low angles [Mark Greene]
|
||||
- The contact shadows on the ground no longer grow & darken when switching between tabs [HitJack]
|
||||
- Additionally, the contact shadows stays visible at low angles [HitJack]
|
||||
- The "Help Translate BlitzKit" text on the home page is now properly centered vertically
|
||||
- The footer now says "Branch" instead of "CDN" [Mark Greene]
|
||||
- The game version in the footer now displays a shorthand version instead of the entire version number [Mark Greene]
|
||||
- The reload visualizer now displays just 1 decimal place [Mark Greene]
|
||||
- Plot controls for the Static armor tab no longer pokes in from the right on non-Static armor tabs in some languages [Mark Greene]
|
||||
- Mixer's controllers now scale better on smaller screens [Mark Greene]
|
||||
- The list of available tanks in the Playlist is no longer excessively wide [Mark Greene]
|
||||
- The footer now says "Branch" instead of "CDN" [HitJack]
|
||||
- The game version in the footer now displays a shorthand version instead of the entire version number [HitJack]
|
||||
- The reload visualizer now displays just 1 decimal place [HitJack]
|
||||
- Plot controls for the Static armor tab no longer pokes in from the right on non-Static armor tabs in some languages [HitJack]
|
||||
- Mixer's controllers now scale better on smaller screens [HitJack]
|
||||
- The list of available tanks in the Playlist is no longer excessively wide [HitJack]
|
||||
|
||||
### Tank Mechanics & Models
|
||||
|
||||
- The gun depression visualizer now properly handles the inherent tilt of tanks like the Minotauro [Mark Greene]
|
||||
- When moving the tracks of tanks, the textures no longer move at different rates [Mark Greene]
|
||||
- The gun depression visualizer now properly handles the inherent tilt of tanks like the Minotauro [HitJack]
|
||||
- When moving the tracks of tanks, the textures no longer move at different rates [HitJack]
|
||||
|
||||
### Localization
|
||||
|
||||
- Users with a preference on a language are once again redirected to the correct localized pages [Mark Greene]
|
||||
- Users with a preference on a language are once again redirected to the correct localized pages [HitJack]
|
||||
|
||||
### Session & Game Compatibility
|
||||
|
||||
- BlitzKit Session now properly handles tanks removed from the game [Mark Greene]
|
||||
- BlitzKit Session now properly handles tanks removed from the game [HitJack]
|
||||
|
||||
## Technical Fixes
|
||||
|
||||
@@ -78,7 +78,7 @@ Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions
|
||||
- This was the last bug standing in the way of BlitzKit Previews
|
||||
- Welcome back, BlitzKit Previews!
|
||||
- Removed some dead code from the BlitzKit model mangler
|
||||
- The player discovery loop now persists for longer than 1 iteration [Mark Greene]
|
||||
- The player discovery loop now persists for longer than 1 iteration [HitJack]
|
||||
- Bun is now forced to run scripts with the `--bun` flag
|
||||
|
||||
## Technical Features
|
||||
@@ -94,5 +94,5 @@ Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions
|
||||
- This was the last bug standing in the way of BlitzKit Previews
|
||||
- Welcome back, BlitzKit Previews!
|
||||
- Removed some dead code from the BlitzKit model mangler
|
||||
- The player discovery loop now persists for longer than 1 iteration [Mark Greene]
|
||||
- The player discovery loop now persists for longer than 1 iteration [HitJack]
|
||||
- Bun is now forced to run scripts with the `--bun` flag
|
||||
@@ -4,14 +4,33 @@
|
||||
|
||||
"paths": {
|
||||
"default": null,
|
||||
"api": null
|
||||
|
||||
"api": null,
|
||||
|
||||
"models_tanks": null,
|
||||
"models_legendary": null,
|
||||
"models_maps": null
|
||||
},
|
||||
|
||||
"nodes": {
|
||||
"default": "blitzkit/deploy-node-beta.blitzkit.app",
|
||||
"api": "blitzkit/deploy-node-api.beta.blitzkit.app"
|
||||
|
||||
"api": "blitzkit/deploy-node-api.beta.blitzkit.app",
|
||||
|
||||
"models_tanks": "blitzkit/deploy-node-tanks.models.beta.blitzkit.app",
|
||||
"models_legendary": "blitzkit/deploy-node-legendary.models.beta.blitzkit.app",
|
||||
"models_maps": "blitzkit/deploy-node-maps.models.beta.blitzkit.app"
|
||||
},
|
||||
|
||||
"aliases": {
|
||||
"default": "/",
|
||||
|
||||
"api": "https://api.beta.blitzkit.app",
|
||||
"static": "https://static.beta.blitzkit.app"
|
||||
|
||||
"models_tanks": "https://tanks.models.beta.blitzkit.app",
|
||||
"models_legendary": "https://legendary.models.beta.blitzkit.app",
|
||||
"models_maps": "https://maps.models.beta.blitzkit.app",
|
||||
|
||||
"static": "https://static.blitzkit.app"
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,25 @@
|
||||
|
||||
"paths": {
|
||||
"default": null,
|
||||
"api": "api"
|
||||
|
||||
"api": "api",
|
||||
|
||||
"models_tanks": "models/tanks",
|
||||
"models_legendary": "models/legendary",
|
||||
"models_maps": "models/maps"
|
||||
},
|
||||
|
||||
"nodes": {},
|
||||
|
||||
"aliases": {
|
||||
"default": "/",
|
||||
|
||||
"api": "/api",
|
||||
|
||||
"models_tanks": "/models/tanks",
|
||||
"models_legendary": "/models/legendary",
|
||||
"models_maps": "/models/maps",
|
||||
|
||||
"static": "https://static.blitzkit.app"
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,33 @@
|
||||
|
||||
"paths": {
|
||||
"default": null,
|
||||
"api": null
|
||||
|
||||
"api": null,
|
||||
|
||||
"models_tanks": null,
|
||||
"models_legendary": null,
|
||||
"models_maps": null
|
||||
},
|
||||
|
||||
"nodes": {
|
||||
"default": "blitzkit/deploy-node-opentest.blitzkit.app",
|
||||
"api": "blitzkit/deploy-node-api.opentest.blitzkit.app"
|
||||
|
||||
"api": "blitzkit/deploy-node-api.opentest.blitzkit.app",
|
||||
|
||||
"models_tanks": "blitzkit/deploy-node-tanks.models.opentest.blitzkit.app",
|
||||
"models_legendary": "blitzkit/deploy-node-legendary.models.opentest.blitzkit.app",
|
||||
"models_maps": "blitzkit/deploy-node-maps.models.opentest.blitzkit.app"
|
||||
},
|
||||
|
||||
"aliases": {
|
||||
"default": "/",
|
||||
|
||||
"api": "https://api.opentest.blitzkit.app",
|
||||
"static": "https://static.opentest.blitzkit.app"
|
||||
|
||||
"models_tanks": "https://tanks.models.opentest.blitzkit.app",
|
||||
"models_legendary": "https://legendary.models.opentest.blitzkit.app",
|
||||
"models_maps": "https://maps.models.opentest.blitzkit.app",
|
||||
|
||||
"static": "https://static.blitzkit.app"
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,33 @@
|
||||
|
||||
"paths": {
|
||||
"default": null,
|
||||
"api": null
|
||||
|
||||
"api": null,
|
||||
|
||||
"models_tanks": null,
|
||||
"models_legendary": null,
|
||||
"models_maps": null
|
||||
},
|
||||
|
||||
"nodes": {
|
||||
"default": "blitzkit/deploy-node-preview.blitzkit.app",
|
||||
"api": "blitzkit/deploy-node-api.preview.blitzkit.app"
|
||||
|
||||
"api": "blitzkit/deploy-node-api.preview.blitzkit.app",
|
||||
|
||||
"models_tanks": "blitzkit/deploy-node-tanks.models.preview.blitzkit.app",
|
||||
"models_legendary": "blitzkit/deploy-node-legendary.models.preview.blitzkit.app",
|
||||
"models_maps": "blitzkit/deploy-node-maps.models.preview.blitzkit.app"
|
||||
},
|
||||
|
||||
"aliases": {
|
||||
"default": "/",
|
||||
|
||||
"api": "https://api.preview.blitzkit.app",
|
||||
"static": "https://static.preview.blitzkit.app"
|
||||
|
||||
"models_tanks": "https://tanks.models.preview.blitzkit.app",
|
||||
"models_legendary": "https://legendary.models.preview.blitzkit.app",
|
||||
"models_maps": "https://maps.models.preview.blitzkit.app",
|
||||
|
||||
"static": "https://static.blitzkit.app"
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,33 @@
|
||||
|
||||
"paths": {
|
||||
"default": null,
|
||||
"api": null
|
||||
|
||||
"api": null,
|
||||
|
||||
"models_tanks": null,
|
||||
"models_legendary": null,
|
||||
"models_maps": null
|
||||
},
|
||||
|
||||
"nodes": {
|
||||
"default": "blitzkit/deploy-node-blitzkit.app",
|
||||
"api": "blitzkit/deploy-node-api.blitzkit.app"
|
||||
|
||||
"api": "blitzkit/deploy-node-api.blitzkit.app",
|
||||
|
||||
"models_tanks": "blitzkit/deploy-node-tanks.models.blitzkit.app",
|
||||
"models_legendary": "blitzkit/deploy-node-legendary.models.blitzkit.app",
|
||||
"models_maps": "blitzkit/deploy-node-maps.models.blitzkit.app"
|
||||
},
|
||||
|
||||
"aliases": {
|
||||
"default": "/",
|
||||
|
||||
"api": "https://api.blitzkit.app",
|
||||
|
||||
"models_tanks": "https://tanks.models.blitzkit.app",
|
||||
"models_legendary": "https://legendary.models.blitzkit.app",
|
||||
"models_maps": "https://maps.models.blitzkit.app",
|
||||
|
||||
"static": "https://static.blitzkit.app"
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,18 @@
|
||||
{
|
||||
"name": "blitzkit",
|
||||
"version": "1.32.0",
|
||||
"version": "1.33.0-beta.1",
|
||||
"license": "BlitzKit License",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "cd packages/website && bun --bun run dev",
|
||||
"build": "cd packages/website && bun run build",
|
||||
"build": "cd packages/website && bun --bun run build",
|
||||
"discover-ids": "cd packages/scripts && bun run discover-ids",
|
||||
"build-protos": "cd packages/scripts && bun run build-protos",
|
||||
"record-performance": "cd packages/scripts && bun run record-performance",
|
||||
"download-client": "cd packages/scripts && bun run download-client",
|
||||
"clean-astro": "rm -rf packages/website/.astro packages/website/node_modules/.astro packages/website/node_modules/.vite"
|
||||
"download-smart-dlc": "cd packages/scripts && bun run download-smart-dlc",
|
||||
"clean-astro": "rm -rf packages/website/.astro packages/website/node_modules/.astro packages/website/node_modules/.vite",
|
||||
"vfs": "cd packages/scripts && bun run vfs"
|
||||
},
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
|
||||
@@ -253,6 +253,27 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
|
||||
return this;
|
||||
}
|
||||
|
||||
protected getTankFilterIds(
|
||||
name: string,
|
||||
definitionKey: string,
|
||||
filter: "include" | "exclude",
|
||||
) {
|
||||
const keys = name.trim().split(/\s+/).filter(Boolean);
|
||||
|
||||
return keys.flatMap((key) => {
|
||||
const id = this.tankStringIdMap[key];
|
||||
|
||||
if (id === undefined) {
|
||||
console.warn(
|
||||
`Skipping unavailable tank "${key}" in ${filter} vehicle filter for "${definitionKey}"`,
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
return [id];
|
||||
});
|
||||
}
|
||||
|
||||
protected getString(name: string) {
|
||||
const collection: Record<string, string> = {
|
||||
[locales.default]: this.stringsI18n[locales.default][name],
|
||||
@@ -271,6 +292,8 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
|
||||
collection[locale] = localizedString;
|
||||
}
|
||||
|
||||
collection[locales.default] = collection[locales.default] ?? name;
|
||||
|
||||
return { locales: collection } satisfies I18nString;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
|
||||
: TankType.TANK_TYPE_RESEARCHABLE,
|
||||
tier: tank.level,
|
||||
class: tankClass,
|
||||
testing: tankTags.includes("testTank"),
|
||||
testing: tankTags.includes("testTank") || tank.level === 11,
|
||||
deprecated: tankTags.includes("deprecated"),
|
||||
price: tankPrice,
|
||||
camouflage_still: tankDefinition.root.invisibility.still,
|
||||
@@ -598,9 +598,25 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
|
||||
for (const shellKey in gunListEntry.shots) {
|
||||
const gunShellEntry = gunListEntry.shots[shellKey];
|
||||
const shell = shellList.root[shellKey];
|
||||
|
||||
// Newer client data stores shot properties on the shell rather
|
||||
// than repeating them under every gun's <shots> entry.
|
||||
const speed =
|
||||
typeof gunShellEntry === "string"
|
||||
? shell.speed
|
||||
: gunShellEntry.speed;
|
||||
const maxDistance =
|
||||
typeof gunShellEntry === "string"
|
||||
? shell.maxDistance
|
||||
: gunShellEntry.maxDistance;
|
||||
const piercingPower =
|
||||
typeof gunShellEntry === "string"
|
||||
? shell.piercingPower
|
||||
: gunShellEntry.piercingPower;
|
||||
|
||||
const shellId = toUniqueId(nation, shell.id);
|
||||
const shellName = this.getString(shell.userString);
|
||||
const penetrationRaw = gunShellEntry.piercingPower
|
||||
const penetrationRaw = piercingPower
|
||||
.split(" ")
|
||||
.filter((penetrationString) => penetrationString !== "")
|
||||
.map(Number);
|
||||
@@ -610,7 +626,7 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
|
||||
].shells.push({
|
||||
id: shellId,
|
||||
name: shellName,
|
||||
velocity: gunShellEntry.speed,
|
||||
velocity: speed,
|
||||
armor_damage: shell.damage.armor,
|
||||
module_damage: shell.damage.devices,
|
||||
caliber: shell.caliber,
|
||||
@@ -626,7 +642,7 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
|
||||
near: penetrationRaw[0],
|
||||
far: penetrationRaw[1],
|
||||
},
|
||||
range: gunShellEntry.maxDistance,
|
||||
range: maxDistance,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,60 @@
|
||||
import { CamouflageDefinitions } from "@blitzkit/protos";
|
||||
import {
|
||||
Sc2ReadStream,
|
||||
type TankParameters,
|
||||
} from "@blitzkit/core";
|
||||
import { isEqual, times } from "lodash-es";
|
||||
import { Cache } from "./0_base";
|
||||
import { ServerBlitzKitAPI1 } from "./1_tanks";
|
||||
|
||||
export abstract class ServerBlitzKitAPI2 extends ServerBlitzKitAPI1 {
|
||||
private async skinPresets(vehicle: string) {
|
||||
const [nation, tankKey] = vehicle.split(":");
|
||||
const parameters = await this.vfs.yaml<TankParameters>(
|
||||
`Data/3d/Tanks/Parameters/${nation}/${tankKey}.yaml`,
|
||||
);
|
||||
const sc2 = new Sc2ReadStream(
|
||||
(
|
||||
await this.vfs.file(
|
||||
`Data/3d/${parameters.resourcesPath.blitzModelPath}`,
|
||||
)
|
||||
).buffer as ArrayBuffer,
|
||||
).sc2();
|
||||
const presets = new Set<string>();
|
||||
|
||||
for (const node of sc2["#dataNodes"]) {
|
||||
if (typeof node.configCount !== "number") continue;
|
||||
|
||||
times(node.configCount, (index) => node[`configArchive_${index}`])
|
||||
.filter(
|
||||
(archive) =>
|
||||
!isEqual(archive.textures, node.configArchive_0.textures),
|
||||
)
|
||||
.forEach((archive) => presets.add(archive.configName));
|
||||
}
|
||||
|
||||
return presets;
|
||||
}
|
||||
|
||||
@Cache()
|
||||
async camouflages() {
|
||||
const camouflageDefinitions = CamouflageDefinitions.create();
|
||||
const customization = await this.vfs.yaml<
|
||||
Record<string, { Name: string; Path: string }>
|
||||
>("Data/3d/Customization.yaml");
|
||||
const items = new Map(
|
||||
Object.values(customization).map(({ Name, Path }) => [
|
||||
Name,
|
||||
Path.replace("~res:/", "Data/").replace(/\.sc2$/, ""),
|
||||
]),
|
||||
);
|
||||
const skinPresets = new Map<string, Promise<Set<string>>>();
|
||||
|
||||
for (const camoKey in this.camouflagesXml!.root.camouflages) {
|
||||
const camo = this.camouflagesXml!.root.camouflages[camoKey];
|
||||
|
||||
if (!(camoKey in this.camouflagesYaml!)) continue;
|
||||
|
||||
const yamlEntry = this.camouflagesYaml![camoKey];
|
||||
const fullName = yamlEntry.userString
|
||||
? this.getString(yamlEntry.userString)
|
||||
@@ -20,12 +65,51 @@ export abstract class ServerBlitzKitAPI2 extends ServerBlitzKitAPI1 {
|
||||
const resolvedTankName = shortName ?? fullName;
|
||||
const resolvedTankNameFull =
|
||||
resolvedTankName === fullName ? undefined : fullName;
|
||||
const include = camo.vehicleFilter.include;
|
||||
const vehicle =
|
||||
include && !Array.isArray(include) && "vehicle" in include
|
||||
? include.vehicle?.name
|
||||
: undefined;
|
||||
let tankId: number | undefined = undefined;
|
||||
|
||||
if (vehicle && vehicle in this.tankStringIdMap) {
|
||||
const resolvedParts = await Promise.all(
|
||||
Object.values(yamlEntry.customEntities ?? {}).map(
|
||||
async ({ item }) => {
|
||||
const path = items.get(item);
|
||||
|
||||
return (
|
||||
path !== undefined &&
|
||||
(await this.vfs.resolve(`${path}.sc2`)) &&
|
||||
(await this.vfs.resolve(`${path}.scg`))
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
let hasPreset = false;
|
||||
|
||||
if (camo.group === "legendary" && yamlEntry.preset !== undefined) {
|
||||
if (!skinPresets.has(vehicle)) {
|
||||
skinPresets.set(vehicle, this.skinPresets(vehicle));
|
||||
}
|
||||
|
||||
hasPreset = (await skinPresets.get(vehicle)!).has(yamlEntry.preset);
|
||||
}
|
||||
|
||||
if (resolvedParts.some(Boolean) || hasPreset) {
|
||||
tankId = this.tankStringIdMap[vehicle];
|
||||
}
|
||||
}
|
||||
|
||||
const name = this.getString(camo.userString);
|
||||
|
||||
camouflageDefinitions.camouflages[camo.id] = {
|
||||
id: camo.id,
|
||||
name: this.getString(camo.userString),
|
||||
name,
|
||||
tank_name: resolvedTankName,
|
||||
tank_name_full: resolvedTankNameFull,
|
||||
tank_id: tankId,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2,15 +2,22 @@ import {
|
||||
BlitzCrewType,
|
||||
ChassisDefinitionsList,
|
||||
GunDefinitionsList,
|
||||
I_HAT,
|
||||
J_HAT,
|
||||
K_HAT,
|
||||
parseHierarchies,
|
||||
Sc2ReadStream,
|
||||
ScgReadStream,
|
||||
TankParameters,
|
||||
toUniqueId,
|
||||
TurretDefinitionsList,
|
||||
VehicleDefinitionArmor,
|
||||
VehicleDefinitionList,
|
||||
VehicleDefinitions,
|
||||
VertexAttribute,
|
||||
} from "@blitzkit/core";
|
||||
import { Armor, Crew, ModelDefinitions, Vector3 } from "@blitzkit/protos";
|
||||
import { Vector3Tuple } from "three";
|
||||
import { MathUtils, Vector3 as THREEVector3, Vector3Tuple } from "three";
|
||||
import { Cache } from "./0_base";
|
||||
import { ServerBlitzKitAPI2 } from "./2_camouflages";
|
||||
|
||||
@@ -19,6 +26,81 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
|
||||
return { x: tuple[0], y: tuple[1], z: -tuple[2] } satisfies Vector3;
|
||||
}
|
||||
|
||||
private async collisionBoundingBoxes(
|
||||
nation: string,
|
||||
tankKey: string,
|
||||
turretRotation?: { yaw: number; pitch: number; roll: number },
|
||||
) {
|
||||
const boundingBoxes: Record<
|
||||
string,
|
||||
{ min: Vector3Tuple; max: Vector3Tuple }
|
||||
> = {};
|
||||
const path = `Data/3d/Tanks/CollisionMeshes/${nation}-${tankKey}`;
|
||||
|
||||
if (!(await this.vfs.resolve(`${path}.sc2`))) {
|
||||
throw new Error(`Missing collision mesh for ${nation}-${tankKey}`);
|
||||
}
|
||||
|
||||
const sc2 = new Sc2ReadStream(
|
||||
(await this.vfs.file(`${path}.sc2`)).buffer as ArrayBuffer,
|
||||
).sc2();
|
||||
const scg = new ScgReadStream(
|
||||
(await this.vfs.file(`${path}.scg`)).buffer as ArrayBuffer,
|
||||
).scg();
|
||||
|
||||
parseHierarchies(sc2["#hierarchy"], null, (hierarchy, components) => {
|
||||
for (const component of components) {
|
||||
if (component["comp.typename"] !== "RenderComponent") continue;
|
||||
|
||||
const polygonGroup = scg.get(
|
||||
component["rc.renderObj"]["ro.batches"]["0000"]["rb.datasource"],
|
||||
);
|
||||
|
||||
if (!polygonGroup) continue;
|
||||
|
||||
const min: Vector3Tuple = [Infinity, Infinity, Infinity];
|
||||
const max: Vector3Tuple = [-Infinity, -Infinity, -Infinity];
|
||||
const rotate =
|
||||
turretRotation && hierarchy.name.toLowerCase().startsWith("turret");
|
||||
|
||||
polygonGroup.vertices.forEach((vertex) => {
|
||||
vertex.forEach(({ attribute, value }) => {
|
||||
if (attribute !== VertexAttribute.VERTEX) return;
|
||||
|
||||
const position = new THREEVector3(...value);
|
||||
|
||||
if (rotate) {
|
||||
position
|
||||
.applyAxisAngle(
|
||||
I_HAT,
|
||||
-MathUtils.degToRad(turretRotation.pitch),
|
||||
)
|
||||
.applyAxisAngle(J_HAT, -MathUtils.degToRad(turretRotation.roll))
|
||||
.applyAxisAngle(K_HAT, -MathUtils.degToRad(turretRotation.yaw));
|
||||
}
|
||||
|
||||
const coordinates = position.toArray();
|
||||
|
||||
for (let axis = 0; axis < 3; axis++) {
|
||||
min[axis] = Math.min(min[axis], coordinates[axis]);
|
||||
max[axis] = Math.max(max[axis], coordinates[axis]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
boundingBoxes[hierarchy.name.toLowerCase()] = { min, max };
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
if (!boundingBoxes.hull) {
|
||||
throw new Error(`Missing hull collision mesh for ${nation}-${tankKey}`);
|
||||
}
|
||||
|
||||
return boundingBoxes;
|
||||
}
|
||||
|
||||
private assignArmor(
|
||||
raw: VehicleDefinitionArmor[string],
|
||||
id: number,
|
||||
@@ -63,6 +145,12 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
|
||||
const tankParameters = await this.vfs.yaml<TankParameters>(
|
||||
`Data/3d/Tanks/Parameters/${nation}/${tankKey}.yaml`,
|
||||
);
|
||||
const collisionBoundingBoxes = await this.collisionBoundingBoxes(
|
||||
nation,
|
||||
tankKey,
|
||||
tankDefinition.root.hull.turretInitialRotation,
|
||||
);
|
||||
const hullBoundingBox = collisionBoundingBoxes.hull;
|
||||
const turretOrigin = tankDefinition.root.hull.turretPositions.turret
|
||||
.split(" ")
|
||||
.map(Number) as Vector3Tuple;
|
||||
@@ -137,12 +225,8 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
|
||||
}
|
||||
: undefined,
|
||||
bounding_box: {
|
||||
min: this.vector3TupleToBlitzkit(
|
||||
tankParameters.collision.hull.bbox.min,
|
||||
),
|
||||
max: this.vector3TupleToBlitzkit(
|
||||
tankParameters.collision.hull.bbox.max,
|
||||
),
|
||||
min: this.vector3TupleToBlitzkit(hullBoundingBox.min),
|
||||
max: this.vector3TupleToBlitzkit(hullBoundingBox.max),
|
||||
},
|
||||
turrets: {},
|
||||
tracks: {},
|
||||
@@ -202,32 +286,37 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
|
||||
this.assignArmor(armorRaw, armorId, turretArmor);
|
||||
});
|
||||
|
||||
turret.userString;
|
||||
const turretCollisionName = turret.hitTester.collisionModel
|
||||
.split("/")
|
||||
.at(-1)!
|
||||
.split(".")[0]
|
||||
.toLowerCase();
|
||||
const isFullYaw = -turretYaw[0] + turretYaw[1] === 360;
|
||||
|
||||
if (!collisionBoundingBoxes[turretCollisionName] && isFullYaw) {
|
||||
throw new Error(
|
||||
`Missing turret collision mesh for ${nation}-${tankKey} ${turretKey}`,
|
||||
);
|
||||
}
|
||||
|
||||
const turretBoundingBox = collisionBoundingBoxes[
|
||||
turretCollisionName
|
||||
] ?? {
|
||||
min: [0, 0, 0] as Vector3Tuple,
|
||||
max: [0, 0, 0] as Vector3Tuple,
|
||||
};
|
||||
|
||||
modelDefinitions.models[tankId].turrets[turretId] = {
|
||||
armor: turretArmor,
|
||||
gun_origin: this.vector3TupleToBlitzkit(gunOrigin),
|
||||
model_id: turretModel,
|
||||
yaw:
|
||||
-turretYaw[0] + turretYaw[1] === 360
|
||||
? undefined
|
||||
: { min: turretYaw[0], max: turretYaw[1] },
|
||||
yaw: isFullYaw
|
||||
? undefined
|
||||
: { min: turretYaw[0], max: turretYaw[1] },
|
||||
guns: {},
|
||||
bounding_box: {
|
||||
min: this.vector3TupleToBlitzkit(
|
||||
tankParameters.collision[
|
||||
this.parsePath!(
|
||||
turret.hitTester.collisionModel,
|
||||
).name.toLowerCase()
|
||||
].bbox.min,
|
||||
),
|
||||
max: this.vector3TupleToBlitzkit(
|
||||
tankParameters.collision[
|
||||
this.parsePath!(
|
||||
turret.hitTester.collisionModel,
|
||||
).name.toLowerCase()
|
||||
].bbox.max,
|
||||
),
|
||||
min: this.vector3TupleToBlitzkit(turretBoundingBox.min),
|
||||
max: this.vector3TupleToBlitzkit(turretBoundingBox.max),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export abstract class ServerBlitzKitAPI6 extends ServerBlitzKitAPI5 {
|
||||
async consumables() {
|
||||
const consumableDefinitions = ConsumableDefinitions.create();
|
||||
|
||||
Object.entries(this.consumablesCommon).forEach(([, consumable]) => {
|
||||
Object.entries(this.consumablesCommon).forEach(([key, consumable]) => {
|
||||
const entry: Consumable = {
|
||||
id: consumable.id,
|
||||
game_mode_exclusive: "gameModeFilter" in consumable,
|
||||
@@ -39,9 +39,7 @@ export abstract class ServerBlitzKitAPI6 extends ServerBlitzKitAPI5 {
|
||||
filter_type: {
|
||||
$case: "ids",
|
||||
value: {
|
||||
ids: includeRaw.name.split(/ +/).map((key) => {
|
||||
return this.tankStringIdMap[key];
|
||||
}),
|
||||
ids: this.getTankFilterIds(includeRaw.name, key, "include"),
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -67,9 +65,7 @@ export abstract class ServerBlitzKitAPI6 extends ServerBlitzKitAPI5 {
|
||||
filter_type: {
|
||||
$case: "ids",
|
||||
value: {
|
||||
ids: excludeRaw.name.split(/ +/).map((key) => {
|
||||
return this.tankStringIdMap[key];
|
||||
}),
|
||||
ids: this.getTankFilterIds(excludeRaw.name, key, "exclude"),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ export abstract class ServerBlitzKitAPI7 extends ServerBlitzKitAPI6 {
|
||||
async provisions() {
|
||||
const provisionDefinitions = ProvisionDefinitions.create();
|
||||
|
||||
Object.entries(this.provisionsCommon).forEach(([, provision]) => {
|
||||
Object.entries(this.provisionsCommon).forEach(([key, provision]) => {
|
||||
const entry = Provision.create({
|
||||
id: provision.id,
|
||||
exclude: [],
|
||||
@@ -39,9 +39,7 @@ export abstract class ServerBlitzKitAPI7 extends ServerBlitzKitAPI6 {
|
||||
filter_type: {
|
||||
$case: "ids",
|
||||
value: {
|
||||
ids: includeRaw.name.split(/ +/).map((key) => {
|
||||
return this.tankStringIdMap[key];
|
||||
}),
|
||||
ids: this.getTankFilterIds(includeRaw.name, key, "include"),
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -67,9 +65,7 @@ export abstract class ServerBlitzKitAPI7 extends ServerBlitzKitAPI6 {
|
||||
filter_type: {
|
||||
$case: "ids",
|
||||
value: {
|
||||
ids: excludeRaw.name
|
||||
.split(/ +/)
|
||||
.map((key) => this.tankStringIdMap[key]),
|
||||
ids: this.getTankFilterIds(excludeRaw.name, key, "exclude"),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { SkillDefinitions } from "@blitzkit/protos";
|
||||
import { createDefaultSkills } from "./createDefaultSkills";
|
||||
import { TankEnvironment } from "./tankEnvironment";
|
||||
|
||||
export function createDefaultEnvironment(skills: SkillDefinitions) {
|
||||
return {
|
||||
equalize: false,
|
||||
distance: 0,
|
||||
skills: createDefaultSkills(skills),
|
||||
} satisfies TankEnvironment;
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
import { SkillDefinitions } from "..";
|
||||
import { SkillDefinitions } from "@blitzkit/protos";
|
||||
import { permanentSkills } from "../blitz/permanentSkills";
|
||||
import { MAX_SKILL_LEVEL } from "../config/skills";
|
||||
|
||||
export function createDefaultSkills(skillDefinitions: SkillDefinitions) {
|
||||
const skills: Record<string, number> = {};
|
||||
|
||||
Object.values(skillDefinitions.classes).forEach((tankSkills) => {
|
||||
tankSkills.skills.forEach((skill) => {
|
||||
skills[skill] = permanentSkills.includes(skill) ? 7 : 0;
|
||||
skills[skill] = permanentSkills.includes(skill) ? MAX_SKILL_LEVEL : 0;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ export * from "./api";
|
||||
export * from "./assertSecret";
|
||||
export * from "./availableProvisions";
|
||||
export * from "./coefficient";
|
||||
export * from "./createDefaultEnvironment";
|
||||
export * from "./createDefaultProvisions";
|
||||
export * from "./createDefaultSkills";
|
||||
export * from "./degressiveStat";
|
||||
@@ -24,6 +25,8 @@ export * from "./sluggify";
|
||||
export * from "./staticAsset";
|
||||
export * from "./sum";
|
||||
export * from "./tankDefinitions";
|
||||
export * from "./tankEnvironment";
|
||||
export * from "./tankBoundingBox";
|
||||
export * from "./tankIcon";
|
||||
export * from "./tankNames";
|
||||
export * from "./unionBoundingBox";
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import { ModelDefinition, TurretModelDefinition } from "../protos";
|
||||
import { unionBoundingBox } from "./unionBoundingBox";
|
||||
|
||||
export function tankBoundingBox(
|
||||
tankModelDefinition: ModelDefinition,
|
||||
turretModelDefinition: TurretModelDefinition,
|
||||
) {
|
||||
const hull = tankModelDefinition.bounding_box!;
|
||||
const turret = turretModelDefinition.bounding_box!;
|
||||
const origin = tankModelDefinition.turret_origin!;
|
||||
|
||||
if (
|
||||
turret.min!.x === turret.max!.x &&
|
||||
turret.min!.y === turret.max!.y &&
|
||||
turret.min!.z === turret.max!.z
|
||||
) {
|
||||
return unionBoundingBox(hull, hull);
|
||||
}
|
||||
|
||||
return unionBoundingBox(hull, {
|
||||
min: {
|
||||
x: turret.min!.x + origin.x,
|
||||
y: turret.min!.y + origin.z,
|
||||
z: turret.min!.z + origin.y,
|
||||
},
|
||||
max: {
|
||||
x: turret.max!.x + origin.x,
|
||||
y: turret.max!.y + origin.z,
|
||||
z: turret.max!.z + origin.y,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CrewType, ShellType, TankClass, TankType } from "@blitzkit/protos";
|
||||
import { CrewType, ShellType } from "@blitzkit/protos";
|
||||
import { times } from "lodash-es";
|
||||
|
||||
export const SHELL_NAMES: Record<ShellType, string> = {
|
||||
@@ -15,47 +15,7 @@ export const CREW_MEMBER_NAMES = {
|
||||
[CrewType.CREW_TYPE_RADIOMAN]: "radioman",
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* @deprecated use svg
|
||||
*/
|
||||
export const TANK_ICONS: Record<TankClass, string> = {
|
||||
[TankClass.TANK_CLASS_TANK_DESTROYER]: "https://i.imgur.com/BIHSEH0.png",
|
||||
[TankClass.TANK_CLASS_LIGHT]: "https://i.imgur.com/CSNha5V.png",
|
||||
[TankClass.TANK_CLASS_MEDIUM]: "https://i.imgur.com/wvf3ltm.png",
|
||||
[TankClass.TANK_CLASS_HEAVY]: "https://i.imgur.com/ECeqlZa.png",
|
||||
};
|
||||
/**
|
||||
* @deprecated use svg
|
||||
*/
|
||||
export const TANK_ICONS_PREMIUM: Record<TankClass, string> = {
|
||||
[TankClass.TANK_CLASS_TANK_DESTROYER]: "https://i.imgur.com/TCu3EdR.png",
|
||||
[TankClass.TANK_CLASS_LIGHT]: "https://i.imgur.com/zdkpTRb.png",
|
||||
[TankClass.TANK_CLASS_MEDIUM]: "https://i.imgur.com/3z7eHX6.png",
|
||||
[TankClass.TANK_CLASS_HEAVY]: "https://i.imgur.com/P3vbmyA.png",
|
||||
};
|
||||
/**
|
||||
* @deprecated use svg
|
||||
*/
|
||||
export const TANK_ICONS_COLLECTOR: Record<TankClass, string> = {
|
||||
[TankClass.TANK_CLASS_TANK_DESTROYER]: "https://i.imgur.com/WTjeirB.png",
|
||||
[TankClass.TANK_CLASS_LIGHT]: "https://i.imgur.com/EwhtKkU.png",
|
||||
[TankClass.TANK_CLASS_MEDIUM]: "https://i.imgur.com/u8YDMBh.png",
|
||||
[TankClass.TANK_CLASS_HEAVY]: "https://i.imgur.com/8xRf3nc.png",
|
||||
};
|
||||
export const TIERS = times(10, (index) => index + 1);
|
||||
export const TIER_ROMAN_NUMERALS: Record<number, string> = {
|
||||
1: "I",
|
||||
2: "II",
|
||||
3: "III",
|
||||
4: "IV",
|
||||
5: "V",
|
||||
6: "VI",
|
||||
7: "VII",
|
||||
8: "VIII",
|
||||
9: "IX",
|
||||
10: "X",
|
||||
11: "XI",
|
||||
};
|
||||
|
||||
export const flags: Record<string, string> = {
|
||||
ussr: "<:ussr:1218421042033197197>",
|
||||
@@ -68,8 +28,3 @@ export const flags: Record<string, string> = {
|
||||
european: "🇪🇺",
|
||||
other: "<:other:1218421572243558482>",
|
||||
};
|
||||
export const TREE_TYPE_ICONS: Record<TankType, Record<TankClass, string>> = {
|
||||
[TankType.TANK_TYPE_RESEARCHABLE]: TANK_ICONS,
|
||||
[TankType.TANK_TYPE_PREMIUM]: TANK_ICONS_PREMIUM,
|
||||
[TankType.TANK_TYPE_COLLECTOR]: TANK_ICONS_COLLECTOR,
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface TankEnvironment {
|
||||
equalize: boolean;
|
||||
distance: number;
|
||||
skills: Record<string, number>;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from "./gunTypeOrder";
|
||||
export * from "./skills";
|
||||
export * from "./tankClassOrder";
|
||||
export * from "./treeTypeOrder";
|
||||
@@ -0,0 +1 @@
|
||||
export const MAX_SKILL_LEVEL = 7;
|
||||
@@ -1,50 +0,0 @@
|
||||
export enum ImgurSize {
|
||||
/**
|
||||
* The default size
|
||||
*/
|
||||
Default = '',
|
||||
/**
|
||||
* Unknown size but really really small
|
||||
*/
|
||||
UltraSmall = 'ss',
|
||||
/**
|
||||
* 90x90
|
||||
*/
|
||||
SmallSquare = 's',
|
||||
/**
|
||||
* 160x160
|
||||
*/
|
||||
BigSquare = 'b',
|
||||
/**
|
||||
* 160x160
|
||||
*/
|
||||
SmallThumbnail = 't',
|
||||
/**
|
||||
* 320x320
|
||||
*/
|
||||
MediumThumbnail = 'm',
|
||||
/**
|
||||
* 640x640
|
||||
*/
|
||||
LargeThumbnail = 'l',
|
||||
/**
|
||||
* 1024x1024
|
||||
*/
|
||||
HugeThumbnail = 'h',
|
||||
}
|
||||
|
||||
interface ImgurOptions {
|
||||
format: 'jpeg' | 'png';
|
||||
size: ImgurSize;
|
||||
}
|
||||
|
||||
const defaultImgurOptions: ImgurOptions = {
|
||||
format: 'png',
|
||||
size: ImgurSize.Default,
|
||||
};
|
||||
|
||||
export function imgur(id: string, imgurOptions?: Partial<ImgurOptions>) {
|
||||
const options = { ...defaultImgurOptions, ...imgurOptions };
|
||||
|
||||
return `https://i.imgur.com/${id}${options.size}.${options.format}`;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export * from './imgur';
|
||||
@@ -2,7 +2,6 @@ export * from "./api";
|
||||
export * from "./blitz";
|
||||
export * from "./blitzkit";
|
||||
export * from "./config";
|
||||
export * from "./imgur";
|
||||
export * from "./math";
|
||||
export * from "./patreon";
|
||||
export * from "./statistics";
|
||||
|
||||
@@ -88,6 +88,7 @@ enum PvrChannelType {
|
||||
|
||||
enum ResolvedBitRatePixelFormat {
|
||||
R4G4B4A4,
|
||||
R8G8B8A8,
|
||||
R5G6B5A0,
|
||||
}
|
||||
|
||||
@@ -137,6 +138,27 @@ export class PvrReadStream extends ReadStream {
|
||||
};
|
||||
}
|
||||
|
||||
case ResolvedBitRatePixelFormat.R8G8B8A8: {
|
||||
const data = Buffer.alloc(pixelCount * 4);
|
||||
|
||||
times(pixelCount, (index) => {
|
||||
const buffer = this.consumeUint8Array(4);
|
||||
const bufferIndex = index * 4;
|
||||
|
||||
data[bufferIndex] = buffer[0]; // R
|
||||
data[bufferIndex + 1] = buffer[1]; // G
|
||||
data[bufferIndex + 2] = buffer[2]; // B
|
||||
data[bufferIndex + 3] = buffer[3]; // A
|
||||
});
|
||||
|
||||
return {
|
||||
data,
|
||||
width: header.width,
|
||||
height: header.height,
|
||||
channels: 4 as const,
|
||||
};
|
||||
}
|
||||
|
||||
case ResolvedBitRatePixelFormat.R5G6B5A0: {
|
||||
const data = Buffer.alloc(pixelCount * 3);
|
||||
|
||||
@@ -208,10 +230,13 @@ export class PvrReadStream extends ReadStream {
|
||||
if (pixelFormat.order === "rgba") {
|
||||
if (isEqual(pixelFormat.bitRates, [4, 4, 4, 4])) {
|
||||
return ResolvedBitRatePixelFormat.R4G4B4A4;
|
||||
} else
|
||||
} else if (isEqual(pixelFormat.bitRates, [8, 8, 8, 8])) {
|
||||
return ResolvedBitRatePixelFormat.R8G8B8A8;
|
||||
} else {
|
||||
throw new TypeError(
|
||||
`Unhandled rgba bit rate ${pixelFormat.bitRates.join(", ")}`,
|
||||
);
|
||||
}
|
||||
} else if (pixelFormat.order === "rgb\0") {
|
||||
if (isEqual(pixelFormat.bitRates, [5, 6, 5, 0])) {
|
||||
return ResolvedBitRatePixelFormat.R5G6B5A0;
|
||||
|
||||
@@ -90,6 +90,28 @@ export interface Hierarchy {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export function parseHierarchies<Parent>(
|
||||
hierarchies: Hierarchy[],
|
||||
parent: Parent,
|
||||
parseHierarchy: (
|
||||
hierarchy: Hierarchy,
|
||||
components: Component[],
|
||||
parent: Parent,
|
||||
) => Parent | undefined,
|
||||
) {
|
||||
for (const hierarchy of hierarchies) {
|
||||
const components = Array.from(
|
||||
{ length: hierarchy.components.count },
|
||||
(_, index) => hierarchy.components[index.toString().padStart(4, "0")],
|
||||
);
|
||||
const child = parseHierarchy(hierarchy, components, parent);
|
||||
|
||||
if (child !== undefined && hierarchy["#hierarchy"]) {
|
||||
parseHierarchies(hierarchy["#hierarchy"], child, parseHierarchy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 0001, 0002, 0003...: Component
|
||||
type Components = {
|
||||
count: number;
|
||||
|
||||
@@ -3,5 +3,7 @@ export type CamouflagesYaml = Record<
|
||||
{
|
||||
userString?: string;
|
||||
shortUserString?: string;
|
||||
preset?: string;
|
||||
customEntities?: Record<string, { item: string }>;
|
||||
}
|
||||
>;
|
||||
@@ -20,11 +20,13 @@ export interface GunDefinitionsList {
|
||||
burst?: { count: number; rate: number };
|
||||
clip?: { count: number; rate: number };
|
||||
shots: {
|
||||
[key: string]: {
|
||||
speed: number;
|
||||
piercingPower: string;
|
||||
maxDistance: number;
|
||||
};
|
||||
[key: string]:
|
||||
| ""
|
||||
| {
|
||||
speed: number;
|
||||
piercingPower: string;
|
||||
maxDistance: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,6 +10,9 @@ export type ShellDefinitionsList = Record<
|
||||
normalizationAngle?: number;
|
||||
ricochetAngle?: number;
|
||||
explosionRadius?: number;
|
||||
speed: number;
|
||||
maxDistance?: number;
|
||||
piercingPower: string;
|
||||
}
|
||||
> & {
|
||||
icons: Record<string, string>;
|
||||
|
||||
@@ -15,11 +15,39 @@
|
||||
"bhp_t": "{value}bhp/t",
|
||||
"kN": "{value}kN",
|
||||
"hp_s": "{value}hp/s",
|
||||
"plus": "+{value}"
|
||||
"plus": "+{value}",
|
||||
"fraction": "{numerator} / {denominator}"
|
||||
},
|
||||
|
||||
"tanks": {
|
||||
"toys": {
|
||||
"ricochet": {
|
||||
"angle": "Angle",
|
||||
"normalization": "Normalization",
|
||||
"effective": "Effective",
|
||||
"armor": "Armor",
|
||||
"no_ricochet": "Explosive shells don't ricochet"
|
||||
},
|
||||
|
||||
"traverse": {
|
||||
"effective": "Effective",
|
||||
"hull": "Hull",
|
||||
"turret": "Turret"
|
||||
},
|
||||
|
||||
"reload": {
|
||||
"skip": "Skip"
|
||||
}
|
||||
},
|
||||
|
||||
"characteristics": {
|
||||
"compare": {
|
||||
"label": "Compare against",
|
||||
"class": "Tier {tier} {class}",
|
||||
"tier": "All tier {tier}",
|
||||
"all": "All tanks"
|
||||
},
|
||||
|
||||
"titles": {
|
||||
"gun": "Gun",
|
||||
"clip": "Clip",
|
||||
@@ -45,11 +73,11 @@
|
||||
"burst_size": "Burst size",
|
||||
"intra_burst": "Intra-burst",
|
||||
"penetration": "Penetration",
|
||||
"penetration_loss_by_distance": "Penetration loss by 500m",
|
||||
"penetration_loss_after_ricochet": "Penetration loss after ricochet",
|
||||
"shell_velocity": "Shell velocity",
|
||||
"shell_range": "Shell range",
|
||||
"shell_capacity": "Shell capacity",
|
||||
"penetration_loss_by_distance": "Loss by 500m",
|
||||
"penetration_loss_after_ricochet": "Loss after ricochet",
|
||||
"shell_velocity": "Velocity",
|
||||
"shell_range": "Range",
|
||||
"shell_capacity": "Capacity",
|
||||
"caliber": "Caliber",
|
||||
"normalization": "Normalization",
|
||||
"ricochet": "Ricochet",
|
||||
@@ -66,7 +94,7 @@
|
||||
"azimuth_right": "Azimuth right",
|
||||
"speed_forward": "Forward",
|
||||
"speed_backward": "Backward",
|
||||
"speeds": "Speeds",
|
||||
"speeds": "Speed",
|
||||
"engine_power": "Engine power",
|
||||
"brake_force": "Brake force",
|
||||
"weight": "Weight",
|
||||
@@ -80,7 +108,7 @@
|
||||
"medium_terrain_coefficient_raw": "Medium",
|
||||
"soft_terrain_coefficient_raw": "Soft",
|
||||
"hull_traverse_speed": "Hull traverse speed",
|
||||
"hull_traverse_speeds": "Hull traverse speeds",
|
||||
"hull_traverse_speeds": "Hull traverse speed",
|
||||
"hull_traverse_speed_hard": "Hard",
|
||||
"hull_traverse_speed_medium": "Medium",
|
||||
"hull_traverse_speed_soft": "Soft",
|
||||
@@ -98,6 +126,10 @@
|
||||
}
|
||||
},
|
||||
|
||||
"game_modes": {
|
||||
"title": "Game mode abilities"
|
||||
},
|
||||
|
||||
"navigation": {
|
||||
"tank": "Tank",
|
||||
"characteristics": "Characteristics"
|
||||
@@ -110,6 +142,10 @@
|
||||
"provisions": "Provisions",
|
||||
"modules": "Modules",
|
||||
"equipment": "Equipment",
|
||||
"shells": "Shells",
|
||||
"clear": "Clear",
|
||||
"maximize": "Maximize",
|
||||
"skills": "Crew skills",
|
||||
"alternative": "Alt"
|
||||
},
|
||||
|
||||
@@ -239,7 +275,7 @@
|
||||
|
||||
"branches": {
|
||||
"beta": "Beta",
|
||||
"development": "Development",
|
||||
"development": "Post Malone Edition",
|
||||
"opentest": "OpenTest",
|
||||
"preview": "Preview",
|
||||
"production": "Production"
|
||||
@@ -448,53 +484,15 @@
|
||||
},
|
||||
|
||||
"sort": {
|
||||
"meta.none": "none",
|
||||
"survivability.health": "health",
|
||||
"survivability.viewRange": "view range",
|
||||
"survivability.camouflageStill": "camouflage still",
|
||||
"survivability.camouflageMoving": "camouflage moving",
|
||||
"survivability.camouflageShooting": "camouflage shooting",
|
||||
"survivability.volume": "volume",
|
||||
"survivability.length": "length",
|
||||
"fire.dpm": "standard DPM",
|
||||
"fire.dpmPremium": "premium DPM",
|
||||
"fire.reload": "reload",
|
||||
"fire.caliber": "caliber",
|
||||
"fire.standardPenetration": "standard penetration",
|
||||
"fire.premiumPenetration": "premium penetration",
|
||||
"fire.tertiaryPenetration": "tertiary penetration",
|
||||
"fire.damage": "damage",
|
||||
"fire.moduleDamage": "module damage",
|
||||
"fire.shellVelocity": "shell velocity",
|
||||
"fire.shellRange": "shell range",
|
||||
"fire.shellCapacity": "shell capacity",
|
||||
"fire.aimTime": "aim time",
|
||||
"fire.dispersionStill": "dispersion still",
|
||||
"fire.dispersionMoving": "dispersion moving",
|
||||
"fire.gunDepression": "gun depression",
|
||||
"fire.gunElevation": "gun elevation",
|
||||
"maneuverability.forwardsSpeed": "forwards speed",
|
||||
"maneuverability.backwardsSpeed": "backwards speed",
|
||||
"maneuverability.power": "power",
|
||||
"maneuverability.powerToWeight": "power to weight",
|
||||
"maneuverability.weight": "weight",
|
||||
"maneuverability.traverseSpeed": "traverse speed"
|
||||
},
|
||||
"sort_dropdown": {
|
||||
"label": "Sort",
|
||||
"groups": {
|
||||
"sort": {
|
||||
"no_sort": "No sort",
|
||||
"label": "Sort by",
|
||||
"fire": "Fire",
|
||||
"maneuverability": "Maneuverability",
|
||||
"survivability": "Survivability"
|
||||
},
|
||||
"direction": {
|
||||
"label": "Direction",
|
||||
"ascending": "Ascending",
|
||||
"descending": "Descending"
|
||||
}
|
||||
|
||||
"none": "None",
|
||||
"by": "Sort by",
|
||||
|
||||
"direction": {
|
||||
"label": "Direction",
|
||||
"ascending": "Ascending",
|
||||
"descending": "Descending"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -534,11 +532,10 @@
|
||||
|
||||
"footer": {
|
||||
"motto": "Everything World of Tanks Blitz",
|
||||
"copyright": "Unaffiliated with Wargaming or any service",
|
||||
"association": "An Open Collective Project",
|
||||
|
||||
"about": {
|
||||
"title": "About",
|
||||
"credits": "Credits",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Patches"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "test",
|
||||
"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}.",
|
||||
"fox": "El rápido zorro marrón salta sobre el perro perezoso."
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "Restablecer",
|
||||
"shuffle": "Shuffle",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "No afiliado con Wargaming u otros servicios",
|
||||
"about": {
|
||||
"title": "About",
|
||||
"credits": "Credits",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Parches"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "teste",
|
||||
"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."
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "Reset",
|
||||
"shuffle": "Shuffle",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "Unaffiliated with Wargaming or any service",
|
||||
"about": {
|
||||
"title": "About",
|
||||
"credits": "Credits",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Patches"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "test",
|
||||
"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}.",
|
||||
"fox": "すばしっこい茶色のキツネが怠け者の犬を飛び越した。"
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "リセット",
|
||||
"shuffle": "Shuffle",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "Wargamingやその他のサービスとは関係ありません",
|
||||
"about": {
|
||||
"title": "概要",
|
||||
"credits": "クレジット",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "パッチノート"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "test",
|
||||
"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}.",
|
||||
"fox": "Szybki brązowy lis przeskoczył nad leniwym psem."
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -19,7 +14,7 @@
|
||||
"gun_types": {
|
||||
"auto_loader": "Samo ładowacz",
|
||||
"auto_reloader": "Automatyczne przeładowanie",
|
||||
"regular": "Regular"
|
||||
"regular": "Regularny"
|
||||
},
|
||||
"shells": {
|
||||
"ap": "AP",
|
||||
@@ -38,10 +33,10 @@
|
||||
},
|
||||
"branches": {
|
||||
"beta": "Beta",
|
||||
"development": "Development",
|
||||
"opentest": "OpenTest",
|
||||
"preview": "Preview",
|
||||
"production": "Production"
|
||||
"development": "Rozwój",
|
||||
"opentest": "OtwartyTest",
|
||||
"preview": "Przegląd",
|
||||
"production": "Produkcja"
|
||||
},
|
||||
"locales": {
|
||||
"en": "Angielski",
|
||||
@@ -102,28 +97,28 @@
|
||||
"other": "Hybryda"
|
||||
},
|
||||
"tank_class_short": {
|
||||
"-1": "unrecognized",
|
||||
"-1": "nierozpoznany",
|
||||
"0": "Lekki",
|
||||
"1": "Średni",
|
||||
"2": "Ciężki",
|
||||
"3": "TD"
|
||||
"3": "NC"
|
||||
},
|
||||
"tank_class_short_plural_lowercase": {
|
||||
"0": "lekkie",
|
||||
"1": "średnie",
|
||||
"2": "ciężkie",
|
||||
"3": "TDs"
|
||||
"3": "NC-ów"
|
||||
},
|
||||
"tank_class_medium": {
|
||||
"-1": "unrecognized",
|
||||
"-1": "nierozpoznany",
|
||||
"0": "Lekki",
|
||||
"1": "Średni",
|
||||
"2": "Ciężki",
|
||||
"3": "Niszczyciel czołgów"
|
||||
},
|
||||
"tree_type": {
|
||||
"-1": "unrecognized",
|
||||
"0": "Tech tree",
|
||||
"-1": "nierozpoznany",
|
||||
"0": "Drzewko technologiczne",
|
||||
"1": "Premium",
|
||||
"2": "Kolekcjonerski"
|
||||
},
|
||||
@@ -187,223 +182,229 @@
|
||||
},
|
||||
"website": {
|
||||
"redirect": {
|
||||
"title": "301: moved permanently",
|
||||
"body": "This page has moved. Redirecting..."
|
||||
"title": "301: przeniesiony na stałe",
|
||||
"body": "Ta strona została przeniesiona. Przekierowywanie..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"description": "Change BlitzKit settings",
|
||||
"dev_mode": "Development mode",
|
||||
"auto_load_models": "Auto-load models",
|
||||
"language": "Language"
|
||||
"title": "Ustawienia",
|
||||
"description": "Zmień ustawienia BlitzKit",
|
||||
"dev_mode": "Tryb deweloperski",
|
||||
"auto_load_models": "Automatycznie wczytaj modele",
|
||||
"language": "Język"
|
||||
},
|
||||
"common": {
|
||||
"player_search": {
|
||||
"hint": "Search players...",
|
||||
"no_results": "No results",
|
||||
"searching": "Searching..."
|
||||
"hint": "Szukaj graczy...",
|
||||
"no_results": "Brak wyników",
|
||||
"searching": "Wyszukiwanie..."
|
||||
},
|
||||
"copy_button": {
|
||||
"copied": "Copied!"
|
||||
"copied": "Skopiowano!"
|
||||
},
|
||||
"tank_search": {
|
||||
"select_dialog_title": "Search for tanks",
|
||||
"swap_dialog_title": "Swap tank",
|
||||
"clear_filters": "Clear filters",
|
||||
"login": "Login to use this",
|
||||
"search_bar_hint": "Search tanks...",
|
||||
"recent": "Recently viewed",
|
||||
"select_all": "Select all",
|
||||
"count_singular": "1 tank",
|
||||
"count_plural": "{count} tanks",
|
||||
"sorting_by": "Sorting by {name}",
|
||||
"clear": "Clear",
|
||||
"tier": "Tier {tier}",
|
||||
"passive": "{name} (Passive)",
|
||||
"active": "{name} (Active)",
|
||||
"select_dialog_title": "Szukaj czołgów",
|
||||
"swap_dialog_title": "Zamień czołg",
|
||||
"clear_filters": "Wyczyść filtry",
|
||||
"login": "Zaloguj się, aby tego użyć",
|
||||
"search_bar_hint": "Szukaj czołgów...",
|
||||
"recent": "Ostatnio oglądane",
|
||||
"select_all": "Zaznacz wszystko",
|
||||
"count_singular": "1 czołg",
|
||||
"count_plural": "{count} czołgi",
|
||||
"sorting_by": "Sortowanie według {name}",
|
||||
"clear": "Wyczyść",
|
||||
"tier": "Poziom czołgu {tier}",
|
||||
"passive": "{name} (Pasywny)",
|
||||
"active": "{name} (Aktywne)",
|
||||
"no_tanks_found": {
|
||||
"body": "No tanks found.",
|
||||
"body": "Nie znaleziono czołgu.",
|
||||
"search_again": "",
|
||||
"clear_filters": "Try clearing filters."
|
||||
"clear_filters": "Spróbuj wyczyścić filtry."
|
||||
},
|
||||
"sort": {
|
||||
"meta.none": "none",
|
||||
"survivability.health": "health",
|
||||
"survivability.viewRange": "view range",
|
||||
"survivability.camouflageStill": "camouflage still",
|
||||
"survivability.camouflageMoving": "camouflage moving",
|
||||
"survivability.camouflageShooting": "camouflage shooting",
|
||||
"survivability.volume": "volume",
|
||||
"survivability.length": "length",
|
||||
"fire.dpm": "standard DPM",
|
||||
"fire.dpmPremium": "premium DPM",
|
||||
"fire.reload": "reload",
|
||||
"fire.caliber": "caliber",
|
||||
"fire.standardPenetration": "standard penetration",
|
||||
"fire.premiumPenetration": "premium penetration",
|
||||
"meta.none": "brak",
|
||||
"survivability.health": "punkty.życia",
|
||||
"survivability.viewRange": "zasięg widzenia",
|
||||
"survivability.camouflageStill": "kamuflaż w bezruchu",
|
||||
"survivability.camouflageMoving": "kamuflaż w trakcie ruchu",
|
||||
"survivability.camouflageShooting": "kamuflaż podczas strzału",
|
||||
"survivability.volume": "wartość",
|
||||
"survivability.length": "długość",
|
||||
"fire.dpm": "DPM pocisków podstawowych",
|
||||
"fire.dpmPremium": "DPM pocisków premium",
|
||||
"fire.reload": "przeładowanie",
|
||||
"fire.caliber": "kaliber",
|
||||
"fire.standardPenetration": "Penetracja pocisków standardowych",
|
||||
"fire.premiumPenetration": "Penetracja pocisków premium",
|
||||
"fire.tertiaryPenetration": "tertiary penetration",
|
||||
"fire.damage": "damage",
|
||||
"fire.moduleDamage": "module damage",
|
||||
"fire.shellVelocity": "shell velocity",
|
||||
"fire.shellRange": "shell range",
|
||||
"fire.shellCapacity": "shell capacity",
|
||||
"fire.aimTime": "aim time",
|
||||
"fire.damage": "uszkodzenia",
|
||||
"fire.moduleDamage": "Uszkodzenia modułów",
|
||||
"fire.shellVelocity": "Prędkość pocisku",
|
||||
"fire.shellRange": "Zasięg pocisku",
|
||||
"fire.shellCapacity": "Maksymalna ilość pocisków",
|
||||
"fire.aimTime": "Czas celowania",
|
||||
"fire.dispersionStill": "dispersion still",
|
||||
"fire.dispersionMoving": "dispersion moving",
|
||||
"fire.gunDepression": "gun depression",
|
||||
"fire.gunElevation": "gun elevation",
|
||||
"maneuverability.forwardsSpeed": "forwards speed",
|
||||
"maneuverability.backwardsSpeed": "backwards speed",
|
||||
"maneuverability.power": "power",
|
||||
"maneuverability.powerToWeight": "power to weight",
|
||||
"maneuverability.weight": "weight",
|
||||
"fire.gunDepression": "Depresja działa",
|
||||
"fire.gunElevation": "Elewacja działa",
|
||||
"maneuverability.forwardsSpeed": "Maksymalna prędkość do przodu",
|
||||
"maneuverability.backwardsSpeed": "Maksymalna prędkość do tyłu",
|
||||
"maneuverability.power": "Moc silnika",
|
||||
"maneuverability.powerToWeight": "Proporcja mocy do masy",
|
||||
"maneuverability.weight": "Masa czołgu",
|
||||
"maneuverability.traverseSpeed": "traverse speed"
|
||||
},
|
||||
"sort_dropdown": {
|
||||
"label": "Sort",
|
||||
"label": "Filtruj",
|
||||
"groups": {
|
||||
"sort": {
|
||||
"no_sort": "No sort",
|
||||
"label": "Sort by",
|
||||
"fire": "Fire",
|
||||
"maneuverability": "Maneuverability",
|
||||
"survivability": "Survivability"
|
||||
"no_sort": "Brak filtrów",
|
||||
"label": "Filtruj według",
|
||||
"fire": "Siła ognia",
|
||||
"maneuverability": "Mobilność ",
|
||||
"survivability": "Przetrwanie"
|
||||
},
|
||||
"direction": {
|
||||
"label": "Direction",
|
||||
"ascending": "Ascending",
|
||||
"descending": "Descending"
|
||||
"ascending": "Rosnąco",
|
||||
"descending": "Malejąco"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warnings": {
|
||||
"test": "Tanks in testing are subject to change and may not represent the final product."
|
||||
"test": "Wartości statystyk czołgów w fazie testowej mogą ulec zmianie."
|
||||
}
|
||||
},
|
||||
"home": {
|
||||
"discord": {
|
||||
"join_short": "Join cool people!",
|
||||
"join_long": "Join super duper cool people!",
|
||||
"join_short": "Dołącz do elity!",
|
||||
"join_long": "Dołącz do topowej elity!",
|
||||
"action": "Discord"
|
||||
},
|
||||
"hero": {
|
||||
"credit": "By {name} ❤️"
|
||||
"credit": "Według {name} ♥️"
|
||||
},
|
||||
"hot_tanks": {
|
||||
"title": "Popular tanks",
|
||||
"subtitle": "Last {days} days"
|
||||
"title": "Popularne czołgi",
|
||||
"subtitle": "Ostatnie {days} dni"
|
||||
},
|
||||
"other_projects": {
|
||||
"title": "Other cool projects"
|
||||
"title": "Inne epickie projekty"
|
||||
},
|
||||
"help_translate": "Please help translate {name} to {language}!",
|
||||
"seo_description": "Tools for everything World of Tanks Blitz"
|
||||
"help_translate": "Proszę pomóż przetłumaczyć {name} na {language}!",
|
||||
"seo_description": "Narzędzia do wszystkiego World of Tanks Blitz"
|
||||
},
|
||||
"docs": {
|
||||
"patches": {
|
||||
"name": "BlitzKit Changelogs",
|
||||
"seo_description": "Changelogs for BlitzKit Discord bot and website"
|
||||
"name": "Zapisy zmian BlitzKit",
|
||||
"seo_description": "Zapisy zmian BlitzKit: Discord bot i strona internetowa"
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "Reset",
|
||||
"shuffle": "Shuffle",
|
||||
"remove": "Remove played",
|
||||
"tracking": "BlitzKit is tracking your battles",
|
||||
"reset": "Resetuj",
|
||||
"shuffle": "Wymieszaj",
|
||||
"remove": "Usuń czołgi, którymi grałem",
|
||||
"tracking": "BlitzKit zapisuje twoje bitwy",
|
||||
"sort": {
|
||||
"button": "Sort by",
|
||||
"last_played": "Last played",
|
||||
"least_played": "Least played"
|
||||
"button": "Filtruj według",
|
||||
"last_played": "Ostatnio używane czołgi",
|
||||
"least_played": "Najmniej używane czołgi"
|
||||
},
|
||||
"table": {
|
||||
"index": "#",
|
||||
"never": "Never",
|
||||
"tank": "Tank",
|
||||
"last_played": "Last played",
|
||||
"battles": "Career battles",
|
||||
"never": "Nigdy",
|
||||
"tank": "Czołg",
|
||||
"last_played": "Ostatnio używane czołgi",
|
||||
"battles": "Wszystkie bitwy na koncie",
|
||||
"unrecorded": "--",
|
||||
"wins": "Zwycięstwa"
|
||||
},
|
||||
"large_warning": {
|
||||
"title": "That's a lot of tanks!",
|
||||
"description": "Are you sure you want to create a playlist of {count} tanks? That's {time} hours of gameplay at 50% winrate!",
|
||||
"cancel": "Cancel",
|
||||
"proceed": "Proceed"
|
||||
"title": "To jest mnóstwo czołgów!",
|
||||
"description": "Czy na pewno chcesz stworzyć playlistę złożoną z {count} czołgów? To {time} godzin gry przy 50% zwycięstw!",
|
||||
"cancel": "Anuluj",
|
||||
"proceed": "Zatwierdź"
|
||||
},
|
||||
"generate": "Generate playlist",
|
||||
"name": "Playlist",
|
||||
"description": "Tank playlist generator",
|
||||
"seo_description": "Don't know what to play in World of Tanks Blitz? Use BlitzKit Playlist to get suggestions!",
|
||||
"button": "Generate",
|
||||
"pool_size": "{count} possible tanks"
|
||||
"generate": "Wygeneruj playlistę",
|
||||
"name": "Playlista",
|
||||
"description": "Generator playlisty czołgów",
|
||||
"seo_description": "Nie wiesz, którym czołgiem grać w World of Tanks Blitz? Użyj funkcji playlisty BlitzKit, i ułóż własną listę czołgów do gry!",
|
||||
"button": "Wygeneruj",
|
||||
"pool_size": "{count} możliwe czołgi"
|
||||
},
|
||||
"mixer": {
|
||||
"name": "Mixer",
|
||||
"name": "Mikser",
|
||||
"button": "Mix and match",
|
||||
"description": "Mix tank modules",
|
||||
"seo_description": "Mix and match hulls, turrets, and guns of tanks in World of Tanks Blitz",
|
||||
"screenshot": "Screenshot",
|
||||
"randomize": "Randomize"
|
||||
"screenshot": "Zrzut ekranu",
|
||||
"randomize": "Wymieszaj"
|
||||
},
|
||||
"guess": {
|
||||
"name": "Guess",
|
||||
"name": "Zgadnij",
|
||||
"button": "What could it be?",
|
||||
"description": "Silhouette mini-game",
|
||||
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
|
||||
"search": {
|
||||
"placeholder": "Type to guess...",
|
||||
"skip": "Skip",
|
||||
"guess": "Guess",
|
||||
"next": "Next",
|
||||
"placeholder": "Wpisz odpowiedź",
|
||||
"skip": "Pomiń",
|
||||
"guess": "Zgaduję",
|
||||
"next": "Następny",
|
||||
"no_results": "Brak wyników"
|
||||
},
|
||||
"stats": "{correct} / {total} correct, {streak} streak",
|
||||
"help": {
|
||||
"title": "Partially reveal tank?",
|
||||
"title": "Odsłonić część czołgu?",
|
||||
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
|
||||
"cancel": "Cancel",
|
||||
"reveal": "Reveal"
|
||||
"cancel": "Anuluj",
|
||||
"reveal": "Pokaż"
|
||||
},
|
||||
"clear": "Clear",
|
||||
"select_all": "Select all",
|
||||
"tier": "Tier {tier}"
|
||||
"clear": "Wyczyść",
|
||||
"select_all": "Zaznacz wszystko ",
|
||||
"tier": "Poziom czołgu {tier}"
|
||||
},
|
||||
"tankopedia": {
|
||||
"search": "Search a stat...",
|
||||
"search": "Wyszukaj statystykę...",
|
||||
"name": "Tankopedia",
|
||||
"button": "Find tanks",
|
||||
"description": "Blitz tank encyclopedia",
|
||||
"button": "Znajdź czołg",
|
||||
"description": "Encyklopedia czołgów w WoTb",
|
||||
"seo_description": "Statistics, armor, and more for all tanks in World of Tanks Blitz",
|
||||
"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.",
|
||||
"visualizers": {
|
||||
"reload": {
|
||||
"skip": "Skip"
|
||||
"skip": "Pomiń"
|
||||
},
|
||||
"assault": {
|
||||
"title": "Assault shells"
|
||||
},
|
||||
"rotator": {
|
||||
"hull": "Hull",
|
||||
"turret": "Turret",
|
||||
"hard": "Hard",
|
||||
"hull": "Kadłub",
|
||||
"turret": "Wieża",
|
||||
"hard": "Utwardzony",
|
||||
"medium": "Średni",
|
||||
"soft": "Soft",
|
||||
"effective": "Effective"
|
||||
"soft": "Miękki",
|
||||
"effective": "Rzeczywisty"
|
||||
},
|
||||
"ricochet": {
|
||||
"angle": "Angle",
|
||||
"angle": "Kąt",
|
||||
"normalization": "Normalization",
|
||||
"effective_angle": "Effective angle",
|
||||
"armor": "Armor",
|
||||
"no_ricochet": "Explosive shells don't ricochet"
|
||||
"effective_angle": "Rzeczywisty kąt nachylenia pancerza",
|
||||
"armor": "Pancerz",
|
||||
"no_ricochet": "Pociski odłamkowe nie rykoszetują."
|
||||
},
|
||||
"view_range": {
|
||||
"camo": "Camo",
|
||||
"ghost_factory": "Ghost Factory",
|
||||
"dead_rail": "Dead Rail"
|
||||
"camo": "Kamuflaż",
|
||||
"ghost_factory": "Fabryka duchów",
|
||||
"dead_rail": "Martwy tor"
|
||||
},
|
||||
"flexibility": {
|
||||
"yaw": "Yaw",
|
||||
@@ -443,71 +444,71 @@
|
||||
"ricochet": "Ricochet",
|
||||
"explosion_radius": "Explosion radius",
|
||||
"exit": "Exit",
|
||||
"reset": "Reset"
|
||||
"reset": "Zresetuj"
|
||||
},
|
||||
"advanced": "Advanced highlighting",
|
||||
"advanced": "Zaawansowane podświetlanie",
|
||||
"shot_card": {
|
||||
"element": {
|
||||
"primary": "Primary",
|
||||
"primary": "Główny",
|
||||
"spaced": "Spaced",
|
||||
"external": "External",
|
||||
"gap": "Gap",
|
||||
"gun": "Gun",
|
||||
"track": "Tracks"
|
||||
"external": "Zewnętrzny",
|
||||
"gap": "Odstęp",
|
||||
"gun": "Działo",
|
||||
"track": "Gąsienice"
|
||||
},
|
||||
"status": {
|
||||
"penetration": "{damage}hp penetration",
|
||||
"blocked": "Blocked",
|
||||
"ricochet": "Ricochet",
|
||||
"splash": "{damage}hp splash"
|
||||
"penetration": "{damage} penetracja punktów wytrzymałości",
|
||||
"blocked": "Zablokowany",
|
||||
"ricochet": "Rykoszet",
|
||||
"splash": "{damage} rozprysk punktów wytrzymałości"
|
||||
},
|
||||
"stats": {
|
||||
"thickness_and_angle": "{thickness}mm {angle}°",
|
||||
"nominal": "{thickness}mm nominal",
|
||||
"ricochet_loss": "{loss}% penetration"
|
||||
"thickness_and_angle": "{thickness}mm {angle}",
|
||||
"nominal": "{thickness}mm nominalny",
|
||||
"ricochet_loss": "{loss}% penetracji"
|
||||
}
|
||||
}
|
||||
},
|
||||
"static": {
|
||||
"name": "Static armor",
|
||||
"primary": "Primary",
|
||||
"spaced": "Spaced",
|
||||
"external": "External",
|
||||
"name": "Pancerz statyczny",
|
||||
"primary": "Główny Pancerz",
|
||||
"spaced": "Ekran przeciwkumulacyjny",
|
||||
"external": "Zewnętrzny",
|
||||
"edit": {
|
||||
"label": "Edit",
|
||||
"reset": "Reset"
|
||||
"label": "Edytuj",
|
||||
"reset": "Zresetuj"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"back": "Back",
|
||||
"compare": "Compare",
|
||||
"back": "Powrót",
|
||||
"compare": "Porównaj",
|
||||
"swap": {
|
||||
"button": "Swap",
|
||||
"title": "Swap tanks"
|
||||
"button": "Zamień",
|
||||
"title": "Zamień czołgi"
|
||||
},
|
||||
"vanilla": "Vanilla",
|
||||
"opentest": "OpenTest",
|
||||
"full_name": "Full name",
|
||||
"full_name": "Pełna nazwa",
|
||||
"nation": "Naród",
|
||||
"class": "Klasa",
|
||||
"tier": "Poziom",
|
||||
"type": "Rodzaj",
|
||||
"dev_id": "DEV: ID",
|
||||
"dev_name": "DEV: NAME",
|
||||
"purchase": "Purchase price",
|
||||
"restoration": "Restoration price",
|
||||
"dev_name": "DEV: NAZWA",
|
||||
"purchase": "Cena zakupu",
|
||||
"restoration": "Cena odzyskania",
|
||||
"sale": "Sale price",
|
||||
"research": "Research XP"
|
||||
},
|
||||
"tech_tree": {
|
||||
"title": "Tech tree",
|
||||
"battle": "1 battle",
|
||||
"battles": "{count} battles",
|
||||
"route": "Route {index} of {count}"
|
||||
"title": "Drzewko technologiczne",
|
||||
"battle": "1 bitwa",
|
||||
"battles": "{count} bitew",
|
||||
"route": "Ścieżka {index} z {count}"
|
||||
},
|
||||
"game_modes": {
|
||||
"title": "Game mode abilities"
|
||||
"title": "Umiejętności trybu gry"
|
||||
},
|
||||
"review": {
|
||||
"title": "Review videos",
|
||||
@@ -520,26 +521,26 @@
|
||||
"equalize": "Equalize"
|
||||
},
|
||||
"modules": {
|
||||
"title": "Modules",
|
||||
"stock": "Stock",
|
||||
"upgrade": "Upgrade"
|
||||
"title": "Moduły",
|
||||
"stock": "Standardowy",
|
||||
"upgrade": "Ulepsz"
|
||||
},
|
||||
"equipment": {
|
||||
"title": "Equipment",
|
||||
"clear": "Clear"
|
||||
"title": "Wyposażenie",
|
||||
"clear": "Wyczyść"
|
||||
},
|
||||
"provisions": {
|
||||
"title": "Provisions",
|
||||
"clear": "Clear"
|
||||
"title": "Materiały eksploatacyjne",
|
||||
"clear": "Wyczyść"
|
||||
},
|
||||
"consumables": {
|
||||
"title": "Consumables",
|
||||
"clear": "Clear",
|
||||
"clear": "Wyczyść",
|
||||
"info": "Yellow consumables do not affect the statistics."
|
||||
},
|
||||
"skills": {
|
||||
"title": "Crew skills",
|
||||
"clear": "Clear",
|
||||
"clear": "Wyczyść",
|
||||
"maximize": "Maximize",
|
||||
"info": "Yellow skills only apply under special circumstances. Hold Space to quickly toggle between level 0 and 7."
|
||||
},
|
||||
@@ -557,49 +558,49 @@
|
||||
},
|
||||
"values": {
|
||||
"shell_index": "Shell {index}",
|
||||
"at_distance": "At {distance}m",
|
||||
"at_distance_slider_label": "Distance",
|
||||
"dispersion_at_distance": "Dispersion at {distance}m",
|
||||
"gun_flexibility": "Gun flexibility",
|
||||
"speed": "Speed",
|
||||
"terrain_coefficients": "Terrain coefficients",
|
||||
"raw_terrain_coefficients": "Raw terrain coefficients",
|
||||
"power_to_weight_ratio": "Power to weight ratio",
|
||||
"hull_traverse_speed": "Hull traverse speed",
|
||||
"camouflage": "Camouflage",
|
||||
"reload": "Reload",
|
||||
"crewCount": "Crew count",
|
||||
"at_distance": "Z odległości {distance}m",
|
||||
"at_distance_slider_label": "Zasięg widzenia",
|
||||
"dispersion_at_distance": "Rozrzut na {distance}m",
|
||||
"gun_flexibility": "Elastyczność działa",
|
||||
"speed": "Prędkość",
|
||||
"terrain_coefficients": "Współczynniki terenu",
|
||||
"raw_terrain_coefficients": "Surowe współczynniki terenu",
|
||||
"power_to_weight_ratio": "Stosunek mocy do masy",
|
||||
"hull_traverse_speed": "Prędkość obrotu kadłuba",
|
||||
"camouflage": "Kamuflaż",
|
||||
"reload": "Przeładowanie",
|
||||
"crewCount": "Liczba członków załogi",
|
||||
"shellNormalization": "Normalization",
|
||||
"shellRicochet": "Ricochet",
|
||||
"dpm": "DPM",
|
||||
"dpmEffective": "Effective at 60s",
|
||||
"peekabooDpm": "Peekaboo DPM",
|
||||
"peekabooDpmInfo": "Damage per minute assuming you only fire after resetting camouflage (or the reload finishes, if it's slower) — at least 10 seconds between shots.",
|
||||
"shells": "Shells",
|
||||
"mostOptimalShellIndex": "Most optimal shell",
|
||||
"shellReloads": "Reloads",
|
||||
"shellReload": "Reload",
|
||||
"intraClip": "Intra-clip",
|
||||
"dpm": "Uszkodzenia na minutę",
|
||||
"dpmEffective": "Efektywne w 60s",
|
||||
"peekabooDpm": "Obrażenia na minutę w stylu „wychyl i schowaj”",
|
||||
"peekabooDpmInfo": "Obrażenia na minutę przy założeniu, że strzelisz tylko po zresetowaniu kamuflażu (lub ponownym załadowaniu, jeśli jest wolniejszy) — co najmniej 10 sekund pomiędzy strzałami.",
|
||||
"shells": "Pociski",
|
||||
"mostOptimalShellIndex": "Optymalny pocisk",
|
||||
"shellReloads": "Przeładowania",
|
||||
"shellReload": "Przeładowanie",
|
||||
"intraClip": "Czas przeładowania pocisku",
|
||||
"caliber": "Caliber",
|
||||
"penetration": "Penetration",
|
||||
"damage": "Uszkodzenia",
|
||||
"damageWithoutAssault": "Damage without assault shells",
|
||||
"clipDamage": "Clipping potential",
|
||||
"moduleDamage": "Module damage",
|
||||
"explosionRadius": "Explosion radius",
|
||||
"shellVelocity": "Shell velocity",
|
||||
"aimTime": "Aim time",
|
||||
"damageWithoutAssault": "Uszkodzenia bez pocisków szturmowych",
|
||||
"clipDamage": "Potencjał magazynu",
|
||||
"moduleDamage": "Uszkodzenia modułów",
|
||||
"explosionRadius": "Promień eksplozji",
|
||||
"shellVelocity": "Prędkość pocisku",
|
||||
"aimTime": "Czas celowania",
|
||||
"dispersion": "Still",
|
||||
"dispersionMoving": "Moving",
|
||||
"dispersionHullTraversing": "Hull traversing",
|
||||
"dispersionTurretTraversing": "Turret traversing",
|
||||
"dispersionShooting": "Shooting",
|
||||
"dispersionGunDamaged": "Gun damaged",
|
||||
"gunDepression": "Depression",
|
||||
"gunElevation": "Elevation",
|
||||
"gunFrontalDepression": "Frontal depression",
|
||||
"gunFrontalElevation": "Frontal elevation",
|
||||
"gunRearDepression": "Rear depression",
|
||||
"dispersionMoving": "Podczas ruchu",
|
||||
"dispersionHullTraversing": "Obrót kadłuba",
|
||||
"dispersionTurretTraversing": "Obrót wieży",
|
||||
"dispersionShooting": "Strzelanie",
|
||||
"dispersionGunDamaged": "Uszkodzone Działo",
|
||||
"gunDepression": "Limit obrotu działa w dół",
|
||||
"gunElevation": "Limit obrotu działa w górę",
|
||||
"gunFrontalDepression": "Przedni limit obrotu działa w dół",
|
||||
"gunFrontalElevation": "Przedni limit obrotu działa w górę",
|
||||
"gunRearDepression": "Tylne opuszczanie działa",
|
||||
"gunRearElevation": "Rear elevation",
|
||||
"azimuthLeft": "Azimuth left",
|
||||
"azimuthRight": "Azimuth right",
|
||||
@@ -626,7 +627,7 @@
|
||||
"trackRepairTime": "Track repair time",
|
||||
"viewRange": "View range",
|
||||
"camouflageStill": "Still",
|
||||
"camouflageMoving": "Moving",
|
||||
"camouflageMoving": "Podczas ruchu",
|
||||
"camouflageShootingStill": "Shooting while still",
|
||||
"camouflageShootingMoving": "Shooting while moving",
|
||||
"camouflageCaughtOnFire": "Caught on fire",
|
||||
@@ -648,7 +649,7 @@
|
||||
"crew": {
|
||||
"title": "Crew training",
|
||||
"info": "represents the other roles a crew member can take.",
|
||||
"count": "Crew count",
|
||||
"count": "Liczba członków załogi",
|
||||
"commander": "Commander",
|
||||
"gunner": "Gunner",
|
||||
"driver": "Driver",
|
||||
@@ -656,14 +657,14 @@
|
||||
"loader": "Loader"
|
||||
},
|
||||
"maneuverability": {
|
||||
"title": "Maneuverability"
|
||||
"title": "Mobilność "
|
||||
},
|
||||
"survivability": {
|
||||
"title": "Survivability"
|
||||
"title": "Przetrwanie"
|
||||
}
|
||||
},
|
||||
"compare": {
|
||||
"name": "Compare",
|
||||
"name": "Porównaj",
|
||||
"button": "Compare tanks",
|
||||
"description": "Compare tank statistics",
|
||||
"seo_description": "Compare tanks statistics and loadouts in World of Tanks Blitz",
|
||||
@@ -673,7 +674,7 @@
|
||||
"title": "Add tanks",
|
||||
"description": "Select tanks to add to comparison"
|
||||
},
|
||||
"clear": "Clear",
|
||||
"clear": "Wyczyść",
|
||||
"deltas": {
|
||||
"none": "No deltas",
|
||||
"percentage": "Percentage",
|
||||
@@ -686,17 +687,17 @@
|
||||
},
|
||||
"table": {
|
||||
"equipment": {
|
||||
"clear": "Clear",
|
||||
"clear": "Wyczyść",
|
||||
"apply_to_all": "Apply to all"
|
||||
},
|
||||
"skills": {
|
||||
"clear": "Clear",
|
||||
"clear": "Wyczyść",
|
||||
"maximize": "Maximize",
|
||||
"equalize": "Equalize"
|
||||
},
|
||||
"modules": {
|
||||
"stock": "Stock",
|
||||
"upgrade": "Upgrade"
|
||||
"stock": "Standardowy",
|
||||
"upgrade": "Ulepsz"
|
||||
},
|
||||
"provisions": {
|
||||
"clear": "Clear this tank",
|
||||
@@ -761,14 +762,14 @@
|
||||
"seo_description": "Track your stats in real time as you play World of Tanks Blitz",
|
||||
"search": {
|
||||
"lookup": "Look up a player to get started",
|
||||
"hint": "Search players...",
|
||||
"searching": "Searching...",
|
||||
"hint": "Szukaj graczy...",
|
||||
"searching": "Wyszukiwanie...",
|
||||
"no_results": "No players found"
|
||||
},
|
||||
"controls": {
|
||||
"title": "Tracking {name}",
|
||||
"subtitle": "Since {time}",
|
||||
"reset": "Reset",
|
||||
"reset": "Zresetuj",
|
||||
"change": "Change"
|
||||
},
|
||||
"no_cc": {
|
||||
@@ -792,7 +793,7 @@
|
||||
"description": "Rank Blitz tanks",
|
||||
"seo_description": "Explore tier lists ranking tanks from best to worst, based on player ratings and statistical performance in World of Tanks Blitz",
|
||||
"buttons": {
|
||||
"reset": "Reset",
|
||||
"reset": "Zresetuj",
|
||||
"share": "Share"
|
||||
}
|
||||
},
|
||||
@@ -828,7 +829,7 @@
|
||||
"success": {
|
||||
"title": "Copy URL",
|
||||
"info": "Generated the URL for {name}. The embed will start tracking as soon as the URL is pasted. Reset at any time by right-clicking on PC or long-pressing on mobile and then selecting \"Reset\".",
|
||||
"back": "Back",
|
||||
"back": "Powrót",
|
||||
"copy": "Copy URL"
|
||||
}
|
||||
},
|
||||
@@ -839,7 +840,7 @@
|
||||
},
|
||||
"customize": {
|
||||
"title": "Customize",
|
||||
"reset": "Reset",
|
||||
"reset": "Zresetuj",
|
||||
"description": "Bells and whistles of your embed"
|
||||
}
|
||||
},
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "Unaffiliated with Wargaming or any service",
|
||||
"about": {
|
||||
"title": "About",
|
||||
"credits": "Credits",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Patches"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"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}.",
|
||||
"fox": "A ágil raposa castanha salta por cima do cão preguiçoso."
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -41,7 +36,7 @@
|
||||
"development": "Development",
|
||||
"opentest": "TesteAberto",
|
||||
"preview": "Preview",
|
||||
"production": "Production"
|
||||
"production": "Produção"
|
||||
},
|
||||
"locales": {
|
||||
"en": "Inglês",
|
||||
@@ -187,11 +182,11 @@
|
||||
},
|
||||
"website": {
|
||||
"redirect": {
|
||||
"title": "301: moved permanently",
|
||||
"title": "301: movido permanentemente",
|
||||
"body": "This page has moved. Redirecting..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"title": "Configurações",
|
||||
"description": "Change BlitzKit settings",
|
||||
"dev_mode": "Modo de desenvolvimento",
|
||||
"auto_load_models": "Auto-load models",
|
||||
@@ -207,9 +202,9 @@
|
||||
"copied": "Copiado!"
|
||||
},
|
||||
"tank_search": {
|
||||
"select_dialog_title": "Search for tanks",
|
||||
"select_dialog_title": "Procura por tanque",
|
||||
"swap_dialog_title": "Swap tank",
|
||||
"clear_filters": "Clear filters",
|
||||
"clear_filters": "Limpar filtros",
|
||||
"login": "Login to use this",
|
||||
"search_bar_hint": "Procurar tanques...",
|
||||
"recent": "Visto recentemente",
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "Restaurar",
|
||||
"shuffle": "Shuffle",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "Não afiliado à Wargaming ou qualquer serviço",
|
||||
"about": {
|
||||
"title": "Sobre",
|
||||
"credits": "Créditos",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Atualizações"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "тест",
|
||||
"long": "Это длинная тестовая строка. Вы НИКОГДА не должны видеть её в пользовательском интерфейсе. Мой любимый фрукт — {fruit}, потому что это цвет {color}. Он мне так нравится, так что я скажу его 3 раза {fruit}! {fruit}! {fruit}! И ещё раз, это {color}, а не {not_color}.",
|
||||
"fox": "Съешь же ещё этих мягких французских булок, да выпей чаю."
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -38,10 +33,10 @@
|
||||
},
|
||||
"branches": {
|
||||
"beta": "Бета",
|
||||
"development": "Development",
|
||||
"development": "Разработка",
|
||||
"opentest": "Открытый тест",
|
||||
"preview": "Preview",
|
||||
"production": "Production"
|
||||
"preview": "Предпросмотр",
|
||||
"production": "Производство"
|
||||
},
|
||||
"locales": {
|
||||
"en": "Английский",
|
||||
@@ -194,7 +189,7 @@
|
||||
"title": "Настройки",
|
||||
"description": "Изменить настройки BlitzKit",
|
||||
"dev_mode": "Режим разработчика",
|
||||
"auto_load_models": "Auto-load models",
|
||||
"auto_load_models": "Автозагрузка моделей",
|
||||
"language": "Язык"
|
||||
},
|
||||
"common": {
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "Сброс",
|
||||
"shuffle": "Перемешать",
|
||||
@@ -413,7 +414,7 @@
|
||||
}
|
||||
},
|
||||
"sandbox": {
|
||||
"load_model": "Load model",
|
||||
"load_model": "Загрузить модель",
|
||||
"poses": {
|
||||
"hull_down": "За холмом",
|
||||
"face_hug": "В упор",
|
||||
@@ -574,7 +575,7 @@
|
||||
"dpm": "ДПМ",
|
||||
"dpmEffective": "Эффективность за 60с",
|
||||
"peekabooDpm": "Peekaboo DPM",
|
||||
"peekabooDpmInfo": "Damage per minute assuming you only fire after resetting camouflage (or the reload finishes, if it's slower) — at least 10 seconds between shots.",
|
||||
"peekabooDpmInfo": "Урон в минуту при условии, если вы сбросите камуфляж(или перезарядка окончена, если она медленнее) - не менее 10 секунд между выстрелами.",
|
||||
"shells": "Снарядов в барабане",
|
||||
"mostOptimalShellIndex": "Самый эффективный снаряд",
|
||||
"shellReloads": "Перезарядка",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "Не связан с Wargaming или иным сервисом",
|
||||
"about": {
|
||||
"title": "О сайте",
|
||||
"credits": "Авторы",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Патчи"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "тест",
|
||||
"long": "{color}{fruit}",
|
||||
"fox": "Швидка бура лисиця перестрибує через лінивого собаку."
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "Скинути",
|
||||
"shuffle": "Перемішати",
|
||||
@@ -364,7 +365,7 @@
|
||||
"title": "Partially reveal tank?",
|
||||
"description": "Reveals the tank without showing the name. This round will be considered incorrect and break your streak!",
|
||||
"cancel": "",
|
||||
"reveal": "Reveal"
|
||||
"reveal": "Рівень"
|
||||
},
|
||||
"clear": "Clear",
|
||||
"select_all": "Вибрати все",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "Unaffiliated with Wargaming or any service",
|
||||
"about": {
|
||||
"title": "About",
|
||||
"credits": "Credits",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "Patches"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"test": {
|
||||
"default": "测试",
|
||||
"long": "这是一个测试用长字符串。你绝对不会在用户界面中看见这些。我最喜欢的水果是{fruit}因为它的颜色是{color}的。我如此喜欢它,以至于我会把它的名字念3次!{fruit}!{fruit}!{fruit}!重申一次,它是{color}的而不是{not_color}的。",
|
||||
"fox": "褐色的狐狸迅速地跳过那只懒狗"
|
||||
},
|
||||
"common": {
|
||||
"name": "BlitzKit",
|
||||
"units": {
|
||||
@@ -307,6 +302,12 @@
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"credits": {
|
||||
"name": "Credits",
|
||||
"button": "View people",
|
||||
"description": "Contributors of BlitzKit",
|
||||
"seo_description": "BlitzKit is the work of many"
|
||||
},
|
||||
"playlist": {
|
||||
"reset": "重置",
|
||||
"shuffle": "换一批",
|
||||
@@ -922,7 +923,6 @@
|
||||
"copyright": "本网站与 Wargaming战游网 或任何服务无关",
|
||||
"about": {
|
||||
"title": "关于",
|
||||
"credits": "鸣谢",
|
||||
"discord": "Discord",
|
||||
"github": "GitHub",
|
||||
"patches": "补丁"
|
||||
|
||||
@@ -13,4 +13,5 @@ message Camouflage {
|
||||
I18nString name = 2;
|
||||
optional I18nString tank_name = 3;
|
||||
optional I18nString tank_name_full = 4;
|
||||
optional uint32 tank_id = 5;
|
||||
}
|
||||
@@ -5,7 +5,9 @@
|
||||
"discover-ids": "bun src/discoverIds/index.ts",
|
||||
"build-protos": "bun src/protos.ts",
|
||||
"record-performance": "bun src/recordPerformance/index.ts",
|
||||
"download-client": "bun src/downloadClient/index.ts"
|
||||
"download-client": "bun src/downloadClient/index.ts",
|
||||
"download-smart-dlc": "bun src/downloadSmartDLC/index.ts",
|
||||
"vfs": "bun src/vfs/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzkit/closed": "workspace:*",
|
||||
|
||||
@@ -9,6 +9,8 @@ import {
|
||||
} from "./constants";
|
||||
import { QuickGitHubRelease } from "./types";
|
||||
|
||||
const DEPOT_DOWNLOADER_RETRY_TIME = 30_000;
|
||||
|
||||
const provider = assertSecret(import.meta.env.CLIENT_PROVIDER);
|
||||
const source = assertSecret(import.meta.env.CLIENT_SOURCE);
|
||||
const dir = assertSecret(import.meta.env.CLIENT_DIR);
|
||||
@@ -43,11 +45,27 @@ if (provider === "steam") {
|
||||
const username = assertSecret(import.meta.env.STEAM_USERNAME);
|
||||
const password = assertSecret(import.meta.env.STEAM_PASSWORD);
|
||||
|
||||
await $`${DEPOT_DOWNLOADER_EXECUTABLE} -os ${
|
||||
platform
|
||||
} -app ${id} -username ${username} -password ${
|
||||
password
|
||||
} -dir ${dir} -max-downloads ${DEPOT_DOWNLOADER_MAX_DOWNLOADS}`;
|
||||
while (true) {
|
||||
const result = await $`${
|
||||
DEPOT_DOWNLOADER_EXECUTABLE
|
||||
} -os ${platform} -app ${id} -username ${
|
||||
username
|
||||
} -password ${password} -dir ${dir} -max-downloads ${
|
||||
DEPOT_DOWNLOADER_MAX_DOWNLOADS
|
||||
}`.nothrow();
|
||||
|
||||
if (result.exitCode === 0) {
|
||||
console.log("Client downloaded successfully!");
|
||||
break;
|
||||
}
|
||||
|
||||
console.error(
|
||||
`DepotDownloader failed (exit ${result.exitCode}). Retrying in ${DEPOT_DOWNLOADER_RETRY_TIME / 1000} seconds...`,
|
||||
);
|
||||
await new Promise((resolve) =>
|
||||
setTimeout(resolve, DEPOT_DOWNLOADER_RETRY_TIME),
|
||||
);
|
||||
}
|
||||
} else if (provider === "zip") {
|
||||
const url = assertSecret(import.meta.env.CLIENT_SOURCE);
|
||||
|
||||
|
||||
@@ -2,9 +2,16 @@ import { dvp } from "@blitzkit/closed";
|
||||
import { assertSecret } from "@blitzkit/core";
|
||||
import { mkdir, writeFile } from "fs/promises";
|
||||
import { parse as parsePath } from "path";
|
||||
import ProgressBar from "progress";
|
||||
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
||||
import { PATCHES_ROOT, vfs } from "./buildAssets/constants";
|
||||
import { RegionsPublish } from "../types/regionsPublish";
|
||||
import { vfs } from "../vfs/vfs";
|
||||
|
||||
const CLIENT_DIR = assertSecret(import.meta.env.CLIENT_DIR);
|
||||
|
||||
const regionsPublish = await vfs.yaml<RegionsPublish>(
|
||||
"Data/regions_publish.yaml",
|
||||
);
|
||||
const [smartDlcUrl] = regionsPublish.Common.smartDlcUrls;
|
||||
|
||||
const versionTextFile = await vfs.text(`Data/version.txt`);
|
||||
const currentVersion = versionTextFile
|
||||
@@ -18,9 +25,7 @@ console.log(`Installing patches for ${currentVersion}...`);
|
||||
let patchIndex = 1;
|
||||
while (true) {
|
||||
const response = await fetch(
|
||||
`${assertSecret(
|
||||
import.meta.env.WOTB_DLC_CDN,
|
||||
)}/dlc/s${currentVersion}_${patchIndex}.yaml`,
|
||||
`${smartDlcUrl}/s${currentVersion}_${patchIndex}.yaml`,
|
||||
);
|
||||
|
||||
console.log(patchIndex, response.status);
|
||||
@@ -30,51 +35,34 @@ while (true) {
|
||||
console.log(`Applying patch ${patchIndex}...`);
|
||||
|
||||
const data = parseYaml(await response.text());
|
||||
const dvpm = await fetch(
|
||||
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${data.dx11}`,
|
||||
).then((response) => response.arrayBuffer());
|
||||
const dvpm = await fetch(`${smartDlcUrl}/${data.dx11}`).then((response) =>
|
||||
response.arrayBuffer(),
|
||||
);
|
||||
const dvpd = await fetch(
|
||||
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${data.dx11.replace(
|
||||
".dvpm",
|
||||
".dvpd",
|
||||
)}`,
|
||||
`${smartDlcUrl}/${data.dx11.replace(".dvpm", ".dvpd")}`,
|
||||
).then((response) => response.arrayBuffer());
|
||||
const files = await dvp(dvpm, dvpd);
|
||||
const bar = new ProgressBar(
|
||||
`Patching ${files.length} files :bar`,
|
||||
files.length,
|
||||
);
|
||||
|
||||
for (const { path, data } of files) {
|
||||
console.log(`Patching "${path}"...`);
|
||||
|
||||
const { dir } = parsePath(path);
|
||||
|
||||
try {
|
||||
await mkdir(`${PATCHES_ROOT}/Data/${dir}`, { recursive: true });
|
||||
} catch (error) {
|
||||
console.warn(`Failed to make directory "${dir}"`);
|
||||
}
|
||||
await mkdir(`${CLIENT_DIR}/Data/${dir}`, { recursive: true });
|
||||
|
||||
const buffer = Buffer.from(data);
|
||||
|
||||
await writeFile(`${PATCHES_ROOT}/Data/${path}`, new Uint8Array(buffer));
|
||||
|
||||
bar.tick();
|
||||
await writeFile(`${CLIENT_DIR}/Data/${path}`, new Uint8Array(buffer));
|
||||
}
|
||||
|
||||
console.log("patches done for patch");
|
||||
|
||||
if ("dynamicContentLocalizationsDir" in data) {
|
||||
console.log(
|
||||
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${
|
||||
data.dynamicContentLocalizationsDir
|
||||
}/en.yaml`,
|
||||
`${smartDlcUrl}/${data.dynamicContentLocalizationsDir}/en.yaml`,
|
||||
);
|
||||
const localizationsResponse = await fetch(
|
||||
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${
|
||||
data.dynamicContentLocalizationsDir
|
||||
}/en.yaml`,
|
||||
`${smartDlcUrl}/${data.dynamicContentLocalizationsDir}/en.yaml`,
|
||||
);
|
||||
console.log("fetched");
|
||||
const newStrings = parseYaml(await localizationsResponse.text());
|
||||
@@ -86,10 +74,10 @@ while (true) {
|
||||
const patchedContent = stringifyYaml(patchedStrings);
|
||||
console.log("stringified");
|
||||
|
||||
await mkdir(`${PATCHES_ROOT}/Data/Strings`, { recursive: true });
|
||||
await mkdir(`${CLIENT_DIR}/Data/Strings`, { recursive: true });
|
||||
console.log("mkdir");
|
||||
await writeFile(
|
||||
`${PATCHES_ROOT}/Data/Strings/en.yaml`,
|
||||
`${CLIENT_DIR}/Data/Strings/en.yaml`,
|
||||
new Uint8Array(Buffer.from(patchedContent)),
|
||||
);
|
||||
console.log("file");
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface RegionsPublish {
|
||||
Common: Common;
|
||||
}
|
||||
|
||||
interface Common {
|
||||
smartDlcUrls: string[];
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { vfs } from "./vfs";
|
||||
|
||||
const command = Bun.argv[2];
|
||||
const path = Bun.argv[3];
|
||||
|
||||
if (!path) {
|
||||
console.error("Gimme a path to assess dumb ass");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (command === "cat") {
|
||||
const content = await vfs.file(path);
|
||||
await Bun.write(Bun.stdout, content);
|
||||
} else if (command === "ls") {
|
||||
const files = await vfs.dir(path);
|
||||
|
||||
for (const file of files) {
|
||||
console.log(file);
|
||||
}
|
||||
} else if (command === "yaml") {
|
||||
const content = await vfs.yaml(path);
|
||||
await Bun.write(Bun.stdout, JSON.stringify(content, null, 2));
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { assertSecret } from "@blitzkit/core";
|
||||
import { LocalVFS } from "@blitzkit/core/src/blitzkit/vfs/local";
|
||||
|
||||
export const vfs = new LocalVFS(assertSecret(import.meta.env.CLIENT_DIR));
|
||||
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -1,38 +0,0 @@
|
||||
---
|
||||
import { tankIcon } from "@blitzkit/core";
|
||||
import { Flex, Heading, Link, Strong, Text } from "@radix-ui/themes";
|
||||
---
|
||||
|
||||
<Flex justify="center" px="4">
|
||||
<Link
|
||||
color="gray"
|
||||
highContrast
|
||||
style={{ display: "content" }}
|
||||
href="/docs/guides/christmas-2025"
|
||||
underline="none"
|
||||
>
|
||||
<Flex
|
||||
mt="3"
|
||||
px="5"
|
||||
py="4"
|
||||
style={{
|
||||
borderRadius: "var(--radius-3)",
|
||||
backgroundImage: "url(https://i.imgur.com/LRYmSkg.png)",
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
boxSizing: "border-box",
|
||||
}}
|
||||
align="center"
|
||||
gap="5"
|
||||
>
|
||||
<img src={tankIcon(25169)} style={{ height: "min(15vw, 5rem)" }} />
|
||||
|
||||
<Flex direction="column">
|
||||
<Heading size={{ initial: "4", sm: "6" }}>Christmas 2025</Heading>
|
||||
<Text size={{ initial: "2", sm: "3" }}>
|
||||
Win the <Strong>GSOR the TANK</Strong> and more!
|
||||
</Text>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Link>
|
||||
</Flex>
|
||||
@@ -0,0 +1,36 @@
|
||||
.outer {
|
||||
padding: 0 var(--space-4);
|
||||
margin-top: var(--space-3);
|
||||
|
||||
img {
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: relative;
|
||||
|
||||
background: linear-gradient(var(--pink-3), var(--purple-2));
|
||||
box-shadow: var(--shadow-3);
|
||||
|
||||
max-width: 40rem;
|
||||
|
||||
padding: var(--space-5);
|
||||
border-radius: var(--radius-4);
|
||||
|
||||
.important {
|
||||
position: absolute;
|
||||
|
||||
top: 0;
|
||||
left: 50%;
|
||||
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
background-color: inherit;
|
||||
|
||||
padding: var(--space-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { HeartFilledIcon } from "@radix-ui/react-icons";
|
||||
import { Button, Em, Flex, Strong, Text } from "@radix-ui/themes";
|
||||
import { donationTiers } from "../../config/donations";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
export function Beg() {
|
||||
return (
|
||||
<Flex align="center" gap="4" direction="column" className={styles.outer}>
|
||||
<Text size="3" className={styles.important}>
|
||||
<Flex gap="2" align="center">
|
||||
<img src="https://github.com/tresabhi.png" />
|
||||
<Em>We need your attention</Em>
|
||||
</Flex>
|
||||
</Text>
|
||||
|
||||
<Flex direction="column" className={styles.center} gap="4">
|
||||
<Flex direction="column" gap="3">
|
||||
<Text color="tomato">
|
||||
We can no longer keep BlitzKit sustainable for <Strong>free</Strong>
|
||||
.
|
||||
</Text>
|
||||
|
||||
<Text>
|
||||
We want to add tank modules, player statistics, rebalancing patch
|
||||
notes, bring back the Discord bot, and more.
|
||||
</Text>
|
||||
|
||||
<Text>
|
||||
But paying out of pocket makes that impossible. We are an earnest
|
||||
non-profit, so consider donating to make the above possible. 100% of
|
||||
your money goes back into BlitzKit.
|
||||
</Text>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="3">
|
||||
{donationTiers.map(({ name, value, link }) => (
|
||||
<a target="_blank" key={name} href={link}>
|
||||
<Button size="3" color="crimson">
|
||||
{value === null && <HeartFilledIcon />}
|
||||
{value === null ? "Custom" : `$${value}`}
|
||||
</Button>
|
||||
</a>
|
||||
))}
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
@@ -16,6 +16,11 @@
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
&[data-disabled="true"] {
|
||||
cursor: default;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&[data-size="minor"] {
|
||||
font-size: 0.7em;
|
||||
padding: var(--space-2) var(--space-3);
|
||||
@@ -81,5 +86,9 @@
|
||||
&[data-variant="surface"],
|
||||
&[data-variant="outline"] {
|
||||
outline: var(--space-1) solid var(--accent-6);
|
||||
|
||||
&[data-high-contrast="true"] {
|
||||
outline: var(--space-1) solid var(--accent-11);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ export interface ButtonProps extends ComponentProps<"button"> {
|
||||
radius?: `${1 | 2 | 3}` | "max";
|
||||
variant?: "solid" | "surface" | "soft" | "inverted" | "ghost" | "outline";
|
||||
size?: "regular" | "minor" | "major";
|
||||
highContrast?: boolean; // TODO: add high contrast
|
||||
highContrast?: boolean;
|
||||
|
||||
listChild?: boolean;
|
||||
parentListChild?: boolean;
|
||||
@@ -39,6 +39,8 @@ export function Button({
|
||||
|
||||
listChild,
|
||||
parentListChild,
|
||||
disabled,
|
||||
highContrast,
|
||||
...props
|
||||
}: ButtonProps) {
|
||||
return (
|
||||
@@ -51,6 +53,9 @@ export function Button({
|
||||
data-size={size}
|
||||
data-list-child={listChild}
|
||||
data-parent-list-child={parentListChild}
|
||||
data-high-contrast={highContrast}
|
||||
data-disabled={disabled}
|
||||
disabled={disabled}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
.checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
|
||||
.control {
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
|
||||
margin: 0;
|
||||
|
||||
accent-color: var(--accent-9);
|
||||
}
|
||||
|
||||
&,
|
||||
* {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { useId, type ReactNode } from "react";
|
||||
import { Text } from "../Text";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
export interface CheckboxProps {
|
||||
checked: boolean;
|
||||
onCheckedChange(checked: boolean): void;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export function Checkbox({
|
||||
checked,
|
||||
onCheckedChange,
|
||||
children,
|
||||
}: CheckboxProps) {
|
||||
const id = useId();
|
||||
|
||||
return (
|
||||
<div className={styles.checkbox}>
|
||||
<input
|
||||
className={styles.control}
|
||||
type="checkbox"
|
||||
id={id}
|
||||
checked={checked}
|
||||
onChange={(event) => onCheckedChange(event.target.checked)}
|
||||
/>
|
||||
|
||||
{children && (
|
||||
<label htmlFor={id}>
|
||||
<Text lowContrast>{children}</Text>
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
import { alias, availableProvisions, permanentSkills } from "@blitzkit/core";
|
||||
import {
|
||||
alias,
|
||||
availableProvisions,
|
||||
MAX_SKILL_LEVEL,
|
||||
permanentSkills,
|
||||
} from "@blitzkit/core";
|
||||
import { checkConsumableProvisionInclusivity } from "@blitzkit/core/src/blitzkit/checkConsumableProvisionInclusivity";
|
||||
import { ComponentPlaceholderIcon } from "@radix-ui/react-icons";
|
||||
import {
|
||||
@@ -153,7 +158,7 @@ export function CompareTable({ stats }: CompareTableProps) {
|
||||
onClick={() => {
|
||||
CompareEphemeral.mutate((draft) => {
|
||||
Object.keys(draft.crewSkills).forEach((skill) => {
|
||||
draft.crewSkills[skill] = 7;
|
||||
draft.crewSkills[skill] = MAX_SKILL_LEVEL;
|
||||
});
|
||||
});
|
||||
}}
|
||||
|
||||
@@ -3,9 +3,9 @@ import { useEffect, useState, type ReactNode } from "react";
|
||||
import type { MaybeSkeletonComponentProps } from "../types/maybeSkeletonComponentProps";
|
||||
import { InlineSkeleton } from "./InlineSkeleton";
|
||||
|
||||
const TIME = 1764898200 * 1000;
|
||||
const TIME = 1792598400 * 1000;
|
||||
|
||||
export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
export function Countdown({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
const [timeLeft, setTimeLeft] = useState<number>(TIME - Date.now());
|
||||
|
||||
useEffect(() => {
|
||||
@@ -31,14 +31,14 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
|
||||
string = (
|
||||
<>
|
||||
in{" "}
|
||||
revealed in{" "}
|
||||
<Code highContrast>
|
||||
{hours}h {minutes}m {seconds}s
|
||||
</Code>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
string = "has ended. Come again later!";
|
||||
string = "have been revealed.";
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -47,7 +47,7 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
color="gray"
|
||||
highContrast
|
||||
style={{ display: "content" }}
|
||||
href="https://discord.gg/njQdBhNS?event=1446208951136813117"
|
||||
href="https://preview.blitzkit.app/tanks"
|
||||
underline="none"
|
||||
>
|
||||
<Flex
|
||||
@@ -56,17 +56,17 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
py="4"
|
||||
style={{
|
||||
borderRadius: "var(--radius-3)",
|
||||
backgroundImage: "url(https://i.imgur.com/LRYmSkg.png)",
|
||||
backgroundImage: "url(https://i.imgur.com/xgngxoy.png)",
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
boxSizing: "border-box",
|
||||
boxShadow: "0 0 var(--space-7) var(--blue-a5)",
|
||||
boxShadow: "0 0 var(--space-7) var(--white-a2)",
|
||||
}}
|
||||
align="center"
|
||||
gap="5"
|
||||
>
|
||||
<img
|
||||
src="https://i.imgur.com/mvmJQgB.png"
|
||||
src="https://i.imgur.com/kXV3r3P.png"
|
||||
style={{
|
||||
height: "min(15vw, 5rem)",
|
||||
filter: "drop-shadow(0.5rem 0.5rem 1rem #00000080)",
|
||||
@@ -75,11 +75,11 @@ export function Giveaway({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
|
||||
<Flex direction="column">
|
||||
<Heading size={{ initial: "4", sm: "6" }}>
|
||||
Music Box giveaway {!skeleton && string}{" "}
|
||||
Tier XIs {!skeleton && string}{" "}
|
||||
{skeleton && <InlineSkeleton width="10rem" />}
|
||||
</Heading>
|
||||
<Text size={{ initial: "2", sm: "3" }}>
|
||||
Join the BlitzKit Discord server event
|
||||
Get ready to go to the Tankopedia!
|
||||
</Text>
|
||||
</Flex>
|
||||
</Flex>
|
||||
@@ -0,0 +1,135 @@
|
||||
---
|
||||
import { Grid, Text } from "@radix-ui/themes";
|
||||
import { credits } from "../config/credits";
|
||||
import { getStrings } from "../core/i18n/getStrings";
|
||||
|
||||
interface Props {
|
||||
locale: string;
|
||||
}
|
||||
|
||||
const { locale } = Astro.props;
|
||||
|
||||
const strings = getStrings(locale);
|
||||
---
|
||||
|
||||
<style>
|
||||
.credits {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
padding: var(--space-4);
|
||||
|
||||
.inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
|
||||
width: 100%;
|
||||
max-width: 80rem;
|
||||
|
||||
.list {
|
||||
gap: var(--space-5);
|
||||
|
||||
.link {
|
||||
display: contents;
|
||||
|
||||
.person {
|
||||
--profile-size: 5rem;
|
||||
|
||||
position: relative;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
padding: var(--space-4);
|
||||
padding-top: 0;
|
||||
margin-top: calc(var(--profile-size) / 2);
|
||||
gap: var(--space-1);
|
||||
|
||||
box-shadow: var(--shadow-3);
|
||||
border-radius: var(--radius-3);
|
||||
|
||||
.contain {
|
||||
border-radius: inherit;
|
||||
|
||||
position: absolute;
|
||||
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
.hint {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
|
||||
filter: saturate(20) brightness(0.125) blur(4rem);
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 50%;
|
||||
|
||||
position: relative;
|
||||
|
||||
margin-top: calc(var(--profile-size) / -2);
|
||||
|
||||
object-fit: cover;
|
||||
width: var(--profile-size);
|
||||
height: var(--profile-size);
|
||||
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="credits">
|
||||
<div class="inner">
|
||||
<Grid
|
||||
className="list"
|
||||
py="4"
|
||||
columns="repeat(auto-fill, minmax(16rem, 1fr))"
|
||||
flow="dense"
|
||||
gap="4"
|
||||
gapY="8"
|
||||
>
|
||||
{
|
||||
credits.map((person) => (
|
||||
<a target="_blank" href={person.url} class="link">
|
||||
<div class="person">
|
||||
<div class="contain">
|
||||
<div
|
||||
class="hint"
|
||||
style={`background-image: url(${person.image})`}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<img src={person.image} />
|
||||
|
||||
<Text weight="medium" className="text" color="gray" highContrast>
|
||||
{person.name}
|
||||
</Text>
|
||||
<Text className="text" color="gray" wrap="pretty">
|
||||
{person.description}
|
||||
</Text>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</Grid>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1,9 @@
|
||||
import { alias, permanentSkills, romanize } from "@blitzkit/core";
|
||||
import {
|
||||
alias,
|
||||
MAX_SKILL_LEVEL,
|
||||
permanentSkills,
|
||||
romanize,
|
||||
} from "@blitzkit/core";
|
||||
import { Flex } from "@radix-ui/themes";
|
||||
import { api } from "../api/dynamic";
|
||||
import { GenericTankComponentButton } from "./ModuleButtons/GenericTankComponentButton";
|
||||
@@ -34,10 +39,10 @@ export function CrewSkillManager({
|
||||
const draft = { ...skillLevels };
|
||||
|
||||
if (event.shiftKey) {
|
||||
draft[skill] = draft[skill] === 0 ? 7 : 0;
|
||||
draft[skill] = draft[skill] === 0 ? MAX_SKILL_LEVEL : 0;
|
||||
} else {
|
||||
draft[skill] = level - 1;
|
||||
if (draft[skill] < 0) draft[skill] = 7;
|
||||
if (draft[skill] < 0) draft[skill] = MAX_SKILL_LEVEL;
|
||||
}
|
||||
|
||||
onChange(draft);
|
||||
|
||||
@@ -42,9 +42,9 @@ const strings = await api.strings(locale);
|
||||
}}
|
||||
>
|
||||
<Heading>BlitzKit</Heading>
|
||||
<Text color="gray">{strings.website.footer.motto}</Text>
|
||||
<Text size="1" color="gray">
|
||||
{strings.website.footer.copyright}
|
||||
<Text size="2" color="gray">{strings.website.footer.motto}</Text>
|
||||
<Text size="2" color="gray">
|
||||
{strings.website.footer.association}
|
||||
</Text>
|
||||
|
||||
<Box mt="2">
|
||||
@@ -83,9 +83,6 @@ const strings = await api.strings(locale);
|
||||
sm: "start",
|
||||
}}
|
||||
>
|
||||
<LinkI18n {locale} href="/docs/about/credits" color="gray">
|
||||
{strings.website.footer.about.credits}
|
||||
</LinkI18n>
|
||||
<Link
|
||||
href="https://discord.gg/nDt7AjGJQH"
|
||||
target="_blank"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { alias, SEARCH_KEYS, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import { alias, romanize, SEARCH_KEYS } from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n";
|
||||
import { TankDefinition } from "@blitzkit/protos";
|
||||
import {
|
||||
@@ -163,7 +163,7 @@ export function Guesser() {
|
||||
justify="center"
|
||||
>
|
||||
<Icon width="1em" height="1em" />
|
||||
{TIER_ROMAN_NUMERALS[result.tier]}
|
||||
{romanize(result.tier)}
|
||||
</Flex>
|
||||
}
|
||||
/>
|
||||
@@ -215,7 +215,7 @@ export function Guesser() {
|
||||
}}
|
||||
>
|
||||
{literals(strings.website.tools.guess.tier, {
|
||||
tier: TIER_ROMAN_NUMERALS[tier],
|
||||
tier: romanize(tier),
|
||||
})}
|
||||
</DropdownMenu.CheckboxItem>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ import { TankopediaDisplay } from "../stores/tankopediaPersistent/constants";
|
||||
|
||||
const ANGLE = degToRad(15);
|
||||
const REVEAL_ANIMATION_TIME = 3;
|
||||
const TRANSITION_ANIMATION_TIME = 0.5;
|
||||
export const TRANSITION_ANIMATION_TIME = 0.5;
|
||||
|
||||
const LIGHTS_COUNT = 3;
|
||||
const THETA_OFFSET = degToRad(180 - 45);
|
||||
@@ -46,11 +46,17 @@ export function Lighting({ hasPbr }: Props) {
|
||||
|
||||
const highGraphics = TankopediaPersistent.use((state) => state.highGraphics);
|
||||
const requestedDisplay = Tankopedia.use((state) => state.requestedDisplay);
|
||||
const revealed = Tankopedia.use((state) => state.revealed);
|
||||
const skinPending = Tankopedia.use(
|
||||
(state) => state.loadedSkin !== state.skin,
|
||||
);
|
||||
|
||||
const animationTime = useRef(REVEAL_ANIMATION_TIME);
|
||||
const t0 = useRef(performance.now() / 1e3 - animationTime.current);
|
||||
const holding = useRef(false);
|
||||
|
||||
const isRevealing = useRef(true);
|
||||
const isFirstReveal = useRef(true);
|
||||
|
||||
const [animate, setAnimate] = useState(true);
|
||||
|
||||
@@ -71,6 +77,37 @@ export function Lighting({ hasPbr }: Props) {
|
||||
setAnimate(true);
|
||||
}, [requestedDisplay]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isFirstReveal.current) {
|
||||
isFirstReveal.current = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!revealed) {
|
||||
animationTime.current = TRANSITION_ANIMATION_TIME;
|
||||
t0.current = performance.now() / 1e3;
|
||||
holding.current = true;
|
||||
} else if (holding.current) {
|
||||
animationTime.current = REVEAL_ANIMATION_TIME;
|
||||
t0.current = performance.now() / 1e3 - animationTime.current;
|
||||
holding.current = false;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
setAnimate(true);
|
||||
invalidate();
|
||||
}, [revealed]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!skinPending) return;
|
||||
|
||||
animationTime.current = TRANSITION_ANIMATION_TIME;
|
||||
t0.current = performance.now() / 1e3;
|
||||
|
||||
setAnimate(true);
|
||||
}, [skinPending]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ContactShadows
|
||||
@@ -90,6 +127,7 @@ export function Lighting({ hasPbr }: Props) {
|
||||
hasPbr={hasPbr}
|
||||
t0={t0}
|
||||
animationTime={animationTime}
|
||||
holding={holding}
|
||||
wrapper={wrapper}
|
||||
stop={() => {
|
||||
setAnimate(false);
|
||||
@@ -145,11 +183,19 @@ interface AnimatorProps {
|
||||
|
||||
t0: RefObject<number>;
|
||||
animationTime: RefObject<number>;
|
||||
holding: RefObject<boolean>;
|
||||
wrapper: RefObject<Group | null>;
|
||||
hasPbr: boolean;
|
||||
}
|
||||
|
||||
function Animator({ stop, t0, animationTime, wrapper, hasPbr }: AnimatorProps) {
|
||||
function Animator({
|
||||
stop,
|
||||
t0,
|
||||
animationTime,
|
||||
holding,
|
||||
wrapper,
|
||||
hasPbr,
|
||||
}: AnimatorProps) {
|
||||
const requestedDisplay = Tankopedia.use((state) => state.requestedDisplay);
|
||||
const display = Tankopedia.use((state) => state.display);
|
||||
|
||||
@@ -176,7 +222,7 @@ function Animator({ stop, t0, animationTime, wrapper, hasPbr }: AnimatorProps) {
|
||||
|
||||
useFrame(({ invalidate }) => {
|
||||
const dt = performance.now() / 1e3 - t0.current;
|
||||
const x = clamp(dt / animationTime.current, 0, 2);
|
||||
const x = clamp(dt / animationTime.current, 0, holding.current ? 1 : 2);
|
||||
|
||||
if (x === 2) {
|
||||
apply(1);
|
||||
@@ -188,6 +234,9 @@ function Animator({ stop, t0, animationTime, wrapper, hasPbr }: AnimatorProps) {
|
||||
const t = (0.5 * Math.sin(Math.PI * (x + 0.5)) + 0.5) ** 2;
|
||||
|
||||
apply(t);
|
||||
|
||||
if (holding.current && x === 1) return;
|
||||
|
||||
invalidate();
|
||||
|
||||
if (x >= 1 && Tankopedia.state.display !== requestedDisplay) {
|
||||
@@ -195,6 +244,12 @@ function Animator({ stop, t0, animationTime, wrapper, hasPbr }: AnimatorProps) {
|
||||
draft.display = requestedDisplay;
|
||||
});
|
||||
}
|
||||
|
||||
if (x >= 1 && Tankopedia.state.skin !== Tankopedia.state.loadedSkin) {
|
||||
Tankopedia.mutate((draft) => {
|
||||
draft.skin = draft.loadedSkin;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return null;
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
import { Link, Table } from '@radix-ui/themes';
|
||||
import MarkdownToJSX from 'markdown-to-jsx';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { docImageUrl, isExternalImage } from '../core/blitzkit/docImages';
|
||||
|
||||
interface MarkdownProps {
|
||||
children: string;
|
||||
}
|
||||
|
||||
function Image(props: ComponentProps<'img'>) {
|
||||
return <img style={{ maxWidth: '100%' }} {...props} />;
|
||||
function Image({ src, ...props }: ComponentProps<'img'>) {
|
||||
return (
|
||||
<img
|
||||
style={{ maxWidth: '100%' }}
|
||||
src={src && isExternalImage(src) ? docImageUrl(src) : src}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function Markdown({ children }: MarkdownProps) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import { romanize } from "@blitzkit/core";
|
||||
import type {
|
||||
EngineDefinition,
|
||||
GunDefinition,
|
||||
@@ -42,7 +42,7 @@ export function ModuleManager({
|
||||
<Flex gap="1" wrap="wrap">
|
||||
<ModuleButton
|
||||
module="turret"
|
||||
discriminator={TIER_ROMAN_NUMERALS[modules.turret.tier]}
|
||||
discriminator={romanize(modules.turret.tier)}
|
||||
onClick={() => setTurretMenuOpen(true)}
|
||||
/>
|
||||
|
||||
@@ -71,7 +71,7 @@ export function ModuleManager({
|
||||
<ModuleButton
|
||||
variant="ghost"
|
||||
module="turret"
|
||||
discriminator={TIER_ROMAN_NUMERALS[turret.tier]}
|
||||
discriminator={romanize(turret.tier)}
|
||||
/>{" "}
|
||||
{unwrap(turret.name!)}
|
||||
</DropdownMenu.RadioItem>
|
||||
@@ -83,7 +83,7 @@ export function ModuleManager({
|
||||
|
||||
<ModuleButton
|
||||
module="gun"
|
||||
discriminator={TIER_ROMAN_NUMERALS[modules.gun.tier]}
|
||||
discriminator={romanize(modules.gun.tier)}
|
||||
onClick={() => setGunMenuOpen(true)}
|
||||
/>
|
||||
|
||||
@@ -111,7 +111,7 @@ export function ModuleManager({
|
||||
<ModuleButton
|
||||
variant="ghost"
|
||||
module="gun"
|
||||
discriminator={TIER_ROMAN_NUMERALS[gun.tier]}
|
||||
discriminator={romanize(gun.tier)}
|
||||
/>{" "}
|
||||
{unwrap(gun.name!)}
|
||||
</DropdownMenu.RadioItem>
|
||||
@@ -123,7 +123,7 @@ export function ModuleManager({
|
||||
|
||||
<ModuleButton
|
||||
module="engine"
|
||||
discriminator={TIER_ROMAN_NUMERALS[modules.engine.tier]}
|
||||
discriminator={romanize(modules.engine.tier)}
|
||||
onClick={() => setEngineMenuOpen(true)}
|
||||
/>
|
||||
|
||||
@@ -150,7 +150,7 @@ export function ModuleManager({
|
||||
<ModuleButton
|
||||
variant="ghost"
|
||||
module="engine"
|
||||
discriminator={TIER_ROMAN_NUMERALS[engine.tier]}
|
||||
discriminator={romanize(engine.tier)}
|
||||
/>{" "}
|
||||
{unwrap(engine.name!)}
|
||||
</DropdownMenu.RadioItem>
|
||||
@@ -162,7 +162,7 @@ export function ModuleManager({
|
||||
|
||||
<ModuleButton
|
||||
module="chassis"
|
||||
discriminator={TIER_ROMAN_NUMERALS[modules.track.tier]}
|
||||
discriminator={romanize(modules.track.tier)}
|
||||
onClick={() => setTrackMenuOpen(true)}
|
||||
/>
|
||||
|
||||
@@ -189,7 +189,7 @@ export function ModuleManager({
|
||||
<ModuleButton
|
||||
variant="ghost"
|
||||
module="chassis"
|
||||
discriminator={TIER_ROMAN_NUMERALS[track.tier]}
|
||||
discriminator={romanize(track.tier)}
|
||||
/>{" "}
|
||||
{unwrap(track.name!)}
|
||||
</DropdownMenu.RadioItem>
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
GearIcon,
|
||||
HamburgerMenuIcon,
|
||||
} from "@radix-ui/react-icons";
|
||||
import { Box, Code, Flex, IconButton, Link } from "@radix-ui/themes";
|
||||
import { Box, Code, Flex, Grid, IconButton, Link } from "@radix-ui/themes";
|
||||
import { resolveBranchName } from "../core/blitzkit/branches";
|
||||
import { getStrings } from "../core/i18n/getStrings";
|
||||
import { Var } from "../core/radix/var";
|
||||
@@ -103,7 +103,7 @@ const strings = getStrings(locale);
|
||||
<Flex
|
||||
className="content"
|
||||
width="100%"
|
||||
p={{ initial: "4", sm: "3" }}
|
||||
p="3"
|
||||
direction="column"
|
||||
align="center"
|
||||
>
|
||||
@@ -131,42 +131,6 @@ const strings = getStrings(locale);
|
||||
|
||||
<Box flexGrow="1" />
|
||||
|
||||
<Flex
|
||||
align="center"
|
||||
gap={{ initial: "3", md: "6" }}
|
||||
display={{ initial: "none", sm: "flex" }}
|
||||
justify="center"
|
||||
className="tools"
|
||||
>
|
||||
{
|
||||
toolsFiltered.map(([id, tool]) => {
|
||||
const selected = Astro.url.pathname.includes(
|
||||
`/${tool.path ?? id}`,
|
||||
);
|
||||
const toolStrings =
|
||||
strings.website.tools[
|
||||
(tool.strings ?? id) as keyof typeof strings.website.tools
|
||||
];
|
||||
|
||||
return (
|
||||
<LinkI18n
|
||||
{locale}
|
||||
weight={selected ? "medium" : "regular"}
|
||||
color="gray"
|
||||
highContrast={selected}
|
||||
size={{ initial: "1", md: "2" }}
|
||||
href={`/${tool.path ?? id}`}
|
||||
underline="hover"
|
||||
>
|
||||
{toolStrings.name}
|
||||
</LinkI18n>
|
||||
);
|
||||
})
|
||||
}
|
||||
</Flex>
|
||||
|
||||
<Box flexGrow="1" />
|
||||
|
||||
<Flex align="center" gap="4">
|
||||
<Link
|
||||
style={{ display: "flex", alignContent: "center" }}
|
||||
@@ -190,7 +154,7 @@ const strings = getStrings(locale);
|
||||
|
||||
<NavbarAccount {locale} client:idle />
|
||||
|
||||
<Flex align="center" display={{ initial: "flex", sm: "none" }}>
|
||||
<Flex align="center">
|
||||
<IconButton variant="ghost" color="gray" className="hamburger">
|
||||
<Cross1Icon data-expanded />
|
||||
<HamburgerMenuIcon data-closed />
|
||||
@@ -199,11 +163,10 @@ const strings = getStrings(locale);
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<Flex
|
||||
direction="column"
|
||||
<Grid
|
||||
data-expanded
|
||||
columns="repeat(auto-fill, minmax(30rem, 1fr))"
|
||||
gap="3"
|
||||
display={{ initial: "flex", sm: "none" }}
|
||||
>
|
||||
{
|
||||
toolsFiltered.map(([id, tool]) => {
|
||||
@@ -228,7 +191,7 @@ const strings = getStrings(locale);
|
||||
}}
|
||||
>
|
||||
<Flex
|
||||
py="4"
|
||||
p="6"
|
||||
justify="end"
|
||||
flexGrow="1"
|
||||
style={{
|
||||
@@ -242,7 +205,7 @@ const strings = getStrings(locale);
|
||||
);
|
||||
})
|
||||
}
|
||||
</Flex>
|
||||
</Grid>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export function RecentlyViewedTanks() {
|
||||
const strings = useStrings();
|
||||
const by = TankSort.use((state) => state.by);
|
||||
|
||||
if (recentlyViewed.length === 0 || by !== "meta.none" || hasFilters) {
|
||||
if (recentlyViewed.length === 0 || by !== null || hasFilters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
.scroller {
|
||||
--scroller-curtain-color: var(--gray-1);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
|
||||
position: relative;
|
||||
|
||||
.content {
|
||||
overflow: auto;
|
||||
|
||||
padding-bottom: var(--space-4);
|
||||
|
||||
transition: scrollbar-color var(--duration-brief);
|
||||
scrollbar-color: transparent transparent;
|
||||
|
||||
&:hover {
|
||||
scrollbar-color: var(--gray-7) var(--gray-3);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus-within {
|
||||
.bar-wrapper {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-orientation="horizontal"] {
|
||||
.curtain {
|
||||
width: min(25%, var(--space-7));
|
||||
height: calc(100% - var(--space-3) - 2 * var(--space-1));
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
&[data-side="start"] {
|
||||
left: 0;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
var(--scroller-curtain-color),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
|
||||
&[data-side="end"] {
|
||||
right: 0;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent,
|
||||
var(--scroller-curtain-color)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[data-orientation="vertical"] {
|
||||
min-height: 0;
|
||||
|
||||
.content {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.curtain {
|
||||
width: calc(100% - var(--space-3) - 2 * var(--space-1));
|
||||
height: min(25%, var(--space-7));
|
||||
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
||||
&[data-side="start"] {
|
||||
top: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
var(--scroller-curtain-color),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
|
||||
&[data-side="end"] {
|
||||
bottom: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
transparent,
|
||||
var(--scroller-curtain-color)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.curtain {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { useEffect, useRef, type ComponentProps } from "react";
|
||||
import { clamp } from "three/src/math/MathUtils.js";
|
||||
import { classNames } from "../../ui/classNames";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
interface ScrollerProps extends ComponentProps<"div"> {
|
||||
orientation?: "horizontal" | "vertical";
|
||||
}
|
||||
|
||||
export function Scroller({
|
||||
children,
|
||||
className,
|
||||
orientation = "horizontal",
|
||||
...props
|
||||
}: ScrollerProps) {
|
||||
const content = useRef<HTMLDivElement>(null!);
|
||||
const curtainStart = useRef<HTMLDivElement>(null!);
|
||||
const curtainEnd = useRef<HTMLDivElement>(null!);
|
||||
|
||||
const isHorizontal = orientation === "horizontal";
|
||||
|
||||
useEffect(() => {
|
||||
function syncCurtains() {
|
||||
const maxScroll = isHorizontal
|
||||
? content.current.scrollWidth - content.current.clientWidth
|
||||
: content.current.scrollHeight - content.current.clientHeight;
|
||||
const scrollPosition = isHorizontal
|
||||
? content.current.scrollLeft
|
||||
: content.current.scrollTop;
|
||||
|
||||
if (maxScroll <= 0) {
|
||||
curtainStart.current.style.opacity = "0";
|
||||
curtainEnd.current.style.opacity = "0";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const dimension = isHorizontal
|
||||
? content.current.clientWidth
|
||||
: content.current.clientHeight;
|
||||
const fadeDistance = Math.min(60, dimension * 0.15);
|
||||
const startOpacity = clamp(scrollPosition / fadeDistance, 0, 1);
|
||||
const endOpacity = clamp(
|
||||
(maxScroll - scrollPosition) / fadeDistance,
|
||||
0,
|
||||
1,
|
||||
);
|
||||
|
||||
curtainStart.current.style.opacity = `${startOpacity}`;
|
||||
curtainEnd.current.style.opacity = `${endOpacity}`;
|
||||
}
|
||||
|
||||
syncCurtains();
|
||||
|
||||
window.addEventListener("resize", syncCurtains);
|
||||
content.current.addEventListener("scroll", syncCurtains);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("resize", syncCurtains);
|
||||
content.current.removeEventListener("scroll", syncCurtains);
|
||||
};
|
||||
}, [orientation]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(styles.scroller, className)}
|
||||
{...props}
|
||||
data-orientation={orientation}
|
||||
>
|
||||
<div className={styles.content} ref={content}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
<div ref={curtainStart} data-side="start" className={styles.curtain} />
|
||||
<div ref={curtainEnd} data-side="end" className={styles.curtain} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
.section {
|
||||
padding: var(--space-5);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
.options {
|
||||
width: max-content;
|
||||
|
||||
position: relative;
|
||||
display: grid;
|
||||
|
||||
border-radius: var(--radius-max);
|
||||
|
||||
&[data-size="minor"] {
|
||||
.option {
|
||||
padding: var(--space-2) var(--space-3);
|
||||
font-size: 0.75em;
|
||||
}
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
|
||||
outline: var(--outline-focus);
|
||||
border-radius: var(--radius-max);
|
||||
|
||||
transition: var(--duration-brief);
|
||||
}
|
||||
|
||||
&[data-variant="solid"] {
|
||||
background-color: var(--gray-3);
|
||||
|
||||
.indicator {
|
||||
background-color: var(--accent-3);
|
||||
}
|
||||
}
|
||||
|
||||
&[data-variant="underline"] {
|
||||
border-radius: 0;
|
||||
|
||||
.indicator {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
|
||||
background: linear-gradient(transparent, var(--accent-a2));
|
||||
|
||||
outline: none;
|
||||
border-radius: 0;
|
||||
|
||||
border-bottom: var(--space-1) solid var(--accent-9);
|
||||
}
|
||||
}
|
||||
|
||||
.option {
|
||||
position: relative;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
padding: var(--space-3) var(--space-4);
|
||||
|
||||
color: var(--gray-11);
|
||||
cursor: pointer;
|
||||
|
||||
input {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:has(input:checked) {
|
||||
color: var(--gray-12);
|
||||
}
|
||||
|
||||
&:has(input:focus-visible) {
|
||||
outline: 2px solid var(--accent-8);
|
||||
outline-offset: 2px;
|
||||
border-radius: var(--radius-max);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { type ReactNode } from "react";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
export interface SegmentedControlOption {
|
||||
value: string;
|
||||
label: ReactNode;
|
||||
}
|
||||
|
||||
export interface SegmentedControlProps {
|
||||
options: readonly SegmentedControlOption[];
|
||||
value: string;
|
||||
onValueChange(value: string): void;
|
||||
size?: "regular" | "minor";
|
||||
variant?: "solid" | "underline";
|
||||
}
|
||||
|
||||
export function SegmentedControl({
|
||||
options,
|
||||
value,
|
||||
onValueChange,
|
||||
size = "regular",
|
||||
variant = "solid",
|
||||
}: SegmentedControlProps) {
|
||||
const selectedIndex = options.findIndex((option) => option.value === value);
|
||||
const segmentWidth = 100 / options.length;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles.options}
|
||||
role="radiogroup"
|
||||
data-size={size}
|
||||
data-variant={variant}
|
||||
style={{
|
||||
gridTemplateColumns: `repeat(${options.length}, minmax(0, 1fr))`,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className={styles.indicator}
|
||||
style={{
|
||||
left: `${Math.max(selectedIndex, 0) * segmentWidth}%`,
|
||||
width: `${segmentWidth}%`,
|
||||
}}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
{options.map((option) => (
|
||||
<label className={styles.option} key={option.value}>
|
||||
<input
|
||||
type="radio"
|
||||
value={option.value}
|
||||
checked={option.value === value}
|
||||
onChange={() => onValueChange(option.value)}
|
||||
/>
|
||||
<span className={styles.label}>{option.label}</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export function StupidCat() {
|
||||
return <img src="https://i.imgur.com/6FBBzb9.png" />;
|
||||
}
|
||||
@@ -40,4 +40,10 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.discriminator {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ export const TankCard = (props: MaybeSkeletonComponentProps<TankCardProps>) => {
|
||||
|
||||
{props.discriminator && (
|
||||
<Text lowContrast align="center">
|
||||
{props.discriminator}
|
||||
<div className={styles.discriminator}>{props.discriminator}</div>
|
||||
</Text>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
@@ -2,13 +2,14 @@ import { invalidate, useThree, type ThreeEvent } from "@react-three/fiber";
|
||||
import { useRef } from "react";
|
||||
import { Group, Mesh, MeshStandardMaterial, Vector2 } from "three";
|
||||
import { applyPitchYawLimits } from "../core/blitz/applyPitchYawLimits";
|
||||
import { jsxTree } from "../core/blitzkit/jsxTree";
|
||||
import { modelTransformEvent } from "../core/blitzkit/modelTransform";
|
||||
import { skinTree } from "../core/blitzkit/skinTree";
|
||||
import { controlsEnabledEvent } from "../core/controlsEnabled";
|
||||
import { DuelModule, getDuel, useDuel } from "../hooks/useDuel";
|
||||
import { useDuelModel } from "../hooks/useDuelModel";
|
||||
import { hasEquipment } from "../hooks/useEquipment";
|
||||
import { useModel } from "../hooks/useModel";
|
||||
import { useSkin } from "../hooks/useSkin";
|
||||
import { useTankTransform } from "../hooks/useTankTransform";
|
||||
import { Tankopedia } from "../stores/tankopedia";
|
||||
import { TankopediaDisplay } from "../stores/tankopediaPersistent/constants";
|
||||
@@ -27,6 +28,7 @@ export function TankModel() {
|
||||
const gunModelDefinition = turretModelDefinition.guns[protagonist.gun];
|
||||
const { gltf } = useModel(protagonist.tank);
|
||||
const nodes = Object.values(gltf.nodes);
|
||||
const skinGltf = useSkin(protagonist.tank);
|
||||
|
||||
useTankTransform(track, turret, turretContainer, gunContainer);
|
||||
|
||||
@@ -103,7 +105,7 @@ export function TankModel() {
|
||||
window.removeEventListener("pointerup", handlePointerUp);
|
||||
}
|
||||
|
||||
return jsxTree(node, {
|
||||
return skinTree(node, skinGltf, {
|
||||
mesh(_, props, key) {
|
||||
return (
|
||||
<mesh
|
||||
@@ -182,7 +184,7 @@ export function TankModel() {
|
||||
window.removeEventListener("pointerup", handlePointerUp);
|
||||
}
|
||||
|
||||
return jsxTree(node, {
|
||||
return skinTree(node, skinGltf, {
|
||||
mesh(_, props, key) {
|
||||
return (
|
||||
<mesh
|
||||
@@ -265,7 +267,7 @@ export function TankModel() {
|
||||
window.removeEventListener("pointerup", handlePointerUp);
|
||||
}
|
||||
|
||||
return jsxTree(node, {
|
||||
return skinTree(node, skinGltf, {
|
||||
mesh(_, props, key) {
|
||||
return (
|
||||
<mesh
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
import {
|
||||
normalizeBoundingBox,
|
||||
resolveDpm,
|
||||
unionBoundingBox,
|
||||
} from "@blitzkit/core";
|
||||
import type { TankDefinition } from "@blitzkit/protos";
|
||||
import { useMemo } from "react";
|
||||
import { api } from "../../../api/dynamic";
|
||||
import { resolveReload } from "../../../core/blitzkit/resolveReload";
|
||||
import { TankSort } from "../../../stores/tankopediaSort";
|
||||
import { TankCard } from "../../TankCard";
|
||||
|
||||
interface TankSearchCardProps {
|
||||
tank: TankDefinition;
|
||||
onSelect?: (tank: TankDefinition) => void;
|
||||
}
|
||||
|
||||
const modelDefinitions = await api.models();
|
||||
|
||||
export function TankSearchCard({ tank, onSelect }: TankSearchCardProps) {
|
||||
const by = TankSort.use((state) => state.by);
|
||||
const discriminator = useMemo(() => {
|
||||
if (by.startsWith("meta")) return undefined;
|
||||
|
||||
const turret = tank.turrets.at(-1)!;
|
||||
const gun = turret.guns.at(-1)!;
|
||||
const shell0 = gun.shells[0];
|
||||
const shell1 = gun.shells[1];
|
||||
const shell2 = gun.shells[2];
|
||||
const tracks = tank.tracks.at(-1)!;
|
||||
const engine = tank.engines.at(-1)!;
|
||||
const tankModelDefinition = modelDefinitions.models[tank.id];
|
||||
const turretModelDefinition = tankModelDefinition.turrets[turret.id];
|
||||
const gunModelDefinition = turretModelDefinition.guns[gun.id];
|
||||
|
||||
switch (by) {
|
||||
case "fire.aimTime":
|
||||
return gun.aim_time.toFixed(2);
|
||||
case "fire.caliber":
|
||||
return shell0.caliber.toFixed(0);
|
||||
case "fire.damage":
|
||||
return shell0.armor_damage.toFixed(0);
|
||||
case "fire.moduleDamage":
|
||||
return shell0.module_damage.toFixed(0);
|
||||
case "fire.dispersionMoving":
|
||||
return tracks.dispersion_move.toFixed(3);
|
||||
case "fire.dispersionStill":
|
||||
return gun.dispersion_base.toFixed(3);
|
||||
case "fire.dpm":
|
||||
return resolveDpm(gun, shell0).toFixed(0);
|
||||
case "fire.dpmPremium":
|
||||
return shell1 ? resolveDpm(gun, shell1).toFixed(0) : "--";
|
||||
case "fire.reload":
|
||||
return resolveReload(gun).toFixed(2);
|
||||
case "fire.standardPenetration":
|
||||
return shell0?.penetration!.near.toFixed(0);
|
||||
case "fire.premiumPenetration":
|
||||
return shell1 ? shell1?.penetration!.near.toFixed(0) : "--";
|
||||
case "fire.tertiaryPenetration":
|
||||
return shell1 ? shell2?.penetration!.near.toFixed(0) : "--";
|
||||
case "fire.shellVelocity":
|
||||
return shell0.velocity.toFixed(0);
|
||||
case "fire.shellCapacity":
|
||||
return gun.shell_capacity.toFixed(0);
|
||||
case "fire.shellRange":
|
||||
return shell0.range.toFixed(0);
|
||||
case "fire.gunDepression":
|
||||
return (
|
||||
gunModelDefinition.pitch!.max +
|
||||
(tankModelDefinition.initial_turret_rotation?.pitch ?? 0)
|
||||
).toFixed(1);
|
||||
case "fire.gunElevation":
|
||||
return (
|
||||
-gunModelDefinition.pitch!.min -
|
||||
(tankModelDefinition.initial_turret_rotation?.pitch ?? 0)
|
||||
).toFixed(1);
|
||||
case "maneuverability.forwardsSpeed":
|
||||
return tank.speed_forwards.toFixed(0);
|
||||
case "maneuverability.backwardsSpeed":
|
||||
return tank.speed_backwards.toFixed(0);
|
||||
case "maneuverability.power":
|
||||
return engine.power.toFixed(0);
|
||||
case "maneuverability.powerToWeight":
|
||||
return (
|
||||
(1000 * engine.power) /
|
||||
(tank.weight +
|
||||
engine.weight +
|
||||
tracks.weight +
|
||||
turret.weight +
|
||||
gun.weight)
|
||||
).toFixed(1);
|
||||
case "maneuverability.weight":
|
||||
return (
|
||||
(tank.weight +
|
||||
engine.weight +
|
||||
tracks.weight +
|
||||
turret.weight +
|
||||
gun.weight) /
|
||||
1000
|
||||
).toFixed(1);
|
||||
case "maneuverability.traverseSpeed":
|
||||
return tracks.traverse_speed.toFixed(1);
|
||||
case "survivability.health":
|
||||
return (tank.health + turret.health).toFixed(0);
|
||||
case "survivability.viewRange":
|
||||
return turret.view_range.toFixed(0);
|
||||
case "survivability.camouflageStill":
|
||||
return (tank.camouflage_still * 100).toFixed(0);
|
||||
case "survivability.camouflageMoving":
|
||||
return (tank.camouflage_moving * 100).toFixed(0);
|
||||
case "survivability.camouflageShooting":
|
||||
return (tank.camouflage_still * gun.camouflage_loss * 100).toFixed(0);
|
||||
case "survivability.volume": {
|
||||
const dimensions = normalizeBoundingBox(
|
||||
unionBoundingBox(
|
||||
tankModelDefinition.bounding_box!,
|
||||
turretModelDefinition.bounding_box!,
|
||||
),
|
||||
);
|
||||
|
||||
return (dimensions.x * dimensions.y * dimensions.z).toFixed(0);
|
||||
}
|
||||
|
||||
case "survivability.length": {
|
||||
const bounds = normalizeBoundingBox(
|
||||
unionBoundingBox(
|
||||
tankModelDefinition.bounding_box!,
|
||||
turretModelDefinition.bounding_box!,
|
||||
),
|
||||
);
|
||||
|
||||
return Math.max(bounds.x, bounds.y, bounds.z).toFixed(0);
|
||||
}
|
||||
}
|
||||
}, [by]);
|
||||
|
||||
return (
|
||||
<TankCard
|
||||
key={tank.id}
|
||||
onTankSelect={onSelect}
|
||||
tank={tank}
|
||||
discriminator={discriminator}
|
||||
/>
|
||||
);
|
||||
}
|
||||