Compare commits

..
296 Commits
Author SHA1 Message Date
tresabhi 037d223d70 handle pre hydrated text 2026-11-22 19:28:42 -06:00
tresabhi a34f15225e auto focus 2026-11-22 19:25:31 -06:00
tresabhi 0182d47e29 fix overflowing page 2026-11-22 19:13:25 -06:00
tresabhi b68755df35 island tanks 2026-11-22 18:58:05 -06:00
tresabhi 1b50f0bcdd migrate settings 2026-11-22 13:58:17 -06:00
tresabhi 8dd412ed32 better hydrating recent tanks list 2026-11-21 20:24:47 -06:00
tresabhi 16ff393ea0 overflow content in tank search 2026-11-21 20:06:39 -06:00
tresabhi 2ed6371ed3 bring tank icons in tank cards to center 2026-11-21 19:36:07 -06:00
tresabhi 9efcb55083 simplified page padding scheme 2026-11-21 19:33:55 -06:00
tresabhi baf42d0273 correct default navbar tool 2026-11-21 00:39:31 -06:00
tresabhi aa07156aeb add banner art for emebd, fix embed flex 1, and univerial 0 left paddings 2026-11-21 00:30:18 -06:00
tresabhi 8b9418715c fix overlay transisiton and better perofamnce sticky table 2026-11-21 00:12:39 -06:00
tresabhi 429f856f19 fix cell paddings 2026-11-20 23:54:37 -06:00
tresabhi d9fe4d5fd6 hide compare rows with just 1 cell of value 2026-11-20 23:44:14 -06:00
tresabhi ca28986730 switch to fine and coarse media queries 2026-11-20 23:41:12 -06:00
tresabhi 68335de62c optimize html, css, svg's, and webp delivery 2026-11-20 23:23:40 -06:00
tresabhi 457f04ce0c todo 2026-11-20 11:38:45 -06:00
tresabhi 94b7e0f1b1 cut html by 40% 2026-11-20 11:36:14 -06:00
tresabhi 0b11e13e21 mpas 2026-11-20 09:47:48 -06:00
tresabhi 9686273706 locale slugs 2026-11-20 00:21:36 -06:00
tresabhi ba723b443b migrate mixer 2026-11-19 23:43:22 -06:00
tresabhi 60f3fb7727 localize a few things 2026-11-19 21:12:33 -06:00
tresabhi 94fcd17480 no padding expansion on desktop navbar 2026-11-19 21:07:25 -06:00
tresabhi 6550fbd54b migrate 404 page 2026-11-19 21:07:11 -06:00
tresabhi 6d0c44f381 no internal css 2026-11-19 17:00:03 -06:00
tresabhi ff051106e7 migrated embed 2026-11-19 16:59:43 -06:00
tresabhi 6ad21a19a7 home button 2026-11-19 11:20:42 -06:00
tresabhi 73917b46d8 solid navbar 2026-11-19 11:11:20 -06:00
tresabhi 94ec7cfb6f navbar compat for compare 2026-11-19 11:04:38 -06:00
tresabhi eeac6cfe5e fix strings 2026-11-19 10:44:29 -06:00
tresabhi bf2f417546 tool banner and home 2026-11-19 10:44:09 -06:00
tresabhi e474f5d8f8 fix embed redirector 2026-11-19 10:28:29 -06:00
tresabhi 8852d77b46 wrap options 2026-11-19 10:27:37 -06:00
tresabhi bdc3ac005c perfect navbars 2026-11-19 10:24:43 -06:00
tresabhi d9a5495aec yeah 2026-11-19 09:20:09 -06:00
tresabhi 2bff4f47fb no settings url 2026-11-18 23:43:07 -06:00
tresabhi f647cb4ca1 hide a bunch more pages 2026-11-18 23:40:58 -06:00
tresabhi fc32de0f3f faster banners 2026-11-18 23:38:52 -06:00
tresabhi a7f0b768a5 both! 2026-11-18 23:26:24 -06:00
tresabhi 8cf000cbe6 navbars 2026-11-18 22:31:10 -06:00
tresabhi 08df0001ed i got ideas 2026-11-17 23:48:31 -06:00
tresabhi 00e898d79f rename 2026-11-17 22:56:13 -06:00
tresabhi 0803f91a48 remove 2026-11-17 22:26:18 -06:00
tresabhi 0578f47914 performance table rewrite and shared sort direction 2026-11-17 22:01:46 -06:00
tresabhi 966651284d hide some tools 2026-11-15 21:48:11 -06:00
tresabhi e14b8cad38 fix no results 2026-11-15 21:40:00 -06:00
tresabhi a863f89b29 setup right 2026-11-15 21:35:53 -06:00
tresabhi 8170b88996 move lint step after build protos 2026-11-15 21:17:30 -06:00
tresabhi b48a68b8de vehicle abilities and their characteristics 2026-11-15 21:14:09 -06:00
tresabhi 79129ff3c0 augment trees, pitch-limit fallback, and cached definitions 2026-11-15 17:28:43 -06:00
tresabhi da9c5272bc Merge branch 'main' into data-driven 2026-11-14 13:57:46 -06:00
tresabhi af475a0ebc move version to protected field 2026-11-14 13:51:19 -06:00
tresabhi 1a4ca8ca1e init 2026-11-14 11:28:46 -06:00
tresabhi 20fb8f2ac9 there we go 2026-11-14 11:25:58 -06:00
tresabhi 79c2ad87a4 wtf? lets try this 2026-11-14 11:22:21 -06:00
tresabhi 7f80723ee7 add zip vfs 2026-11-14 11:16:49 -06:00
tresabhi 035e034995 make cooldown optional 2026-11-14 11:10:41 -06:00
tresabhi dcf509f82c Merge branch 'main' into data-driven 2026-11-14 01:20:29 -06:00
tresabhi c311a6ab8b migrate compare and tankopedia loadout to new data-driven components, splitting the old monolithic loadout and compare UI into smaller pieces and adding shared Table, Dialog and Scroller primitives 2026-11-14 01:17:38 -06:00
TrèsAbhi 26f3245257 Merge pull request #437 from Hitjack007/faster-texture-exports
Fix: Faster tank and legendary camouflage model builds
2026-11-13 13:40:20 -06:00
Mark Greene c5fea49f5d Fix: Faster tank and legendary camouflage model builds
## Why

In CI, `models_legendary` was the slowest chunk of the website build (65 min on 2026-11-08), slower than `models_tanks` (49 min) even though there are far fewer camouflages (443) than tanks (738). In the CI log, each camouflage takes longer than the last, from about 8 s at the start to about 50 s near the end, which looked like a leak.

It isn't a leak:

- Nothing is kept between routes (no module-level caches) and the file reader caches nothing.
- The camouflages later in the list are heavier: newer tanks with more parts and textures.
- All the work is JavaScript on one thread, so Astro's 4 routes at a time take turns on one core. Each route's time also includes waiting for the other three. The build only kept about 1 core busy.

A CPU profile of one heavy camouflage (1224, 52 s) showed where the time goes:

- **About 60% in `readTexture`:** decoding DDS textures in our own decoder (`core/src/streams/dds.ts`).
- **About 16% in `crc32`:** checksumming every `.dvpl` game file with the pure-JavaScript `crc` package.
- **Repeated work:** that camouflage decoded 32 textures, but only 8 different files. Every part decodes the camouflage's shared atlas again (4 textures × 7 parts).

## What changed

### DDS decoder (`packages/core/src/streams/dds.ts`)

The old decoder allocated at almost every step:

- for every pixel, a new 4-value array (`[...color, alpha]`), then `forEach` + `Math.round`;
- for every block, a closure plus palette objects built with `.map()` and spread;
- for every small read (2–8 bytes), a byte copy through `consumeUint8Array`;
- every loop through lodash `times()`, adding a function call per block and per pixel.

A 2048×2048 texture has 4 million pixels in 262,000 blocks, so that meant tens of millions of allocations and calls per texture, all on the single JavaScript thread.

`decodeBlocks` now:

- reads the file's bytes in place;
- works out each block's palette once into two reused 16-byte buffers;
- writes the pixels straight into the output with plain loops.

The output is unchanged. Palette values use the same formulas in the same order (for example `(2 * c0 + c1) / 3`) and are rounded with the same `Math.round(value * 255)`. Rounding once per palette entry gives the same bytes as rounding once per pixel. Two old quirks are kept on purpose:

- BC1 is treated as transparent when `color0 < color1` (the standard says `<=`).
- BC3's 6-alpha mode stores `255` for index 7, which wraps to `1` as a byte (the standard value is opaque). This is marked in a comment and left for a separate fix, because fixing it changes some textures.

### Texture reuse (`[...chunk_models_tanks]/[id]/model.glb.ts`)

`cachedImage` keeps the last 64 finished textures (encoded images), keyed by reader and file path, and wraps `readBaseColor`, `readOcclusion`, `readRoughnessMetallic` and `readNormal`. Repeat requests reuse the same image instead of decoding and encoding again. The cap keeps memory from growing over the build. The logic inside the four readers is unchanged; they're only re-indented.

### DVPL checksum (`packages/core/src/blitz/readDVPL.ts`)

`Bun.hash.crc32` replaces the `crc` package and gives the same values. `readDVPL` only runs under Bun (every caller reads through `LocalVFS`, which already uses `Bun.file`). `crc` is removed from core's dependencies; the scripts package still uses it.

## Timings

All local timings are on the same Mac, one after another, with nothing else heavy running.

### Full builds

"Before" for a local build is CI time ÷ 1.5, which matches the real ~40-minute local camouflage build of main.

| Build | CI on main (2026-11-08) | Before, local (CI ÷ 1.5) | After, local | Speed-up |
|---|---|---|---|---|
| models_tanks | 49 min | ~33 min | 6 min 37 s | ~4.9× |
| models_legendary | 65 min | ~43 min | 4 min 52 s | ~8.9× |

With the 2026-11-10 production run (58 and 57 min), it's ~5.8× for tanks and ~7.8× for camouflages.

The camouflage build after each step, locally:

| Stage | models_legendary |
|---|---|
| main (real local build) | ~40 min |
| Texture reuse + checksum | 32 min 24 s |
| + DDS decoder | 4 min 52 s |

### Samples (main against this change, same machine)

| Sample | main | After | Speed-up | Identical |
|---|---|---|---|---|
| 30 DDS textures (BC1/BC2/BC3, incl. sRGB) | 6.1 s | 0.3 s | ~20× | 30/30 |
| 5 heavy late camouflages from CI | 124.6 s | 13.4 s | ~9.3× | 5/5 |
| 45 camouflages (every 10th in build order) | 258.5 s | 77.2 s | ~3.35× | 45/45 |
| 29 tanks (15 slowest in CI + 14 spread) | 105.3 s | 43.6 s | ~2.4× | 29/29 |

The 5 heavy camouflages after each step:

| Camouflage | main | Texture reuse | + checksum | + DDS decoder |
|---|---|---|---|---|
| 1224 | 49.7 s | 6.2 s | 6.4 s | 3.2 s |
| 2146 | 17.2 s | 6.3 s | 6.4 s | 2.9 s |
| 2122 | 31.4 s | 7.5 s | 5.9 s | 2.6 s |
| 2143 | 16.9 s | 10.1 s | 6.1 s | 2.8 s |
| 2059 | 9.6 s | 5.8 s | 4.1 s | 1.9 s |
| **Total** | **124.6 s** | **36.0 s** | **28.9 s** | **13.4 s** |

The single-camouflage speed-up (3.35× on the 45-camouflage sample) is smaller than the full-build one (~8×). With decoding no longer holding the JavaScript thread, Astro's 4 routes at a time overlap instead of queuing, and sharp's threads run alongside them.

### Full site build (`CHUNK=*`, all chunks one after another)

36 min 36 s, 0 errors, 21,613 routes, peak memory 4.6 GB.

| Chunk | Time |
|---|---|
| api | ~4.3 min |
| models_tanks | ~6.1 min |
| models_legendary | ~4.6 min |
| default (pages, 9 locales) | ~21 min |

### CPU and memory

- The tank build used 1,183 s of CPU in 397 s, so about 3 cores busy on average; before, it was about 1.
- Peak memory was 3.5 GB for the tank build and 4.6 GB for the full site.
- CI runners have 4 cores and 16 GB, so this fits. No threads or processes were added: Astro's concurrency (4) and sharp's threading are unchanged.

## What this means for CI

The chunks run as parallel jobs, so the website build takes as long as its slowest chunk. Before, that was `models_legendary` at about 65 min. Using CI ≈ 1.5× local, tank models should take about 10 min and camouflages about 7–8 min. `default` (about 36 min in CI) becomes the slowest chunk, so the whole build should drop from about 65 min to about 36. This is an estimate until the next CI run.

## Checked

- Byte-identical GLBs (SHA-1) for 45 camouflages and 29 tanks against main, and decoded pixels for 30 DDS textures.
- A full site build finishes with no errors.
- Animations and particles are unaffected: the camouflage GLBs, including their animation data, are byte-identical.
2026-11-13 17:06:17 +13:00
tresabhi 287aba853f fix guesser hydration and auto animatin play 2026-11-12 16:50:49 -06:00
tresabhi 1ae06bc685 protos in setup 2026-11-12 16:43:48 -06:00
tresabhi c72ee930bf migrate guesser 2026-11-12 15:14:01 -06:00
tresabhi c9f922ef24 symmetry 2026-11-11 23:34:43 -06:00
tresabhi 296e005586 remove bottom margin for no xp's at the bottom
idfk whatever man
2026-11-11 23:26:20 -06:00
tresabhi 4097730803 ranges 2026-11-11 23:23:53 -06:00
tresabhi cf0a1dd1ab research costs 2026-11-11 23:08:04 -06:00
tresabhi 9d0def24f9 (x,y)->(y,x) 2026-11-11 22:51:15 -06:00
tresabhi 6bef735aea recover a bunch of stats from legacy, fix enhanced armor in sandbox, add game's module layout from the upgrade screen, a bunch of toys from legacy 2026-11-11 22:43:47 -06:00
tresabhi cc0284e2ec auto widths 2026-11-10 14:55:33 -06:00
tresabhi f071a77fc0 antagonist controls 2026-11-10 14:54:22 -06:00
tresabhi f74b66dd5f localize 2026-11-09 23:27:36 -06:00
tresabhi fe545c415e antagonist settings 2026-11-09 23:23:04 -06:00
tresabhi aa982d73de thicknesses 2026-11-09 23:05:19 -06:00
tresabhi 263475ec3c static card 2026-11-09 22:58:55 -06:00
tresabhi e6158dec8d shot card 2026-11-09 22:46:59 -06:00
tresabhi 7ff386cecc animation pause button 2026-11-09 22:07:56 -06:00
tresabhi c883f79025 ZY correct animations 2026-11-09 22:01:05 -06:00
tresabhi ddd0e049c6 YZ correction across collision and glb 2026-11-09 21:51:40 -06:00
tresabhi 1fce0ecb5a remove flex 2026-11-09 21:33:16 -06:00
tresabhi ffa24a9bc9 Merge branch 'main' into data-driven 2026-11-09 21:28:46 -06:00
tresabhi ad0c8b3431 open source WOTB_GLOSSARY 2026-11-08 18:38:46 -06:00
tresabhi e50cc6cf5d only trigger on repo context 2026-11-08 18:33:35 -06:00
tresabhi be9dd9721d non transparent ground 2026-11-08 18:30:07 -06:00
tresabhi 4686877dd1 use wgc by default 2026-11-08 18:13:52 -06:00
tresabhi 47cb0f36f9 download wg parts 2026-11-08 18:10:00 -06:00
tresabhi 7918a88666 fetch urls 2026-11-08 18:07:12 -06:00
tresabhi cd2ef98e22 code split download client 2026-11-08 17:38:55 -06:00
tresabhi f2d3c59e97 lint 2026-11-07 20:52:38 -06:00
tresabhi 1cb760e227 heheheha 2026-11-07 20:51:53 -06:00
tresabhi ce27388c00 organize 2026-11-07 20:48:08 -06:00
tresabhi e8b2651595 move to global scripts 2026-11-07 20:44:23 -06:00
tresabhi 3695e2cd5e add scripts 2026-11-07 20:42:52 -06:00
tresabhi 01445cf845 move download-smart-dlc to closed 2026-11-07 20:20:36 -06:00
tresabhi b121147b43 undo optional dep 2026-11-07 20:17:10 -06:00
tresabhi b3b56462d1 move @blitzkit/closed to optional 2026-11-07 20:07:30 -06:00
tresabhi d42cccc3c2 partial submodules 2026-11-07 20:01:33 -06:00
tresabhi c592501f48 ignore submodules on pr's 2026-11-07 19:59:26 -06:00
TrèsAbhi 5f4cf15500 Merge pull request #405 from Hitjack007/animated-legendary-camos 2026-11-07 18:32:38 -06:00
Mark Greene 232b3e7770 Fix: Address karelpak1's review on animated legendary camouflages
- Sockets bound to a joint now sit right on the joint, as in game. Only the skeleton's own children are bound. This fixes the WZ-114 gun barrels collapsing.
- Clips keep their full duration when it runs past their last key.
- Part states are kept per entity and exported on each part's own switchers, so parts with matching names can't overwrite each other.
- A finished one-shot animation now stops on whatever it switched to, as in game. It only keeps looping if it changes nothing.
- Delayed actions run in delay order.
2026-11-07 15:35:12 +13:00
Mark Greene 99373872ed Merge branch 'main' into animated-legendary-camos 2026-11-07 15:02:21 +13:00
tresabhi 5477be35e7 Merge branch 'main' into data-driven 2026-11-05 16:46:42 -06:00
tresabhi a9dd018632 build protos 2026-11-05 16:42:54 -06:00
Mark Greene fddf407cc0 Fix: Address review on animated legendary camouflages
- Inline the camouflage preset lookup instead of a one-off `camouflagePreset` helper
- Move the `primitive` override into the `jsxTree` mergers, so `skinTree` takes plain mergers and falls back to `<primitive>` like the mesh and group defaults
2026-11-05 17:26:56 +13:00
tresabhi 88346308cb more hacks for this stupid ai slop wargaming is shoving down the client 2026-11-04 16:14:42 -06:00
tresabhi ebedac0642 some hacks to get some tier 11's compiling 2026-11-04 16:04:02 -06:00
TrèsAbhi a2b97380ac Update countdown text to reflect 3 tanks 2026-11-04 03:50:49 +00:00
tresabhi de4094554e countdown 2026-11-03 09:26:32 -06:00
tresabhi cdcec8548a logs 2026-11-02 22:17:18 -06:00
TrèsAbhi 5ffe5a0a9f Merge pull request #283 from Hitjack007/tankopedia-antagonist-selector 2026-11-01 13:30:18 -06:00
tresabhi 7fb73edb87 Merge branch 'main' into pr/Hitjack007/283 2026-11-01 13:29:12 -06:00
TrèsAbhi 1bc0561dbc Merge pull request #378 from Hitjack007/compare-switch-all-shells 2026-11-01 13:27:49 -06:00
tresabhi c82d2ccf1c Merge branch 'main' into pr/Hitjack007/378-2 2026-11-01 13:26:16 -06:00
TrèsAbhi 15a08b934b Merge pull request #285 from Hitjack007/tankopedia-scale 2026-11-01 13:23:50 -06:00
tresabhi f4894655b0 yeah this is fine 2026-11-01 13:23:35 -06:00
tresabhi e4b49e1600 use canvas 2026-11-01 13:20:02 -06:00
tresabhi 7bfd930cea Revert "remove granuality"
This reverts commit b65229dc80.
2026-11-01 13:15:06 -06:00
tresabhi 71e9e6fd5b Revert "use canvas"
This reverts commit ff507ed4e6.
2026-11-01 13:15:06 -06:00
tresabhi be0be90bdb Revert "no gray picking"
This reverts commit 62637418e5.
2026-11-01 13:15:06 -06:00
tresabhi 62637418e5 no gray picking 2026-11-01 13:07:22 -06:00
tresabhi ff507ed4e6 use canvas 2026-11-01 13:05:23 -06:00
tresabhi b65229dc80 remove granuality 2026-11-01 13:03:37 -06:00
tresabhi 4a6a5b3d34 Merge branch 'main' into pr/Hitjack007/285-1 2026-11-01 12:55:25 -06:00
tresabhi 2150fb3758 Merge branch 'main' into pr/Hitjack007/405 2026-11-01 12:44:23 -06:00
Mark Greene 682f039c6c Fix: Hide unused states of legendary camouflage parts (fixes maus) 2026-11-01 14:46:21 +13:00
tresabhi 0632899ecf disable halloween 2026-10-31 18:14:10 -05:00
tresabhi 8d9549f7d5 get over it 2026-10-31 18:06:49 -05:00
tresabhi c4edafa94b oh lord 2026-10-31 17:54:36 -05:00
tresabhi 23fc2510da sub menus 2026-10-31 17:43:57 -05:00
tresabhi 5df53458fd button sizes 2026-10-31 17:26:59 -05:00
tresabhi f596737419 remove styles 2026-10-31 17:20:51 -05:00
tresabhi 3bd1ab1e94 heheheha 2026-10-31 17:18:48 -05:00
tresabhi 01e3763f1e ai can you do this? probably not 2026-10-31 17:06:00 -05:00
tresabhi 234d927313 ahhhhhh 2026-10-31 16:56:42 -05:00
tresabhi 4ae327b6fc more consistent 2026-10-31 16:35:43 -05:00
tresabhi e1d292c954 apply s'more 2026-10-31 16:21:18 -05:00
tresabhi 4245ae4b7b some drop down styles 2026-10-31 16:08:27 -05:00
tresabhi db210a431b some styles 2026-10-31 14:31:30 -05:00
tresabhi da3ad0aa1b at least it runs 2026-10-31 14:13:17 -05:00
tresabhi 9ba19a425c sizing 2026-10-31 14:02:26 -05:00
tresabhi 75f91467ab loaders 2026-10-31 13:57:56 -05:00
tresabhi 11088ee3dc attachments 2026-10-31 13:48:15 -05:00
tresabhi b3064cdd3a some small fixes 2026-10-31 13:41:41 -05:00
tresabhi a15e331681 Merge branch 'main' into data-driven 2026-10-31 13:38:57 -05:00
TrèsAbhi 72758e9ff7 Merge pull request #423 from Hitjack007/legendary-camos-fix
Fix: Legendary camouflage parts, materials, names and attachments
2026-10-31 13:26:16 -05:00
Mark Greene 8566b2cc2f Feature: Looping garage animations for legendary camouflages
Legendary camo add-ons now loop their garage animation in the Tankopedia viewer. It's always on, with no settings.

- The garage replay now also works out which motions end up looping, and the export writes only those clips
- Customization parts export skeletons, skin weights and sockets
- Parts render as primitives so their bones can animate, with attachments layered on top
- Base tank models are unchanged
2026-10-31 22:15:57 +13:00
tresabhi 8028446788 fall back to github.token for pr runs 2026-10-30 16:59:31 -05:00
tresabhi e216b4cd6b fix 1 pixel lights 2026-10-30 16:49:43 -05:00
Mark Greene c535811c1d Fix: Fade glowing camouflage parts with the lights
Unlit `Textured` materials loaded as `MeshBasicMaterial`, so they stayed bright while the lights receded during a camouflage switch (E 100 legendary camouflage).

- `Textured` materials now export as standard materials with the base color texture as emissive and a black base color, so they look the same as before.
- The Tankopedia model fades their emissive intensity with the lighting transition.
- Additive blending applies to these parts again, since they are standard materials.
2026-10-30 17:26:50 +13:00
tresabhi d96f77bf05 i am tired boss 2026-10-29 15:29:37 -05:00
tresabhi 3b34b01536 redirect guesser 2026-10-29 15:02:20 -05:00
tresabhi 14126d05a1 rename 2026-10-29 14:58:40 -05:00
tresabhi 93c1e6e761 code split 2026-10-29 14:38:04 -05:00
tresabhi b0af48f866 disable some more 2026-10-29 14:28:18 -05:00
tresabhi 1aa4e6c470 renable tabs 2026-10-29 14:25:55 -05:00
Mark Greene c772d47a07 Fix: Unify Tankopedia model, camouflage and attachment loaders
- Tankopedia state uses `loaders: { model, skin, attachment }` with `requested` and `loaded`
- useSkin swaps the camouflage halfway through the lighting transition for both cached and downloaded skins
- Remove the leftover "Unreleased" camouflage name handling
2026-10-30 07:11:31 +13:00
tresabhi f81f972787 wha 2026-10-29 13:04:11 -05:00
tresabhi 6e35c06cfc loader 2026-10-29 11:54:33 -05:00
tresabhi 078bc9d6cd use revealed 2026-10-29 11:36:29 -05:00
tresabhi dc9c20db84 remove debug console logs 2026-10-29 11:26:38 -05:00
tresabhi 523fee5010 its only ever going to be standard material 2026-10-29 11:15:28 -05:00
tresabhi e5be69dd37 no unreleased! 2026-10-29 11:08:20 -05:00
tresabhi bddcf10e90 assert 2026-10-29 11:07:33 -05:00
tresabhi 484d4ae3da please dont make name undefinedable, just default to the string id 2026-10-29 11:07:11 -05:00
Mark Greene 0f299335d6 Fix: Legendary camouflage parts, materials, names and attachments
Fixes a batch of legendary camouflage problems in the Tankopedia viewer, adds three missing unique camouflages and lets attachments be shown together with a camouflage.

## Camouflage parts (state switchers)
- Camouflages now choose which tank pieces show the same way the game does. Each switcher's load-time scenario script runs at export time (checks for attached camouflage items, or compares the camouflage preset), along with its state-switch actions. This replaces the old guess from part names (new `core/blitzkit/switcherStates.ts`).
- Fixes missing roof MGs, fenders and fuel tanks (IS-3 Bear, Obj. 140 Terror, IS-7, IS-4, FV215b 183, AMX 50 B, KV-1S) and default parts mixed into camouflages (Pershing Speedfire, Forest Witch Fullmetal, Waffenträger Goldstreifen).
- Switchers inside camouflage parts now show one state instead of all of them stacked (Obj. Kust double net, Goldstreifen stowage, Tiger II cat).
- States are matched by original node names, because the GLTF loader renames duplicates.
- Camouflage part meshes with no LODs (`lodIndex -1`) are kept, which restores the Tiger II cat body and missing pieces on about 11 other camouflages.

## Materials
- `AlphaBlend` materials export as transparent. `AlphaBlendAdditive` materials export as additive and are applied in `jsxTree`, and unlit `Textured` materials export as unlit (IS-8 Raroh flames, dinosaur holograms, and glass and screens on a few base tanks).
- Camouflage part materials that share a name with the tank's material no longer replace the tank's camouflage material (Bisonte C45 Unbreakable).

## Names
- With a legendary camouflage selected, the title shows the tank's in-battle name ("GuP Type 95 Ha-Go", "KV-1 Warrior", "Shinobi").
- Camouflages without a name in the game files yet show "Unreleased" in orange instead of their raw string key, and no longer crash the tank names list.

## Attachments
- Attachments (`kind: customization`) are listed in their own group under the camouflages and can be turned on together with a camouflage. They load the same way as camouflages and fade with the same transition.

## Other
- Liberté, You Rock! and Ozzie (single-tank camouflages that only set a preset through `override`) are now available.
- Mastery gun mark meshes (`custom_gun_marks_*`) are no longer drawn (Helsing, HWT20 FalconFire and two camouflage guns).

## Not included
- Pixel Wave, Digital Trace and Forest Shadow are tiled pattern camouflages, which the viewer can't render yet.
- FV301 Corbie's drone position and the dinosaur heads' glow depend on camouflage animations and emissive materials, which are separate PRs.

Fixes #417
Fixes #419
Fixes #421
2026-10-29 15:28:11 +13:00
tresabhi 4694d495bb well at least some of it is showing up i guess 2026-10-27 18:58:21 -05:00
tresabhi 43fc98e37d focus tooltip 2026-10-27 18:43:48 -05:00
tresabhi d251c31b92 port antagonist control 2026-10-27 18:39:56 -05:00
tresabhi 45811b5c18 fix imports 2026-10-27 17:13:01 -05:00
tresabhi 10f8fa28f9 icons 2026-10-27 16:49:52 -05:00
tresabhi f10065887d black background 2026-10-27 14:24:32 -05:00
tresabhi dd83da91ff compiling 2026-10-27 11:52:58 -05:00
tresabhi bf7046c91b skin switcher 2026-10-27 11:51:14 -05:00
tresabhi fae0277b69 re apply rotation patch 2026-10-27 11:40:47 -05:00
tresabhi 3470d68204 fix imports 2026-10-27 11:36:00 -05:00
tresabhi bac29d843c remove path 2026-10-26 09:55:22 -05:00
tresabhi 5807473fb6 Merge branch 'main' into data-driven 2026-10-26 09:50:43 -05:00
TrèsAbhi 091607b0a8 Add Beta option to bug report issue template 2026-10-25 21:53:59 -05:00
tresabhi 4d45029bfa imports 2026-10-25 18:52:41 -05:00
tresabhi 89d272166f Merge branch 'main' into data-driven 2026-10-25 18:49:49 -05:00
TrèsAbhi 590f4a5df3 Merge pull request #407 from blitzkit/main-i18n
New Crowdin updates
2026-10-25 18:41:43 -05:00
TrèsAbhi e326985ec4 Merge pull request #411 from blitzkit/beg 2026-10-25 18:40:34 -05:00
TrèsAbhi dcd77d5666 Merge branch 'main' into beg 2026-10-25 18:38:48 -05:00
TrèsAbhi d45425ec57 Merge pull request #414 from blitzkit:simplify-navbar
simplify
2026-10-25 18:37:52 -05:00
tresabhi 46fd061aff simplify 2026-10-25 18:37:28 -05:00
TrèsAbhi 752b11e56d Merge pull request #413 from Hitjack007/legendary-camos-fix
Fix legendary camos
2026-10-25 18:25:40 -05:00
Mark Greene 049ef58691 Fix legendary camos
Fixed https://github.com/blitzkit/blitzkit/commit/b540ab781419cbaa693597bf89a2f62962d8295f @tresabhi
2026-10-26 12:22:51 +13:00
TrèsAbhi bb64d718c2 Merge branch 'main' into beg 2026-10-25 18:11:37 -05:00
tresabhi 0d6c508382 remove skins from api 2026-10-25 15:00:17 -05:00
tresabhi 7f77b4006d shit ass wargaming legacy systems 2026-10-25 13:31:12 -05:00
tresabhi c11285e985 exit code retry 2026-10-25 13:03:35 -05:00
tresabhi a4ee9cf2bd automatic url 2026-10-25 12:50:48 -05:00
tresabhi b3ad122542 fix CLIENT_PROVIDER 2026-10-25 12:36:39 -05:00
tresabhi 41fb822571 apply smart dlc 2026-10-25 12:27:57 -05:00
tresabhi 9236c54b4b rgba8888 2026-10-24 21:29:45 -05:00
tresabhi 92ef7f4020 force bun 2026-10-24 21:18:26 -05:00
TrèsAbhi 96c8d3d801 New translations en.json (Russian)
[ci skip]
2026-10-24 20:34:55 -05:00
TrèsAbhi 2cdbd0b810 New translations en.json (Portuguese)
[ci skip]
2026-10-24 20:34:54 -05:00
TrèsAbhi 61a4711029 New translations en.json (Polish)
[ci skip]
2026-10-24 20:34:52 -05:00
TrèsAbhi f04cfb8875 New translations en.json (Japanese)
[ci skip]
2026-10-24 20:34:51 -05:00
TrèsAbhi 7ea6032244 New translations en.json (Spanish)
[ci skip]
2026-10-24 20:34:49 -05:00
TrèsAbhi a1bc1bc630 New translations en.json (French)
[ci skip]
2026-10-24 20:34:48 -05:00
TrèsAbhi 34b96f4003 New translations en.json (Chinese Simplified)
[ci skip]
2026-10-24 20:34:46 -05:00
TrèsAbhi 3f4306b3b3 New translations en.json (Ukrainian)
[ci skip]
2026-10-24 20:34:45 -05:00
tresabhi 40b732803e retry time 2026-10-24 20:32:34 -05:00
TrèsAbhi ac673cd47f Merge pull request #392 from blitzkit/new-credits 2026-10-24 20:21:58 -05:00
tresabhi 76445c67b2 some updates 2026-10-24 20:21:07 -05:00
tresabhi 8f399e5c54 Merge branch 'main' into new-credits 2026-10-24 20:19:15 -05:00
TrèsAbhi 14dc40a3e7 New translations en.json (Ukrainian)
[ci skip]
2026-10-24 15:30:30 -05:00
TrèsAbhi 3daa56e100 New translations en.json (Polish)
[ci skip]
2026-10-23 09:57:28 -05:00
TrèsAbhi 37c257c8c4 New translations en.json (Russian)
[ci skip]
2026-10-22 17:04:11 -05:00
TrèsAbhi dfc6a2bada New translations en.json (Portuguese)
[ci skip]
2026-10-22 17:04:08 -05:00
TrèsAbhi 9b8b06ca70 New translations en.json (Polish)
[ci skip]
2026-10-22 17:04:06 -05:00
TrèsAbhi f7ffb2d34d New translations en.json (Japanese)
[ci skip]
2026-10-22 17:04:04 -05:00
TrèsAbhi 2b7e88e30c New translations en.json (Spanish)
[ci skip]
2026-10-22 17:04:00 -05:00
TrèsAbhi af172c95f2 New translations en.json (French)
[ci skip]
2026-10-22 17:03:59 -05:00
TrèsAbhi f8794de782 New translations en.json (Chinese Simplified)
[ci skip]
2026-10-22 17:03:57 -05:00
TrèsAbhi 5fe295b209 New translations en.json (Ukrainian)
[ci skip]
2026-10-22 17:03:55 -05:00
tresabhi 41418eb8e0 restrict branches 2026-10-22 17:03:05 -05:00
tresabhi f6f8e2b4df polish 2026-10-22 17:00:13 -05:00
tresabhi a4fca4085e dedicated tool 2026-10-22 16:49:03 -05:00
tresabhi 26f71df9f9 remove some... people... 2026-10-22 16:40:11 -05:00
tresabhi d32b8cc3f5 Merge branch 'main' into new-credits 2026-10-22 16:38:40 -05:00
tresabhi 0922614dbc finalize 2026-10-22 16:37:16 -05:00
tresabhi ae4b2e1bb3 Merge branch 'main' into beg 2026-10-22 16:25:11 -05:00
TrèsAbhi 3b75d7b523 New translations en.json (Russian)
[ci skip]
2026-10-22 15:56:13 -05:00
TrèsAbhi 0cbd67ff38 New translations en.json (Portuguese)
[ci skip]
2026-10-22 15:56:11 -05:00
TrèsAbhi 068f481b93 New translations en.json (Polish)
[ci skip]
2026-10-22 15:56:10 -05:00
TrèsAbhi 1430c32440 New translations en.json (Japanese)
[ci skip]
2026-10-22 15:56:08 -05:00
TrèsAbhi d14afc8b39 New translations en.json (Spanish)
[ci skip]
2026-10-22 15:56:07 -05:00
TrèsAbhi cba591b368 New translations en.json (French)
[ci skip]
2026-10-22 15:56:05 -05:00
TrèsAbhi 42b5ab6f02 New translations en.json (Chinese Simplified)
[ci skip]
2026-10-22 15:56:04 -05:00
TrèsAbhi c1363be70a New translations en.json (Ukrainian)
[ci skip]
2026-10-22 15:56:02 -05:00
tresabhi 72e358f034 add pr checks 2026-10-22 15:45:04 -05:00
tresabhi b4a689dfbb start adding tiers 2026-10-22 15:42:07 -05:00
tresabhi 19e535969e colors 2026-10-22 11:51:08 -05:00
tresabhi eebc373b46 better 2026-10-22 11:45:18 -05:00
tresabhi ecb1a7c21e base 2026-10-22 11:30:03 -05:00
tresabhi 625d8d1595 cleaner logic 2026-10-22 09:13:57 -05:00
TrèsAbhi 602bf37411 New translations en.json (Russian)
[ci skip]
2026-10-22 05:51:52 -05:00
tresabhi fc9050e7fe fix imports 2026-10-21 23:23:55 -05:00
tresabhi 654887dd66 versio 2026-10-21 23:06:18 -05:00
tresabhi b540ab7814 sk 2026-10-21 22:59:12 -05:00
tresabhi 0ee9c99a28 move tank models to models_tanks chunk 2026-10-21 22:56:40 -05:00
tresabhi ab9149a11f git keep 2026-10-21 22:48:33 -05:00
tresabhi 924c130516 git keep 2026-10-21 22:47:01 -05:00
tresabhi 33366a8f79 Merge branch 'main' into split-branches 2026-10-21 22:44:54 -05:00
TrèsAbhi 342497563f Merge pull request #373 from Hitjack007/legendary-camo-models 2026-10-21 22:42:53 -05:00
Mark Greene a495a5f208 Feature: Legendary camouflages in the Tankopedia viewer 2026-10-22 16:12:03 +13:00
TrèsAbhi 10b0e29a26 New translations en.json (Polish)
[ci skip]
2026-10-21 10:03:16 -05:00
tresabhi 007d4e9540 make tier 11's test tanks 2026-10-21 09:56:21 -05:00
tresabhi 273fea1599 promote preview 2026-10-21 09:36:06 -05:00
TrèsAbhi ed36eedbfb New translations en.json (Polish)
[ci skip]
2026-10-21 07:42:08 -05:00
Mark Greene ffb5a1f9c8 Feature: Animated legendary camouflages
Legendary camo add-ons now play their garage animations in the Tankopedia viewer, and a new menu next to the camo column triggers their battle reactions.

**Export (`model.glb` / `skins/[skin].glb`)**
- Customization parts export skeletons, skin weights and one clip per `.anim` motion file (`core/blitzkit/skinAnimations`)
- Sockets bound to skeleton joints follow their joint
- Action lists and scenario graphs are carried in glTF extras
- Part batches with no LODs (`lodIndex` -1) are now exported, fixing meshes that were missing entirely (e.g. the Tiger II cat body, the BDT-5A engine rings)
- Base tank models are unchanged

**Viewer**
- A runtime plays the clips and drives state switchers, action lists and the game's scenario graphs (a small interpreter for the node types the camos use)
- Camo parts render as primitives so their bones can animate
- Garage animations play once rather than looping, so the camo settles

**Animation menu**
- Floats left of the camo column when the selected camo has triggerable animations
- Icon buttons use the game's own white icons, served from `/icons/skin-events/[event].webp`
- Idle replays the garage animation
- Triggers: Shoot, Kill, Take damage, Damage enemy, Ricochet / No penetration, Start moving, Consumable, Reload. Only events that actually animate get a button
- Buttons are disabled while a triggered animation plays; triggering cuts any garage animation short

All legendary skin files together grow from 1.32 GB to 1.35 GB (+2.4%), almost all of it in the 102 animated camos.
2026-10-20 18:48:35 +13:00
Mark Greene 85e03d3b42 Feature: Legendary camouflages in the Tankopedia viewer 2026-10-20 18:46:29 +13:00
tresabhi 7df53d845d vfs debug 2026-10-19 20:12:03 -05:00
tresabhi 1b5c79c2b8 Merge branch 'production' 2026-10-19 19:54:58 -05:00
tresabhi 51900f4c80 countdown 2026-10-19 19:22:20 -05:00
tresabhi b9388cc544 add basic xi compatibility 2026-10-19 19:08:25 -05:00
Mark Greene a0c54b50fc Feature: tank distribution scale on Tankopedia stats 2026-10-20 07:18:01 +13:00
TrèsAbhi 05648ea040 Merge pull request #353 from Hitjack007/remove-imgur-references
Fix: migrate Imgur images to BlitzKit hosting
2026-10-18 14:12:50 -05:00
TrèsAbhi 73080fd60a Merge branch 'main' into remove-imgur-references 2026-10-18 14:03:19 -05:00
TrèsAbhi 14be326c41 Merge pull request #368 from Hitjack007/calculated-bounding-boxes 2026-10-18 14:02:34 -05:00
TrèsAbhi 8132f2d91e Merge branch 'main' into calculated-bounding-boxes 2026-10-18 13:59:49 -05:00
TrèsAbhi 1258cd1fa2 New Crowdin updates (#399) 2026-10-18 13:59:07 -05:00
tresabhi b00a63a9f8 sorting 2026-10-15 00:38:01 -05:00
TrèsAbhi 989e3d395a Merge pull request #385 from blitzkit/main
Production
2026-10-14 13:15:55 -05:00
tresabhi 8ec7fcb90a ui shit 2026-10-13 21:14:42 -05:00
tresabhi 830e1597e7 revive sandbox 2026-10-13 21:03:06 -05:00
tresabhi 3131217600 custom scroller for loadout 2026-10-13 20:53:15 -05:00
tresabhi 0b740e3f60 port scroller 2026-10-13 20:40:47 -05:00
tresabhi 1416d64e34 add skills 2026-10-13 20:37:53 -05:00
tresabhi bc6257a0c3 reloads 2026-10-12 10:47:00 -05:00
tresabhi 3d8cfc3aeb reload visualizer 2026-10-12 10:34:01 -05:00
tresabhi d8925a47b5 i am satisfied 2026-10-10 23:12:41 -05:00
tresabhi 60f482d820 hahaha 2026-10-10 20:48:37 -05:00
tresabhi c2fd81c98e remove old credits 2026-10-10 18:47:46 -05:00
tresabhi 0fbc868738 more colors 2026-10-10 18:43:44 -05:00
tresabhi ff0cfbaf0a target 2026-10-10 18:38:05 -05:00
tresabhi 4642b74bca colors! 2026-10-10 18:37:47 -05:00
tresabhi 88d49bd5a3 avenir 2026-10-10 18:24:14 -05:00
tresabhi 6fd2423445 more progress 2026-10-10 18:12:01 -05:00
tresabhi a0dba52649 complete list? 2026-10-10 17:49:06 -05:00
tresabhi 80d76e3729 more more more! 2026-10-10 17:34:07 -05:00
tresabhi 7915b39d9d more! 2026-10-10 17:17:57 -05:00
tresabhi c94a84222d add more 2026-10-10 17:05:36 -05:00
tresabhi 1bca762781 start of credits 2026-10-10 16:59:34 -05:00
tresabhi 6e30da4978 add some padding to distinguish navbar end with the start of the dialog 2026-10-09 17:56:42 -05:00
TrèsAbhi b45f281cb9 Merge branch 'main' into compare-switch-all-shells 2026-10-09 17:39:15 -05:00
Mark Greene 2288c089e8 Fix: dialogs clipping under the navbar and uneven Compare spacing 2026-10-10 11:16:36 +13:00
tresabhi 12ff9a90eb update matrix 2026-10-08 11:13:12 -05:00
tresabhi 5ad5c701c9 update envs for chunk splitting 2026-10-08 11:10:47 -05:00
Mark Greene a365fa5e50 Fix: migrate Imgur images to BlitzKit hosting 2026-10-08 20:28:02 +13:00
Mark Greene 57d77bf2b4 Fix: calculate tank dimensions from collision models 2026-10-08 20:25:03 +13:00
Mark Greene d93b202ee8 Feature: Switch all shells in Compare 2026-10-08 18:36:17 +13:00
638 changed files with 23970 additions and 14341 deletions

No files matched your search

-8
View File
@@ -1,8 +0,0 @@
---
name: proto-workflow
description: Regenerate this repository's TypeScript protobuf outputs after editing .proto schemas.
---
# Proto Workflow
After editing any `.proto` schema in this repository, run `bun run build-protos` from the repository root. Review the generated changes and address any schema or generator errors before finishing the task.
-13
View File
@@ -1,13 +0,0 @@
---
name: repo-boundaries
description: Apply the user's persistent repository boundaries whenever working in their projects.
---
# Repo Boundaries
Apply these boundaries to all work in the user's repositories:
- Read-only Git commands are allowed when useful, including status, diff, log, and show. Do not run Git commands that modify repository state.
- Never edit `bun.lock`, including regenerating or formatting it. When dependency manifests change, leave the lockfile alone; the user will update it by running `bun install`.
These are firm constraints, not preferences to revisit for a task. Continue useful work within them and explain any limitation if a requested result would require crossing either boundary.
@@ -1,3 +0,0 @@
interface:
display_name: "Repo Boundaries"
short_description: "Respect repository editing boundaries"
+23
View File
@@ -0,0 +1,23 @@
---
name: commit-message
description: Read the git diff and write a commit message in the repo's existing style. Use when the user asks for a commit message or runs /commit-message. Only prints the message; never stages, commits, or pushes.
disable-model-invocation: true
allowed-tools: Bash(git diff:*), Bash(git log:*), Bash(git status:*)
---
# Commit message
Write a commit message for the current changes. Do not stage, commit, or push anything; the user does that themselves.
## Context
- Recent commits: !`git log --format=%s -20`
- Staged stat: !`git diff --cached --stat`
- Unstaged stat: !`git diff --stat`
## Steps
1. Use the staged diff (`git diff --cached`) if anything is staged; otherwise use the unstaged diff (`git diff`). Read the actual hunks for anything the stat doesn't explain. Skim large deletions and pure-formatting churn rather than reading them line by line.
2. Find the one main thing the change does. Renames, moves into the flat `Name/index.tsx` layout, CSS tweaks, and formatting churn are usually side effects of that, not separate items.
3. Match the style of the recent commits: one line, all lowercase, no trailing period, no conventional-commit prefix, no body, usually 2–6 words (e.g. `migrate 404 page`, `no internal css`, `fix embed redirector`).
4. Reply with only the message in a code block. No preamble, no summary, no bullet list, no suggestions.
+44
View File
@@ -0,0 +1,44 @@
---
name: vfs
description: Read files from the World of Tanks Blitz game client (including DVPL-compressed ones) via scripts/vfs.sh. Use when you need to list, read, or parse game data like Data/*.yaml, version.txt, or any asset in the client install, or when you need to know where the client install and wotblitz.exe are.
---
# Game client VFS
`scripts/vfs.sh` reads files out of the installed game client and transparently handles DVPL decompression. Use it instead of reading the Steam directory directly, because many client files are DVPL-compressed and raw reads give you garbage.
Run it from the repo root (the wrapper `cd`s into `packages/scripts` itself):
```bash
scripts/vfs.sh ls <dir> # list a directory, one entry per line
scripts/vfs.sh cat <file> # raw file contents to stdout (decompressed)
scripts/vfs.sh yaml <file> # parse a YAML file, print as JSON
```
The path argument is required. Paths are relative to the client root, e.g. `Data/version.txt`. Without a path it exits 1.
Source of truth for commands: `packages/scripts/src/vfs/index.ts`. Check it if a command here seems missing.
## Examples (verified)
```bash
scripts/vfs.sh cat Data/version.txt # 11.21.0.1235_7376187 release/11.21.0 WOTB_Win7 (no trailing newline)
scripts/vfs.sh ls Data # *.yaml configs, 3d, Configs, Fonts, ...
scripts/vfs.sh yaml Data/countries.yaml # JSON: { "ru": ["AM", "AZ", ...], ... }
```
## Where the client is
- The install dir comes from `CLIENT_DIR` in `packages/website/.env` (read via `packages/scripts/src/vfs/vfs.ts`). The location is machine-specific, so read that `.env` to find it rather than assuming a path. The `.env` may also contain commented-out alternative client locations.
- Executable: `wotblitz.exe` in that directory (~74 MB). `wotblitz-browser.exe` is the small embedded-browser helper, not the game.
- The `.env` holds an application ID and paths; don't paste its secrets elsewhere.
## Reverse engineering the executable
For binary analysis of `wotblitz.exe`, use the REA MCP tools (`mcp__rea__*`, load via ToolSearch). Nothing is open by default: call `open_binary` with the exe path first, and `close_binary` when done. The `rea` CLI is not on PATH, so `rea doctor` is unavailable; the MCP server is the interface.
## Notes
- Read-only: the VFS never modifies the client.
- Prefer `yaml` over `cat` for `.yaml` files when you want to query structure.
- Large outputs: pipe through `head` or `jq`.
+1
View File
@@ -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
+8 -3
View File
@@ -30,8 +30,13 @@ jobs:
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Setup protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GH_TOKEN }}
- name: Set up script
run: scripts/setup.sh
- name: Setup Git
run: |
@@ -39,7 +44,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Discover IDs
run: bun run discover-ids
run: scripts/discover-ids.sh
env:
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
GH_TOKEN: ${{ secrets.IDS_TOKEN }}
+37 -21
View File
@@ -2,6 +2,11 @@ name: Website
on:
push:
branches:
- main
- production
pull_request:
schedule:
- cron: "0 4 * * *"
@@ -18,6 +23,7 @@ on:
options:
- production
- main
- data-driven
environment:
description: Environment
@@ -38,9 +44,10 @@ on:
type: choice
required: true
default: steam
default: wgc
options:
- wgc
- steam
- zip
- wgpkg
@@ -60,10 +67,13 @@ concurrency:
cancel-in-progress: true
env:
# workflow
HAS_ROOT_REPO_CONTEXT: ${{ github.event_name != 'pull_request' }}
# client
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
CLIENT_PROVIDER: ${{ inputs.client_provider || 'steam' }}
CLIENT_PROVIDER: ${{ inputs.client_provider || (github.event_name != 'pull_request' && 'steam' || 'wgc') }}
CLIENT_SOURCE: ${{ inputs.client_source || '444200/windows' }}
CLIENT_DIR: ../../temp/game
@@ -73,11 +83,6 @@ env:
PUBLIC_STATIC_ASSET_BASE: https://assets.blitzkit.app
PUBLIC_GUIDE_WEBSITE: https://guidesblitz.com
# blitz
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
# google
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
@@ -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,9 +107,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ inputs.branch || 'production' }}
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
ref: ${{ github.event.pull_request.head.sha || inputs.branch || 'production' }}
# the only submodule is closed, which needs secrets
submodules: ${{ env.HAS_ROOT_REPO_CONTEXT == 'true' && 'recursive' || 'false' }}
token: ${{ secrets.GH_TOKEN || github.token }}
- name: Setup bun
uses: oven-sh/setup-bun@v2
@@ -119,14 +125,21 @@ jobs:
sudo apt-get update
sudo apt-get install -y aria2 libarchive-tools
- name: Install dependencies
run: bun install
- name: Set up script
run: scripts/setup.sh
- name: Download Client
run: bun run download-client
# - name: Lint
# run: scripts/lint.sh
- name: Download client
run: scripts/download-client.sh
- name: Download SmartDLC
if: ${{ env.HAS_ROOT_REPO_CONTEXT == 'true' }}
run: scripts/download-smart-dlc.sh
- name: Build
run: bun run --bun build
run: scripts/build-website.sh
env:
CHUNK: ${{ matrix.chunk }}
@@ -139,13 +152,16 @@ 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')
env.HAS_ROOT_REPO_CONTEXT == 'true'
|| (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
|| (github.event_name == 'push' && github.ref == 'refs/heads/production')
|| (github.event_name == 'workflow_dispatch')
}}
env:
+3
View File
@@ -106,6 +106,7 @@
"Herdbreaker",
"Hetz",
"highp",
"hocs",
"iife",
"imgur",
"immer",
@@ -227,7 +228,9 @@
"UNLOCALIZED",
"UNORM",
"unpickled",
"unranked",
"Unregistering",
"unreviewed",
"unrotate",
"unwrapper",
"userns",
+6 -6
View File
@@ -44,16 +44,16 @@ cd blitzkit
> [!NOTE]
> There is a closed source submodule under `packages/closed` that you can safely ignore. This sole purpose of this submodule is to provide `dvp.ts`, a proprietary Wargaming game asset tree compression tool. You will not need this at any point.
Then, download the dependencies with Bun.
Then, grand execution permission to the setup script.
```bash
bun install
chmod +x scripts/setup.sh
```
Finally, compile the proto files into TypeScript.
Finally, run the setup script.
```bash
build build-protos
scripts/setup.sh
```
## Developing: Environment
@@ -65,11 +65,11 @@ Go through the different packages in the `packages` directory and clone their re
Launching the website is as easy as running the `dev` script.
```bash
bun dev
scripts/dev-website.sh
```
If you ever make a change to any proto file, make sure to rebuild them.
```bash
build build-protos
scripts/build-protos.sh
```
+4 -71
View File
@@ -36,7 +36,6 @@
"@types/lz4js": "^0.2.1",
"@types/three": "^0.180.0",
"adm-zip": "^0.5.16",
"crc": "^4.3.2",
"dotenv": "^17.2.2",
"fast-xml-parser": "^5.3.2",
"lodash-es": "^4.17.21",
@@ -59,7 +58,6 @@
"packages/scripts": {
"name": "@blitzkit/scripts",
"dependencies": {
"@blitzkit/closed": "workspace:*",
"@blitzkit/core": "workspace:*",
"@blitzkit/i18n": "workspace:*",
"@gltf-transform/core": "^4.2.1",
@@ -117,7 +115,6 @@
"@types/three": "^0.180.0",
"@vite-pwa/astro": "^1.1.0",
"astro": "^5.14.4",
"astro-favicons": "^3.1.5",
"cheerio": "^1.1.2",
"compare-versions": "^6.1.1",
"fuzzysort": "^3.1.0",
@@ -132,7 +129,7 @@
"react-dom": "^19.3.0",
"react-error-boundary": "^6.1.3",
"react-promise-suspense": "^0.3.4",
"soapstone": "^1.0.1",
"soapstone": "^1.1.0",
"three": "^0.180.0",
"three-stdlib": "^2.36.0",
"transliteration": "^2.6.1",
@@ -1027,8 +1024,6 @@
"astro": ["[email protected]", "", { "dependencies": { "@astrojs/compiler": "^2.12.2", "@astrojs/internal-helpers": "0.7.4", "@astrojs/markdown-remark": "6.3.8", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^3.0.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.2.0", "acorn": "^8.15.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "boxen": "8.0.1", "ci-info": "^4.3.0", "clsx": "^2.1.1", "common-ancestor-path": "^1.0.1", "cookie": "^1.0.2", "cssesc": "^3.0.0", "debug": "^4.4.1", "deterministic-object-hash": "^2.0.2", "devalue": "^5.3.2", "diff": "^5.2.0", "dlv": "^1.1.3", "dset": "^3.1.4", "es-module-lexer": "^1.7.0", "esbuild": "^0.25.0", "estree-walker": "^3.0.3", "flattie": "^1.1.1", "fontace": "~0.3.0", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", "import-meta-resolve": "^4.2.0", "js-yaml": "^4.1.0", "kleur": "^4.1.5", "magic-string": "^0.30.18", "magicast": "^0.3.5", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "p-limit": "^6.2.0", "p-queue": "^8.1.0", "package-manager-detector": "^1.3.0", "picomatch": "^4.0.3", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.2", "shiki": "^3.12.0", "smol-toml": "^1.4.2", "tinyexec": "^1.0.1", "tinyglobby": "^0.2.14", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", "unifont": "~0.6.0", "unist-util-visit": "^5.0.0", "unstorage": "^1.17.0", "vfile": "^6.0.3", "vite": "^6.3.6", "vitefu": "^1.1.1", "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "yocto-spinner": "^0.2.3", "zod": "^3.25.76", "zod-to-json-schema": "^3.24.6", "zod-to-ts": "^1.2.0" }, "optionalDependencies": { "sharp": "^0.34.0" }, "bin": { "astro": "astro.js" } }, "sha512-yqgMAO2Whi9GmZkByyiPcG7CiiPr0Me0iBSorMa6M0g+wQk/ewnIqUyr7T/uFCPTQndoKwucnYFTrf0yfb0urw=="],
"astro-favicons": ["[email protected]", "", { "dependencies": { "favilib": "^1.0.5", "ultrahtml": "^1.5.3" }, "peerDependencies": { "astro": ">= 4.0.0" } }, "sha512-XFEW0Yk0sSfFu7WAT5wJ61atbT16YpO3y5n/ooxtys1/Uuv0v2XmMFw8OUrxnykmstUKoa+XjqUw22ph9cFn7A=="],
"async": ["[email protected]", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="],
"async-function": ["[email protected]", "", {}, "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA=="],
@@ -1161,14 +1156,10 @@
"clsx": ["[email protected]", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],
"color": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1", "color-string": "^1.9.0" } }, "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A=="],
"color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
"color-name": ["[email protected]", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
"color-string": ["[email protected]", "", { "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg=="],
"comma-separated-tokens": ["[email protected]", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="],
"commander": ["[email protected]", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="],
@@ -1383,8 +1374,6 @@
"fastq": ["[email protected]", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="],
"favilib": ["[email protected]", "", { "dependencies": { "escape-html": "^1.0.3", "sharp": "^0.33.5", "xml2js": "^0.6.2" } }, "sha512-3Fk5LQRU96QUmHWmyZc3WIMyz1tmte6TPlCVjaairXeHGtPHM4pnLvg11CyXTq6od1v5aaopHoREHNSwN4BKDA=="],
"fd-slicer": ["[email protected]", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
"fdir": ["[email protected]", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
@@ -1643,8 +1632,6 @@
"jimp": ["[email protected]", "", { "dependencies": { "@jimp/core": "1.6.0", "@jimp/diff": "1.6.0", "@jimp/js-bmp": "1.6.0", "@jimp/js-gif": "1.6.0", "@jimp/js-jpeg": "1.6.0", "@jimp/js-png": "1.6.0", "@jimp/js-tiff": "1.6.0", "@jimp/plugin-blit": "1.6.0", "@jimp/plugin-blur": "1.6.0", "@jimp/plugin-circle": "1.6.0", "@jimp/plugin-color": "1.6.0", "@jimp/plugin-contain": "1.6.0", "@jimp/plugin-cover": "1.6.0", "@jimp/plugin-crop": "1.6.0", "@jimp/plugin-displace": "1.6.0", "@jimp/plugin-dither": "1.6.0", "@jimp/plugin-fisheye": "1.6.0", "@jimp/plugin-flip": "1.6.0", "@jimp/plugin-hash": "1.6.0", "@jimp/plugin-mask": "1.6.0", "@jimp/plugin-print": "1.6.0", "@jimp/plugin-quantize": "1.6.0", "@jimp/plugin-resize": "1.6.0", "@jimp/plugin-rotate": "1.6.0", "@jimp/plugin-threshold": "1.6.0", "@jimp/types": "1.6.0", "@jimp/utils": "1.6.0" } }, "sha512-YcwCHw1kiqEeI5xRpDlPPBGL2EOpBKLwO4yIBJcXWHPj5PnA5urGq0jbyhM5KoNpypQ6VboSoxc9D8HyfvngSg=="],
"jiti": ["[email protected]", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-VXe6RjJkBPj0ohtqaO8vSWP3ZhAKo66fKrFNCll4BTcwljPLz03pCbaNKfzGP5MbrCYcbJ7v0nOYYwUzTEIdXQ=="],
"jpeg-js": ["[email protected]", "", {}, "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="],
"js-tokens": ["[email protected]", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
@@ -1951,7 +1938,7 @@
"potpack": ["[email protected]", "", {}, "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="],
"prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="],
"prettier": ["prettier@2.8.7", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="],
"pretty-bytes": ["[email protected]", "", {}, "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ=="],
@@ -2141,8 +2128,6 @@
"side-channel-weakmap": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="],
"simple-swizzle": ["[email protected]", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw=="],
"simple-xml-to-json": ["[email protected]", "", {}, "sha512-kWJDCr9EWtZ+/EYYM5MareWj2cRnZGF93YDNpH4jQiHB+hBIZnfPFSQiVMzZOdk+zXWqTZ/9fTeQNu2DqeiudA=="],
"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
@@ -2153,7 +2138,7 @@
"smol-toml": ["[email protected]", "", {}, "sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g=="],
"soapstone": ["soapstone@1.0.1", "", { "dependencies": { "immer": "^11.1.8", "lodash-es": "^4.18.1" }, "peerDependencies": { "react": "^19.3.0", "typescript": "^5" } }, "sha512-5f6iW2Hybjqcvmn+P+X1gH1NKDhry+ePk4F1rqK0yeFjNICx7tqy0X315tQD0Lhv/zUTNA9dV+8BLW9/o7Wlpw=="],
"soapstone": ["soapstone@1.1.0", "", { "dependencies": { "immer": "^11.1.8", "lodash-es": "^4.18.1" }, "peerDependencies": { "react": "^19.3.0", "typescript": "^5" } }, "sha512-LyPSdZcSrsYh2oPIMen54gyX496f1J4cXnzkQS5QJk1zWO5XVURypz5cuv8yYn5a2xW98BIz33DxLYnATaBVMg=="],
"socks": ["[email protected]", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="],
@@ -2507,7 +2492,7 @@
"xml-parse-from-string": ["[email protected]", "", {}, "sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g=="],
"xml2js": ["xml2js@0.6.2", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA=="],
"xml2js": ["xml2js@0.5.0", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA=="],
"xmlbuilder": ["[email protected]", "", {}, "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="],
@@ -2625,8 +2610,6 @@
"extract-zip/get-stream": ["[email protected]", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="],
"favilib/sharp": ["[email protected]", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.6.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", "@img/sharp-libvips-darwin-arm64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-x64": "1.0.4", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", "@img/sharp-linux-x64": "0.33.5", "@img/sharp-linuxmusl-arm64": "0.33.5", "@img/sharp-linuxmusl-x64": "0.33.5", "@img/sharp-wasm32": "0.33.5", "@img/sharp-win32-ia32": "0.33.5", "@img/sharp-win32-x64": "0.33.5" } }, "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw=="],
"file-manager/@doctormckay/stdlib": ["@doctormckay/[email protected]", "", {}, "sha512-XhuUOzElz6fnNdt70IYNKqhPAEpGaL4JHOhAvklRh0hAhVPW+/wLxaWT3DWUbaG5Dta5YvIp7+cZK3GhIpAuug=="],
"filelist/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="],
@@ -2659,8 +2642,6 @@
"pac-proxy-agent/socks-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
"parse-bmfont-xml/xml2js": ["[email protected]", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA=="],
"parse5/entities": ["[email protected]", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],
"pixelmatch/pngjs": ["[email protected]", "", {}, "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg=="],
@@ -2683,8 +2664,6 @@
"safe-push-apply/isarray": ["[email protected]", "", {}, "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="],
"simple-swizzle/is-arrayish": ["[email protected]", "", {}, "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA=="],
"soapstone/immer": ["[email protected]", "", {}, "sha512-EQyQtLiYW029lyoczMl/Hh4Xu7cDecSc58JRYpHyL4tIAu3eqd1yJzQX04d2BZHDkzFFvm6qJEJWOtfDSWAXbQ=="],
"source-map-support/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
@@ -2739,8 +2718,6 @@
"wrap-ansi/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="],
"yaml-language-server/prettier": ["[email protected]", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="],
"yaml-language-server/request-light": ["[email protected]", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="],
"yaml-language-server/vscode-languageserver": ["[email protected]", "", { "dependencies": { "vscode-languageserver-protocol": "3.16.0" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw=="],
@@ -2821,48 +2798,6 @@
"cliui/wrap-ansi/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"favilib/sharp/@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.0.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ=="],
"favilib/sharp/@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.0.4" }, "os": "darwin", "cpu": "x64" }, "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q=="],
"favilib/sharp/@img/sharp-libvips-darwin-arm64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg=="],
"favilib/sharp/@img/sharp-libvips-darwin-x64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ=="],
"favilib/sharp/@img/sharp-libvips-linux-arm": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g=="],
"favilib/sharp/@img/sharp-libvips-linux-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="],
"favilib/sharp/@img/sharp-libvips-linux-s390x": ["@img/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="],
"favilib/sharp/@img/sharp-libvips-linux-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw=="],
"favilib/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA=="],
"favilib/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw=="],
"favilib/sharp/@img/sharp-linux-arm": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.0.5" }, "os": "linux", "cpu": "arm" }, "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ=="],
"favilib/sharp/@img/sharp-linux-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA=="],
"favilib/sharp/@img/sharp-linux-s390x": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.0.4" }, "os": "linux", "cpu": "s390x" }, "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q=="],
"favilib/sharp/@img/sharp-linux-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA=="],
"favilib/sharp/@img/sharp-linuxmusl-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g=="],
"favilib/sharp/@img/sharp-linuxmusl-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw=="],
"favilib/sharp/@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.2.0" }, "cpu": "none" }, "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg=="],
"favilib/sharp/@img/sharp-win32-ia32": ["@img/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ=="],
"favilib/sharp/@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg=="],
"favilib/sharp/detect-libc": ["[email protected]", "", {}, "sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw=="],
"favilib/sharp/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
"filelist/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
"ndarray-pixels/sharp/@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.2.3" }, "os": "darwin", "cpu": "arm64" }, "sha512-sitdlPzDVyvmINUdJle3TNHl+AG9QcwiAMsXmccqsCOMZNIdW2/7S26w0LyU8euiLVzFBL3dXPwVCq/ODnf2vA=="],
@@ -2933,8 +2868,6 @@
"boxen/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
"favilib/sharp/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ=="],
"ndarray-pixels/sharp/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ=="],
"widest-line/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
-47
View File
@@ -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.
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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]
+5 -5
View File
@@ -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]
+34 -34
View File
@@ -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
+21
View File
@@ -0,0 +1,21 @@
# BlitzKit 1.33.0
Thank you to [HitJack](https://github.com/Hitjack007) for your contributions this update.
## Features
- Added legendary camouflages to Tankopedia [HitJack]
- The rank bars below every statistic in Tankopedia now shows the distribution of every other tank [HitJack]
- Added a Credits page for everyone who has contributed to BlitzKit
- Added an option to synchronize shells across tanks in Compare [HitJack]
## Fixes
- The tank selector popups are now properly sized vertically, stopping them from clipping the top of the page [HitJack]
- When the lights recede, there is no longer a 1-pixel spot where the light still shines
## Technical Changes
- The BlitzKit API is now split across `legendary.models.blitzkit.app`, `tanks.models.blitzkit.app`, `maps.models.blitzkit.app`, and `api.models.blitzkit.app`
- Added some compatibility for the new tier XI tanks
- More work is needed in this area to implement the new mechanics they bring
+22 -3
View File
@@ -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"
}
}
+15 -1
View File
@@ -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"
}
}
+22 -3
View File
@@ -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"
}
}
+22 -3
View File
@@ -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"
}
}
+21 -2
View File
@@ -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 -10
View File
@@ -1,17 +1,8 @@
{
"name": "blitzkit",
"version": "1.32.0",
"version": "1.33.0",
"license": "BlitzKit License",
"private": true,
"scripts": {
"dev": "cd packages/website && bun --bun run dev",
"build": "cd packages/website && 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"
},
"type": "module",
"workspaces": [
"packages/*"
-1
View File
@@ -15,7 +15,6 @@
"@types/lz4js": "^0.2.1",
"@types/three": "^0.180.0",
"adm-zip": "^0.5.16",
"crc": "^4.3.2",
"dotenv": "^17.2.2",
"fast-xml-parser": "^5.3.2",
"lodash-es": "^4.17.21",
-5
View File
@@ -1,5 +0,0 @@
export function canSplash(
type: ShellDefinition["type"],
): type is ShellType.SHELL_TYPE_HE {
return type === ShellType.SHELL_TYPE_HE;
}
+4 -4
View File
@@ -1,11 +1,11 @@
import { assertSecret } from "../blitzkit";
import type { BlitzGlossary } from "../types";
export const WOTB_GLOSSARY_DOMAIN = "https://na.wotblitz.com";
export const WOTB_GLOSSARY_PATH = "api/glossary/stuff";
export async function fetchGlossary(locale: string) {
const response = await fetch(
`${assertSecret(
import.meta.env.WOTB_GLOSSARY_DOMAIN,
)}/${locale}${assertSecret(import.meta.env.WOTB_GLOSSARY_PATH)}`,
`${WOTB_GLOSSARY_DOMAIN}/${locale}/${WOTB_GLOSSARY_PATH}`,
);
return (await response.json()) as BlitzGlossary;
}
-1
View File
@@ -1,5 +1,4 @@
export * from "./blitzShellKindToBlitzkit";
export * from "./canSplash";
export * from "./clans";
export * from "./classes";
export * from "./equipmentPrice";
+6 -6
View File
@@ -1,8 +1,8 @@
export const permanentSkills = [
'smooth_turn',
'soft_recoil',
'smooth_driving',
'smooth_turret',
'virtuoso',
'camouflage',
"smooth_turn",
"soft_recoil",
"smooth_driving",
"smooth_turret",
"virtuoso",
"camouflage",
];
+1 -2
View File
@@ -1,4 +1,3 @@
import { crc32 } from "crc";
import { decompressBlock } from "lz4js";
/**
@@ -26,7 +25,7 @@ export function readDVPL(buffer: Buffer) {
if (targetBlock.length !== footerData.cSize) {
throw new RangeError("DVPL size mismatch");
}
if (crc32(targetBlock) !== footerData.crc32) {
if (Bun.hash.crc32(targetBlock) !== footerData.crc32) {
throw new TypeError("DVPL CRC32 mismatch");
}
@@ -27,14 +27,4 @@ export abstract class AbstractBlitzKitAPI {
abstract scripts(): Promise<BlitzScripts>;
abstract strings(locale: string): Promise<Strings>;
async tank(id: number) {
const tanks = await this.tanks();
return tanks.tanks[id];
}
async model(id: number) {
const models = await this.models();
return models.models[id];
}
}
+13
View File
@@ -16,12 +16,15 @@ import { fetchPB } from "../../api";
import { fetchJSON } from "../../api/fetchJSON";
import { BlitzScripts } from "../../types/blitzScripts";
import { AbstractBlitzKitAPI } from "./abstract";
import { Cache } from "./server/0_base";
export class ClientBlitzKitAPI extends AbstractBlitzKitAPI {
@Cache()
game() {
return fetchPB(alias("api", "/definitions/game.pb"), GameDefinitions);
}
@Cache()
consumables() {
return fetchPB(
alias("api", "/definitions/consumables.pb"),
@@ -29,10 +32,12 @@ export class ClientBlitzKitAPI extends AbstractBlitzKitAPI {
);
}
@Cache()
tanks() {
return fetchPB(alias("api", "/definitions/tanks.pb"), TankDefinitions);
}
@Cache()
camouflages() {
return fetchPB(
alias("api", "/definitions/camouflage.pb"),
@@ -40,6 +45,7 @@ export class ClientBlitzKitAPI extends AbstractBlitzKitAPI {
);
}
@Cache()
provisions() {
return fetchPB(
alias("api", "/definitions/provisions.pb"),
@@ -47,14 +53,17 @@ export class ClientBlitzKitAPI extends AbstractBlitzKitAPI {
);
}
@Cache()
models() {
return fetchPB(alias("api", "/definitions/models.pb"), ModelDefinitions);
}
@Cache()
skills() {
return fetchPB(alias("api", "/definitions/skills.pb"), SkillDefinitions);
}
@Cache()
equipment() {
return fetchPB(
alias("api", "/definitions/equipment.pb"),
@@ -62,18 +71,22 @@ export class ClientBlitzKitAPI extends AbstractBlitzKitAPI {
);
}
@Cache()
gallery() {
return fetchPB(alias("api", "/definitions/gallery.pb"), Gallery);
}
@Cache()
maps() {
return fetchPB(alias("api", "/definitions/maps.pb"), MapDefinitions);
}
@Cache()
scripts() {
return fetchJSON<BlitzScripts>(alias("api", "/definitions/scripts.json"));
}
@Cache()
strings(locale: string) {
return fetchJSON<Strings>(alias("api", `/strings/${locale}.json`));
}
+58 -34
View File
@@ -87,7 +87,7 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
protected botPattern = /^.+((tutorial_bot(\d+)?)|(TU))$/;
protected stringsI18n: Record<string, Record<string, string>> = {};
private stringsI18n: Record<string, Record<string, string>> = {};
protected nationsDir?: string[];
protected tankStringIdMap: Record<string, number> = {};
protected consumablesCommon: ConsumablesCommon = {};
@@ -104,6 +104,7 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
protected gameTypeSelectorStyles?: SquadBattleTypeStylesYaml;
protected combatRoles?: CombatRolesYaml;
protected tierEqualizer?: string[][];
protected version?: string;
constructor(vfs: AbstractVFS) {
super();
@@ -115,95 +116,95 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
const { existsSync } = await import("fs");
const { readFile, writeFile, mkdir } = await import("fs/promises");
console.log("Initializing virtual file system...");
const path = await import("node:path");
this.extname = path.extname;
this.parsePath = path.parse;
await this.vfs.init();
console.log("Fetching game data...");
this.nationsDir = await this.vfs
.dir("Data/XML/item_defs/vehicles")
.then((files) => files.filter((nation) => nation !== "common"));
this.optionalDevices = await this.vfs.xml<{ root: OptionalDevices }>(
"Data/XML/item_defs/vehicles/common/optional_devices.xml",
"Data/XML/item_defs/vehicles/common/optional_devices.xml"
);
this.optionalDeviceSlots = await this.vfs.xml<{
root: OptionalDeviceSlots;
}>("Data/XML/item_defs/vehicles/common/optional_device_slots.xml");
this.tankmenAvatar = await this.vfs.xml<{ root: TankmenAvatar }>(
"Data/XML/item_defs/tankmen/avatar.xml",
"Data/XML/item_defs/tankmen/avatar.xml"
);
this.mapsYaml = await this.vfs.yaml<MapsYaml>("Data/maps.yaml");
this.camouflagesXml = await this.vfs.xml<{ root: CamouflagesXml }>(
"Data/XML/item_defs/vehicles/common/camouflages.xml",
"Data/XML/item_defs/vehicles/common/camouflages.xml"
);
this.camouflagesYaml = await this.vfs.yaml<CamouflagesYaml>(
"Data/camouflages.yaml",
"Data/camouflages.yaml"
);
this.squadBattleTypeStyles = await this.vfs.yaml<SquadBattleTypeStylesYaml>(
`Data/UI/Screens3/Lobby/Hangar/Squad/SquadBattleType.yaml`,
`Data/UI/Screens3/Lobby/Hangar/Squad/SquadBattleType.yaml`
);
this.gameTypeSelectorStyles =
await this.vfs.yaml<SquadBattleTypeStylesYaml>(
`Data/UI/Screens/Lobby/Hangar/GameTypeSelector.yaml`,
`Data/UI/Screens/Lobby/Hangar/GameTypeSelector.yaml`
);
this.combatRoles = await this.vfs.yaml<CombatRolesYaml>(
`Data/XML/item_defs/vehicles/common/combat_roles.yaml`,
`Data/XML/item_defs/vehicles/common/combat_roles.yaml`
);
this.tierEqualizer = await this.vfs.csv(
// spell:disable-next-line
`Data/XML/item_defs/vehicles/common/tier_equializer.csv`,
{ delimiter: ";" },
{ delimiter: ";" }
);
this.version = (await this.vfs.text("Data/version.txt")).split(" ")[0];
console.log("Fetching game localizations...");
await Promise.all(
locales.supported.map(async ({ locale }) => {
const root = "../../temp/game-strings";
const cachePath = `${root}/${locale}.json`;
locales.supported.map(async (supported) => {
const root = `../../temp/game-strings/${this.version}`;
const cachePath = `${root}/${supported.locale}.json`;
if (existsSync(cachePath)) {
console.log(` Cache hit for ${locale}`);
console.log(` Cache hit for ${supported.locale}`);
const content = await readFile(cachePath, "utf-8");
this.stringsI18n[locale] = JSON.parse(content) as BlitzStrings;
this.stringsI18n[supported.locale] = JSON.parse(
content
) as BlitzStrings;
return;
}
console.log(` Cache miss for ${locale} (this will take a while...)`);
console.log(
` Cache miss for ${supported.locale} (this will take a while...)`
);
const blitzLocale = locales.supported.find(
(l) => l.locale === locale,
)!.variant_blitz_local;
const stringsLocale = supported.variant_blitz_strings ?? supported.locale;
const networkStrings = (await fetch(
`https://stufficons.wgcdn.co/localizations/${blitzLocale}.yaml`,
`https://stufficons.wgcdn.co/localizations/${stringsLocale}.yaml`
)
.then((response) => response.text())
.then(parseYaml)) as BlitzStrings;
const localStrings = await this.vfs.yaml<BlitzStrings>(
`Data/Strings/${blitzLocale}.yaml`,
`Data/Strings/${stringsLocale}.yaml`
);
const combined = { ...networkStrings, ...localStrings };
await mkdir(root, { recursive: true });
await writeFile(cachePath, JSON.stringify(combined));
this.stringsI18n[locale] = combined;
}),
this.stringsI18n[supported.locale] = combined;
})
);
console.log("Fetching consumable and provision data...");
for (const match of (
await this.vfs.text(
`Data/XML/item_defs/vehicles/common/consumables/list.xml`,
`Data/XML/item_defs/vehicles/common/consumables/list.xml`
)
).matchAll(/<items path="(.+)\.xml"\/>/g)) {
if (match[1] === "prototypes") continue;
@@ -212,15 +213,15 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
this.consumablesCommon,
(
await this.vfs.xml<{ root: ConsumablesCommon }>(
`Data/XML/item_defs/vehicles/common/consumables/${match[1]}.xml`,
`Data/XML/item_defs/vehicles/common/consumables/${match[1]}.xml`
)
).root,
).root
);
}
for (const match of (
await this.vfs.text(
`Data/XML/item_defs/vehicles/common/provisions/list.xml`,
`Data/XML/item_defs/vehicles/common/provisions/list.xml`
)
).matchAll(/<items path="(.+)\.xml"\/>/g)) {
if (match[1] === "prototypes") continue;
@@ -229,15 +230,15 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
this.provisionsCommon,
(
await this.vfs.xml<{ root: ConsumablesCommon }>(
`Data/XML/item_defs/vehicles/common/provisions/${match[1]}.xml`,
`Data/XML/item_defs/vehicles/common/provisions/${match[1]}.xml`
)
).root,
).root
);
}
for (const nation of this.nationsDir!) {
const tankList = await this.vfs.xml<{ root: VehicleDefinitionList }>(
`Data/XML/item_defs/vehicles/${nation}/list.xml`,
`Data/XML/item_defs/vehicles/${nation}/list.xml`
);
for (const tankKey in tankList.root) {
@@ -253,6 +254,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 +293,8 @@ export abstract class ServerBlitzKitAPI0 extends AbstractBlitzKitAPI {
collection[locale] = localizedString;
}
collection[locales.default] = collection[locales.default] ?? name;
return { locales: collection } satisfies I18nString;
}
}
@@ -279,7 +303,7 @@ export function Cache(disableInDev = false) {
const cache = new WeakMap<object, Map<string, Promise<unknown>>>();
return function <This, Arguments extends any[], Return>(
target: (this: This, ...args: Arguments) => Promise<Return>,
target: (this: This, ...args: Arguments) => Promise<Return>
// TODO: evaluate if we need context to make the error trace easier
// context: ClassMethodDecoratorContext<
// This,
@@ -12,7 +12,7 @@ export abstract class ServerBlitzKitAPI10 extends ServerBlitzKitAPI9 {
await Promise.all(
locales.supported.map(async (supported) => {
const glossary = await fetchGlossary(
supported.variant_blitz_local ?? supported.locale,
supported.variant_blitz_glossary ?? supported.locale,
);
console.log(
@@ -1,25 +1,53 @@
import { ConsumablesCommon, OptionalDevices } from "../../../types";
import { BlitzEffectScript } from "../../../types/blitzEffectScript";
import { BlitzScripts } from "../../../types/blitzScripts";
import type {
BlitzEffectScript,
BlitzScripts,
ConsumablesCommon,
OptionalDevices,
} from "../../../types";
import { AbstractVFS } from "../../vfs";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI10 } from "./10_avatars";
function assignNormalizedScript(
target: Record<string, BlitzEffectScript>,
export abstract class ServerBlitzKitAPI11 extends ServerBlitzKitAPI10 {
// The XML parser keeps switches as text, but the script types declare them as
// booleans
private normalizeSwitches<Value>(value: Value): Value {
if (typeof value === "string") {
const lowered = value.toLowerCase();
if (lowered === "true") return true as Value;
if (lowered === "false") return false as Value;
}
if (Array.isArray(value))
return value.map((child) => this.normalizeSwitches(child)) as Value;
if (typeof value === "object" && value !== null) {
return Object.fromEntries(
Object.entries(value).map(([key, child]) => [
key,
this.normalizeSwitches(child),
]),
) as Value;
}
return value;
}
private assignNormalizedScript(
target: Record<number, BlitzEffectScript>,
key: number,
script?: BlitzEffectScript,
) {
) {
if (script === undefined) return;
if (script["#text"] === "StaticFactorDevice") {
script["#text"] = script.attribute!;
}
target[key] = script;
}
target[key] = this.normalizeSwitches(script);
}
export abstract class ServerBlitzKitAPI11 extends ServerBlitzKitAPI10 {
@Cache()
async scripts() {
const scripts: BlitzScripts = {
@@ -35,14 +63,18 @@ export abstract class ServerBlitzKitAPI11 extends ServerBlitzKitAPI10 {
for (const key in optionalDevices.root) {
const equipment = optionalDevices.root[key];
assignNormalizedScript(scripts.equipment, equipment.id, equipment.script);
this.assignNormalizedScript(
scripts.equipment,
equipment.id,
equipment.script,
);
}
async function assign(
const assign = async (
vfs: AbstractVFS,
dir: string,
target: keyof BlitzScripts,
) {
target: "consumables" | "provisions",
) => {
const root = `Data/XML/item_defs/vehicles/common/${dir}`;
const list = await vfs.text(`${root}/list.xml`);
const pattern = /<items path="(\w+)\.xml"\/>/gm;
@@ -55,14 +87,14 @@ export abstract class ServerBlitzKitAPI11 extends ServerBlitzKitAPI10 {
for (const key in things.root) {
const thing = things.root[key];
assignNormalizedScript(
this.assignNormalizedScript(
scripts[target],
thing.id,
things.root[key].script,
);
}
}
}
};
await assign(this.vfs, "consumables", "consumables");
await assign(this.vfs, "provisions", "provisions");
+519 -139
View File
@@ -1,36 +1,319 @@
import {
type AugmentAttributeDefinitions,
BlitzCrewType,
BlitzModuleType,
blitzShellKindToBlitzkit,
BlitzTankClass,
ChassisDefinitionsList,
type ConsumablesVehicleFilter,
EngineDefinitionsList,
GunDefinitionsList,
ShellDefinitionsList,
ShellKind,
sluggify,
TechTreeLayoutYaml,
toUniqueId,
TurretDefinitionsList,
UnlocksListing,
UpgradeAttributesXml,
UpgradeProgressionXml,
UpgradeProgressionXmlNode,
UpgradeProgressionXmlRequirement,
type VehicleAbilityItem,
type VehicleDefinitionGun,
VehicleDefinitionList,
VehicleDefinitions,
} from "@blitzkit/core";
import {
AbilitySource,
AssaultRanges,
AugmentAttribute,
AugmentNode,
AugmentNodeType,
AugmentProgression,
AugmentRequirement,
Crew,
Equalizer,
GunDefinition,
ModulePosition,
ModuleType,
ResearchCost,
ShellDefinition,
TankDefinitions,
TankPrice,
TankPriceType,
TankType,
Unlock,
type VehicleAbility,
} from "@blitzkit/protos";
import { Cache, ServerBlitzKitAPI0 } from "./0_base";
export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
// A gun the way a tank's turret or a vehicle ability builds it. `gun`
// overrides the shared gun entry, which is all an ability has
private parseGun(
nation: string,
gunKey: string,
gunList: GunDefinitionsList,
shellList: ShellDefinitionsList,
gun: Partial<VehicleDefinitionGun>,
unlocks: GunDefinition["unlocks"],
) {
const gunListEntry = gunList.shared[gunKey];
const gunType =
gun.clip === undefined
? "regular"
: gun.pumpGunMode
? "auto_reloader"
: "auto_loader";
const gunClipCount = gunType === "regular" ? 1 : gun.clip!.count;
const shotDispersionFactors =
gun.shotDispersionFactors ?? gunListEntry.shotDispersionFactors;
let assault_ranges: AssaultRanges | undefined;
if (gun.extras?.trayShell) {
const types = gun.extras.trayShell.kinds.split(" ").map((string) => {
const trimmed = string.trim();
if (trimmed in blitzShellKindToBlitzkit) {
return blitzShellKindToBlitzkit[trimmed as ShellKind];
}
throw new SyntaxError(`Invalid shell kind: ${trimmed}`);
});
const sectorNames = Object.keys(gun.extras.trayShell.sectors);
if (sectorNames.length !== 1 || sectorNames[0] !== "sector") {
throw new SyntaxError("Invalid tray shell sector");
}
const sector = gun.extras.trayShell.sectors.sector;
assault_ranges = {
types,
ranges: sector.map((value) => ({
factor: value.factor,
distance: value.distance,
})),
};
}
return {
id: toUniqueId(nation, gunList.ids[gunKey]),
weight: gunListEntry.weight,
rotation_speed: gunListEntry.rotationSpeed,
name: this.getString(gunListEntry.userString),
tier: gunListEntry.level,
shells: this.parseShells(nation, gunListEntry, shellList),
camouflage_loss:
gun.invisibilityFactorAtShot === undefined
? 0
: typeof gun.invisibilityFactorAtShot === "number"
? gun.invisibilityFactorAtShot
: gun.invisibilityFactorAtShot.at(-1)!,
aim_time: gun.aimingTime ?? gunListEntry.aimingTime,
dispersion_base:
gun.shotDispersionRadius ?? gunListEntry.shotDispersionRadius,
dispersion_damaged: shotDispersionFactors.whileGunDamaged,
dispersion_shot: shotDispersionFactors.afterShot,
dispersion_traverse: shotDispersionFactors.turretRotation,
unlocks,
shell_capacity: gun.maxAmmo ?? gunListEntry.maxAmmo,
assault_ranges,
burst:
gun.burst && gun.burst.count > 1
? {
count: gun.burst.count,
interval: 60 / gun.burst.rate,
}
: undefined,
gun_type:
gunType === "regular"
? {
$case: "regular",
value: {
reload: gun.reloadTime ?? 0,
},
}
: gunType === "auto_reloader"
? {
$case: "auto_reloader",
value: {
intra_clip: 60 / gun.clip!.rate,
shell_count: gunClipCount,
shell_reloads: gun.pumpGunReloadTimes!.split(" ").map(Number),
},
}
: {
$case: "auto_loader",
value: {
intra_clip: 60 / gun.clip!.rate,
clip_reload: gun.reloadTime ?? 0,
shell_count: gunClipCount,
},
},
} satisfies GunDefinition;
}
// The shells a gun fires. Its shots may override a shell's speed, range and
// penetration, and otherwise the shell's own values hold
private parseShells(
nation: string,
gunListEntry: GunDefinitionsList["shared"][string],
shellList: ShellDefinitionsList,
) {
return Object.keys(gunListEntry.shots ?? {}).map((shellKey) => {
const gunShellEntry = gunListEntry.shots[shellKey];
const shell = shellList[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 penetrationRaw = piercingPower
.split(" ")
.filter((penetrationString) => penetrationString !== "")
.map(Number);
return {
id: toUniqueId(nation, shell.id),
name: this.getString(shell.userString),
velocity: speed,
armor_damage: shell.damage.armor,
module_damage: shell.damage.devices,
caliber: shell.caliber,
normalization: shell.normalizationAngle,
ricochet: shell.ricochetAngle,
type: blitzShellKindToBlitzkit[shell.kind],
explosion_radius:
shell.kind === "HIGH_EXPLOSIVE"
? shell.explosionRadius ?? 0
: undefined,
icon: shell.icon,
penetration: {
near: penetrationRaw[0],
far: penetrationRaw[1],
},
range: maxDistance,
acceleration: shell.acceleration,
max_speed: shell.maxSpeed,
} satisfies ShellDefinition;
});
}
// A vehicle ability's placeholder gun as `nation:gun`, built like a tank's own
// guns. An ability's gun has no turret, so its shared entry is all its data
private async placeholderGun(reference: string) {
const [nation, gunKey] = reference.trim().split(":");
const base = `Data/XML/item_defs/vehicles/${nation}/components`;
const { root: gunList } = await this.vfs.xml<{
root: GunDefinitionsList;
}>(`${base}/guns.xml`);
const { root: shellList } = await this.vfs.xml<{
root: ShellDefinitionsList;
}>(`${base}/shells.xml`);
const shared = gunList.shared[gunKey];
if (shared === undefined) {
throw new Error(`Vehicle ability gun ${reference} is not in guns.xml`);
}
return this.parseGun(nation, gunKey, gunList, shellList, shared, []);
}
// The hidden provisions and consumables the game marks as vehicle abilities,
// by the key a tank's `extras` names them with
private vehicleAbilityItems() {
const items = new Map<string, VehicleAbilityItem>();
const groups = [
[AbilitySource.ABILITY_SOURCE_CONSUMABLE, this.consumablesCommon],
[AbilitySource.ABILITY_SOURCE_PROVISION, this.provisionsCommon],
] as const;
for (const [source, group] of groups) {
for (const [key, item] of Object.entries(group)) {
if (!("isVehicleAbility" in item)) continue;
// The names in the filter's `include`, or nothing when it doesn't name tanks
const vehicle = item.vehicleFilter?.include.vehicle;
items.set(key, {
source,
id: item.id,
vehicleNames:
vehicle !== undefined && "name" in vehicle
? vehicle.name.trim().split(/\s+/)
: undefined,
gun: item.script?.gun,
});
}
}
return items;
}
// The abilities a tank has, from the hidden items its own `extras` names.
// Guns name none in the game files today, so one is an error, not a gap
private async vehicleAbilitiesOf(
nation: string,
tankKey: string,
root: {
extras?: Record<string, unknown>;
turrets0?: Record<
string,
{ guns: Record<string, { extras?: Record<string, unknown> }> }
>;
},
items: Map<string, VehicleAbilityItem>,
) {
const name = `${nation}:${tankKey}`;
for (const turret of Object.values(root.turrets0 ?? {})) {
for (const gun of Object.values(turret.guns ?? {})) {
for (const key of Object.keys(gun.extras ?? {})) {
if (items.has(key)) {
throw new Error(
`Gun extra ${key} on ${name} is a vehicle ability, which is only linked for tanks`,
);
}
}
}
}
const abilities: VehicleAbility[] = [];
for (const key of Object.keys(root.extras ?? {})) {
const item = items.get(key);
if (item === undefined) continue;
if (item.vehicleNames && !item.vehicleNames.includes(name)) {
throw new Error(
`${key} is on ${name}, which its vehicle filter does not include`,
);
}
abilities.push({
source: item.source,
id: item.id,
gun:
item.gun === undefined
? undefined
: await this.placeholderGun(item.gun),
});
}
return abilities;
}
private parseResearchCost(raw: number | string) {
if (typeof raw === "number") {
return {
@@ -49,9 +332,133 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
}
}
private parseAugmentProgression(
xml: UpgradeProgressionXml,
attributeDefinitions: AugmentAttributeDefinitions,
) {
const iconName = (path?: string) => path?.split("/").at(-1);
const types = {
NODETYPE_COMMON: AugmentNodeType.AUGMENT_NODE_TYPE_COMMON,
NODETYPE_MECHANIC: AugmentNodeType.AUGMENT_NODE_TYPE_MECHANIC,
NODETYPE_ALTERNATIVE_MECHANIC:
AugmentNodeType.AUGMENT_NODE_TYPE_ALTERNATIVE,
} satisfies Record<UpgradeProgressionXmlNode["nodeType"], AugmentNodeType>;
const parseRequirements = (
requiredNodes: UpgradeProgressionXmlNode["requiredNodes"],
) =>
(requiredNodes === undefined || requiredNodes === ""
? []
: requiredNodes.node
).map((requirement: UpgradeProgressionXmlRequirement) =>
typeof requirement === "string"
? ({
tech_name: requirement,
vertical_first: false,
} satisfies AugmentRequirement)
: ({
tech_name: requirement["#text"],
vertical_first: requirement["@_verticalFirst"] === "true",
} satisfies AugmentRequirement),
);
const parseNode = (node: UpgradeProgressionXmlNode) =>
({
id: node.id,
tech_name: node.techName,
type: types[node.nodeType],
xp_cost: node.xpCost ?? 0,
position:
node.gridPosition === undefined
? undefined
: { x: node.gridPosition.column, y: node.gridPosition.row },
requires: parseRequirements(node.requiredNodes),
attributes: (node.attributes?.attribute ?? []).map(
({ attributeName, value }) => {
const definition = attributeDefinitions.get(attributeName);
return {
name: attributeName,
value: typeof value === "boolean" ? Number(value) : value,
icon: iconName(definition?.icon),
title:
definition === undefined
? undefined
: this.getString(definition.title),
} satisfies AugmentAttribute;
},
),
name:
node.displayName === undefined
? undefined
: this.getString(node.displayName),
} satisfies AugmentNode);
const parsedNodes = xml.nodes.node.map(parseNode);
const byTechName = new Map(
parsedNodes.map((node) => [node.tech_name, node]),
);
const groups =
xml.alternativeMechanicGroups?.alternativeMechanicGroup ?? [];
if (groups.length > 1) {
throw new Error(
"Upgrade progression with more than one alternative group",
);
}
const group = groups.at(0);
const alternativeNames = new Set(group?.alternativeNodes.node);
for (const node of parsedNodes) {
if (
node.type === AugmentNodeType.AUGMENT_NODE_TYPE_ALTERNATIVE &&
!alternativeNames.has(node.tech_name)
) {
throw new Error(
`Alternative upgrade ${node.tech_name} belongs to no group`,
);
}
}
return {
rows: xml.matrix.rows,
columns: xml.matrix.columns,
nodes: parsedNodes.filter(
(node) => node.type !== AugmentNodeType.AUGMENT_NODE_TYPE_ALTERNATIVE,
),
group:
group === undefined
? undefined
: {
tech_name: group.techName,
name: this.getString(group.displayName),
description: this.getString(group.description),
icon: iconName(group.icon),
xp_cost: group.xpCost,
position: {
x: group.gridPosition.column,
y: group.gridPosition.row,
},
requires: parseRequirements(group.requiredNodes),
alternatives: group.alternativeNodes.node.map((techName) => {
const node = byTechName.get(techName);
if (node === undefined) {
throw new Error(`Unknown alternative upgrade ${techName}`);
}
return node;
}),
},
} satisfies AugmentProgression;
}
@Cache()
async tanks() {
const tankDefinitions = TankDefinitions.create();
const abilityItems = this.vehicleAbilityItems();
const gameModeNativeNames: Record<string, string> = {};
@@ -162,6 +569,23 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
const tankXps = new Map<number, ResearchCost>();
// Only some builds ship augment trees
const upgradeAttributesPath =
"Data/XML/item_defs/vehicles/common/tank_upgrade_attributes.xml";
const upgradeAttributeDefinitions: AugmentAttributeDefinitions = new Map();
if ((await this.vfs.resolve(upgradeAttributesPath)) !== null) {
const upgradeAttributes =
await this.vfs.xmlWithAttributes<UpgradeAttributesXml>(
upgradeAttributesPath,
);
for (const { attributeName, icon, title } of upgradeAttributes.root
.attributes.attribute) {
upgradeAttributeDefinitions.set(attributeName, { icon, title });
}
}
for (const nation of this.nationsDir!) {
const tankList = await this.vfs.xml<{ root: VehicleDefinitionList }>(
`Data/XML/item_defs/vehicles/${nation}/list.xml`,
@@ -362,11 +786,96 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
const name_full =
name === canonicalFullName ? undefined : canonicalFullName;
// The client lays modules out automatically unless the tank has its own
// file, in which case every cell is placed by hand
const module_positions: ModulePosition[] = [];
const layoutPath = `Data/Configs/TechTree/${nation}/${tankKey}.yaml`;
const resolvedLayoutPath = await this.vfs.resolve(layoutPath);
if (resolvedLayoutPath !== null) {
const layout = await this.vfs.yaml<TechTreeLayoutYaml>(layoutPath);
if (layout.modules) {
for (const [moduleKey, { position }] of Object.entries(
layout.modules,
)) {
// keys look like `#vehicleGun:_85mm_S-53`
const [kind, name] = moduleKey.replace(/^#/, "").split(":");
let rawId: number | undefined;
let type: ModuleType;
switch (kind) {
case "vehicle":
rawId = tankList.root[name]?.id;
type = ModuleType.MODULE_TYPE_VEHICLE;
break;
case "vehicleChassis":
rawId = chassisList.root.ids[name];
type = ModuleType.MODULE_TYPE_TRACKS;
break;
case "vehicleEngine":
rawId = enginesList.root.ids[name];
type = ModuleType.MODULE_TYPE_ENGINE;
break;
case "vehicleGun":
rawId = gunList.root.ids[name];
type = ModuleType.MODULE_TYPE_GUN;
break;
case "vehicleTurret":
rawId = turretList.root.ids[name];
type = ModuleType.MODULE_TYPE_TURRET;
break;
default:
throw new Error(
`Unknown module kind in ${layoutPath}: ${kind}`,
);
}
if (rawId === undefined) {
throw new Error(
`Unknown module in ${layoutPath}: ${moduleKey}`,
);
}
module_positions.push({
id: toUniqueId(nation, rawId),
type,
position: { x: position[0], y: position[1] },
});
}
}
}
const augment_progression =
tankDefinition.root.upgradeProgression === undefined
? undefined
: this.parseAugmentProgression(
(
await this.vfs.xmlWithAttributes<{
root: { upgradeProgression: UpgradeProgressionXml };
}>(`Data/XML/item_defs/vehicles/${nation}/${tankKey}.xml`)
).root.upgradeProgression,
upgradeAttributeDefinitions,
);
tankDefinitions.tanks[tankId] = {
ancestors: [],
successors: [],
id: tankId,
dev_name: tankKey,
module_positions,
augment_progression,
vehicle_abilities: await this.vehicleAbilitiesOf(
nation,
tankKey,
tankDefinition.root,
abilityItems,
),
roles: {},
camouflages: camouflages,
fixed_camouflage: fixedCamouflage,
@@ -390,7 +899,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,
@@ -488,149 +997,20 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
),
});
let gunIndex = 0;
for (const gunKey in turret.guns) {
const gun = turret.guns[gunKey];
const gunId = toUniqueId(nation, gunList.root.ids[gunKey]);
const gunListEntry = gunList.root.shared[gunKey];
const gunName = this.getString(gunListEntry.userString);
const gunType =
"clip" in gun
? gun.pumpGunMode
? "autoReloader"
: "autoLoader"
: "regular";
const gunClipCount = gunType === "regular" ? 1 : gun.clip!.count;
const shotDispersionFactors =
gun.shotDispersionFactors ?? gunListEntry.shotDispersionFactors;
let assault_ranges: AssaultRanges | undefined;
if (gun.extras?.trayShell) {
const types = gun.extras.trayShell.kinds
.split(" ")
.map((string) => {
const trimmed = string.trim();
if (trimmed in blitzShellKindToBlitzkit) {
return blitzShellKindToBlitzkit[trimmed as ShellKind];
}
throw new SyntaxError(`Invalid shell kind: ${trimmed}`);
});
const sectorNames = Object.keys(gun.extras.trayShell.sectors);
if (sectorNames.length !== 1 || sectorNames[0] !== "sector") {
throw new SyntaxError("Invalid tray shell sector");
}
const sector = gun.extras.trayShell.sectors.sector;
assault_ranges = {
types,
ranges: sector.map((value) => ({
factor: value.factor,
distance: value.distance,
})),
};
}
totalUnlocks.push(gun.unlocks);
tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push({
id: gunId,
weight: gunListEntry.weight,
rotation_speed: gunListEntry.rotationSpeed,
name: gunName,
tier: gunListEntry.level,
shells: [],
camouflage_loss:
typeof gun.invisibilityFactorAtShot === "number"
? gun.invisibilityFactorAtShot
: gun.invisibilityFactorAtShot.at(-1)!,
aim_time: gun.aimingTime ?? gunListEntry.aimingTime,
dispersion_base:
gun.shotDispersionRadius ?? gunListEntry.shotDispersionRadius,
dispersion_damaged: shotDispersionFactors.whileGunDamaged,
dispersion_shot: shotDispersionFactors.afterShot,
dispersion_traverse: shotDispersionFactors.turretRotation,
unlocks: resolveUnlocks(
this.blitzModuleTypeToBlitzkit,
gun.unlocks,
tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push(
this.parseGun(
nation,
gunKey,
gunList.root,
shellList.root,
gun,
resolveUnlocks(this.blitzModuleTypeToBlitzkit, gun.unlocks),
),
shell_capacity: gun.maxAmmo ?? gunListEntry.maxAmmo,
assault_ranges,
burst:
gun.burst && gun.burst.count > 1
? {
count: gun.burst.count,
interval: 60 / gun.burst.rate,
}
: undefined,
gun_type:
gunType === "regular"
? {
$case: "regular",
value: {
reload: gun.reloadTime,
},
}
: gunType === "autoReloader"
? {
$case: "auto_reloader",
value: {
intra_clip: 60 / gun.clip!.rate,
shell_count: gunClipCount,
shell_reloads: gun
.pumpGunReloadTimes!.split(" ")
.map(Number),
},
}
: {
$case: "auto_loader",
value: {
intra_clip: 60 / gun.clip!.rate,
clip_reload: gun.reloadTime,
shell_count: gunClipCount,
},
},
} satisfies GunDefinition);
for (const shellKey in gunListEntry.shots) {
const gunShellEntry = gunListEntry.shots[shellKey];
const shell = shellList.root[shellKey];
const shellId = toUniqueId(nation, shell.id);
const shellName = this.getString(shell.userString);
const penetrationRaw = gunShellEntry.piercingPower
.split(" ")
.filter((penetrationString) => penetrationString !== "")
.map(Number);
tankDefinitions.tanks[tankId].turrets[turretIndex].guns[
gunIndex
].shells.push({
id: shellId,
name: shellName,
velocity: gunShellEntry.speed,
armor_damage: shell.damage.armor,
module_damage: shell.damage.devices,
caliber: shell.caliber,
normalization: shell.normalizationAngle,
ricochet: shell.ricochetAngle,
type: blitzShellKindToBlitzkit[shell.kind],
explosion_radius:
shell.kind === "HIGH_EXPLOSIVE"
? (shell.explosionRadius ?? 0)
: undefined,
icon: shell.icon,
penetration: {
near: penetrationRaw[0],
far: penetrationRaw[1],
},
range: gunShellEntry.maxDistance,
});
}
gunIndex++;
);
}
turretIndex++;
@@ -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,57 @@ 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`))
);
},
),
);
const [nation, tankKey] = vehicle.split(":");
// some unique camos only set the preset for their one tank
const preset =
yamlEntry.preset ??
yamlEntry.override?.[nation]?.override?.[tankKey]?.preset;
let hasPreset = false;
if (preset !== undefined) {
if (!skinPresets.has(vehicle)) {
skinPresets.set(vehicle, this.skinPresets(vehicle));
}
hasPreset = (await skinPresets.get(vehicle)!).has(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,
attachment: camo.kind === "customization",
};
}
+152 -37
View File
@@ -2,21 +2,110 @@ 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 { Armor, Crew, ModelDefinitions, ProtoVector3 } from "@blitzkit/protos";
import { MathUtils, Vector3 as THREEVector3, Vector3Tuple } from "three";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI2 } from "./2_camouflages";
// The `front` and `back` tags hold "min max range" in degrees
function parseExtraPitchLimitValues(raw: string | undefined) {
if (raw === undefined) return undefined;
return raw.trim().split(/\s+/).map(Number);
}
export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
private vector3TupleToBlitzkit(tuple: Vector3Tuple) {
return { x: tuple[0], y: tuple[1], z: -tuple[2] } satisfies Vector3;
return { x: tuple[0], y: tuple[1], z: -tuple[2] } satisfies ProtoVector3;
}
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(
@@ -63,6 +152,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 +232,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: {},
@@ -204,30 +295,41 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
turret.userString;
let turretCollisionName = this.parsePath!(
turret.hitTester.collisionModel,
).name.toLowerCase();
const isFullYaw = -turretYaw[0] + turretYaw[1] === 360;
if (!collisionBoundingBoxes[turretCollisionName] && isFullYaw) {
turretCollisionName = "turret_01";
console.warn(
`HACK: Missing turret collision mesh for ${nation}/${tankKey}; turret key: ${
turretKey
}; collision model: ${turretCollisionName}; available options: ${Object.keys(
collisionBoundingBoxes,
).join(", ")}; using ${turretCollisionName} instead`,
);
}
let turretBoundingBox = collisionBoundingBoxes[turretCollisionName];
if (turretBoundingBox === undefined) {
console.warn("HACK: missing collision; using 0's");
turretBoundingBox = { min: [0, 0, 0], max: [0, 0, 0] };
}
modelDefinitions.models[tankId].turrets[turretId] = {
armor: turretArmor,
gun_origin: this.vector3TupleToBlitzkit(gunOrigin),
model_id: turretModel,
yaw:
-turretYaw[0] + turretYaw[1] === 360
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),
},
};
@@ -243,20 +345,33 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
)
.split(" ")
.map(Number) as [number, number];
const gunModel = Number(
let gunModel = Number(
this.parsePath!(gun.models.undamaged).name.split("_")[1],
);
const front = gun.extraPitchLimits?.front
? gun.extraPitchLimits.front.split(" ").map(Number)
: undefined;
const back = gun.extraPitchLimits?.back
? gun.extraPitchLimits.back.split(" ").map(Number)
: undefined;
const transition = gun.extraPitchLimits?.transition
? typeof gun.extraPitchLimits.transition === "number"
? gun.extraPitchLimits.transition
: gun.extraPitchLimits.transition.at(-1)!
: undefined;
if (tankId === 30497) {
console.warn(
"HACK: using gun_02 for hacker tank instead of gun_01... hehe, that's quite appropriate for this tank haha",
);
gunModel = 2;
}
// The client merges shared and per-tank values one field at a time:
// front, back and transition each fall back on the shared gun
const extraPitchLimits = {
...gunListEntry.extraPitchLimits,
...gun.extraPitchLimits,
};
const front = parseExtraPitchLimitValues(extraPitchLimits.front);
const back = parseExtraPitchLimitValues(extraPitchLimits.back);
// A repeated tag overwrites the last one, and one value covers both
const transition =
extraPitchLimits.transition === undefined
? undefined
: typeof extraPitchLimits.transition === "number"
? extraPitchLimits.transition
: extraPitchLimits.transition.at(-1)!;
const gunArmor: Armor = { thickness: {}, spaced: [] };
const maskName = `gun_${gunModel.toString().padStart(2, "0")}`;
const maskEnabled =
@@ -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"),
},
},
});
@@ -20,9 +20,7 @@ export abstract class ServerBlitzKitAPI9 extends ServerBlitzKitAPI8 {
provisionNativeNames[key] = provision.id;
});
const version = (await this.vfs.text("Data/version.txt")).split(" ")[0];
gameDefinitions.version = version;
gameDefinitions.version = this.version!;
gameDefinitions.nations = (
await this.vfs.yaml<AvailableNationsYaml>("Data/available_nations.yaml")
).available_nations;
@@ -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
View File
@@ -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";
@@ -23,7 +24,9 @@ export * from "./romanize";
export * from "./sluggify";
export * from "./staticAsset";
export * from "./sum";
export * from "./tankBoundingBox";
export * from "./tankDefinitions";
export * from "./tankEnvironment";
export * from "./tankIcon";
export * from "./tankNames";
export * from "./unionBoundingBox";
@@ -1,9 +1,9 @@
import { BoundingBox, Vector3 } from "../../../protos/src/blitzkit";
import { BoundingBox, ProtoVector3 } from "../../../protos/src/blitzkit";
export function normalizeBoundingBox(boundingBox: BoundingBox) {
return {
x: boundingBox.max!.x - boundingBox.min!.x,
y: boundingBox.max!.y - boundingBox.min!.y,
z: boundingBox.max!.z - boundingBox.min!.z,
} satisfies Vector3;
} satisfies ProtoVector3;
}
@@ -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>;
}
+19 -1
View File
@@ -4,9 +4,21 @@ import { XMLParser } from "fast-xml-parser";
import type { normalize } from "node:path/posix";
import { parse as parseYaml } from "yaml";
// Tags of an upgrade progression that are lists even with a single child
const UPGRADE_PROGRESSION_LIST_TAGS = new Set([
"node",
"attribute",
"alternativeMechanicGroup",
]);
export abstract class AbstractVFS {
textDecoder = new TextDecoder();
private xmlParser = new XMLParser();
private attributeXmlParser = new XMLParser({
ignoreAttributes: false,
// A lone child would otherwise parse to an object instead of a list
isArray: (name) => UPGRADE_PROGRESSION_LIST_TAGS.has(name),
});
protected normalizePath?: typeof normalize;
@@ -14,7 +26,7 @@ export abstract class AbstractVFS {
const path = await import("node:path/posix");
this.normalizePath = path.normalize;
await this._init();
return await this._init();
}
protected abstract _init(): Promise<typeof this>;
@@ -80,6 +92,12 @@ export abstract class AbstractVFS {
return this.xmlParser.parse(file) as Type;
}
// Keeps attributes as `@_name` and lists as arrays, which `xml` drops
async xmlWithAttributes<Type>(path: string) {
const file = await this.text(path);
return this.attributeXmlParser.parse(file) as Type;
}
protected async _csv(text: string, options: Options = {}) {
const parsed = parseCSV(text, options);
return parsed;
+18
View File
@@ -0,0 +1,18 @@
import { assertSecret } from "@blitzkit/core";
import { AbstractVFS } from "./abstract";
import { LocalVFS } from "./local";
import { ZipVFS } from "./zip";
export async function createClientVFS() {
let vfs: AbstractVFS;
if (import.meta.env.CLIENT_PROVIDER === "zip") {
vfs = new ZipVFS(assertSecret(import.meta.env.CLIENT_SOURCE));
} else {
vfs = new LocalVFS(assertSecret(import.meta.env.CLIENT_DIR));
}
await vfs.init();
return vfs;
}
+1
View File
@@ -1,3 +1,4 @@
export * from "./gunTypeOrder";
export * from "./skills";
export * from "./tankClassOrder";
export * from "./treeTypeOrder";
+1
View File
@@ -0,0 +1 @@
export const MAX_SKILL_LEVEL = 7;
-50
View File
@@ -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
View File
@@ -1 +0,0 @@
export * from './imgur';
-1
View File
@@ -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";
+142 -200
View File
@@ -1,5 +1,4 @@
import { times } from "lodash-es";
import type { Vector3Tuple, Vector4Tuple } from "three";
import { WindowsReadStream } from "./windows";
enum DxgiFormat {
@@ -127,6 +126,16 @@ enum DxgiFormat {
FORCE_UINT = 0xffffffff,
}
enum BlockFormat {
BC1,
BC2,
BC3,
}
// red, green and blue of a packed 5:6:5 color
const CHANNEL_SHIFTS = [11, 5, 0];
const CHANNEL_MAXIMUMS = [31, 63, 31];
enum DdsDimension {
UNKNOWN = 0,
BUFFER = 1,
@@ -180,44 +189,18 @@ export class DdsReadStream extends WindowsReadStream {
switch (dxgiFormat) {
case DxgiFormat.BC1_TYPELESS:
case DxgiFormat.BC1_UNORM:
case DxgiFormat.BC1_UNORM_SRGB: {
return this.iterateBlocks(header.width, header.height, () => {
const colorInterpolations = this.bc1ColorInterpolations();
const colorKeys = this.bc1ColorKeys();
return (index) => colorInterpolations[colorKeys[index]];
});
}
case DxgiFormat.BC1_UNORM_SRGB:
return this.decodeBlocks(header.width, header.height, BlockFormat.BC1);
case DxgiFormat.BC2_TYPELESS:
case DxgiFormat.BC2_UNORM:
case DxgiFormat.BC2_UNORM_SRGB: {
return this.iterateBlocks(header.width, header.height, () => {
const alphaInterpolations = this.bc2AlphaInterpolations();
const colorInterpolations = this.bc2ColorInterpolations();
const colorKeys = this.bc1ColorKeys();
return (index) => {
return [
...colorInterpolations[colorKeys[index]],
alphaInterpolations[index],
];
};
});
}
case DxgiFormat.BC2_UNORM_SRGB:
return this.decodeBlocks(header.width, header.height, BlockFormat.BC2);
case DxgiFormat.BC3_TYPELESS:
case DxgiFormat.BC3_UNORM:
case DxgiFormat.BC3_UNORM_SRGB: {
return this.iterateBlocks(header.width, header.height, () => {
const alphaInterpolations = this.bc3AlphaInterpolations();
const alphaKeys = this.bc3AlphaKeys();
const colorInterpolations = this.bc2ColorInterpolations();
const colorKeys = this.bc1ColorKeys();
return (index) => [
...colorInterpolations[colorKeys[index]],
alphaInterpolations[alphaKeys[index]],
];
});
}
case DxgiFormat.BC3_UNORM_SRGB:
return this.decodeBlocks(header.width, header.height, BlockFormat.BC3);
default:
throw new TypeError(
@@ -299,189 +282,148 @@ export class DdsReadStream extends WindowsReadStream {
throw new RangeError("Width and height must be divisible by 4");
}
}
iterateBlocks(
width: number,
height: number,
blockIterator: () => (index: number) => Vector4Tuple
) {
/**
* writes each 4x4 block straight into the image; a block's palette is worked
* out from 0 to 1 and rounded to bytes once, as each pixel would round it
*/
decodeBlocks(width: number, height: number, format: BlockFormat) {
this.assetFactor4(width, height);
const data = Buffer.alloc(width * height * 4);
const blocksX = width / 4;
const blocksY = height / 4;
const bytes = new Uint8Array(this.buffer);
// 4 colors of red, green, blue and alpha
const colors = new Uint8Array(16);
// BC2 has an alpha per pixel, BC3 a palette of 8
const alphas = new Uint8Array(16);
times(blocksX * blocksY, (index) => {
const blockPosX = (index % blocksX) * 4;
const blockPosY = Math.floor(index / blocksX) * 4;
const pixelIterator = blockIterator();
for (let blockY = 0; blockY < height; blockY += 4) {
for (let blockX = 0; blockX < width; blockX += 4) {
let index = this.index;
// BC3's 3 bit alpha keys, 8 pixels to each half
let alphaKeysLow = 0;
let alphaKeysHigh = 0;
times(16, (pixelIndex) => {
const pixelPosX = pixelIndex % 4;
const pixelPosY = Math.floor(pixelIndex / 4);
const x = blockPosX + pixelPosX;
const y = blockPosY + pixelPosY;
const bufferIndex = 4 * (y * width + x);
if (format === BlockFormat.BC2) {
for (let pixel = 0; pixel < 16; pixel++) {
const alpha =
(bytes[index + (pixel >> 1)] >> ((pixel & 1) * 4)) & 0b1111;
pixelIterator(pixelIndex).forEach((channel, index) => {
data[bufferIndex + index] = Math.round(channel * 255);
});
});
});
alphas[pixel] = Math.round((alpha / 15) * 255);
}
index += 8;
} else if (format === BlockFormat.BC3) {
this.bc3Alphas(bytes[index] / 255, bytes[index + 1] / 255, alphas);
alphaKeysLow =
bytes[index + 2] |
(bytes[index + 3] << 8) |
(bytes[index + 4] << 16);
alphaKeysHigh =
bytes[index + 5] |
(bytes[index + 6] << 8) |
(bytes[index + 7] << 16);
index += 8;
}
const int0 = bytes[index] | (bytes[index + 1] << 8);
const int1 = bytes[index + 2] | (bytes[index + 3] << 8);
const colorKeys =
bytes[index + 4] |
(bytes[index + 5] << 8) |
(bytes[index + 6] << 16) |
(bytes[index + 7] << 24);
// only BC1 has a transparent color
this.blockColors(
int0,
int1,
format === BlockFormat.BC1 && int0 < int1,
colors
);
this.index = index + 8;
for (let pixel = 0; pixel < 16; pixel++) {
const offset =
4 * ((blockY + (pixel >> 2)) * width + blockX + (pixel & 3));
const color = 4 * ((colorKeys >>> (pixel * 2)) & 0b11);
data[offset] = colors[color];
data[offset + 1] = colors[color + 1];
data[offset + 2] = colors[color + 2];
if (format === BlockFormat.BC1) {
data[offset + 3] = colors[color + 3];
} else if (format === BlockFormat.BC2) {
data[offset + 3] = alphas[pixel];
} else {
const alphaKey =
pixel < 8
? (alphaKeysLow >> (pixel * 3)) & 0b111
: (alphaKeysHigh >> ((pixel - 8) * 3)) & 0b111;
data[offset + 3] = alphas[alphaKey];
}
}
}
}
return { data, width, height, channels: 4 as const };
}
readR5G6B5Int() {
return new DataView(this.read(2)).getUint16(0, true);
}
R5G6B5() {
const buffer = this.consumeUint8Array(2);
const r = (buffer[1] & 0b11111000) >>> 3;
const g = ((buffer[1] & 0b111) << 3) | ((buffer[0] & 0b11100000) >>> 5);
const b = buffer[0] & 0b11111;
blockColors(
int0: number,
int1: number,
transparent: boolean,
colors: Uint8Array
) {
for (let channel = 0; channel < 3; channel++) {
const shift = CHANNEL_SHIFTS[channel];
const maximum = CHANNEL_MAXIMUMS[channel];
const value0 = ((int0 >> shift) & maximum) / maximum;
const value1 = ((int1 >> shift) & maximum) / maximum;
return [r / 31, g / 63, b / 31] as Vector3Tuple;
}
R5G6B5A0() {
return [...this.R5G6B5(), 1] as Vector4Tuple;
}
A8() {
return this.uint8() / 255;
}
bc1ColorInterpolations() {
const int0 = this.readR5G6B5Int();
const color0 = this.R5G6B5A0();
const int1 = this.readR5G6B5Int();
const color1 = this.R5G6B5A0();
const alpha = int0 < int1;
const color2 = alpha
? (color0.map(
(channel0, index) => (channel0 + color1[index]) / 2
) as Vector4Tuple)
: (color0.map(
(channel0, index) => (2 * channel0 + color1[index]) / 3
) as Vector4Tuple);
const color3 = alpha
? ([0, 0, 0, 0] as Vector4Tuple)
: (color0.map(
(channel0, index) => (channel0 + 2 * color1[index]) / 3
) as Vector4Tuple);
return {
[0b00]: color0,
[0b01]: color1,
[0b10]: color2,
[0b11]: color3,
} as Record<number, Vector4Tuple>;
}
bc1ColorKeys() {
const buffer = this.consumeUint8Array(4);
const d = (buffer[0] & 0b11000000) >>> 6;
const c = (buffer[0] & 0b110000) >>> 4;
const b = (buffer[0] & 0b1100) >>> 2;
const a = buffer[0] & 0b11;
const h = (buffer[1] & 0b11000000) >>> 6;
const g = (buffer[1] & 0b110000) >>> 4;
const f = (buffer[1] & 0b1100) >>> 2;
const e = buffer[1] & 0b11;
const l = (buffer[2] & 0b11000000) >>> 6;
const k = (buffer[2] & 0b110000) >>> 4;
const j = (buffer[2] & 0b1100) >>> 2;
const i = buffer[2] & 0b11;
const p = (buffer[3] & 0b11000000) >>> 6;
const o = (buffer[3] & 0b110000) >>> 4;
const n = (buffer[3] & 0b1100) >>> 2;
const m = buffer[3] & 0b11;
return [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p];
}
bc2AlphaInterpolations() {
const buffer = this.consumeUint8Array(8);
const d = (buffer[1] & 0b11110000) >>> 4;
const c = buffer[1] & 0b1111;
const b = (buffer[0] & 0b11110000) >>> 4;
const a = buffer[0] & 0b1111;
const h = (buffer[3] & 0b11110000) >>> 4;
const g = buffer[3] & 0b1111;
const f = (buffer[2] & 0b11110000) >>> 4;
const e = buffer[2] & 0b1111;
const l = (buffer[5] & 0b11110000) >>> 4;
const k = buffer[5] & 0b1111;
const j = (buffer[4] & 0b11110000) >>> 4;
const i = buffer[4] & 0b1111;
const p = (buffer[7] & 0b11110000) >>> 4;
const o = buffer[7] & 0b1111;
const n = (buffer[6] & 0b11110000) >>> 4;
const m = buffer[6] & 0b1111;
return [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p].map(
(alpha) => alpha / 15
colors[channel] = Math.round(value0 * 255);
colors[4 + channel] = Math.round(value1 * 255);
colors[8 + channel] = Math.round(
(transparent ? (value0 + value1) / 2 : (2 * value0 + value1) / 3) * 255
);
colors[12 + channel] = transparent
? 0
: Math.round(((value0 + 2 * value1) / 3) * 255);
}
bc2ColorInterpolations() {
const color0 = this.R5G6B5();
const color1 = this.R5G6B5();
const color2 = color0.map(
(channel0, index) => (2 * channel0 + color1[index]) / 3
) as Vector3Tuple;
const color3 = color0.map(
(channel0, index) => (channel0 + 2 * color1[index]) / 3
) as Vector3Tuple;
return {
[0b00]: color0,
[0b01]: color1,
[0b10]: color2,
[0b11]: color3,
} as Record<number, Vector3Tuple>;
colors[3] = 255;
colors[7] = 255;
colors[11] = 255;
colors[15] = transparent ? 0 : 255;
}
bc3AlphaInterpolations() {
const alpha0 = this.A8();
const alpha1 = this.A8();
bc3Alphas(alpha0: number, alpha1: number, alphas: Uint8Array) {
const full = alpha0 > alpha1;
const values = full
? [
alpha0,
alpha1,
(6 * alpha0 + 1 * alpha1) / 7,
(5 * alpha0 + 2 * alpha1) / 7,
(4 * alpha0 + 3 * alpha1) / 7,
(3 * alpha0 + 4 * alpha1) / 7,
(2 * alpha0 + 5 * alpha1) / 7,
(1 * alpha0 + 6 * alpha1) / 7,
]
: [
alpha0,
alpha1,
(4 * alpha0 + 1 * alpha1) / 5,
(3 * alpha0 + 2 * alpha1) / 5,
(2 * alpha0 + 3 * alpha1) / 5,
(1 * alpha0 + 4 * alpha1) / 5,
0,
// kept as the decoder always had it, which wraps to 1 as a byte
255,
];
return {
[0b000]: alpha0,
[0b001]: alpha1,
...(full
? {
[0b010]: (6 * alpha0 + 1 * alpha1) / 7,
[0b011]: (5 * alpha0 + 2 * alpha1) / 7,
[0b100]: (4 * alpha0 + 3 * alpha1) / 7,
[0b101]: (3 * alpha0 + 4 * alpha1) / 7,
[0b110]: (2 * alpha0 + 5 * alpha1) / 7,
[0b111]: (1 * alpha0 + 6 * alpha1) / 7,
for (let key = 0; key < 8; key++) {
alphas[key] = Math.round(values[key] * 255);
}
: {
[0b010]: (4 * alpha0 + 1 * alpha1) / 5,
[0b011]: (3 * alpha0 + 2 * alpha1) / 5,
[0b100]: (2 * alpha0 + 3 * alpha1) / 5,
[0b101]: (1 * alpha0 + 4 * alpha1) / 5,
[0b110]: 0,
[0b111]: 255,
}),
} as Record<number, number>;
}
bc3AlphaKeys() {
const buffer = this.consumeUint8Array(6);
const h = (buffer[2] & 0b11100000) >>> 5;
const g = (buffer[2] & 0b11100) >>> 2;
const f = ((buffer[2] & 0b11) << 1) | ((buffer[1] & 0b10000000) >>> 7);
const e = (buffer[1] & 0b1110000) >>> 4;
const d = (buffer[1] & 0b1110) >>> 1;
const c = ((buffer[1] & 0b1) << 2) | ((buffer[0] & 0b11000000) >>> 6);
const b = (buffer[0] & 0b111000) >>> 3;
const a = buffer[0] & 0b111;
const p = (buffer[5] & 0b11100000) >>> 5;
const o = (buffer[5] & 0b11100) >>> 2;
const n = ((buffer[5] & 0b11) << 1) | ((buffer[4] & 0b10000000) >>> 7);
const m = (buffer[4] & 0b1110000) >>> 4;
const l = (buffer[4] & 0b1110) >>> 1;
const k = ((buffer[4] & 0b1) << 2) | ((buffer[3] & 0b11000000) >>> 6);
const j = (buffer[3] & 0b111000) >>> 3;
const i = buffer[3] & 0b111;
return [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p];
}
}
+26 -1
View File
@@ -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;
+36 -1
View File
@@ -40,6 +40,8 @@ export interface ConfigArchive {
interface EnabledPresets {
AlphaTest: boolean;
AlphaBlend?: boolean;
AlphaBlendAdditive?: boolean;
}
interface Flags {
@@ -90,6 +92,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;
@@ -113,6 +137,13 @@ interface RbAabbox {
maximum: number[];
}
export type ComponentName = Component["comp.typename"];
export type ComponentOf<Name extends ComponentName> = Extract<
Component,
{ "comp.typename": Name }
>;
export type Component =
| {
"comp.typename": "TransformComponent";
@@ -134,7 +165,11 @@ export type Component =
"ro.notShadowOnly": boolean;
"ro.sOclCull": boolean;
"ro.sOclIndex": number;
} & Record<`rb${number}.${"lodIndex" | "switchIndex"}`, number>;
} & Record<`rb${number}.${"lodIndex" | "switchIndex"}`, number> &
Record<
`skinnedObject.batch${number}.targetsData`,
ArrayBuffer | undefined
>;
}
| {
"comp.typename": "SlotComponent";
+9 -6
View File
@@ -16,13 +16,16 @@ interface PolygonGroupRaw {
vertices: ArrayBuffer;
}
type BlitzkitVertex = { attribute: VertexAttribute; value: number[] }[];
export type Vertex = { attribute: VertexAttribute; value: number[] }[];
interface BlitzkitPolygonGroup {
vertices: BlitzkitVertex[];
export interface PolygonGroup {
vertices: Vertex[];
indices: number[];
}
/** polygon group id -> polygon group */
export type ScgPolygonGroups = Map<bigint, PolygonGroup>;
const vertexAttributesArray = Object.values(VertexAttribute).filter(
(value) => typeof value === "number",
);
@@ -63,7 +66,7 @@ export class ScgReadStream extends ScpgReadStream {
scg() {
const header = this.header();
const polygonGroupsRaw: PolygonGroupRaw[] = [];
const polygonGroups = new Map<bigint, BlitzkitPolygonGroup>();
const polygonGroups = new Map<bigint, PolygonGroup>();
for (let index = 0; index < header.nodeCount; index++) {
const polygonGroupRaw = this.ka() as PolygonGroupRaw;
@@ -83,7 +86,7 @@ export class ScgReadStream extends ScpgReadStream {
}
const verticesStream = new ScpgReadStream(polygonGroupRaw.vertices);
const vertices: BlitzkitVertex[] = [];
const vertices: Vertex[] = [];
const { format, stride } = ScgReadStream.parseVertexFormat(
polygonGroupRaw.vertexFormat,
);
@@ -110,7 +113,7 @@ export class ScgReadStream extends ScpgReadStream {
);
});
return polygonGroups;
return polygonGroups satisfies ScgPolygonGroups;
}
static parseVertexFormat(formatInt: number) {
@@ -0,0 +1,10 @@
// What an augment attribute shows, by attribute name
export interface AugmentAttributeDefinition {
icon: string;
title: string;
}
export type AugmentAttributeDefinitions = Map<
string,
AugmentAttributeDefinition
>;
+8 -4
View File
@@ -4,6 +4,14 @@ export type BlitzEffectScript = RSN & {
cooldown?: number;
duration?: number;
aimingSpeed?: number;
gunDispersionModifier?: number;
activateWithoutDamage?: boolean;
targetOrder?: boolean;
// A placeholder gun the ability fires, as `nation:gun`, and what it resolves to
gun?: string;
allowSwitchAfterKill?: boolean;
allowNonDamagingHits?: boolean;
startCooldown?: number;
automatic?: boolean;
@@ -52,10 +60,6 @@ interface ModuleConstants {
modules: Record<string, number | number[]>;
}
interface ModulesMaxHPFactorsModules {
ammoBayHealth: number;
}
interface ChangesToHit {
crew: number;
modules: RSN;
+1 -1
View File
@@ -1,4 +1,4 @@
import { BlitzEffectScript } from "./blitzEffectScript";
import type { BlitzEffectScript } from "./blitzEffectScript";
export interface BlitzScripts {
consumables: Record<number, BlitzEffectScript>;
@@ -3,5 +3,12 @@ export type CamouflagesYaml = Record<
{
userString?: string;
shortUserString?: string;
preset?: string;
customEntities?: Record<string, { item: string }>;
// nation -> tank
override?: Record<
string,
{ override?: Record<string, { preset?: string }> }
>;
}
>;
@@ -5,6 +5,7 @@ export interface GunDefinitionsList {
[key: string]: {
rotationSpeed: number;
weight: number;
reloadTime?: number;
shotDispersionFactors: {
turretRotation: number;
afterShot: number;
@@ -17,10 +18,17 @@ export interface GunDefinitionsList {
tags: string;
level: number;
pitchLimits: string;
extraPitchLimits?: {
front?: string;
back?: string;
transition?: number | number[];
};
burst?: { count: number; rate: number };
clip?: { count: number; rate: number };
shots: {
[key: string]: {
[key: string]:
| ""
| {
speed: number;
piercingPower: string;
maxDistance: number;
+7
View File
@@ -1,5 +1,8 @@
export * from "./augmentAttributeDefinitions";
export * from "./availableNationsYaml";
export * from "./blitzEffectScript";
export * from "./blitzModuleType";
export * from "./blitzScripts";
export * from "./blitzStrings";
export * from "./blitzTankFilterDefinitionCategory";
export * from "./camouflagesXml";
@@ -21,7 +24,11 @@ export * from "./squadBattleTypeStylesYaml";
export * from "./tankmenAvatar";
export * from "./tankParameters";
export * from "./tanksStats";
export * from "./techTreeLayoutYaml";
export * from "./turretDefinitionsList";
export * from "./upgradeProgressionXml";
export * from "./vehicleAbilityItem";
export * from "./vehicleDefinitionArmor";
export * from "./vehicleDefinitionList";
export * from "./vehicleDefinitions";
export * from "./vehicleFilter";
@@ -1,6 +1,5 @@
export type ShellDefinitionsList = Record<
string,
{
// A shell as its shells.xml entry lists it
export interface ShellDefinitionXml {
id: number;
userString: string;
icon: string;
@@ -10,8 +9,14 @@ export type ShellDefinitionsList = Record<
normalizationAngle?: number;
ricochetAngle?: number;
explosionRadius?: number;
}
> & {
speed: number;
maxDistance: number;
acceleration?: number;
maxSpeed?: number;
piercingPower: string;
}
export type ShellDefinitionsList = Record<string, ShellDefinitionXml> & {
icons: Record<string, string>;
};
@@ -0,0 +1,7 @@
export interface TechTreeLayoutYamlModule {
position: [number, number];
}
export interface TechTreeLayoutYaml {
modules?: Record<string, TechTreeLayoutYamlModule>;
}
@@ -0,0 +1,61 @@
// Parsed with attributes and with these elements forced to arrays, see
// `AbstractVFS.xmlWithAttributes`
// Plain text unless the connector carries `verticalFirst`
export type UpgradeProgressionXmlRequirement =
| string
// Attribute values stay strings
| { "#text": string; "@_verticalFirst"?: string };
export interface UpgradeProgressionXmlAttribute {
attributeName: string;
// Numbers, or `true`/`false` for switches
value: number | boolean;
}
export interface UpgradeProgressionXmlNode {
id: number;
techName: string;
nodeType:
| "NODETYPE_COMMON"
| "NODETYPE_MECHANIC"
| "NODETYPE_ALTERNATIVE_MECHANIC";
xpCost?: number;
displayName?: string;
icon?: string;
gridPosition?: { row: number; column: number };
// Empty elements parse to an empty string
requiredNodes?: "" | { node: UpgradeProgressionXmlRequirement[] };
attributes?: { attribute: UpgradeProgressionXmlAttribute[] };
}
export interface UpgradeProgressionXmlGroup {
techName: string;
displayName: string;
description: string;
icon?: string;
xpCost: number;
gridPosition: { row: number; column: number };
requiredNodes: { node: UpgradeProgressionXmlRequirement[] };
alternativeNodes: { node: string[] };
}
export interface UpgradeProgressionXml {
matrix: { rows: number; columns: number };
alternativeMechanicGroups?: {
alternativeMechanicGroup: UpgradeProgressionXmlGroup[];
};
nodes: { node: UpgradeProgressionXmlNode[] };
}
export interface UpgradeAttributesXml {
root: {
attributes: {
attribute: {
attributeName: string;
icon: string;
title: string;
}[];
};
};
}
@@ -0,0 +1,11 @@
import type { AbilitySource } from "@blitzkit/protos";
// A hidden provision or consumable the game marks as a vehicle ability.
// `vehicleNames` is its filter's list of tanks, when it has one
export interface VehicleAbilityItem {
source: AbilitySource;
id: number;
vehicleNames?: string[];
// The placeholder gun the ability fires, as `nation:gun`
gun?: string;
}
+41 -36
View File
@@ -1,4 +1,4 @@
import { BlitzModuleType } from "@blitzkit/core";
import { BlitzModuleType, VehicleDefinitionArmor } from "@blitzkit/core";
export interface VehicleDefinitions {
invisibility: {
@@ -13,6 +13,8 @@ export interface VehicleDefinitions {
};
consumableSlots: number;
provisionSlots: number;
// Tier 11 tanks only, parsed separately because it needs attributes
upgradeProgression?: object;
optDevicePreset: string | string[];
hull: {
armor: VehicleDefinitionArmor;
@@ -76,7 +78,44 @@ export interface VehicleDefinitions {
collisionModel: string;
};
guns: {
[key: string]: {
[key: string]: VehicleDefinitionGun;
};
};
};
extras?: {
armorsStatesController?: {
state: [
{
id: 0;
armors: string;
type: "default";
enabled: true;
factorsModifiers: "";
default: "";
},
{
id: 1;
armors: string;
type: "default";
enabled: false;
factorsModifiers: "";
},
];
};
};
}
export type BlitzCrewType =
| "commander"
| "radioman"
| "gunner"
| "driver"
| "loader";
export type UnlocksListing = BlitzModuleType | undefined;
// A turret gun as its tank lists it, which overrides the shared gun entry
export interface VehicleDefinitionGun {
unlocks: UnlocksListing;
armor: VehicleDefinitionArmor & {
gun?:
@@ -117,38 +156,4 @@ export interface VehicleDefinitions {
>;
};
};
};
};
};
};
extras?: {
armorsStatesController?: {
state: [
{
id: 0;
armors: string;
type: "default";
enabled: true;
factorsModifiers: "";
default: "";
},
{
id: 1;
armors: string;
type: "default";
enabled: false;
factorsModifiers: "";
},
];
};
};
}
export type BlitzCrewType =
| "commander"
| "radioman"
| "gunner"
| "driver"
| "loader";
export type UnlocksListing = BlitzModuleType | undefined;
+3
View File
@@ -0,0 +1,3 @@
export interface VehicleFilter {
include?: { vehicle?: { name?: string } | { name?: string }[] };
}
+2 -2
View File
@@ -36,8 +36,8 @@
{
"locale": "zh",
"variant_blitz_local": "zh_Hans_SG",
"variant_blitz_cdn": "zh-Hans",
"variant_blitz_glossary": "zh_Hans_SG",
"variant_blitz_strings": "zh-Hans",
"flag": "🇨🇳"
}
+400 -128
View File
@@ -1,4 +1,160 @@
{
"navbar": {
"home": "Home",
"settings": "Settings"
},
"settings": {
"language": "Language",
"device_language": "Device language",
"auto_load_models": "Auto-load models",
"developer_mode": "Developer mode"
},
"mixer": {
"screenshot": "Screenshot",
"randomize": "Randomize"
},
"guesser": {
"help": {
"title": "Partially reveal tank?",
"description": "Reveals the tank without showing the name. This round will be considered incorrect!",
"cancel": "Cancel",
"reveal": "Reveal"
},
"search": {
"skip": "Skip",
"guess": "Guess",
"next": "Next"
},
"stats": "{correct} / {total} correct, {streak} streak",
"stats_untracked": "The score is not tracked when not all tiers are selected",
"tier": "Tier {tier}",
"select_all": "Select all",
"clear": "Clear"
},
"embed": {
"coming_soon": "More embeds coming soon.",
"suggest": "Suggest ideas.",
"preview": {
"title": "Example preview",
"upload": "Upload test background"
},
"configuration": {
"import": {
"title": "Import",
"description": "Paste your current URL if you have one already to import your settings",
"hint": "Paste URL...",
"apply": "Apply",
"applied": "Applied!",
"idiot_title": "Invalid URL",
"idiot_description": "Try pasting the URL that BlitzKit previously generated, you silly goose!",
"idiot_button": "Okay, my bad"
},
"export": {
"title": "Export",
"description": "Copy all properties for you streaming software",
"generate": {
"button": "Generate URL",
"title": "Generate URL",
"subtitle": "Search an account to track",
"cancel": "Cancel",
"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",
"copy": "Copy URL"
}
},
"css": "Copy CSS",
"width": "Copy Width",
"height": "Copy Height",
"framerate": "Copy Framerate"
},
"customize": {
"title": "Customize",
"reset": "Reset",
"description": "Bells and whistles of your embed"
}
},
"types": {
"breakdown": {
"name": "Breakdown",
"reset": "Reset",
"options": {
"width": "Width",
"height": "Height",
"show_total": "Show total",
"list_gap": "List gap",
"list_max_tanks": "Max tanks",
"card_radius": "Card radius",
"card_header_background_color": "Card header background color",
"card_header_padding": "Card header padding",
"card_title": "Card title",
"card_title_type_color": "Card title type color",
"card_title_class_icon": "Card title class icon",
"card_body_background_color": "Card body background color",
"card_body_padding": "Card body padding",
"column_gap": "Column gap",
"column_value": "Column value",
"column_label": "Column label",
"column_1": "Column 1",
"column_2": "Column 2",
"column_3": "Column 3",
"column_4": "Column 4",
"column_1_custom_label": "Column 1 label",
"column_2_custom_label": "Column 2 label",
"column_3_custom_label": "Column 3 label"
}
}
}
},
"compare": {
"no_tanks": {
"title": "No tanks to compare",
"body": "Add a tank to get started"
},
"add": {
"button": "Add",
"title": "Add tank",
"description": "Select a tank to add to the comparison"
},
"swap_dialog": {
"title": "Swap tank",
"description": "Select a tank to replace this one"
},
"clear": "Clear",
"deltas": {
"label": "Deltas",
"none": "No deltas",
"percentage": "Percentage",
"absolute": "Absolute"
},
"sync_shells": "Sync shells",
"equalize": "Equalize",
"loadout": "Loadout",
"stock": "Stock",
"apply_to_all": "Apply to all",
"remove": "Remove",
"swap": "Swap",
"open": "Open in Tankopedia"
},
"performance": {
"player_count": "Player count",
"tank": "Tank",
"total": "Total",
"no_tanks": {
"title": "No tanks found",
"body": "No tanks with statistics match these filters"
}
},
"units": {
"m": "{value}m",
"mm": "{value}mm",
@@ -9,17 +165,80 @@
"percentage": "{value}%",
"deg_s": "{value}°/s",
"m_s": "{value}m/s",
"m_s2": "{value}m/s²",
"km_h": "{value}km/h",
"t": "{value}t",
"bhp": "{value}bhp",
"bhp_t": "{value}bhp/t",
"kN": "{value}kN",
"hp_s": "{value}hp/s",
"m3": "{value}m³",
"plus": "+{value}",
"fraction": "{numerator} / {denominator}"
"fraction": "{numerator} / {denominator}",
"interval": "{min} - {max}"
},
"tanks": {
"antagonist_control": {
"calibrated_shells": "Calibrated shells",
"enhanced_armor": "Enhanced armor",
"equalize": "Equalize"
},
"skin_switcher": {
"play_animations": "Play animations",
"pause_animations": "Pause animations"
},
"custom_shell": {
"title": "Custom shell",
"type": "Type",
"caliber": "Caliber",
"penetration": "Penetration",
"normalization": "Normalization",
"ricochet": "Ricochet",
"explosion_radius": "Explosion radius",
"exit": "Exit",
"reset": "Reset"
},
"shot_card": {
"element": {
"primary": "Primary",
"spaced": "Spaced",
"external": "External",
"gap": "Gap",
"gun": "Gun",
"track": "Tracks"
},
"status": {
"penetration": "{damage}hp penetration",
"blocked": "Blocked",
"ricochet": "Ricochet",
"splash": "{damage}hp splash"
},
"stats": {
"thickness_and_angle": "{thickness}mm {angle}°",
"nominal": "{thickness}mm nominal",
"ricochet_loss": "{loss}% penetration",
"ricochet_divider": "Ricochet (-25% penetration)"
}
},
"tabs": {
"model": "Model",
"dynamic_armor": "Dynamic armor",
"static_armor": "Static armor"
},
"poses": {
"hull_down": "Hull down",
"face_hug": "Face hug",
"default": "Default"
},
"toys": {
"ricochet": {
"angle": "Angle",
@@ -33,6 +252,23 @@
"effective": "Effective",
"hull": "Hull",
"turret": "Turret"
},
"reload": {
"skip": "Skip"
},
"flexibility": {
"pitch": "Pitch",
"yaw": "Yaw",
"max": "Max",
"min": "Min"
},
"view_range": {
"camo": "Camo",
"ghost_factory": "Ghost Factory",
"dead_rail": "Dead Rail"
}
},
@@ -52,14 +288,29 @@
"flexibility": "Flexibility",
"maneuverability": "Maneuverability",
"survivability": "Survivability",
"concealment": "Concealment"
"concealment": "Concealment",
"steady_aim_system": "Steady aim system",
"burst_mode": "Burst mode",
"combat_frenzy": "Combat frenzy",
"external_ammo_module": "External ammo module",
"ramming_configuration": "Ramming configuration",
"nitro": "Nitro",
"shell_overheat": "Shell overheat",
"auxiliary_weapons": "Auxiliary weapons",
"unguided_rocket": "Unguided rocket",
"assault_shells": "Assault shells"
},
"items": {
"gun_type": "Gun type",
"dpm": "Damage per minute",
"dpm_effective": "Effective by 60s",
"dpm_peekaboo": "Peek-a-boo",
"damage": "Damage",
"damage_range": "Range",
"module_damage": "Module damage",
"module_damage_range": "Range",
"reload": "Reload",
"reloads": "Reloads",
"clipping_potential": "Clipping potential",
@@ -77,9 +328,16 @@
"caliber": "Caliber",
"normalization": "Normalization",
"ricochet": "Ricochet",
"explosion_radius": "Explosion radius",
"aim_time": "Aim time",
"dispersion": "Dispersion",
"dispersion_angle": "Dispersion angle",
"dispersion_penalties": "Dispersion penalties",
"dispersion_moving": "Moving",
"dispersion_hull_traversing": "Hull traversing",
"dispersion_turret_traversing": "Turret traversing",
"dispersion_shooting": "After shooting",
"dispersion_gun_damaged": "Gun damaged",
"gun_depression": "Gun depression",
"gun_elevation": "Gun elevation",
"gun_frontal_depression": "Frontal depression",
@@ -88,13 +346,17 @@
"gun_rear_elevation": "Rear elevation",
"azimuth_left": "Azimuth left",
"azimuth_right": "Azimuth right",
"speed_forward": "Forward",
"speed_backward": "Backward",
"speed_forward": "Top speed",
"speed_backward": "Reverse speed",
"speeds": "Speed",
"engine_power": "Engine power",
"brake_force": "Brake force",
"weight": "Weight",
"power_to_weight": "Power to weight",
"power_to_weight_on_terrain": "Power to weight on terrain",
"power_to_weight_hard": "Hard",
"power_to_weight_medium": "Medium",
"power_to_weight_soft": "Soft",
"terrain_coefficient": "Terrain coefficients",
"raw_terrain_coefficient": "Raw terrain coefficients",
"hard_terrain_coefficient": "Hard",
@@ -114,11 +376,69 @@
"fire_chance": "Fire chance",
"fire_rate": "Fire rate",
"ramming_resistance": "Ramming resistance",
"crew_count": "Crew count",
"view_range": "View range",
"camouflage": "Camouflage",
"camouflages": "Camouflage",
"camouflage": "Still",
"camouflage_moving": "Moving",
"camouflage_shooting_still": "Shooting still",
"camouflage_shooting_moving": "Shooting moving",
"camouflage_on_fire": "On fire",
"width": "Width",
"height": "Height",
"length": "Length"
"length": "Length",
"steady_aim_system_duration": "Duration",
"steady_aim_system_aiming_speed": "Aim time",
"steady_aim_system_dispersion": "Dispersion",
"steady_aim_system_activation_condition": "Activates on",
"burst_mode_count": "Shells",
"burst_mode_interval": "First intra-clip",
"burst_mode_penetrations": "Penetrations",
"burst_mode_target_order": "Same target",
"combat_frenzy_reload_bonus": "Reload per stack",
"combat_frenzy_max_stacks": "Max stacks",
"combat_frenzy_keep_stacks": "Keep on kill",
"external_ammo_module_clip_bonus": "Extra shells",
"external_ammo_module_transformation": "Transform time",
"external_ammo_module_timeout": "Timeout",
"external_ammo_module_activation_condition": "Activates on",
"ramming_configuration_damage_bonus": "Damage bonus",
"ramming_configuration_track_damage_bonus": "Track damage bonus",
"ramming_configuration_damage_reduction": "Damage taken",
"nitro_duration": "Heat time",
"nitro_cooling_duration": "Cool time",
"nitro_cooldown": "Cooldown",
"nitro_engine_power": "Engine power",
"nitro_top_speed": "Top speed",
"nitro_rotation_speed": "Hull traverse",
"shell_overheat_boost": "Damage boost",
"shell_overheat_charge_time": "Charge time",
"shell_overheat_activation_delay": "Charge delay",
"shell_overheat_decay_time": "Discharge time",
"shell_overheat_min_speed": "Min speed",
"shell_overheat_max_speed": "Max speed",
"auxiliary_weapons_shots": "Shots",
"auxiliary_weapons_damage": "Damage",
"auxiliary_weapons_penetration": "Penetration",
"auxiliary_weapons_shell_speed": "Shell speed",
"auxiliary_weapons_interval": "Intra-clip",
"auxiliary_weapons_cooldown": "Reload",
"unguided_rocket_count": "Rockets",
"unguided_rocket_damage": "Damage",
"unguided_rocket_penetration": "Penetration",
"unguided_rocket_initial_speed": "Initial speed",
"unguided_rocket_acceleration": "Acceleration",
"unguided_rocket_max_distance": "Range",
"unguided_rocket_intra_clip": "Intra-clip",
"unguided_rocket_container_reload": "Reload"
},
"flags": {
"yes": "Yes",
"no": "No",
"on_hit": "On hit",
"on_damage": "On damage"
}
},
@@ -126,6 +446,10 @@
"title": "Game mode abilities"
},
"videos": {
"title": "Videos"
},
"navigation": {
"tank": "Tank",
"characteristics": "Characteristics"
@@ -137,8 +461,20 @@
"consumables": "Consumables",
"provisions": "Provisions",
"modules": "Modules",
"augments": "Augments",
"camouflage": "Camouflage",
"module_types": {
"turret": "Turret",
"gun": "Gun",
"engine": "Engine",
"chassis": "Chassis"
},
"equipment": "Equipment",
"shells": "Shells",
"clear": "Clear",
"maximize": "Maximize",
"stock": "Stock",
"skills": "Crew skills",
"alternative": "Alt"
},
@@ -148,71 +484,23 @@
},
"tools": {
"tanks": {
"name": "Tankopedia",
"slogan": "Blitz tank encyclopedia",
"action": "Find tanks"
},
"avatars": {
"name": "Avatars",
"slogan": "Blitz player avatars",
"action": "Browse all"
},
"backgrounds": {
"name": "Backgrounds",
"slogan": "Blitz player backgrounds",
"action": "View all"
},
"api": {
"name": "API",
"action": "To docs",
"slogan": "BlitzKit hosted API"
},
"players": {
"name": "Players",
"slogan": "Player statistics",
"action": "Stalk player"
},
"compare": {
"name": "Compare",
"slogan": "Compare tanks characteristics",
"action": "Compare now"
},
"performance": {
"name": "Performance",
"slogan": "Tank performance statistics",
"action": "View tanks"
},
"playlist": {
"name": "Playlist",
"slogan": "Tank playlist generator",
"action": "Generate"
},
"mixer": {
"name": "Mixer",
"slogan": "Tank module mixer",
"action": "Mix and match"
},
"session": {
"name": "Session",
"slogan": "Live player statistics",
"action": "Track"
},
"guesser": {
"name": "Guesser",
"slogan": "Silhouette mini-game",
"action": "Play"
},
"changelogs": {
"name": "Changelogs",
"slogan": "BlitzKit patch notes",
"action": "Read up"
},
"settings": {
"name": "Settings",
"slogan": "",
"action": ""
}
"home": "Home",
"tanks": "Tankopedia",
"avatars": "Avatars",
"backgrounds": "Backgrounds",
"api": "API",
"players": "Players",
"compare": "Compare",
"performance": "Performance",
"playlist": "Playlist",
"mixer": "Mixer",
"session": "Session",
"guesser": "Guesser",
"changelogs": "Changelogs",
"tier_list": "Tier list",
"embed": "Embed",
"more": "More",
"credits": "Credits"
},
"home": {
@@ -232,6 +520,21 @@
"common": {
"name": "BlitzKit",
"screenshot": {
"title": "Screenshot",
"description": "Screenshot the tank with a transparent background.",
"cancel": "Cancel",
"download": "Download",
"copy": "Copy"
},
"search": {
"hint_players": "Search players...",
"hint_tanks": "Search tanks...",
"no_results": "No results",
"searching": "Searching..."
},
"units": {
"m": "{value}m",
"mm": "{value}mm",
@@ -266,9 +569,25 @@
"d_1": "Yesterday"
},
"stats": {
"winrate": "Winrate",
"players": "Players",
"damage": "Damage",
"survival": "Survival",
"xp": "XP",
"kills": "Kills",
"spots": "Spots",
"accuracy": "Accuracy",
"shots": "Shots",
"hits": "Hits",
"damage_ratio": "Dmg. ratio",
"damage_taken": "Dmg. taken",
"capture_points": "Cap points"
},
"branches": {
"beta": "Beta",
"development": "Development",
"development": "Post Malone Edition",
"opentest": "OpenTest",
"preview": "Preview",
"production": "Production"
@@ -435,21 +754,12 @@
"body": "This page has moved. Redirecting..."
},
"settings": {
"title": "Settings",
"description": "Change BlitzKit settings",
"dev_mode": "Development mode",
"auto_load_models": "Auto-load models",
"language": "Language"
"not_found": {
"title": "404: page not found",
"body": "Where would you like to go?"
},
"common": {
"player_search": {
"hint": "Search players...",
"no_results": "No results",
"searching": "Searching..."
},
"copy_button": {
"copied": "Copied!"
},
@@ -461,6 +771,7 @@
"login": "Login to use this",
"search_bar_hint": "Search tanks...",
"recent": "Recently viewed",
"recent_empty": "Tanks you view will show up here",
"select_all": "Select all",
"count_singular": "1 tank",
"count_plural": "{count} tanks",
@@ -477,55 +788,17 @@
},
"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"
},
"none": "None",
"by": "Sort by",
"direction": {
"label": "Direction",
"ascending": "Ascending",
"descending": "Descending"
}
}
}
},
"warnings": {
@@ -563,11 +836,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"
+6 -6
View File
@@ -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"
+6 -6
View File
@@ -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"
+6 -6
View File
@@ -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": "パッチノート"
+236 -236
View File
@@ -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"
+11 -11
View File
@@ -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"
+12 -12
View File
@@ -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": "Патчи"
+7 -7
View File
@@ -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"
+6 -6
View File
@@ -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,6 @@ message Camouflage {
I18nString name = 2;
optional I18nString tank_name = 3;
optional I18nString tank_name_full = 4;
optional uint32 tank_id = 5;
optional bool attachment = 6;
}
+14
View File
@@ -0,0 +1,14 @@
syntax = "proto3";
package blitzkit;
message ProtoVector2 {
float x = 1;
float y = 2;
}
message ProtoVector3 {
float x = 1;
float y = 2;
float z = 3;
}
@@ -2,13 +2,15 @@ syntax = "proto3";
package blitzkit;
import "math.proto";
message ModelDefinitions {
map<uint32, ModelDefinition> models = 1;
}
message ModelDefinition {
Armor armor = 1;
Vector3 turret_origin = 2;
ProtoVector3 turret_origin = 2;
optional InitialTurretRotation initial_turret_rotation = 3;
map<uint32, TurretModelDefinition> turrets = 4;
map<uint32, TrackModelDefinition> tracks = 5;
@@ -20,12 +22,6 @@ message Armor {
repeated uint32 spaced = 2;
}
message Vector3 {
float x = 1;
float y = 2;
float z = 3;
}
message InitialTurretRotation {
float yaw = 1;
float pitch = 2;
@@ -36,7 +32,7 @@ message TurretModelDefinition {
BoundingBox bounding_box = 1;
Armor armor = 2;
uint32 model_id = 3;
Vector3 gun_origin = 4;
ProtoVector3 gun_origin = 4;
map<uint32, GunModelDefinition> guns = 5;
optional YawLimits yaw = 6;
}
@@ -47,13 +43,13 @@ message YawLimits {
}
message BoundingBox {
Vector3 min = 1;
Vector3 max = 2;
ProtoVector3 min = 1;
ProtoVector3 max = 2;
}
message TrackModelDefinition {
float thickness = 1;
Vector3 origin = 2;
ProtoVector3 origin = 2;
}
message GunModelDefinition {
@@ -3,6 +3,7 @@ syntax = "proto3";
package blitzkit;
import "i18n.proto";
import "math.proto";
message TankDefinitions {
map<uint32, TankDefinition> tanks = 1;
@@ -42,6 +43,88 @@ message TankDefinition {
string dev_name = 32;
optional Equalizer equalizer = 33;
optional I18nString name_full = 34;
repeated ModulePosition module_positions = 35;
optional AugmentProgression augment_progression = 36;
repeated VehicleAbility vehicle_abilities = 37;
}
// Hand-authored cell in the modules screen grid. Tanks without any use the
// automatic layout.
message ModulePosition {
int32 id = 1;
ModuleType type = 2;
ProtoVector2 position = 3;
}
// Tier 11 augment tree (`upgradeProgression` in the game files). Cells are
// placed by hand on a 1-based grid and the connectors are routed by the
// client, see the loadout augments layout.
message AugmentProgression {
uint32 rows = 1;
uint32 columns = 2;
repeated AugmentNode nodes = 3;
optional AugmentGroup group = 4;
}
// A hidden provision or consumable the tank has, which the game turns into an
// ability. The script itself lives in `scripts.json` under `id`. `gun` is the
// placeholder gun the ability fires, when it fires one
message VehicleAbility {
AbilitySource source = 1;
uint32 id = 2;
optional GunDefinition gun = 3;
}
enum AbilitySource {
ABILITY_SOURCE_PROVISION = 0;
ABILITY_SOURCE_CONSUMABLE = 1;
}
// TODO: render these differently in the browser
enum AugmentNodeType {
AUGMENT_NODE_TYPE_COMMON = 0;
AUGMENT_NODE_TYPE_MECHANIC = 1;
AUGMENT_NODE_TYPE_ALTERNATIVE = 2;
}
message AugmentNode {
int32 id = 1;
string tech_name = 2;
AugmentNodeType type = 3;
// Alternative nodes live in their group and cost nothing on their own
int32 xp_cost = 4;
// Missing for alternative nodes
optional ProtoVector2 position = 5;
repeated AugmentRequirement requires = 6;
repeated AugmentAttribute attributes = 7;
optional I18nString name = 8;
}
message AugmentRequirement {
string tech_name = 1;
// Route the connector along the column before the row
bool vertical_first = 2;
}
message AugmentAttribute {
string name = 1;
// Switches are stored as 0 or 1
float value = 2;
// Icon file name, missing for attributes the client has no art for
optional string icon = 3;
optional I18nString title = 4;
}
// Mutually exclusive final choice that all of its requirements lead into
message AugmentGroup {
string tech_name = 1;
I18nString name = 2;
I18nString description = 3;
optional string icon = 4;
int32 xp_cost = 5;
ProtoVector2 position = 6;
repeated AugmentRequirement requires = 7;
repeated AugmentNode alternatives = 8;
}
message Equalizer {
@@ -87,6 +170,7 @@ message TrackDefinition {
float resistance_medium = 10;
float resistance_soft = 11;
repeated Unlock unlocks = 12;
float repair_time = 13;
}
message EngineDefinition {
@@ -184,6 +268,8 @@ message ShellDefinition {
optional float ricochet = 11;
optional float explosion_radius = 12;
uint32 range = 13;
optional float acceleration = 14;
optional float max_speed = 15;
}
enum ShellType {
-7
View File
@@ -1,14 +1,7 @@
{
"name": "@blitzkit/scripts",
"private": true,
"scripts": {
"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"
},
"dependencies": {
"@blitzkit/closed": "workspace:*",
"@blitzkit/core": "workspace:*",
"@blitzkit/i18n": "workspace:*",
"@gltf-transform/core": "^4.2.1",
-102
View File
@@ -1,102 +0,0 @@
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";
const versionTextFile = await vfs.text(`Data/version.txt`);
const currentVersion = versionTextFile
.split(" ")[0]
.split(".")
.slice(0, 3)
.join(".");
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`,
);
console.log(patchIndex, response.status);
if (!response.ok) break;
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 dvpd = await fetch(
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${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}"`);
}
const buffer = Buffer.from(data);
await writeFile(`${PATCHES_ROOT}/Data/${path}`, new Uint8Array(buffer));
bar.tick();
}
console.log("patches done for patch");
if ("dynamicContentLocalizationsDir" in data) {
console.log(
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${
data.dynamicContentLocalizationsDir
}/en.yaml`,
);
const localizationsResponse = await fetch(
`${assertSecret(import.meta.env.WOTB_DLC_CDN)}/dlc/${
data.dynamicContentLocalizationsDir
}/en.yaml`,
);
console.log("fetched");
const newStrings = parseYaml(await localizationsResponse.text());
console.log("got new strings");
const oldStrings =
await vfs.yaml<Record<string, string>>(`Data/Strings/en.yaml`);
console.log("got old strings");
const patchedStrings = { ...oldStrings, ...newStrings };
const patchedContent = stringifyYaml(patchedStrings);
console.log("stringified");
await mkdir(`${PATCHES_ROOT}/Data/Strings`, { recursive: true });
console.log("mkdir");
await writeFile(
`${PATCHES_ROOT}/Data/Strings/en.yaml`,
new Uint8Array(Buffer.from(patchedContent)),
);
console.log("file");
}
patchIndex++;
}
vfs.dispose();
process.exit(0);
+4
View File
@@ -0,0 +1,4 @@
export const WGC_CLIENT_GUID = "WOTB.WW.PRODUCTION";
export const WGC_CLIENT_URL = "https://wgus-eu.wargaming.net";
export const WGC_METADATA_PROTOCOL_VERSION = "7.10";
export const WGC_PATCHES_CHAIN_PROTOCOL_VERSION = "1.11";
+25 -87
View File
@@ -1,99 +1,37 @@
import { assertSecret } from "@blitzkit/core";
import { $ } from "bun";
import { mkdir, rm } from "node:fs/promises";
import {
DEPOT_DOWNLOADER_EXECUTABLE,
DEPOT_DOWNLOADER_MAX_DOWNLOADS,
DEPOT_DOWNLOADER_OUTPUT,
WGPKG_DIR,
} from "./constants";
import { QuickGitHubRelease } from "./types";
import { downloadSteamClient } from "./steam";
import { downloadWGCClient } from "./wgc";
import { downloadWGPKGClient } from "./wgpkg";
const provider = assertSecret(import.meta.env.CLIENT_PROVIDER);
const source = assertSecret(import.meta.env.CLIENT_SOURCE);
const dir = assertSecret(import.meta.env.CLIENT_DIR);
export const DEPOT_DOWNLOADER_RETRY_TIME = 30_000;
const provider = import.meta.env.CLIENT_PROVIDER;
export const source = import.meta.env.CLIENT_SOURCE;
export const dir = assertSecret(import.meta.env.CLIENT_DIR);
await rm(dir, { recursive: true, force: true });
await mkdir(dir, { recursive: true });
if (provider === "steam") {
const [id, platform] = source.split("/");
console.log("Downloading Depot Downloader...");
const releases = await fetch(
"https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest",
).then((response) => response.json() as Promise<QuickGitHubRelease>);
const asset = releases.assets.find((asset) =>
asset.name.includes("linux-x64"),
);
if (!asset) {
throw new Error("No linux-x64 asset found for Steam DepotDownloader");
}
await rm(DEPOT_DOWNLOADER_OUTPUT, { recursive: true, force: true });
await $`curl -L "${asset.browser_download_url}" -o "${DEPOT_DOWNLOADER_OUTPUT}.zip"`;
await $`unzip "${DEPOT_DOWNLOADER_OUTPUT}.zip" -d "${DEPOT_DOWNLOADER_OUTPUT}"`;
await $`chmod +x "${DEPOT_DOWNLOADER_EXECUTABLE}"`;
console.log("Downloading client...");
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}`;
} else if (provider === "zip") {
const url = assertSecret(import.meta.env.CLIENT_SOURCE);
console.log("Downloading and extracting zipped client...");
await mkdir(dir, { recursive: true });
await $`curl -L "${url}" | bsdtar -xf- --strip-components=1 -C ${dir}`;
} else if (provider === "wgpkg") {
let index = 1;
const urls: string[] = [];
console.log("Discovering packages...");
while (true) {
const url = `${source}.${index.toString().padStart(3, "0")}`;
const response = await fetch(url);
if (response.status === 200) {
urls.push(url);
} else if (response.status === 404) {
switch (provider) {
// steam, identical to wgc
case "steam":
await downloadSteamClient();
break;
} else {
throw new Error(`Wargaming response error status: ${response.status}`);
}
index++;
}
// from zip, read remotely by ZipVFS at build time; nothing to download
case "zip":
console.log("Zip client provider; skipping download in favor of ZipVFS");
break;
console.log(`Downloading ${urls.length} packages...`);
// effectively the same as wgc, but direct for preview
case "wgpkg":
await downloadWGPKGClient();
break;
await rm(WGPKG_DIR, { recursive: true, force: true });
await mkdir(WGPKG_DIR, { recursive: true });
const inputContent = urls
.map((url) => {
const name = url.split("/").pop()!;
return `${url}\n out=${name}\n dir=${WGPKG_DIR}`;
})
.join("\n");
await $`echo ${inputContent} | aria2c -j ${urls.length} -x 2 -s 2 -i -`;
const firstChunk = `${WGPKG_DIR}/${urls[0].split("/").pop()!}`;
await $`7z x "${firstChunk}" -o${dir} -y`;
await rm(WGPKG_DIR, { recursive: true });
} else {
throw new Error(`Unknown provider: ${provider}`);
default:
console.log("Unknown client provider specified, using latest wgc client");
case "wgc":
await downloadWGCClient();
break;
}
@@ -0,0 +1,57 @@
import { assertSecret } from "@blitzkit/core";
import { $ } from "bun";
import { rm } from "node:fs/promises";
import { DEPOT_DOWNLOADER_RETRY_TIME, dir, source } from ".";
import {
DEPOT_DOWNLOADER_EXECUTABLE,
DEPOT_DOWNLOADER_MAX_DOWNLOADS,
DEPOT_DOWNLOADER_OUTPUT,
} from "./constants";
import { QuickGitHubRelease } from "./types";
export async function downloadSteamClient() {
const [id, platform] = source.split("/");
console.log("Downloading Depot Downloader...");
const releases = await fetch(
"https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest",
).then((response) => response.json() as Promise<QuickGitHubRelease>);
const asset = releases.assets.find((asset) =>
asset.name.includes("linux-x64"),
);
if (!asset) {
throw new Error("No linux-x64 asset found for Steam DepotDownloader");
}
await rm(DEPOT_DOWNLOADER_OUTPUT, { recursive: true, force: true });
await $`curl -L "${asset.browser_download_url}" -o "${DEPOT_DOWNLOADER_OUTPUT}.zip"`;
await $`unzip "${DEPOT_DOWNLOADER_OUTPUT}.zip" -d "${DEPOT_DOWNLOADER_OUTPUT}"`;
await $`chmod +x "${DEPOT_DOWNLOADER_EXECUTABLE}"`;
console.log("Downloading client...");
const username = assertSecret(import.meta.env.STEAM_USERNAME);
const password = assertSecret(import.meta.env.STEAM_PASSWORD);
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),
);
}
}
@@ -0,0 +1,62 @@
import locales from "@blitzkit/i18n/locales.json";
import { XMLParser } from "fast-xml-parser";
import {
WGC_CLIENT_GUID,
WGC_CLIENT_URL,
WGC_METADATA_PROTOCOL_VERSION,
WGC_PATCHES_CHAIN_PROTOCOL_VERSION,
} from "../../config/wgcClient";
import { downloadWgParts } from "../wgpkg";
import { ClientMetadata, PatchesChain } from "./types";
const parser = new XMLParser();
export async function downloadWGCClient() {
const metadataUrl = new URL("api/v1/metadata", WGC_CLIENT_URL);
metadataUrl.searchParams.set("guid", WGC_CLIENT_GUID);
metadataUrl.searchParams.set("chain_id", "unknown");
metadataUrl.searchParams.set(
"protocol_version",
WGC_METADATA_PROTOCOL_VERSION,
);
const metadata = await fetch(`${metadataUrl}`)
.then((response) => response.text())
.then((text) => parser.parse(text) as Promise<ClientMetadata>);
const patchesChainUrl = new URL("api/v1/patches_chain", WGC_CLIENT_URL);
patchesChainUrl.searchParams.set(
"protocol_version",
WGC_PATCHES_CHAIN_PROTOCOL_VERSION,
);
patchesChainUrl.searchParams.set("client_type", "full");
patchesChainUrl.searchParams.set("lang", locales.default);
patchesChainUrl.searchParams.set(
"metadata_version",
`${metadata.protocol.version}`,
);
patchesChainUrl.searchParams.set(
"metadata_protocol_version",
WGC_METADATA_PROTOCOL_VERSION,
);
patchesChainUrl.searchParams.set(
"chain_id",
metadata.protocol.predefined_section.chain_id,
);
patchesChainUrl.searchParams.set("game_installation", "true");
patchesChainUrl.searchParams.set("game_id", WGC_CLIENT_GUID);
patchesChainUrl.searchParams.set("client_current_version", "0");
const patchesChain = await fetch(`${patchesChainUrl}`)
.then((response) => response.text())
.then((text) => parser.parse(text) as Promise<PatchesChain>);
const urls = patchesChain.protocol.patches_chain.patch.files.file.map(
(file) =>
new URL(file.name, patchesChain.protocol.web_seeds.url).toString(),
);
await downloadWgParts(urls);
}
@@ -0,0 +1,87 @@
export interface ClientMetadata {
protocol: {
version: number;
predefined_section: PredefinedSection;
generated_section: GeneratedSection;
};
}
interface GeneratedSection {
launch_forbidden: string;
stop_supporting: string;
}
interface PredefinedSection {
app_id: string;
chain_id: string;
supported_languages: string;
default_language: string;
name: string;
fs_name: string;
shortcut_name: string;
executables: { executable: string };
keep_patches_interval: number;
client_types: { client_type: ClientType };
login_enabled: boolean;
realms_settings: RealmsSettings;
localization: Localization;
}
interface ClientType {
initial_app_type: string;
final_app_type: string;
min_supported_os: string;
client_parts: { client_part: string };
}
interface Localization {
item: { text: string[] };
}
interface RealmsSettings {
instances: { instance: Instance[] };
}
interface Instance {
game_id: string;
title_id: string;
platform_realm_id: string;
options: { option: string };
content_service_url: string;
}
export interface PatchesChain {
protocol: {
parts_info: { part: Part };
patches_chain: { patch: Patch };
delay_preload: string;
web_seeds: { url: string };
meta_need_update: string;
version_name: string;
};
}
interface Part {
name: string;
version: number;
status: string;
}
interface Patch {
files: { file: File[] };
torrent: Torrent;
part: string;
version_from: number;
version_to: string;
}
interface File {
name: string;
size: number;
unpacked_size: number;
}
interface Torrent {
hash: string;
urls: { url: string };
}
@@ -0,0 +1,49 @@
import { $ } from "bun";
import { mkdir, rm } from "node:fs/promises";
import { dir, source } from ".";
import { WGPKG_DIR } from "./constants";
export async function downloadWGPKGClient() {
let index = 1;
const urls: string[] = [];
console.log("Discovering packages...");
while (true) {
const url = `${source}.${index.toString().padStart(3, "0")}`;
const response = await fetch(url);
if (response.status === 200) {
urls.push(url);
} else if (response.status === 404) {
break;
} else {
throw new Error(`Wargaming response error status: ${response.status}`);
}
index++;
}
console.log(`Downloading ${urls.length} packages...`);
await downloadWgParts(urls);
}
export async function downloadWgParts(urls: string[]) {
await rm(WGPKG_DIR, { recursive: true, force: true });
await mkdir(WGPKG_DIR, { recursive: true });
const inputContent = urls
.map((url) => {
const name = url.split("/").pop()!;
return `${url}\n out=${name}\n dir=${WGPKG_DIR}`;
})
.join("\n");
await $`echo ${inputContent} | aria2c -j ${urls.length} -x 2 -s 2 -i -`;
const firstChunk = `${WGPKG_DIR}/${urls[0].split("/").pop()!}`;
await $`7z x "${firstChunk}" -o${dir} -y`;
await rm(WGPKG_DIR, { recursive: true });
}
@@ -0,0 +1,13 @@
import { assertSecret } from "@blitzkit/core";
import { $ } from "bun";
import { mkdir } from "node:fs/promises";
import { dir } from ".";
export async function downloadZipClient() {
const url = assertSecret(import.meta.env.CLIENT_SOURCE);
console.log("Downloading and extracting zipped client...");
await mkdir(dir, { recursive: true });
await $`curl -L "${url}" | bsdtar -xf- --strip-components=1 -C ${dir}`;
}
@@ -0,0 +1,7 @@
export interface RegionsPublish {
Common: Common;
}
interface Common {
smartDlcUrls: string[];
}
+23
View File
@@ -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));
}
+3
View File
@@ -0,0 +1,3 @@
import { createClientVFS } from "@blitzkit/core/src/blitzkit/vfs/client";
export const vfs = await createClientVFS();
+12 -20
View File
@@ -1,6 +1,4 @@
import react from "@astrojs/react";
import strings from "@blitzkit/i18n/strings/en.json";
import favicons from "astro-favicons";
import { defineConfig } from "astro/config";
export default defineConfig({
@@ -9,6 +7,16 @@ export default defineConfig({
vite: {
server: { allowedHosts: [] },
esbuild: { target: "es2022" },
build: { cssCodeSplit: false },
css: {
modules: {
// Short hashed class names in production to shrink HTML; the leading _ keeps names that start with a digit valid
generateScopedName:
process.env.NODE_ENV === "production"
? "_[hash:base64:6]"
: undefined,
},
},
},
output: "static",
@@ -16,23 +24,7 @@ export default defineConfig({
outDir: "../../dist/website",
prefetch: { defaultStrategy: "hover", prefetchAll: true },
build: { concurrency: 4 },
build: { concurrency: 8, inlineStylesheets: "never" },
integrations: [
favicons({
name: strings.common.name,
short_name: strings.common.name,
icons: {
windows: true,
android: true,
appleIcon: true,
appleStartup: true,
favicons: true,
yandex: true,
},
}),
react(),
],
integrations: [react()],
});
+1 -9
View File
@@ -1,13 +1,6 @@
{
"name": "@blitzkit/website",
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"lint": "astro check",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^9.4.4",
@@ -30,7 +23,6 @@
"@types/three": "^0.180.0",
"@vite-pwa/astro": "^1.1.0",
"astro": "^5.14.4",
"astro-favicons": "^3.1.5",
"cheerio": "^1.1.2",
"compare-versions": "^6.1.1",
"fuzzysort": "^3.1.0",
@@ -45,7 +37,7 @@
"react-dom": "^19.3.0",
"react-error-boundary": "^6.1.3",
"react-promise-suspense": "^0.3.4",
"soapstone": "^1.0.1",
"soapstone": "^1.1.0",
"three": "^0.180.0",
"three-stdlib": "^2.36.0",
"transliteration": "^2.6.1",
Loaded 100 of 638 files, more files were not shown because too many files have changed in this diff. Show more