Compare commits

..
576 Commits
Author SHA1 Message Date
TrèsAbhi 3640c16384 Merge pull request #123 from tresabhi/dev 2024-06-06 19:45:10 -05:00
TrèsAbhi e8eb9333b1 feat: logs 2024-06-06 19:45:14 -05:00
TrèsAbhi 8ef0bfd7eb fix: stats wn8 fallback 2024-06-06 19:41:53 -05:00
TrèsAbhi 83bcca7f69 fix: no participation edge case 2024-06-06 19:40:37 -05:00
TrèsAbhi 378f56598d feat: seasonal stats 2024-06-06 19:31:53 -05:00
TrèsAbhi 5031b4f8e3 fix: decreasing position marked positively 2024-06-06 19:23:21 -05:00
TrèsAbhi beab7601a4 Merge branch 'dev' of https://github.com/tresabhi/blitzkit into dev 2024-06-06 19:21:10 -05:00
TrèsAbhi 721bfd9ea2 fix: rating command seasonal fix 2024-06-06 19:21:06 -05:00
TrèsAbhi e5c9c780e9 fix: base64 2024-06-06 19:14:01 -05:00
TrèsAbhi 8a64a2d7c7 fix: cache 3 2024-06-06 19:09:17 -05:00
TrèsAbhi eadd66dc6c fix: cache 2 2024-06-06 19:08:29 -05:00
TrèsAbhi 729a45f8a8 fix: cache 2024-06-06 19:05:34 -05:00
TrèsAbhi b216c1e6b8 feat: stronger threshold 2024-06-06 19:02:58 -05:00
TrèsAbhi 30b59fff02 fix: rating command seasonal fix 2024-06-06 19:00:37 -05:00
TrèsAbhi 324cfe3927 fix: secrets 3 2024-06-06 13:44:59 -05:00
TrèsAbhi 6a0182436e fix: secrets 2 2024-06-06 13:44:19 -05:00
TrèsAbhi 1c2d006eba fix: secrets 2024-06-06 13:43:25 -05:00
TrèsAbhi c943baf6f3 feat: discover ids 2024-06-06 13:37:50 -05:00
TrèsAbhi 93c7392d6e feat: isolated discovery 2024-06-05 18:35:44 -05:00
TrèsAbhi a36ffe74c4 fix: remove trash 2024-06-05 14:11:05 -05:00
TrèsAbhi 16ebea659a Merge branch 'dev' 2024-06-05 14:06:42 -05:00
TrèsAbhi 6fac144005 feat: logs 2024-06-05 14:05:13 -05:00
TrèsAbhi 64c9e2f64d fix: disallow iframs 2024-06-05 13:40:45 -05:00
TrèsAbhi 7cdcf7b9e1 fix: ios turret 2024-06-05 13:28:45 -05:00
TrèsAbhi 331f57e7b0 fix: he no block on core 2024-06-05 13:14:08 -05:00
TrèsAbhi 10c810b228 feat: some tankopedia server rendered 2024-06-05 13:06:44 -05:00
TrèsAbhi 25523b9d8d feat: simplification 2024-06-05 12:56:09 -05:00
TrèsAbhi 2a730bed91 feat: better footer 2024-06-05 12:53:16 -05:00
TrèsAbhi 55a78ebd2f feat: table formatting 2024-06-05 12:26:10 -05:00
TrèsAbhi 69ac95415a feat: better credits format 2024-06-05 12:21:05 -05:00
TrèsAbhi ddb0bd8d09 feat: start on expansive footer 2024-06-05 12:12:18 -05:00
TrèsAbhi 4683de90ba feat: better image alignment and loading performance 2024-06-04 18:18:24 -05:00
TrèsAbhi 429049761f feat: edge plus button 2024-06-04 18:06:15 -05:00
TrèsAbhi 61958e72da fix: non-collapsing compare header 3 2024-06-04 17:56:27 -05:00
TrèsAbhi 2f32a076a1 fix: non-collapsing compare header 2 2024-06-04 17:55:15 -05:00
TrèsAbhi a06bcc6a4d fix: non-collapsing compare header 2024-06-04 17:43:14 -05:00
TrèsAbhi 3e0e05b8cc fix: use bounding rects for rotation inputs 2024-06-04 17:37:59 -05:00
TrèsAbhi d601e9fbc3 fix: high contrast link 2024-06-04 17:32:23 -05:00
TrèsAbhi 1c453f1105 fix: use jpeg 2024-06-03 18:29:57 -05:00
TrèsAbhi 1195f078c7 feat: banner 2024-06-03 18:28:09 -05:00
TrèsAbhi 12d07e7dab feat: smaller tool descs 2024-06-03 18:19:41 -05:00
TrèsAbhi e09b34b1d5 feat: blitzkit tankopedia watermark 2024-06-03 18:16:57 -05:00
TrèsAbhi 0c5bf85bc5 fix: use new link component in navbar 2024-06-03 18:07:01 -05:00
TrèsAbhi 5c328d0f4d feat: highliting sections 2024-06-03 18:02:10 -05:00
TrèsAbhi d4976f07f1 feat: more responsive 2024-06-03 17:53:01 -05:00
TrèsAbhi 87b0824523 fix: max width 2024-06-03 17:46:59 -05:00
TrèsAbhi 3d2b443dc7 feat: new homepage 2024-06-03 17:45:50 -05:00
TrèsAbhi 847d605f08 feat: fully implement roboto flex 2024-06-03 16:47:21 -05:00
TrèsAbhi 17cd7e9dc5 fix: no html pointer events 2024-06-03 15:56:02 -05:00
TrèsAbhi a1b25e1e52 fix: discard shot on tank change 2024-06-03 15:52:30 -05:00
TrèsAbhi 42f1dd33b5 fix: multiplicative camouflage 2024-06-03 15:33:41 -05:00
TrèsAbhi 3c4743731b fix: light tank on move camo now same as still 2024-06-03 14:21:36 -05:00
TrèsAbhi 17439bf559 fix: multiplicative camouflage 2024-06-03 14:20:24 -05:00
TrèsAbhi 94b8cfefcf fix: non-obtrusive hit markers 2024-06-03 13:57:15 -05:00
TrèsAbhi a53cf2111e fix: only use gun masking when clipping plane is available 2024-06-03 13:47:55 -05:00
TrèsAbhi d679641c9d fix: smaller quick action buttons on smaller screens 2024-06-03 13:45:44 -05:00
TrèsAbhi 89bff4dcb1 Update credits.md 2024-05-31 19:25:07 -04:00
TrèsAbhi fece9863f8 feat: remove google ads from ads.txt 2024-05-27 22:44:19 -05:00
TrèsAbhi 079a9884a8 Merge branch 'main' of https://github.com/tresabhi/blitzkit 2024-05-27 22:43:15 -05:00
TrèsAbhi ab0c7d5572 feat: enable pubcenter 2024-05-27 22:43:14 -05:00
TrèsAbhi 433621b384 feat: stuff 2024-05-27 22:42:09 -05:00
TrèsAbhi ec95446bae Update ads.txt 2024-05-27 22:34:47 -05:00
TrèsAbhi 615d7f06aa fix: typing parity 2024-05-27 21:08:05 -05:00
TrèsAbhi 96ce3c7d41 fix: block he with red 2024-05-27 21:01:07 -05:00
TrèsAbhi 3230afc117 fix: keying shot display 2024-05-27 20:58:22 -05:00
TrèsAbhi 00cee28e08 fix: render tracer over armor 2024-05-27 20:57:04 -05:00
TrèsAbhi 2b34863b53 fix: ricochet angle 2024-05-27 20:42:48 -05:00
TrèsAbhi e16f3653bb feat: out tracer 2024-05-26 14:39:16 -05:00
TrèsAbhi 7f8797a449 feat: shot display 2024-05-26 13:42:51 -05:00
TrèsAbhi 3438e51ef1 feat: dispaly 2024-05-25 14:21:36 -05:00
TrèsAbhi dc50c4a758 feat: complete math 2024-05-25 13:32:00 -05:00
TrèsAbhi a2bf592eaf feat: more progress 2024-05-24 20:50:55 -05:00
TrèsAbhi a3653b1c1f fix: select first shell on gun swap 2024-05-24 20:36:10 -05:00
TrèsAbhi 15c41ba7c9 fix: no text select on cam rotate 2024-05-24 20:33:19 -05:00
TrèsAbhi 542145467c feat: start rewrite on onClick armor 2024-05-24 20:32:39 -05:00
TrèsAbhi 82933aaf1e fix: heat doesn't actually ricochet lol 2024-05-24 13:48:50 -05:00
TrèsAbhi 8e2302a6d4 feat: start of homepage tracking 2024-05-23 14:05:25 -05:00
TrèsAbhi 477c35db34 fix: adjective titles 2024-05-23 13:48:21 -05:00
TrèsAbhi f7e7fdff0e feat: tank search hydration issues 2024-05-23 13:46:33 -05:00
TrèsAbhi 02daeff583 feat: reduce tanks per page for mobile 2024-05-23 13:29:39 -05:00
TrèsAbhi ddb822054f fix: navbar links 2024-05-23 13:26:43 -05:00
TrèsAbhi 96b4ab4380 fix: no scroll on desktop 2024-05-23 13:20:07 -05:00
TrèsAbhi 4206395f49 fix: footer hydration issues 2024-05-23 13:17:45 -05:00
TrèsAbhi 2a32a1a7cb fix: checks hydration issues 2024-05-23 13:14:45 -05:00
TrèsAbhi 6e96798d5e feat: navbar hydration issues 2024-05-23 13:03:58 -05:00
TrèsAbhi dab3393ba2 feat: legal stuff 2024-05-23 12:41:21 -05:00
TrèsAbhi e2502abd9b feat: agreements 2024-05-23 12:33:47 -05:00
TrèsAbhi 4f29b1b580 feat: legalities 2024-05-23 12:06:05 -05:00
TrèsAbhi f23db7a02a Merge pull request #121 from tresabhi/main 2024-05-23 11:46:15 -05:00
TrèsAbhi 372f04ee20 fix: he strength 2 2024-05-23 11:43:34 -05:00
TrèsAbhi 78adba82de fix: he strength 2024-05-23 09:54:29 -05:00
TrèsAbhi 8f9b60c7e3 feat: some testing gaps 2024-05-23 09:53:49 -05:00
TrèsAbhi a9497d061d feat: more code splitting 2024-05-22 14:16:46 -05:00
TrèsAbhi 5d6e864451 feat: scroll to view home search 2024-05-22 13:57:57 -05:00
TrèsAbhi be7b00c4be feat: more compact modules 2024-05-22 13:52:30 -05:00
TrèsAbhi 9f867b7933 feat: cleaner consumables border radius 2024-05-22 13:51:16 -05:00
TrèsAbhi a3cbe6d1e6 feat: live input updates 2024-05-22 13:47:35 -05:00
TrèsAbhi 6b63231194 feat: some code splitting 2024-05-22 13:43:08 -05:00
TrèsAbhi 5f47218f16 Merge pull request #120 from tresabhi/main 2024-05-22 13:31:39 -05:00
TrèsAbhi 72a90e7d1f fix: 1+ cali 2024-05-22 13:30:39 -05:00
TrèsAbhi 22cd18956b feat: start of isolation 2024-05-22 13:27:07 -05:00
TrèsAbhi 30a3e10bec feat: icon buttons for page turner 2024-05-22 13:20:56 -05:00
TrèsAbhi fda4f76be3 Merge pull request #119 from tresabhi/main 2024-05-22 13:06:10 -05:00
TrèsAbhi 8b9a13a58e Merge pull request #118 from tresabhi/dev-static-updates 2024-05-22 13:04:32 -05:00
TrèsAbhi 903b7fa677 feat: season 4 updates 2024-05-22 13:04:39 -05:00
TrèsAbhi a7bd30348d feat: larger navbar link text 2024-05-21 20:57:26 -05:00
TrèsAbhi 7c950e1121 feat: complete functionality 2024-05-21 14:18:21 -05:00
TrèsAbhi 3631fb3cab feat: new homepage 2024-05-20 21:00:47 -05:00
TrèsAbhi 2ce69b085a feat: new home screen 2024-05-20 14:16:13 -05:00
TrèsAbhi a7b2a0abe9 feat: apple inspired navbar 2024-05-20 13:33:32 -05:00
TrèsAbhi 1db7354c1b fix: safari blur 2024-05-20 12:31:43 -05:00
TrèsAbhi bde1bd279d feat: clone navbar 2024-05-20 12:30:22 -05:00
TrèsAbhi 4062a09c05 feat: aeson navbar 2024-05-20 12:07:00 -05:00
TrèsAbhi 386cca7226 feat: close menu on click 2024-05-19 21:09:49 -05:00
TrèsAbhi d1c6ad90d5 feat: reveal menu on hover 2024-05-19 21:05:23 -05:00
TrèsAbhi 9ff756e458 feat: bun script 2024-05-19 20:56:04 -05:00
TrèsAbhi 68357f6255 fix: one-liner 2024-05-19 18:07:36 -05:00
TrèsAbhi 8c8867280b feat: script 2024-05-19 18:06:02 -05:00
TrèsAbhi 505f74aa26 feat: complete averages script 2024-05-19 17:50:01 -05:00
TrèsAbhi b4c7b07158 feat: id discovery 2024-05-18 21:12:11 -05:00
TrèsAbhi 87b44d1c27 feat: r 2024-05-17 20:29:27 -05:00
TrèsAbhi 61db42d225 feat: more! 2024-05-17 20:23:51 -05:00
TrèsAbhi 8d69784779 feat: more! 2024-05-17 14:14:44 -05:00
TrèsAbhi 02b5f0c45a feat: more! 2024-05-16 20:35:12 -05:00
TrèsAbhi b5b87fbe17 feat: technical dogs 2024-05-15 19:44:51 -05:00
TrèsAbhi ca418b28b5 fix: default closed navbar 2024-05-14 14:12:06 -05:00
TrèsAbhi 0198829a18 feat: better hamburger menu 2024-05-14 14:07:44 -05:00
TrèsAbhi cdd2a08ec0 feat: logs 2024-05-05 14:24:39 -05:00
TrèsAbhi e0e0624010 feat: stop autorotate on pose 2024-05-05 14:10:50 -05:00
TrèsAbhi 03ee0828fe fix: distance gray 2024-05-05 14:08:33 -05:00
TrèsAbhi 3cda99cbc1 feat: plug 2024-05-05 14:08:13 -05:00
TrèsAbhi 258421e77e feat: space in between modules 2024-05-05 13:59:44 -05:00
TrèsAbhi 121a91ce75 feat: tighter consumables row 2024-05-05 13:57:11 -05:00
TrèsAbhi 0a74e43f67 feat: remove vercel subdomain 2024-05-05 13:52:08 -05:00
TrèsAbhi 4900aa8dd9 feat: dev subdomain 2024-05-05 13:48:33 -05:00
TrèsAbhi 07b82aa383 Merge pull request #117 from tresabhi/main 2024-05-05 13:40:01 -05:00
TrèsAbhi ae852564de fix: analysitcs 2024-05-05 12:12:52 -05:00
TrèsAbhi ea4b244336 feat: root domain sitemaps 2024-05-05 12:05:33 -05:00
TrèsAbhi f6925a93f3 feat: descs 2024-05-05 12:04:27 -05:00
TrèsAbhi 03205d3659 feat: highlight top tier modules 2024-05-04 17:50:06 -05:00
TrèsAbhi def470e805 feat: large tank icons 2024-05-04 17:42:32 -05:00
TrèsAbhi 3f8c2ba322 fix: remove second page turner on low results 2024-05-04 17:28:12 -05:00
TrèsAbhi aaf013c650 feat: smolecraft suggestions 1 2024-05-04 17:25:03 -05:00
TrèsAbhi a099df5133 feat: rotation inputs 2024-05-04 17:14:08 -05:00
TrèsAbhi cebc4392ed feat: cleaner fullscreen 2024-05-04 17:02:03 -05:00
TrèsAbhi c9cfb16469 feat: controls 2024-05-04 16:53:26 -05:00
TrèsAbhi c069d132c1 feat: loading bar 2024-05-04 16:44:37 -05:00
TrèsAbhi a5b3177394 feat: no flex 1 2024-05-04 16:39:41 -05:00
TrèsAbhi a7f2c3e324 feat: responsive tech tree 2024-05-04 16:37:36 -05:00
TrèsAbhi 97cd218796 feat: image alts 2024-05-04 16:28:12 -05:00
TrèsAbhi ab510361b5 feat: better layout 2024-05-04 16:19:27 -05:00
TrèsAbhi 299ccef579 feat: bring back stats 2024-05-04 13:46:57 -05:00
TrèsAbhi 42076c1317 feat: module arrows 2024-05-04 13:16:33 -05:00
TrèsAbhi d0743b54e0 feat: better modules 2024-05-04 12:05:37 -05:00
TrèsAbhi 7af5d5f465 feat: module tree 2024-05-04 11:00:54 -05:00
TrèsAbhi 89e97f484b feat: unlocks proof of concept 2024-05-03 23:58:19 -05:00
TrèsAbhi e5d109c973 fix: use card tank value 2024-05-03 23:01:53 -05:00
TrèsAbhi 67fda9b577 feat: falg 2024-05-03 22:54:53 -05:00
TrèsAbhi 64ddacf5c7 feat: tech tree 2024-05-03 22:16:32 -05:00
TrèsAbhi 04434f2acd feat: disabled autorotate on pointer down 2024-05-03 21:19:25 -05:00
TrèsAbhi 798b6894a9 feat: compare button 2024-05-03 21:17:31 -05:00
TrèsAbhi d3760f7705 feat: shooter icon order 2024-05-03 21:08:50 -05:00
TrèsAbhi cc094ff8e4 fix: bottom padding 2024-05-03 20:54:00 -05:00
TrèsAbhi ee66dd31b5 feat: better hero responsiveness 2024-05-03 20:52:59 -05:00
TrèsAbhi d6993c802f feat: fullscreen hero 2024-05-03 20:49:05 -05:00
TrèsAbhi 98716b7f71 feat: shells 2024-05-03 19:37:41 -05:00
TrèsAbhi cc1e3e1315 fix: margin 2024-05-03 19:19:10 -05:00
TrèsAbhi 7bd84fdaec feat: shells 2024-05-03 19:18:34 -05:00
TrèsAbhi a8bb6d0bb8 feat: characteriscs lauytout 2024-05-03 19:10:51 -05:00
TrèsAbhi 9ecf9ed406 feat: separator 2024-05-03 19:03:25 -05:00
TrèsAbhi 551e562109 feat: combine controls 2024-05-03 17:52:45 -05:00
TrèsAbhi 1d955078ef fix: nation adjectives 2024-05-03 17:42:28 -05:00
TrèsAbhi 80c16bce1c feat: switch 2024-05-03 17:39:06 -05:00
TrèsAbhi a961643c76 feat: better ratios of hero 2024-05-03 17:35:59 -05:00
TrèsAbhi ea7f40a808 feat: center name 2024-05-03 17:26:14 -05:00
TrèsAbhi 797642a3c3 feat: rest of config 2024-05-03 17:22:36 -05:00
TrèsAbhi 1c3a20c627 fix: gun tier in map 2024-05-03 17:10:00 -05:00
TrèsAbhi c855bd1653 feat: start of characteristics 2024-05-03 17:07:27 -05:00
TrèsAbhi 381a4fefd9 feat: exit fullscreen 2024-05-03 15:30:17 -05:00
TrèsAbhi e3d69ab83c feat: revamp 2024-05-03 12:57:04 -05:00
TrèsAbhi 468308ad22 feat: descs 2024-05-03 12:02:56 -05:00
TrèsAbhi d3e3d6d7b6 Merge branch 'dev' of https://github.com/tresabhi/blitzkit into dev 2024-05-03 11:49:33 -05:00
TrèsAbhi 32dbd866d4 fix: filter video definitions 2 2024-05-03 11:49:22 -05:00
TrèsAbhi ed9b61c97d fix: filter video definitions 2024-05-03 11:49:22 -05:00
TrèsAbhi 65014cade3 empty 2024-05-03 11:40:20 -05:00
TrèsAbhi be8d565545 fix: filter video definitions 2 2024-05-03 10:38:55 -05:00
TrèsAbhi b151c7483a fix: filter video definitions 2024-05-03 10:35:29 -05:00
TrèsAbhi 6a1b786dae fix: [] 2024-05-03 09:19:29 -05:00
TrèsAbhi ea1eeb4366 fix: first time tank deltas 2024-05-03 09:17:09 -05:00
TrèsAbhi 15bec37a33 feat: logs 2024-05-03 09:10:23 -05:00
TrèsAbhi 4bba794bfb feat: disable login 2024-05-03 09:04:35 -05:00
TrèsAbhi 82014845cb feat: add column 2024-05-03 09:02:06 -05:00
TrèsAbhi 74a83d17e7 feat: better layout 2024-05-02 18:27:27 -05:00
TrèsAbhi 26ea06b091 fix: undef window 2024-05-02 18:08:58 -05:00
TrèsAbhi 352cb70830 feat: totals 2024-05-01 22:11:12 -05:00
TrèsAbhi ff92b3dd45 feat: login auth 2024-05-01 21:04:31 -05:00
TrèsAbhi 99ed269723 fix: old code 2024-05-01 20:56:38 -05:00
TrèsAbhi c24639dd0c feat: deltas 2024-05-01 20:54:27 -05:00
TrèsAbhi cceebd1980 fix: redirect to tracker 2024-05-01 20:36:35 -05:00
TrèsAbhi 596018b3b2 feat: ghost login button 2024-05-01 20:27:10 -05:00
TrèsAbhi 8bc3e2c6b9 feat: stat generalzation 2024-05-01 17:55:13 -05:00
TrèsAbhi aafba7b6c8 feat: link 2024-05-01 17:29:40 -05:00
TrèsAbhi d56be26db2 feat: since timer 2024-05-01 17:23:33 -05:00
TrèsAbhi e740274e5a feat: table 2024-05-01 17:20:08 -05:00
TrèsAbhi 0634804914 Merge pull request #116 from tresabhi/main 2024-05-01 16:37:22 -05:00
TrèsAbhi 4d908493f1 feat: experimental 2024-05-01 16:36:34 -05:00
TrèsAbhi 23d43f131b fix: capitalize K 2024-05-01 16:35:28 -05:00
TrèsAbhi 8a1b8673dc feat: updated favicon 2024-05-01 16:34:46 -05:00
TrèsAbhi 8682b2ea78 feat: rearranged navbar 2024-05-01 16:33:22 -05:00
TrèsAbhi 6e32b41b15 feat: convinient login 2024-05-01 13:04:31 -05:00
TrèsAbhi 6223773c71 feat: move health to right 2024-04-30 22:20:31 -05:00
TrèsAbhi 7fd4c931e5 feat: remove flair 2024-04-30 10:01:23 -05:00
TrèsAbhi 1011c76cda feat: add n90 2024-04-30 09:57:37 -05:00
TrèsAbhi 38fa15ab97 feat: cc account tracking 2 2024-04-28 19:16:08 -05:00
TrèsAbhi d2b18360ed feat: cc account tracking 2024-04-28 18:43:12 -05:00
TrèsAbhi 6ae86a7a70 feat: some protobuf parsing 2024-04-28 17:06:31 -05:00
TrèsAbhi 6b175238b2 feat: subtitle 2024-04-27 11:07:58 -05:00
TrèsAbhi 2a2a7a067c feat: map definitions 2024-04-27 10:50:09 -05:00
TrèsAbhi 25788dedf4 feat: merge types 2024-04-26 12:51:35 -05:00
TrèsAbhi 391990676f feat: wn8 and labels 2024-04-26 12:34:59 -05:00
TrèsAbhi 8c16fdf9b5 fix 2024-04-25 14:00:13 -05:00
TrèsAbhi c30358248f fix: use production videos 2024-04-25 14:00:00 -05:00
TrèsAbhi 62b218a44d feat: some more functionality 2024-04-25 13:47:30 -05:00
TrèsAbhi 1f30d1d2c3 feat: mostly complete rating command 2024-04-24 16:22:48 -05:00
TrèsAbhi b1917c73f2 Update Party3.tsx 2024-04-24 08:13:18 -05:00
TrèsAbhi 2d3325f13a fix: dir 2024-04-23 16:08:13 -05:00
TrèsAbhi 983b96fd99 feat: some work 2024-04-23 16:07:59 -05:00
TrèsAbhi 2c105d7a89 feat: some unfinished ideas 2024-04-23 15:51:16 -05:00
TrèsAbhi 28348552f0 fix: watermark 2024-04-23 15:07:21 -05:00
TrèsAbhi 449f2b0677 fix: more updates to docs 2024-04-23 15:06:24 -05:00
TrèsAbhi 5346ab576f fix: realign 2024-04-23 10:33:24 -05:00
TrèsAbhi d041b353c9 feat: logs 2024-04-23 10:25:59 -05:00
TrèsAbhi 77575168a0 feat: better message 2024-04-23 10:24:00 -05:00
TrèsAbhi 051997d2d3 feat: kit 3 2024-04-23 10:19:32 -05:00
TrèsAbhi e53bdd8e19 fix: core 2024-04-23 09:57:59 -05:00
TrèsAbhi 4013192faa feat: kit 2 2024-04-23 09:51:32 -05:00
TrèsAbhi 3da009f859 feat: kit 2024-04-23 09:42:08 -05:00
TrèsAbhi 2a5888c033 feat: hero 2024-04-22 12:51:46 -05:00
TrèsAbhi ded98d78d4 fix: link 2024-04-22 12:48:07 -05:00
TrèsAbhi f4b231de10 fix: more paths 2024-04-22 12:46:47 -05:00
TrèsAbhi 9fda3c6861 fix: videos 2024-04-22 12:46:15 -05:00
TrèsAbhi d3f58d9cda Merge pull request #111 from tresabhi/dev-rinth 2024-04-22 12:43:26 -05:00
TrèsAbhi 3ef793a776 fix: rinth package 2024-04-22 12:43:23 -05:00
TrèsAbhi 13a901c839 Merge branch 'main' into dev-rinth 2024-04-22 12:43:22 -05:00
TrèsAbhi 5ede2324b3 Update Party3.tsx 2024-04-22 12:27:43 -05:00
TrèsAbhi 4e8f1a4a71 fix: ? 2024-04-22 10:27:46 -05:00
TrèsAbhi eae9cbf971 feat: stop excessive tank armor and model name spam 2024-04-22 10:07:23 -05:00
TrèsAbhi 0eac25f1c8 Merge pull request #108 from tresabhi/imgbot 2024-04-22 10:01:36 -05:00
TrèsAbhi c281e9b66f feat: cumulative video indexing 2024-04-22 09:38:00 -05:00
TrèsAbhi eb7fc62e00 Merge pull request #110 from tresabhi/main 2024-04-22 09:09:54 -05:00
TrèsAbhi d5f83c444e feat; gap 2024-04-21 19:45:47 -05:00
TrèsAbhi c890bfa8bd feat: move up 2024-04-21 19:41:42 -05:00
TrèsAbhi 9ead3eb627 feat: automatic videos 2024-04-21 19:40:38 -05:00
TrèsAbhi b8db78c328 fix: secrets 2024-04-21 18:26:15 -05:00
TrèsAbhi 8b65b94851 feat: force 2024-04-21 18:01:02 -05:00
TrèsAbhi 9da723ed31 feat: logs 2024-04-21 17:40:04 -05:00
TrèsAbhi 2f48dbc25c feat: more shell properties 2024-04-21 17:39:24 -05:00
TrèsAbhi 730d6f2bb8 feat: logs 2024-04-21 17:25:35 -05:00
TrèsAbhi 335ae4493f fix: render normal armor 2024-04-21 17:16:25 -05:00
TrèsAbhi eb83039967 feat: include lower part of barrel 2024-04-21 17:15:23 -05:00
TrèsAbhi 6e91810565 fix: select all rows 2024-04-21 17:05:35 -05:00
TrèsAbhi a55c259205 feat: videos automation 2024-04-21 17:05:07 -05:00
TrèsAbhi b5188331bd feat: remove textual reference 2024-04-21 12:17:33 -05:00
TrèsAbhi 2b354770c7 fix: fragment key 2024-04-21 11:16:46 -05:00
TrèsAbhi 11e4009303 fix: skill keys 2024-04-21 11:13:32 -05:00
TrèsAbhi 9bce5e5d75 fix: duplicate keys 2024-04-21 11:12:52 -05:00
TrèsAbhi 8e8d68a5b5 fix: antagonist bar keys 2024-04-21 11:10:44 -05:00
TrèsAbhi 2c6fcdf21f fix: navbar menu key 2024-04-21 11:09:53 -05:00
TrèsAbhi abb72fb674 fix: jsx tree node uuids 2024-04-21 11:09:24 -05:00
TrèsAbhi b805c2e3b4 fix: video key 2024-04-21 11:07:19 -05:00
TrèsAbhi 7e6aa41ebb fix: no undefined clipping planes 2024-04-21 11:06:40 -05:00
TrèsAbhi a2cfbda932 feat: start work of text 2024-04-21 11:05:42 -05:00
TrèsAbhi 0b222be6ef Merge pull request #109 from tresabhi/main 2024-04-21 10:50:25 -05:00
TrèsAbhi 1548813a21 feat: horizontal ad 2024-04-21 10:41:51 -05:00
TrèsAbhi c615284d87 feat: re-enable adsense 2024-04-21 10:37:44 -05:00
TrèsAbhi 6a48638171 fix: use client 2024-04-21 10:26:08 -05:00
TrèsAbhi 0b4829abd3 fix: use use effect 2024-04-21 10:25:43 -05:00
TrèsAbhi 57cd3aae50 feat: pub ads 2024-04-21 10:21:52 -05:00
TrèsAbhi 6298d6230f Update ads.txt 2024-04-21 09:13:56 -05:00
TrèsAbhi df7a5bb8a0 fix: fullscreen card 2024-04-20 21:40:41 -05:00
TrèsAbhi dd41cac3ac feat: videos 2024-04-20 21:01:28 -05:00
TrèsAbhi f17b275aa7 feat: add blitzkrieg name to older logs 2024-04-20 12:09:23 -05:00
TrèsAbhi 4a04f8a8f3 feat: generalized asset repo 2024-04-20 12:08:43 -05:00
TrèsAbhi 0f7d682782 feat: logos 2024-04-20 12:07:20 -05:00
TrèsAbhi 14cecdebe3 feat: reset asset name to krieg temporarily 2024-04-20 12:02:33 -05:00
TrèsAbhi c2b936c925 feat: rename to blitzrinth 2024-04-20 12:00:48 -05:00
TrèsAbhi 0fd17d9c96 feat: logs 2024-04-20 11:50:16 -05:00
TrèsAbhi b0645c39a0 fix: high end consumables increase 2024-04-20 11:45:41 -05:00
TrèsAbhi 1d947399ab fix: intra-clip for auto loaders 2024-04-20 11:43:15 -05:00
TrèsAbhi 659dddbe8e feat: aggressive donate button 2024-04-20 11:40:10 -05:00
TrèsAbhi a5c1223f7d feat: simpler footer 2024-04-20 11:20:52 -05:00
TrèsAbhi dc084f8d34 feat: compare button 2024-04-19 10:08:00 -05:00
TrèsAbhi 44b5907435 feat: tankopedia button 2024-04-19 09:59:21 -05:00
ImgBotApp 052fbec628 [ImgBot] Optimize images
*Total -- 6,696.66kb -> 4,836.70kb (27.77%)

/public/assets/banners/discord.png -- 1,632.36kb -> 921.18kb (43.57%)
/public/assets/banners/compare.png -- 2,571.28kb -> 1,799.75kb (30.01%)
/docs/public/assets/images/hero.png -- 183.03kb -> 147.76kb (19.27%)
/public/assets/banners/statistics.png -- 2,309.99kb -> 1,968.00kb (14.8%)

Signed-off-by: ImgBotApp <[email protected]>
2024-04-19 14:37:54 +00:00
TrèsAbhi 23d8c54366 feat: super duper secret map 2024-04-19 09:26:53 -05:00
TrèsAbhi dd88d42884 feat: logs 2024-04-19 09:17:22 -05:00
TrèsAbhi ed676f73b2 feat: og descs 2024-04-19 09:14:22 -05:00
TrèsAbhi adb0a9af64 fix: title 2024-04-19 09:11:36 -05:00
TrèsAbhi ccded1b2f8 feat: hide statistics 2024-04-19 09:10:33 -05:00
TrèsAbhi 89d43b4791 feat: better titles 2024-04-19 09:09:12 -05:00
TrèsAbhi 2226ac9852 feat: gutted some navbar features 2024-04-19 09:03:45 -05:00
TrèsAbhi 29bace875e fix: remove commit 2024-04-18 20:27:48 -05:00
TrèsAbhi 04107c10b7 feat: hamburger meny 2024-04-18 20:26:35 -05:00
TrèsAbhi 0a1e823ce4 feat: first developer mode enabling 2024-04-18 19:16:30 -05:00
TrèsAbhi c656d31618 feat: a few settings 2024-04-18 19:11:50 -05:00
TrèsAbhi 7eda4825ea feat: more navbar buttons 2024-04-18 18:42:57 -05:00
TrèsAbhi 60f0eb9a3c feat: tankopedia title 2024-04-18 18:29:29 -05:00
TrèsAbhi ce5c9f4afa feat: page exclusive titles 2024-04-18 18:28:46 -05:00
TrèsAbhi e834d31d92 feat: use lz4js types instead of home brewed 2024-04-18 18:23:23 -05:00
TrèsAbhi b679393b8a Merge branch 'main' into dev 2024-04-17 10:16:31 -05:00
TrèsAbhi eb5f79228b fix: bring back test tanks button 2024-04-17 09:52:15 -05:00
TrèsAbhi 6082576b60 feat: start of a meny 2024-04-17 09:50:46 -05:00
TrèsAbhi 92e9073939 things 2024-04-17 09:31:47 -05:00
TrèsAbhi d6669a84d6 Update index.ts 2024-04-17 08:34:20 -05:00
TrèsAbhi 0c4debe327 Update index.ts 2024-04-17 08:18:56 -05:00
TrèsAbhi 9f41bab28a feat: disabled stats 2024-04-16 22:13:21 -05:00
TrèsAbhi b906b42998 feat: search bar 2024-04-16 22:12:51 -05:00
TrèsAbhi 728a11efa4 feat: reduced gap 2024-04-16 22:06:24 -05:00
TrèsAbhi c35916c291 feat: colors 2024-04-16 22:05:36 -05:00
TrèsAbhi 2fd2e93f55 feat: shadows 2024-04-16 21:58:08 -05:00
TrèsAbhi b566d5982c feat: better icons 2024-04-16 21:49:30 -05:00
TrèsAbhi bef43e9ae6 feat: tank icons 2024-04-16 19:36:49 -05:00
TrèsAbhi e6404d5c77 feat: better spacing 2024-04-16 19:07:06 -05:00
TrèsAbhi f4d58015f5 feat: somethings 2024-04-16 19:03:37 -05:00
TrèsAbhi cd77d24dc6 feat: statistics 2024-04-16 18:51:20 -05:00
TrèsAbhi e25a3cd868 feat: title 2024-04-16 13:53:01 -05:00
TrèsAbhi 68923fe800 feat: icons 2024-04-16 13:49:33 -05:00
TrèsAbhi ccc6ddd5c9 Merge branch 'main' of https://github.com/tresabhi/blitzkrieg 2024-04-16 13:45:33 -05:00
TrèsAbhi 1c28b33da3 Merge branch 'dev' of https://github.com/tresabhi/blitzkrieg into dev 2024-04-16 13:45:18 -05:00
TrèsAbhi 900337f3ce feat: log 2024-04-16 13:45:17 -05:00
TrèsAbhi fae9f8bded feat: time in manifest 2024-04-16 13:45:03 -05:00
TrèsAbhi a0d78f89ff fix: remove logo on small screens 2024-04-16 13:45:03 -05:00
TrèsAbhi 6853d63bbb feat: change to utc 2024-04-16 13:45:03 -05:00
TrèsAbhi 2b27954a3b fix: max dpm on double shot auto reloaders 2024-04-16 13:45:03 -05:00
TrèsAbhi 7aa0b65d1d feat: null handling 2024-04-16 13:45:03 -05:00
TrèsAbhi 3e7a73c528 feat: cleaner fetch blitz func 2024-04-16 13:45:02 -05:00
TrèsAbhi 076785a9ad feat: more efficient 2024-04-16 13:45:02 -05:00
TrèsAbhi 74828e3c45 feat: rts 2024-04-16 13:45:02 -05:00
TrèsAbhi 310640c1ec feat: base work 2024-04-16 13:45:02 -05:00
TrèsAbhi c49c56fba3 Merge pull request #107 from tresabhi/dev 2024-04-16 13:44:16 -05:00
TrèsAbhi cc744f6154 Merge branch 'main' into dev 2024-04-16 13:44:09 -05:00
TrèsAbhi 93bf4a4742 Dev (#106) 2024-04-16 13:43:44 -05:00
TrèsAbhi badeb588dd feat: time in manifest 2024-04-16 09:42:48 -05:00
TrèsAbhi 5876bf35b4 fix: remove logo on small screens 2024-04-16 09:35:10 -05:00
TrèsAbhi 73903114c9 feat: change to utc 2024-04-16 09:28:01 -05:00
TrèsAbhi b29f7ca7f5 fix: max dpm on double shot auto reloaders 2024-04-16 09:24:28 -05:00
TrèsAbhi 9d715c23e5 redacted 2024-04-16 09:18:12 -05:00
TrèsAbhi 4ff5f7cdeb feat: null handling 2024-04-15 13:25:35 -05:00
TrèsAbhi dccfe3d652 feat: cleaner fetch blitz func 2024-04-15 13:19:25 -05:00
TrèsAbhi d780d32291 feat: more efficient 2024-04-15 09:27:59 -05:00
TrèsAbhi ebbdbc53a4 feat: rts 2024-04-13 22:13:57 -05:00
TrèsAbhi 9bc1635680 feat: base work 2024-04-13 18:20:49 -05:00
TrèsAbhi d7d19a0b50 Merge branch 'main' of https://github.com/tresabhi/blitzkrieg 2024-04-13 10:43:20 -05:00
TrèsAbhi 1b6845abf8 fix: grammar 2024-04-13 10:43:09 -05:00
TrèsAbhi 545ee70cd0 feat: logs 2 2024-04-13 10:42:31 -05:00
TrèsAbhi c92729d0e0 feat: logs 2024-04-13 10:42:17 -05:00
TrèsAbhi 71c3b5d2ef feat: undefined mask handling 2024-04-13 10:38:13 -05:00
TrèsAbhi 7372075ba3 fix: remove duplicate mantlets 2024-04-13 10:36:13 -05:00
TrèsAbhi f119b06dd8 fix: grammar 2024-04-12 09:24:15 -05:00
TrèsAbhi e23a440508 feat: logs 2024-04-12 09:23:34 -05:00
TrèsAbhi 6a9fa08500 fix: /research tank icon alignment 2024-04-12 09:17:05 -05:00
TrèsAbhi 8e86e81e91 fix: max probisions 2024-04-10 19:35:28 -05:00
TrèsAbhi 8b359e220a feat: more icon gap 2024-04-10 17:04:33 -05:00
TrèsAbhi 690bc5dbb5 feat: wrapping controls 2024-04-10 16:57:38 -05:00
TrèsAbhi d6e96e17ad feat: spall liner 2024-04-10 16:54:16 -05:00
TrèsAbhi ab26b346e6 feat: lenient psa 2024-04-10 16:29:12 -05:00
TrèsAbhi f02db6ef0b fix: clipping hero stat description 2024-04-10 16:19:24 -05:00
TrèsAbhi 55ba2525d1 fix: query ignorance on filter change 2024-04-10 16:13:39 -05:00
TrèsAbhi ea07d2646d feat: name draggable 2024-04-10 16:10:34 -05:00
TrèsAbhi ca111510f6 feat: remove caret icons 2024-04-10 16:05:30 -05:00
TrèsAbhi 519558dd28 fix: drag on mobile 2024-04-10 16:04:50 -05:00
TrèsAbhi c4d1e305f6 feat: grabbing cursor 2024-04-10 09:41:55 -05:00
TrèsAbhi 59772afb04 feat: drag and drop 2024-04-10 09:40:52 -05:00
TrèsAbhi 8c9dcfa551 feat: change name to just compare 2024-04-10 09:03:56 -05:00
TrèsAbhi 8bbf03a128 feat: version 2024-04-09 16:55:09 -05:00
TrèsAbhi 519fba84dc feat: ordered asset building 2024-04-09 16:03:07 -05:00
TrèsAbhi e7e74f706e feat: more provisions 2024-04-09 10:51:12 -05:00
TrèsAbhi 12e2793c92 feat: dynamic armor 2024-04-09 10:39:26 -05:00
TrèsAbhi 69040dc453 feat: reactive armor 2024-04-09 10:35:32 -05:00
TrèsAbhi 511151e101 feat: shells 2024-04-09 10:23:10 -05:00
TrèsAbhi 7fc993c2eb feat: shells 2024-04-09 10:04:43 -05:00
TrèsAbhi 030ca744e9 fix: correct shell count 2024-04-09 10:03:30 -05:00
TrèsAbhi 74756ab7bf feat: crew actions 2024-04-09 09:56:31 -05:00
TrèsAbhi e9a61d579d fix: update stats with crew skills 2024-04-09 09:51:22 -05:00
TrèsAbhi 7c3cad2c7d feat: crew button and missing traverse stats 2024-04-09 09:47:57 -05:00
TrèsAbhi 5f39ba55f6 feat: skip bot definitions 2024-04-08 22:04:50 -05:00
TrèsAbhi 2bfd8286a4 feat: cleanup 2024-04-08 21:50:29 -05:00
TrèsAbhi f3421b6f70 fix: types 2024-04-08 21:44:52 -05:00
TrèsAbhi abbbf11b3d feat: adsense 2024-04-08 21:43:47 -05:00
TrèsAbhi 797f5a90d2 feat: watermark 2 2024-04-08 21:24:24 -05:00
TrèsAbhi 818d13fade feat: watermark 2024-04-08 21:17:59 -05:00
TrèsAbhi 129d7c9688 feat: skills title 2024-04-08 19:26:49 -05:00
TrèsAbhi 28407b0f05 feat: universal crew skills 2024-04-08 19:24:49 -05:00
TrèsAbhi 8a9d72d0e6 feat: order 2024-04-08 19:12:29 -05:00
TrèsAbhi f98a4c7caa fix: button popover order 2024-04-08 19:10:02 -05:00
TrèsAbhi 92b329a0fb feat: module quick buttons 2024-04-08 19:04:07 -05:00
TrèsAbhi f3d32a4e63 feat: module swapping 2024-04-08 19:01:31 -05:00
TrèsAbhi 0e73d79c9c feat: trimmed module icons 2024-04-08 09:23:26 -05:00
TrèsAbhi 526b5785b7 feat: modules button 2024-04-08 09:22:27 -05:00
TrèsAbhi 02129feb25 fix: NaN deltas 2024-04-08 09:13:14 -05:00
TrèsAbhi 0a38c164a4 fix: removed debug console logs 2024-04-06 22:01:52 -05:00
TrèsAbhi 2e0d52e30e feat: enter to select first tank 2024-04-06 22:00:40 -05:00
TrèsAbhi 6d48f9fe7f idk 2024-04-06 21:40:21 -05:00
TrèsAbhi aba52c9968 feat: consistent icons 2024-04-06 20:35:30 -05:00
TrèsAbhi b96b9fd574 fix: damage decimals 2024-04-06 20:29:36 -05:00
TrèsAbhi fe4ee8b611 feat: more compact 2024-04-06 19:40:40 -05:00
TrèsAbhi 94558393d9 feat: consumables 2024-04-06 19:37:57 -05:00
TrèsAbhi db1e4af20c feat: clear provisions button 2024-04-06 19:19:46 -05:00
TrèsAbhi be20173acd feat: missing provisions 2024-04-06 19:16:16 -05:00
TrèsAbhi d90a70ed2a fix: max selected 2024-04-06 19:09:37 -05:00
TrèsAbhi 85d699dbfc feat: provisions 2024-04-06 19:04:57 -05:00
TrèsAbhi 5d0fe8726b feat: provision buttons 2024-04-06 18:55:34 -05:00
TrèsAbhi 850308b2ac feat: provision assignment 2024-04-06 18:37:21 -05:00
TrèsAbhi 88a85ef152 feat: rename to absolute 2024-04-06 18:30:36 -05:00
TrèsAbhi 8160935081 feat: better control layout 2024-04-06 18:28:16 -05:00
TrèsAbhi c057e295d2 feat: discard sorting on mutate 2024-04-06 18:19:45 -05:00
TrèsAbhi 28d0c26268 feat: change to clear 2024-04-06 17:55:39 -05:00
TrèsAbhi 52cb73a575 feat: gray sort buttons 2024-04-06 17:54:50 -05:00
TrèsAbhi 9f244452da feat: max tank name size 2024-04-06 17:53:22 -05:00
TrèsAbhi d46d948c66 feat: sort 2024-04-06 17:46:30 -05:00
TrèsAbhi 11b99ef211 feat: better compact search chunking 2024-04-06 17:28:45 -05:00
TrèsAbhi 85d350a912 feat: less CLS loader 2024-04-06 17:21:38 -05:00
TrèsAbhi 145bc84fb1 feat: no player selected 2024-04-06 13:18:17 -05:00
TrèsAbhi b7486022eb feat: cleaner home page 2024-04-06 13:12:07 -05:00
TrèsAbhi eadb4bb7b1 fix: no padding in embeds 2024-04-06 13:06:48 -05:00
TrèsAbhi 79723157d2 feat: ghost equipment buttons 2024-04-06 13:03:36 -05:00
TrèsAbhi 4214ff0de5 feat: trash button functionality 2024-04-06 12:51:52 -05:00
TrèsAbhi f516c9275e feat: flex 1 pages 2024-04-06 12:49:38 -05:00
TrèsAbhi f0b905593c feat: better loading spinners 2024-04-06 12:43:54 -05:00
TrèsAbhi 11440bc654 feat: non nested spans 2024-04-06 12:37:50 -05:00
TrèsAbhi 2dab957a05 fix: scroll padding 2024-04-06 12:28:29 -05:00
TrèsAbhi 60f3951e7a feat: remove scrollbar 2 2024-04-06 12:23:08 -05:00
TrèsAbhi 4f03788f15 feat: remove scrollbar 2024-04-06 12:22:56 -05:00
TrèsAbhi 17f4435a30 feat: isolated footer 2024-04-06 12:10:54 -05:00
TrèsAbhi 04e42c929c feat: blitz version 2024-04-06 11:15:39 -05:00
TrèsAbhi 4ba45b8fd8 feat: game definitions 2024-04-06 11:14:07 -05:00
TrèsAbhi 0ece1f4b18 feat: no tanks selected message 2024-04-06 10:57:02 -05:00
TrèsAbhi 49d3e1d1c2 feat: select all option 2024-04-06 10:36:07 -05:00
TrèsAbhi 184ca522dd feat: proper keying 2024-04-06 10:17:48 -05:00
TrèsAbhi 9f07d910b8 feat: generalized equipment matrix manager 2024-04-06 10:06:59 -05:00
TrèsAbhi ac3f2ea93a feat: themed equipment preview 2024-04-06 09:52:28 -05:00
TrèsAbhi a77ff1a638 fix: pen 0 decimals 2024-04-06 09:51:16 -05:00
TrèsAbhi 96d802a09f feat: more compact icons 2024-04-05 17:55:07 -05:00
TrèsAbhi 1babd66649 feat: loop icon 2024-04-05 17:53:56 -05:00
TrèsAbhi 2f2996a40c feat: equipment popover 2024-04-05 17:52:41 -05:00
TrèsAbhi 9d1e059ea5 feat: solid backgrounds 2024-04-05 17:44:31 -05:00
TrèsAbhi 48603b918f feat: equipment preview 2024-04-05 17:40:14 -05:00
TrèsAbhi c1253e8121 feat: equipment matrix visual start 2024-04-05 17:28:58 -05:00
TrèsAbhi ecc029402e feat: percentage 2024-04-05 14:05:15 -05:00
TrèsAbhi 1b88773e28 feat: nominal deltas 2024-04-05 13:59:30 -05:00
TrèsAbhi cf419a9ebb feat: better titles 2024-04-05 13:40:18 -05:00
TrèsAbhi 8565d75747 feat: double gain 2024-04-05 09:51:22 -05:00
TrèsAbhi 186ea8b458 feat: round 2024-04-05 09:38:48 -05:00
TrèsAbhi 4292081df6 feat: stronger colors 2024-04-05 09:35:55 -05:00
TrèsAbhi 4b54b61c35 feat: gradient interpolation 2024-04-05 09:35:03 -05:00
TrèsAbhi 5d098c46fa feat: titles 2024-04-05 09:31:21 -05:00
TrèsAbhi 7575f4581c feat: decimal shorthand 2024-04-05 09:20:07 -05:00
TrèsAbhi 4669fa6ec5 feat: significant change colors 2024-04-05 09:13:13 -05:00
TrèsAbhi 49294d1906 feat: volume 2024-04-05 09:07:29 -05:00
TrèsAbhi 3eee946978 feat: split volume 2024-04-05 09:06:44 -05:00
TrèsAbhi 7fff1c9737 feat: volume 2024-04-04 22:23:06 -05:00
TrèsAbhi 5b4c3119dd feat: average shell reload 2024-04-04 22:17:36 -05:00
TrèsAbhi 0a41ee15ed feat: lower is better 2024-04-04 22:15:33 -05:00
TrèsAbhi ad57d284bb feat: more stats 3 2024-04-04 22:14:30 -05:00
TrèsAbhi b929e9449d feat: more stats 2 2024-04-04 21:56:00 -05:00
TrèsAbhi 948ea0bb8d fix: types 2024-04-04 21:17:40 -05:00
TrèsAbhi c1b1b8d304 feat: more stats 2024-04-04 19:14:22 -05:00
TrèsAbhi 3bc5a6d740 fix: some bugs 2024-04-04 18:56:51 -05:00
TrèsAbhi d25da724e1 feat: some button functionality 2024-04-04 16:14:01 -05:00
TrèsAbhi 753804b8cf feat: some more stats 2 2024-04-04 15:52:05 -05:00
TrèsAbhi 096122d43c feat: some more stats 2024-04-04 15:47:27 -05:00
TrèsAbhi 3448427de0 feat: reintroduced links 2024-04-04 15:35:27 -05:00
TrèsAbhi d8bbd02715 feat: center aline 2024-04-04 13:51:39 -05:00
TrèsAbhi f696c5f3c9 feat: some stats 2024-04-04 13:51:07 -05:00
TrèsAbhi bd412cdaa2 feat: generalized tank stats 2024-04-04 13:16:12 -05:00
TrèsAbhi 913411275b feat: better header alignemnt 2024-04-04 11:05:56 -05:00
TrèsAbhi 17ff8e0819 feat: better sizing 2024-04-04 11:04:27 -05:00
TrèsAbhi b5fdc4d5cf feat: add functionality 2024-04-04 10:46:48 -05:00
TrèsAbhi 59c5d95aff feat: compare page 2024-04-04 10:21:37 -05:00
TrèsAbhi 16babbad90 feat: og tool icon 2024-04-04 10:18:04 -05:00
TrèsAbhi a9dc9e7ebd feat: cleaner tool shadows 2024-04-04 10:16:47 -05:00
TrèsAbhi 52e8df560e feat: added tank compare link 2024-04-04 10:15:01 -05:00
TrèsAbhi 87259ad515 feat: robots 2024-04-03 22:57:28 -05:00
TrèsAbhi c96655a6c0 feat: xml 2024-04-03 22:47:10 -05:00
TrèsAbhi 43894567b8 / 2024-04-03 22:37:38 -05:00
TrèsAbhi 76a952a8e6 fix: change to tests 2024-04-03 22:28:12 -05:00
TrèsAbhi e2efe428a2 feat: use require 2024-04-03 22:24:01 -05:00
TrèsAbhi 887cec2dd4 feat: use fs 2024-04-03 22:22:13 -05:00
TrèsAbhi 04ad48bd33 feat: use proper write file 2024-04-03 22:20:30 -05:00
TrèsAbhi 3613f5d13b feat: log 2024-04-03 22:18:41 -05:00
TrèsAbhi 3362e3b091 feat: js next config 2024-04-03 22:16:16 -05:00
TrèsAbhi 3322fa97d4 feat: ts next config 2024-04-03 22:14:55 -05:00
TrèsAbhi 1dc7748a04 feat: use script 2024-04-03 22:08:22 -05:00
TrèsAbhi 6176b3b0d8 feat: use sync 2024-04-03 22:04:36 -05:00
TrèsAbhi 81c2af08c6 fix: build sitemap before build 2024-04-03 22:02:02 -05:00
TrèsAbhi 2d83519f93 Merge branch 'dev' of https://github.com/tresabhi/blitzkrieg into dev 2024-04-03 21:58:49 -05:00
TrèsAbhi 869c1f0def feat: sitemap 2024-04-03 21:58:38 -05:00
TrèsAbhi 7a64fb8176 feat: preview image 2024-04-03 21:58:38 -05:00
TrèsAbhi 9256244286 fix: remove title from svg 2024-04-03 21:58:38 -05:00
TrèsAbhi 85e54e4a07 fix: build db 2 2024-04-03 21:58:38 -05:00
TrèsAbhi 8075dc8d9f fix: build db 2024-04-03 21:58:38 -05:00
TrèsAbhi 57dced109a feat: page descriptions 2024-04-03 21:58:38 -05:00
TrèsAbhi dd19d5b979 feat: gen prisma (#105) 2024-04-03 21:57:39 -05:00
TrèsAbhi 68d3fe6805 feat: sitemap 2024-04-03 21:56:20 -05:00
TrèsAbhi 70f7698466 feat: preview image 2024-04-03 19:48:28 -05:00
TrèsAbhi 26a5fdea0e fix: remove title from svg 2024-04-03 19:34:32 -05:00
TrèsAbhi 367bd1386b fix: build db 2 2024-04-03 19:31:10 -05:00
TrèsAbhi fac773a8f8 fix: build db 2024-04-03 19:28:25 -05:00
TrèsAbhi 6bd8b7d42f feat: page descriptions 2024-04-03 19:27:24 -05:00
TrèsAbhi 7093662130 feat: gen prisma 2024-04-03 15:34:39 -05:00
TrèsAbhi 4062e56b4c feat: migrated to new db 2024-04-03 15:19:48 -05:00
TrèsAbhi 0885e7e68a feat: logs 2024-04-02 10:37:39 -05:00
TrèsAbhi 3cfa837682 Merge branch 'main' of https://github.com/tresabhi/blitzkrieg into dev 2024-04-02 10:26:31 -05:00
TrèsAbhi 1982604878 fix: some more floating component removals 2024-04-02 10:21:51 -05:00
TrèsAbhi 9ef6eea4a9 fix: remove useless tooltips 2024-04-02 10:10:15 -05:00
TrèsAbhi 78e6b2696c fix: word tolerant pitch and yaw 2024-04-02 10:04:54 -05:00
TrèsAbhi 40b6f30092 fix: synced armor states 2 2024-04-02 10:02:21 -05:00
TrèsAbhi de2d9a1a3e fix: synced armor states 2024-04-02 09:52:46 -05:00
TrèsAbhi b7ad12c698 Create ads.txt 2024-04-02 08:24:37 -05:00
TrèsAbhi 886c2aa1d1 fix: access document on client 2 2024-04-01 22:02:15 -05:00
TrèsAbhi 9818c9868a fix: access document on client 2024-04-01 22:00:38 -05:00
TrèsAbhi 31055f1d66 fix: use link for big tank search 2024-04-01 21:57:54 -05:00
TrèsAbhi 6cef753053 feat: donation icons 2024-04-01 21:46:17 -05:00
TrèsAbhi 5b889f8483 feat: more accessible full screen mode 2024-04-01 21:33:47 -05:00
TrèsAbhi d0d905ccfb feat: better antagonist bar 2024-04-01 19:30:06 -05:00
TrèsAbhi 9a91a8bb13 fix: excessive antagonist bar gap 2024-04-01 19:17:59 -05:00
TrèsAbhi c12cc9b8c5 feat: length sorting 2024-04-01 19:12:59 -05:00
TrèsAbhi fdbfd0bc10 feat: rename size to volume 2024-04-01 19:10:42 -05:00
TrèsAbhi 286b178218 feat: some cleanup 2024-04-01 19:09:21 -05:00
TrèsAbhi 54e012f736 feat: dropdown modules 2024-04-01 19:05:55 -05:00
TrèsAbhi cc6de50de6 feat: upgrade to radix 3.0 2024-04-01 18:36:14 -05:00
TrèsAbhi 194e5fceca feat: crew training info 2024-04-01 09:31:02 -05:00
TrèsAbhi 879a5d534c feat: consumable info 2024-04-01 09:27:54 -05:00
TrèsAbhi 29aaf60da0 feat: cleaner info 2024-04-01 09:24:12 -05:00
TrèsAbhi 3c8f8b49e4 feat: condensed 2 2024-03-31 22:32:43 -05:00
TrèsAbhi 0b88f71f26 feat: condensed 2024-03-31 22:27:11 -05:00
TrèsAbhi 65e239a22b feat: hide module actions on no upgrades 2024-03-31 22:16:29 -05:00
TrèsAbhi 7727e64931 feat: quick actions 2024-03-31 22:14:14 -05:00
TrèsAbhi 7b0465322d feat: special skills 2024-03-31 19:27:37 -05:00
TrèsAbhi 099e5eb228 feat: skill stats 2024-03-31 19:17:30 -05:00
TrèsAbhi eaff26c8d9 feat: crew skills ui 2024-03-31 18:49:17 -05:00
TrèsAbhi d79129df91 feat: skill definitions 2024-03-31 18:24:19 -05:00
TrèsAbhi b363c76639 feat: crew skill icons 2024-03-31 18:17:48 -05:00
TrèsAbhi 034429cd47 Merge branch 'main' of https://github.com/tresabhi/blitzkrieg 2024-03-31 17:48:30 -05:00
TrèsAbhi 57867317cc fix: missing info 2024-03-31 17:48:15 -05:00
TrèsAbhi c2e314b193 feat: log 2024-03-31 17:48:01 -05:00
TrèsAbhi 9d2af1de13 fix: quick equipments 2024-03-31 17:45:22 -05:00
TrèsAbhi 232823566b fix: missing info 2024-03-30 12:48:17 -05:00
TrèsAbhi 958f0f2a52 fix: log version 2024-03-30 12:44:46 -05:00
TrèsAbhi b34fef2147 feat: logs 2024-03-30 12:44:34 -05:00
TrèsAbhi fe661124fa Merge branch 'dev' of https://github.com/tresabhi/blitzkrieg into dev 2024-03-30 12:39:19 -05:00
TrèsAbhi 457dcbcad5 fix: 0 battle handling 2024-03-30 12:38:53 -05:00
TrèsAbhi c18ee70eba fix: /rating use midnight leaderboard 2024-03-30 12:38:53 -05:00
TrèsAbhi 095ffc3d6a fix: sync on click inspector 2024-03-30 12:38:53 -05:00
TrèsAbhi e8b91648b1 fix: click through post inputs 2024-03-30 12:38:53 -05:00
TrèsAbhi 1b43f6ba99 fix: use final thickness 2024-03-30 12:38:53 -05:00
TrèsAbhi fc5360363c fix: uniform inv proj mat 2024-03-30 12:38:53 -05:00
TrèsAbhi 47b3c3029e fix: more accurate HE 2024-03-30 12:38:53 -05:00
TrèsAbhi dea7f34ca3 fix: use normal proj mat 2024-03-30 12:38:53 -05:00
TrèsAbhi 1e5026ea4a fix: persistent equipment 2024-03-30 12:38:53 -05:00
TrèsAbhi 98f568ff6a fix: use three js inverse view proj 2024-03-30 12:38:53 -05:00
TrèsAbhi 10a6f8371d fix: 0 battle handling 2024-03-30 12:33:17 -05:00
TrèsAbhi 0933aa6615 fix: /rating use midnight leaderboard 2024-03-30 12:32:48 -05:00
TrèsAbhi 746592418d Update cd-rating-latest.yml 2024-03-30 12:22:20 -05:00
TrèsAbhi e2404b063c fix: sync on click inspector 2024-03-30 12:14:49 -05:00
TrèsAbhi bae1301556 fix: click through post inputs 2024-03-30 12:13:47 -05:00
TrèsAbhi c2de4952ad fix: use final thickness 2024-03-30 11:34:39 -05:00
TrèsAbhi cce61d8075 fix: uniform inv proj mat 2024-03-30 11:31:44 -05:00
TrèsAbhi 34a0388f45 fix: more accurate HE 2024-03-30 11:28:34 -05:00
TrèsAbhi 9d62965fc3 fix: use normal proj mat 2024-03-30 10:39:58 -05:00
TrèsAbhi 892434e28f fix: persistent equipment 2024-03-30 10:30:30 -05:00
TrèsAbhi 2597fe4bcd fix: use three js inverse view proj 2024-03-30 10:23:23 -05:00
TrèsAbhi f85b4b36bd fix: async exec 2024-03-29 16:45:17 -05:00
TrèsAbhi f777dafefc feat: generated list 2024-03-29 16:42:56 -05:00
TrèsAbhi 6ef65ccea3 fix: don't install fixed sharp twice 2024-03-29 16:40:07 -05:00
TrèsAbhi 974b27a313 fix: production flag 2024-03-29 16:38:51 -05:00
376 changed files with 13956 additions and 5431 deletions

No files matched your search

+4 -2
View File
@@ -53,7 +53,7 @@ jobs:
run: |
$env:GH_TOKEN = "${{ secrets.GH_TOKEN }}"
$env:DISCORD_TOKEN = "${{ secrets.DISCORD_TOKEN }}"
$env:DISCORD_BLITZ_DB = "${{ secrets.DISCORD_BLITZ_DB }}"
$env:DATABASE_URL = "${{ secrets.DATABASE_URL }}"
$env:WOTB_DLC_CDN = "${{ secrets.WOTB_DLC_CDN }}"
yarn setup:patches --depot
@@ -61,5 +61,7 @@ jobs:
run: |
$env:GH_TOKEN = "${{ secrets.GH_TOKEN }}"
$env:DISCORD_TOKEN = "${{ secrets.DISCORD_TOKEN }}"
$env:DISCORD_BLITZ_DB = "${{ secrets.DISCORD_BLITZ_DB }}"
$env:DATABASE_URL = "${{ secrets.DATABASE_URL }}"
$env:VIDEOS_SHEET = "${{ secrets.VIDEOS_SHEET }}"
$env:GOOGLE_APPLICATION_CREDENTIALS = "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
yarn build:assets --all-targets --depot ${{ github.ref == 'refs/heads/main' && '--production' || '' }}
+25
View File
@@ -0,0 +1,25 @@
name: CD Averages
on:
workflow_dispatch:
# schedule:
# - cron: '0 12 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build averages
run: |
GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} VIDEOS_SHEET=${{ secrets.VIDEOS_SHEET }} GOOGLE_APPLICATION_CREDENTIALS=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} bun scripts/averages.ts
+26
View File
@@ -0,0 +1,26 @@
name: CD Discover IDs
on:
push:
branches: main
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Discover IDs
run: DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} GH_TOKEN=${{ secrets.GH_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} bun scripts/discoverIds.ts --production
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
- name: Download release assets
run: |
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkrieg/releases/latest \
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkit/releases/latest \
| grep "browser_download_url.*bot.zip" \
| cut -d : -f 2,3 \
| tr -d \")
@@ -33,4 +33,4 @@ jobs:
unzip bot.zip
- name: Run bot
run: NODE_ENV=production GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DISCORD_BLITZ_DB=${{ secrets.DISCORD_BLITZ_DB }} node --enable-source-maps index.cjs
run: NODE_ENV=production GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} node --enable-source-maps index.cjs
+1 -1
View File
@@ -31,4 +31,4 @@ jobs:
run: yarn
- name: Generate leaderboard
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DISCORD_BLITZ_DB=${{ secrets.DISCORD_BLITZ_DB }} yarn publish:ratingleaderboard --region=asia --target=midnight --production
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=asia --target=midnight --production
+1 -1
View File
@@ -31,4 +31,4 @@ jobs:
run: yarn
- name: Generate leaderboard
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DISCORD_BLITZ_DB=${{ secrets.DISCORD_BLITZ_DB }} yarn publish:ratingleaderboard --region=eu --target=midnight --production
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=eu --target=midnight --production
+2 -2
View File
@@ -1,4 +1,4 @@
name: CD Rating North America
name: CD Rating Latest
on:
schedule:
@@ -31,4 +31,4 @@ jobs:
run: yarn
- name: Generate all leaderboards
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DISCORD_BLITZ_DB=${{ secrets.DISCORD_BLITZ_DB }} yarn publish:ratingleaderboard --region=na,asia,eu --target=latest --production
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=na,asia,eu --target=latest --production
+1 -1
View File
@@ -31,4 +31,4 @@ jobs:
run: yarn
- name: Generate leaderboard
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DISCORD_BLITZ_DB=${{ secrets.DISCORD_BLITZ_DB }} yarn publish:ratingleaderboard --region=na --target=midnight --production
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=na --target=midnight --production
+3 -3
View File
@@ -33,11 +33,11 @@ jobs:
- name: Install dependencies
run: yarn
- name: Add fixed sharp
run: yarn add [email protected] --ignore-engines
- name: Build Prisma
run: yarn prisma generate
- name: Build
run: yarn build:bot
run: yarn build:bot --production
- name: Archive build
uses: actions/upload-artifact@v4
+2 -2
View File
@@ -18,5 +18,5 @@ temp/
/.VSCodeCounter
/.yarn
depots
public/sitemap*.xml
public/robots.txt
public/sitemap*
/firebase.json
+3 -3
View File
@@ -1,3 +1,3 @@
[submodule "submodules/closedkrieg"]
path = submodules/closedkrieg
url = https://github.com/tresabhi/closedkrieg
[submodule "submodules/blitzkit-closed"]
path = submodules/blitzkit-closed
url = https://github.com/tresabhi/blitzkit-closed
+30 -1
View File
@@ -3,6 +3,7 @@
"AABBOX",
"Abhi",
"accountinfo",
"adsense",
"aeson",
"alphatest",
"APAC",
@@ -10,14 +11,20 @@
"applypatches",
"artefacts",
"atgm",
"Avearges",
"AYUV",
"battleresults",
"bbox",
"bepaint",
"betakrieg",
"BINORMAL",
"Binormals",
"BKRL",
"BKRTS",
"BKRTSMANIFEST",
"bkwd",
"blitzkit",
"blitzrinth",
"blitzstars",
"Camo",
"CDON",
@@ -32,6 +39,7 @@
"CUBETEXCOORD",
"customperiod",
"datasource",
"dbid",
"Ddpf",
"Ddsd",
"debugflags",
@@ -41,6 +49,7 @@
"degressive",
"devkrieg",
"diacriticless",
"DIDS",
"donotremove",
"drei",
"Droodles",
@@ -57,11 +66,13 @@
"fullstats",
"fuzzysort",
"gamemode",
"gameplay",
"glsl",
"GLTF",
"haha",
"highp",
"iife",
"imgur",
"immer",
"Inclusivity",
"JOINTINDEX",
@@ -72,12 +83,16 @@
"leaderboards",
"lerp",
"LINEARSIZE",
"loadouts",
"loddist",
"lods",
"lossrate",
"mantlets",
"metallicness",
"minitelrose",
"Minotauro",
"MIPMAPCOUNT",
"mišek",
"modeltransform",
"MURICA",
"NEGATIVEX",
@@ -99,13 +114,19 @@
"POSITIVEY",
"POSITIVEZ",
"Promisable",
"protobuf",
"protos",
"Pyogenics",
"ratingleaderboard",
"raycaster",
"researchable",
"Resvg",
"rizz",
"roboto",
"rtsc",
"RTSM",
"SCPG",
"scroller",
"searchclans",
"searchplayers",
"searchtanks",
@@ -125,6 +146,7 @@
"Synx",
"tankaverages",
"Tankerch",
"tankmen",
"tankopedia",
"tankopedias",
"tankstats",
@@ -137,23 +159,30 @@
"Unicum",
"UNLOCALIZED",
"UNORM",
"unpickled",
"Unregistering",
"vickers",
"vitepress",
"Vovko",
"wargaming",
"webp",
"whitespaces",
"winrate",
"wireframe",
"Woah",
"WOTB",
"wotblitz",
"wotbreplay",
"WOTINSPECTOR",
"xffn",
"xkdkw",
"XMLDVPL",
"YAMLDVPL",
"youtubers",
"zustand"
],
"deno.enable": false,
"deno.unstable": false,
"cSpell.enableFiletypes": ["glsl"]
"cSpell.enableFiletypes": ["glsl"],
"typescript.tsdk": "node_modules\\typescript\\lib"
}
+7 -7
View File
@@ -1,4 +1,4 @@
# Blitzkrieg
# BlitzKit
[![built with Codeium](https://codeium.com/badges/main)](https://codeium.com)
@@ -6,18 +6,18 @@ Tools for everything World of Tanks Blitz
## Invite the bot
Go to [application directory for Blitzkrieg](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go.
Go to [application directory for BlitzKit](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go.
![Blitzkrieg application directory](https://i.imgur.com/JlEA0J1.png)
![BlitzKit application directory](https://i.imgur.com/YWCtOuJ.png)
## Visit the website
### https://blitz-krieg.vercel.app/
### https://blitzkit.app/
![Blitzkrieg website](https://i.imgur.com/eRIZe5P.png)
![BlitzKit website](https://i.imgur.com/bdYMUCL.png)
## Visit the documentation website
### https://tresabhi.github.io/blitzkrieg/
### https://tresabhi.github.io/blitzkit/
![Blitzkrieg documentation website](https://i.imgur.com/TOt5fMx.png)
![BlitzKit documentation website](https://i.imgur.com/hm3KTsF.png)
+3 -3
View File
@@ -5,9 +5,9 @@ import { defineConfig } from 'vitepress';
import { getSidebar } from 'vitepress-plugin-auto-sidebar';
export default defineConfig({
title: 'blitzkrieg',
title: 'BlitzKit',
description: '🎉 All-in-one Discord bot for everything World of Tanks Blitz',
base: '/blitzkrieg/',
base: '/blitzkit/',
outDir: '../dist/docs',
themeConfig: {
@@ -33,7 +33,7 @@ export default defineConfig({
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/tresabhi/blitzkrieg' },
{ icon: 'github', link: 'https://github.com/tresabhi/blitzkit' },
],
},
});
+17
View File
@@ -0,0 +1,17 @@
# BlitzKit Credits
BlitzKit is a one man band **TrèsAbhi** but I am far from solo.
| Role | People |
| ------------------------------ | ------------------------------ |
| Bot verification | S0AP |
| Bot advertisement platform | S0AP |
| Bot rendering pipeline | Vovko |
| Game asset decompression | Maddox |
| Game 3D model parsing | Pyogenics |
| Game file layout | Aeson |
| 3-caliber rule edge cases | Minitelrose, ChickenMan7777 |
| Embed UX | \_34, HisRoyalFatness, Synx |
| Tankopedia pre-release testing | [OPTML], Aeson, \_34, Droodles |
| Website advertisement platform | Aeson, Droodles |
| Compare pre-release testing | [OPTML], Droodles |
+11
View File
@@ -0,0 +1,11 @@
# Blitzkrieg 1.18.1
HE gets more accurate and say goodbye to NaNaNaNaNaN.
## Fixes
- Armor highlighting now works on Apple MacBooks
- Applied equipments now persist after switching shells
- The bottom of the tank sandbox panel can now be interacted with as it was previously blocked by an invisible layer
- `/rating` now uses the midnight leaderboard instead of the absolute latest one
- 0-battle stats are now hidden
+7
View File
@@ -0,0 +1,7 @@
# Blitzkrieg 1.18.2
Redefining how micro a micro-path is.
## Fixes
- The pitch and yaw controls, along with the quick equipment buttons, can once again be interacted with
+29
View File
@@ -0,0 +1,29 @@
# Blitzkrieg 1.18.3
Making Tankopedia more pleasing to use. This update only affects the website.
## Features
- Added crew skills
- Added quick actions
- For example, crew skills have the "clear" and "maximize" actions and equipment simply has a "clear" action
- Added info buttons
- Beside the titles of a few sections, a new info buttons have been added for extended descriptions
- Tank configurations have been condensed thanks to a new layout that works well on most screen sizes
- The Tankopedia now takes advantage of wider screens than before; hence, getting rid of the useless whitespaces on the sides
- Tank modules are now neatly wrapped into dropdown menus
- Sorting tanks by "size" has been renamed to "volume" and length has been added as a new option
- The antagonist (the shooting tank) bar has been shrunk to only fit the its contents
- Fullscreen mode now features all the missing dropdowns and options that were previously hidden
- Added icons for donations on Patreon and Ko-fi in the navigation bar
- Tank search now uses regular links allowing for things like opening in new tabs, copying links, etc.
## Fixes
- Armor highlighting once again works properly even after switching around tank modules
- Inputting invalid numbers into the pitch and yaw fields is now handled correctly
- Removed unnecessary tooltips that didn't show up anyway due to Radix UI 3
## Technical Changes
- Upgraded to Radix UI 3
+23
View File
@@ -0,0 +1,23 @@
# Blitzkrieg 1.19.0
Introducing the Blitzkrieg Compare tool!
## Features
- Added Compare
- Allows you to compare multiple tanks
- Shows deltas in the form of differences between values or percentages
- All stats from the Tankopedia are available here
- [CLS](https://web.dev/articles/cls) was reduced due to the new loading screens
- Clicking enter when searching for tanks now selects the first result
- The first tank name is also displayed in the search input
## Changes
- Removed the donation banner instead for a little note in the footer
- The footer now shows the version of Blitzkrieg and the version of WoTB its running on
- Removed frosted glass effect from most components apart from the navigation bar for performance reasons (I am looking at you, Apple!)
## Fixes
- Tank search is now not ignored when changing filters
+11
View File
@@ -0,0 +1,11 @@
# Blitzkrieg 1.19.1
A minor-major fix to the armor sandbox. This update only affects the website.
## Fixes
- Guns are now clipped properly allowing some tanks like the 252U and T34's mantlets to be penetrable (usually with premium shells) as they are in-game
| Before | After |
| ------------------------------------------ | ----------------------------------------- |
| ![before](https://i.imgur.com/wB0kuk0.png) | ![after](https://i.imgur.com/vxp8wB0.png) |
+6
View File
@@ -0,0 +1,6 @@
# Blitzkrieg 1.19.2
## Fixes
- Maximum DPM for double shot auto-reloaders is now calculate correctly with intra-clip in mind
- Blitzkrieg logo is now removed on lower resolutions to allow for other buttons to fit in the title bar of the Tankopedia
+13
View File
@@ -0,0 +1,13 @@
# Blitzkrieg 1.19.3
Google rizz. This version only affects the website.
## Features
- The titles and descriptions of the Tankopedia tank pages are now more informative
- Added a settings page
- Added a hamburger menu to the navigation bar
## Fixes
- Tank icons in URL previews are now presented properly
+18
View File
@@ -0,0 +1,18 @@
# Blitzkrieg 1.19.4
I genuinely have no idea how these bugs sneaked in here. This update only affects the website.
## Features
- Added a button in Compare which links to the corresponding Tankopedia page
- Added a button in Tankopedia that links to the corresponding Compare page
- If the two tanks (the shooter and the one of which armor is displayed) in the Tankopedia are different, they will be both added by default in the Compare page
- Simplified the footer and added a link to my website and the credits page
- Added an aggressive donate button right at the top of the home page
## Fixes
Thanks to mišek for these bug reports!
- The intra-clip time is now displayed for auto-loaders
- High End Consumables now increase the duration of consumables correctly instead of decreasing it
+19
View File
@@ -0,0 +1,19 @@
# Blitzkrieg 1.19.5
The tankopedia, now more helpful than ever! This update only affects the website.
## Features
- The Tankopedia pages for tanks now include videos from YouTubers
- The selection of tanks that have videos is very small currently but you can help expand it by dropping suggestions on [the official Discord server](https://discord.gg/nDt7AjGJQH)
- Added shell normalization and ricochet angles to the Tankopedia and Compare
## Fixes
- Removed undefined clipping planes
- Added proper keying to all JSX tree nodes, navbar menu items, antagonist bar shells, skill rows and fragments of tank stats in the Tankopedia
- The second half of barrels for tanks like the T-100 LT are now properly included
## Technical Features
- The list of videos is fetched transpiled from a Google Sheets spreadsheet into a CSV file in the asset repository
+3
View File
@@ -0,0 +1,3 @@
# BlitzKit 1.19.6
Renamed Blitzkrieg to BlitzKit.
+18
View File
@@ -0,0 +1,18 @@
# BlitzKit 1.20.0
**IMPORTANT FOR STREAMERS:** This version removed the session tracker embed. Embeds will be reintroduced in the future.
## Features
- Reworked session tracker
- Played tanks are now displayed as a clean table that fits the theme of the website
- Tank images are now displayed along with them being linked to their respective tankopedia pages
- The UI has been simplified
- You can also change what columns are shown in the table but this is a work in progress feature
- Added the `/replay` command
- This command uploads your replays to WOTINSPECTOR and displays the battle results
## Fixes
- Fixed website logo to be "BK"
- Fixed the logo of the website to have a capital "K"
+32
View File
@@ -0,0 +1,32 @@
# BlitzKit 1.20.1
The Tankopedia becomes sexier.
## Features
- Switched domain to https://blitzkit.app/
- Added a hero section with the name of the Tank displayed in a huge font with the model of the tank on the right auto-rotating
- The auto-rotation is disabled upon manual disruption of the camera angle
- Added a historical section for some tanks
- Full screen is cleaner
- The rotation inputs have been moved up to the top of the page
- The shell selector has been moved to the right of the page to mimic the game
- The antagonist (or the shooter) controls have been moved to the bottom of the sandbox
- The "armor" and "model" tabs have been replaced with a single toggle switch labeled as "armor:
- Tank modules are now rendered similar to how they are in the game as a tree
- This is highly experimental; please report issues on [the official Discord server](https://discord.gg/nDt7AjGJQH)
- The XP cost is also listed in this section
- Top tier modules are highlighted in amber
- Added a section to show the tech tree progression for tech tree tanks
- The credit and XP costs are also listed in this section along with the nationality
- The shell selector has been simplified
- Added a "back" button to return to the Tankopedia search page
- The "change" button has now been removed
- The characteristics are now displayed with three columns when possible with the configuration acting as the first row
- Replaced the loading percentage for tank models with a loading bar
- The second page turner controls in the tankopedia search is now hidden when there's not a lot of search results
## Fixes
- Tanks without videos no longer display a broken YouTube video
- Added "alt" texts for all images on the website
+48
View File
@@ -0,0 +1,48 @@
# BlitzKit 1.20.2
Taming the homepage.
## Features
- All tools are now displayed directly on the navbar on wide screens
- On small screens, the tools are hidden within a hamburger menu displaying a list similar to the old homepage
- Added tiny hero image banner to the homepage
- The tools are now displayed in a more readable manner with the most important tool(s) shown twice as large as all others on wider screens
- The pitch and yaw inputs for tank turrets is now update live as the turret and gun is rotated
- Consumables are now displayed in a neater box
- Modules are now displayed in a more compact manner
- Added a privacy policy and terms of service agreement prompt
- The links also point to an on-site page
- Remade the navbar to include important information
- The about section offers credits, a link to Discord, and a link to the GitHub repository
- The legal section displays privacy policy, terms of service, and a link to Google's ad settings
- On the left side, the name of BlitzKit, version, and motto is displayed
- The armor sandbox breakdown has been rewritten from scratch to maintain full parity with the visual armor highlighter, especially for HE shells
- The tracer has also been made more visible by rendering it on top of the armor
- The tracer's penetration locations have also been simplified and no longer show the index
- The number of tanks per page is now reduced for smaller screen sizes
- Added a BlitzKit watermark to the tankopedia sandbox when in fullscreen
- The tool's backgrounds are no longer blurred on their dedicated page
- Added a plus button to add tanks to the right of the rightmost column in the compare tool
## Fixes
- The navbar blur effect now works on Safari too
- Switched buttons out for icon buttons for page turners
- Many hydration issues have been fixed allowing a few pages to load twice as fast
- The nationality of tanks in the title of the tab are now in adjective forms
- HEAT shells no longer ricochet
- Text on page won't be selected on accident when interacting with the tank sandbox
- The first shell is now equipped by default instead of the last one when switching guns/turrets
- Quite a few pages have been more responsive for smaller screens
- Camouflage bonuses are now multiplicative instead of additive
- Light tanks now have the same camouflage on move as when still
- The shot display is now discarded when the tank is swapped out
- Roboto Flex is now properly used instead of the default Radix UI font
- The website now uses Imgur to load images and scale them appropriately for better performance
- The compare headers no longer collapse on Firefox
- Turrets can now be rotated correctly in the Tankopedia on Apple devices
## Technical Changes
- Moved all technical documentations to the `technical` directory within `docs`
+14
View File
@@ -0,0 +1,14 @@
# BlitzKit 1.20.3
A bug turns into a rating command feature!
## Features
- The rating command was giving seasonal statistics instead for the current day; this bug has now been made a feature through the new `/rating season` command
## Fixes
- Missing WN8 is now displayed with "--" instead of `NaN`
- Players who have not participated in the rating gamemode are handled correctly
- Decreasing position is now positive indicated in `/rating`
- `/rating` now displays today's statics correctly once again
-15
View File
@@ -1,15 +0,0 @@
# Team
- TrèsAbhi: creator & programmer
- Prince_NA: game advisor & tester
# Contributors
- S0AP: bot verification process & initial advertizement platform
- Vovko: discord bot rendering pipeline
- Maddox: game file decompression
- Pyogenics: tank model decompression
- Aeson: game files layout
- Minitelrose, ChickenMan7777: 3-caliber rule edge cases
- \_34, HisRoyalFatness, Synx, xkdkw: embed UX
- [OPTML], Aeson, \_34, Droodles: beta testing tankopedia
+2 -2
View File
@@ -4,7 +4,7 @@
## Bot
Blitzkrieg is available as a Discord bot and can be [installed very easily](/guide/invite).
BlitzKit is available as a Discord bot and can be [installed very easily](/guide/invite).
- Track statistics
- Find inactive players in a clan
@@ -15,7 +15,7 @@ Blitzkrieg is available as a Discord bot and can be [installed very easily](/gui
## Website
Provides a bunch of very helpful tools; https://blitz-krieg.vercel.app/
Provides a bunch of very helpful tools; https://blitzkit.app/
- Session tracker
- Rating leaderboard
+1 -1
View File
@@ -1,3 +1,3 @@
# Inviting the Bot
Go to [application directory for Blitzkrieg](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go.
Go to [application directory for BlitzKit](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go.
+4 -4
View File
@@ -3,12 +3,12 @@
layout: home
hero:
name: 'blitzkrieg'
name: 'BlitzKit'
text: Everything Blitz, right in Discord
tagline: All-in-one Discord bot for everything World of Tanks Blitz
image:
src: '/assets/images/hero.png'
alt: 'blitzkrieg'
alt: 'blitzkit'
actions:
- theme: brand
text: Add to Discord Server
@@ -20,11 +20,11 @@ hero:
features:
- title: Clean and Efficient UI
icon: 🚀
details: Blitzkrieg is where concise meets efficient. Get the information you need in the way you want.
details: BlitzKit is where concise meets efficient. Get the information you need in the way you want.
- title: Endless Possibilities
icon: 🛠
details: With endless ways to customize the output, it's guaranteed that you'll always get the information you need.
- title: Easy to Use
icon: 💻
details: Leveraging Discord's, Blitz Stars', and Wargaming's powerful APIS, Blitzkrieg does all the hard work for you.
details: Leveraging Discord's, Blitz Stars', and Wargaming's powerful APIS, Blitzkit does all the hard work for you.
---
+180 -12
View File
@@ -1,23 +1,191 @@
# Blitzkrieg Privacy Policy
# BlitzKit Privacy Policy
Blitzkrieg collects little to no data. Regardless, here is an exhaustive list of Blitzkrieg's data collection practices.
Last updated: May 23, 2024
## Logs
This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You.
All Blitzkrieg logs are available to the public as an effort for open source transparency. A history of all logs [can be found on GitHub](https://github.com/tresabhi/blitzkrieg/actions/workflows/host.yml). All logs expire automatically and are permanently deleted after 30 days. However, anyone may chose to save a local copy of the logs which is not tracked by GitHub.
We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the [Privacy Policy Generator](https://www.termsfeed.com/privacy-policy-generator/).
## Commands
## Interpretation and Definitions
Everytime a command a command is used, the command name and parameters provided is logged. Any identifying information like manually provided in-game usernames are also recorded.
### Interpretation
## Errors
The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
Everytime an error occurs, a detailed stack trace, scope of the error, and the error message is logged both in the GitHub logs and in the public channel [#🔲︱blitzkrieg-logs](https://discord.com/channels/734786591205359697/880650462540476416) in [the official Discord server](https://discord.gg/nDt7AjGJQH).
### Definitions
## Databases
For the purposes of this Privacy Policy:
No databases are used by Blitzkrieg meaning that no data is collected outside of what has already been mentioned above. This is no permanent state.
- **Account** means a unique account created for You to access our Service or parts of our Service.
- **Affiliate** means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority.
- **Company** (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to BlitzKit.
- **Cookies** are small files that are placed on Your computer, mobile device or any other device by a website, containing the details of Your browsing history on that website among its many uses.
- **Country** refers to: Missouri, United States
- **Device** means any device that can access the Service such as a computer, a cellphone or a digital tablet.
- **Personal Data** is any information that relates to an identified or identifiable individual.
- **Service** refers to the Website.
- **Service Provider** means any natural or legal person who processes the data on behalf of the Company. It refers to third-party companies or individuals employed by the Company to facilitate the Service, to provide the Service on behalf of the Company, to perform services related to the Service or to assist the Company in analyzing how the Service is used.
- **Usage Data** refers to data collected automatically, either generated by the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit).
- **Website** refers to BlitzKit, accessible from [https://blitzkit.app/](https://blitzkit.app/)
- **You** means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable.
## 3rd Party
## Collecting and Using Your Personal Data
The privacy policies of Discord, Wargaming, and Blitz Stars apply too since they are utilized by the bot.
### Types of Data Collected
#### Personal Data
While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to:
- Usage Data
#### Usage Data
Usage Data is collected automatically when using the Service.
Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those pages, unique device identifiers and other diagnostic data.
When You access the Service by or through a mobile device, We may collect certain information automatically, including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device identifiers and other diagnostic data.
We may also collect information that Your browser sends whenever You visit our Service or when You access the Service by or through a mobile device.
#### Tracking Technologies and Cookies
We use Cookies and similar tracking technologies to track the activity on Our Service and store certain information. Tracking technologies used are beacons, tags, and scripts to collect and track information and to improve and analyze Our Service. The technologies We use may include:
- **Cookies or Browser Cookies.** A cookie is a small file placed on Your Device. You can instruct Your browser to refuse all Cookies or to indicate when a Cookie is being sent. However, if You do not accept Cookies, You may not be able to use some parts of our Service. Unless you have adjusted Your browser setting so that it will refuse Cookies, our Service may use Cookies.
- **Web Beacons.** Certain sections of our Service and our emails may contain small electronic files known as web beacons (also referred to as clear gifs, pixel tags, and single-pixel gifs) that permit the Company, for example, to count users who have visited those pages or opened an email and for other related website statistics (for example, recording the popularity of a certain section and verifying system and server integrity).
Cookies can be "Persistent" or "Session" Cookies. Persistent Cookies remain on Your personal computer or mobile device when You go offline, while Session Cookies are deleted as soon as You close Your web browser. You can learn more about cookies on [TermsFeed website](https://www.termsfeed.com/blog/cookies/#What_Are_Cookies) article.
We use both Session and Persistent Cookies for the purposes set out below:
- **Necessary / Essential Cookies**
Type: Session Cookies
Administered by: Us
Purpose: These Cookies are essential to provide You with services available through the Website and to enable You to use some of its features. They help to authenticate users and prevent fraudulent use of user accounts. Without these Cookies, the services that You have asked for cannot be provided, and We only use these Cookies to provide You with those services.
- **Cookies Policy / Notice Acceptance Cookies**
Type: Persistent Cookies
Administered by: Us
Purpose: These Cookies identify if users have accepted the use of cookies on the Website.
- **Functionality Cookies**
Type: Persistent Cookies
Administered by: Us
Purpose: These Cookies allow us to remember choices You make when You use the Website, such as remembering your login details or language preference. The purpose of these Cookies is to provide You with a more personal experience and to avoid You having to re-enter your preferences every time You use the Website.
- **Google AdSense Cookies**
Type: Persistent Cookies
Administered by: Google AdSense
Purpose: Third party vendors, including Google, use cookies to serve ads based on a user's prior visits to BlitzKit. Google's use of advertising cookies enables it and its partners to serve ads to your users based on their visit to your sites and/or other sites on the Internet. Users may opt out of personalized advertising by visiting [Ads Settings](https://www.google.com/settings/ads).
For more information about the cookies we use and your choices regarding cookies, please visit our Cookies Policy or the Cookies section of our Privacy Policy.
### Use of Your Personal Data
The Company may use Personal Data for the following purposes:
- **To provide and maintain our Service**, including to monitor the usage of our Service.
- **To manage Your Account:** to manage Your registration as a user of the Service. The Personal Data You provide can give You access to different functionalities of the Service that are available to You as a registered user.
- **For the performance of a contract:** the development, compliance and undertaking of the purchase contract for the products, items or services You have purchased or of any other contract with Us through the Service.
- **To contact You:** To contact You by email, telephone calls, SMS, or other equivalent forms of electronic communication, such as a mobile application's push notifications regarding updates or informative communications related to the functionalities, products or contracted services, including the security updates, when necessary or reasonable for their implementation.
- **To provide You** with news, special offers and general information about other goods, services and events which we offer that are similar to those that you have already purchased or enquired about unless You have opted not to receive such information.
- **To manage Your requests:** To attend and manage Your requests to Us.
- **For business transfers:** We may use Your information to evaluate or conduct a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which Personal Data held by Us about our Service users is among the assets transferred.
- **For other purposes**: We may use Your information for other purposes, such as data analysis, identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and improve our Service, products, services, marketing and your experience.
We may share Your personal information in the following situations:
- **With Service Providers:** We may share Your personal information with Service Providers to monitor and analyze the use of our Service, to contact You.
- **For business transfers:** We may share or transfer Your personal information in connection with, or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of Our business to another company.
- **With Affiliates:** We may share Your information with Our affiliates, in which case we will require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other subsidiaries, joint venture partners or other companies that We control or that are under common control with Us.
- **With business partners:** We may share Your information with Our business partners to offer You certain products, services or promotions.
- **With other users:** when You share personal information or otherwise interact in the public areas with other users, such information may be viewed by all users and may be publicly distributed outside.
- **With Your consent**: We may disclose Your personal information for any other purpose with Your consent.
### Retention of Your Personal Data
The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal agreements and policies.
The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter period of time, except when this data is used to strengthen the security or to improve the functionality of Our Service, or We are legally obligated to retain this data for longer time periods.
### Transfer of Your Personal Data
Your information, including Personal Data, is processed at the Company's operating offices and in any other places where the parties involved in the processing are located. It means that this information may be transferred to — and maintained on — computers located outside of Your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from Your jurisdiction.
Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer.
The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information.
### Delete Your Personal Data
You have the right to delete or request that We assist in deleting the Personal Data that We have collected about You.
Our Service may give You the ability to delete certain information about You from within the Service.
You may update, amend, or delete Your information at any time by signing in to Your Account, if you have one, and visiting the account settings section that allows you to manage Your personal information. You may also contact Us to request access to, correct, or delete any personal information that You have provided to Us.
Please note, however, that We may need to retain certain information when we have a legal obligation or lawful basis to do so.
### Disclosure of Your Personal Data
#### Business Transactions
If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy.
#### Law enforcement
Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law or in response to valid requests by public authorities (e.g. a court or a government agency).
#### Other legal requirements
The Company may disclose Your Personal Data in the good faith belief that such action is necessary to:
- Comply with a legal obligation
- Protect and defend the rights or property of the Company
- Prevent or investigate possible wrongdoing in connection with the Service
- Protect the personal safety of Users of the Service or the public
- Protect against legal liability
### Security of Your Personal Data
The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your Personal Data, We cannot guarantee its absolute security.
## Children's Privacy
Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from anyone under the age of 13 without verification of parental consent, We take steps to remove that information from Our servers.
If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from a parent, We may require Your parent's consent before We collect and use that information.
## Links to Other Websites
Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You visit.
We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.
## Changes to this Privacy Policy
We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy Policy on this page.
We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and update the "Last updated" date at the top of this Privacy Policy.
You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.
## Contact Us
If you have any questions about this Privacy Policy, You can contact us:
- By visiting this page on our website: [https://discord.gg/nDt7AjGJQH](https://discord.gg/nDt7AjGJQH)
+103 -7
View File
@@ -1,13 +1,109 @@
# Blitzkrieg Terms of Service
# BLitzKit Terms and Conditions
## About
Last updated: May 23, 2024
Blitzkrieg is a multi-function Discord bot that serves users with needs specific to the game World of Tanks Blitz.
Please read these terms and conditions carefully before using Our Service.
## License
## Interpretation and Definitions
Blitzkrieg is licensed under the MIT License.
### Interpretation
## 3rd Party
The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
The terms of services of Discord, Wargaming, and Blitz Stars apply too since they are utilized by the bot.
### Definitions
For the purposes of these Terms and Conditions:
- **Affiliate** means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority.
- **Country** refers to: Missouri, United States
- **Company** (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to BlitzKit.
- **Device** means any device that can access the Service such as a computer, a cellphone or a digital tablet.
- **Service** refers to the Website.
- **Terms and Conditions** (also referred as "Terms") mean these Terms and Conditions that form the entire agreement between You and the Company regarding the use of the Service. This Terms and Conditions agreement has been created with the help of the [Terms and Conditions Generator](https://www.termsfeed.com/terms-conditions-generator/).
- **Third-party Social Media Service** means any services or content (including data, information, products or services) provided by a third-party that may be displayed, included or made available by the Service.
- **Website** refers to BlitzKit, accessible from [https://blitzkit.app/](https://blitzkit.app/)
- **You** means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable.
## Acknowledgment
These are the Terms and Conditions governing the use of this Service and the agreement that operates between You and the Company. These Terms and Conditions set out the rights and obligations of all users regarding the use of the Service.
Your access to and use of the Service is conditioned on Your acceptance of and compliance with these Terms and Conditions. These Terms and Conditions apply to all visitors, users and others who access or use the Service.
By accessing or using the Service You agree to be bound by these Terms and Conditions. If You disagree with any part of these Terms and Conditions then You may not access the Service.
You represent that you are over the age of 18. The Company does not permit those under 18 to use the Service.
Your access to and use of the Service is also conditioned on Your acceptance of and compliance with the Privacy Policy of the Company. Our Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your personal information when You use the Application or the Website and tells You about Your privacy rights and how the law protects You. Please read Our Privacy Policy carefully before using Our Service.
## Links to Other Websites
Our Service may contain links to third-party web sites or services that are not owned or controlled by the Company.
The Company has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that the Company shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such web sites or services.
We strongly advise You to read the terms and conditions and privacy policies of any third-party web sites or services that You visit.
## Termination
We may terminate or suspend Your access immediately, without prior notice or liability, for any reason whatsoever, including without limitation if You breach these Terms and Conditions.
Upon termination, Your right to use the Service will cease immediately.
## Limitation of Liability
Notwithstanding any damages that You might incur, the entire liability of the Company and any of its suppliers under any provision of this Terms and Your exclusive remedy for all of the foregoing shall be limited to the amount actually paid by You through the Service or 100 USD if You haven't purchased anything through the Service.
To the maximum extent permitted by applicable law, in no event shall the Company or its suppliers be liable for any special, incidental, indirect, or consequential damages whatsoever (including, but not limited to, damages for loss of profits, loss of data or other information, for business interruption, for personal injury, loss of privacy arising out of or in any way related to the use of or inability to use the Service, third-party software and/or third-party hardware used with the Service, or otherwise in connection with any provision of this Terms), even if the Company or any supplier has been advised of the possibility of such damages and even if the remedy fails of its essential purpose.
Some states do not allow the exclusion of implied warranties or limitation of liability for incidental or consequential damages, which means that some of the above limitations may not apply. In these states, each party's liability will be limited to the greatest extent permitted by law.
## "AS IS" and "AS AVAILABLE" Disclaimer
The Service is provided to You "AS IS" and "AS AVAILABLE" and with all faults and defects without warranty of any kind. To the maximum extent permitted under applicable law, the Company, on its own behalf and on behalf of its Affiliates and its and their respective licensors and service providers, expressly disclaims all warranties, whether express, implied, statutory or otherwise, with respect to the Service, including all implied warranties of merchantability, fitness for a particular purpose, title and non-infringement, and warranties that may arise out of course of dealing, course of performance, usage or trade practice. Without limitation to the foregoing, the Company provides no warranty or undertaking, and makes no representation of any kind that the Service will meet Your requirements, achieve any intended results, be compatible or work with any other software, applications, systems or services, operate without interruption, meet any performance or reliability standards or be error free or that any errors or defects can or will be corrected.
Without limiting the foregoing, neither the Company nor any of the company's provider makes any representation or warranty of any kind, express or implied: (i) as to the operation or availability of the Service, or the information, content, and materials or products included thereon; (ii) that the Service will be uninterrupted or error-free; (iii) as to the accuracy, reliability, or currency of any information or content provided through the Service; or (iv) that the Service, its servers, the content, or e-mails sent from or on behalf of the Company are free of viruses, scripts, trojan horses, worms, malware, timebombs or other harmful components.
Some jurisdictions do not allow the exclusion of certain types of warranties or limitations on applicable statutory rights of a consumer, so some or all of the above exclusions and limitations may not apply to You. But in such a case the exclusions and limitations set forth in this section shall be applied to the greatest extent enforceable under applicable law.
## Governing Law
The laws of the Country, excluding its conflicts of law rules, shall govern this Terms and Your use of the Service. Your use of the Application may also be subject to other local, state, national, or international laws.
## Disputes Resolution
If You have any concern or dispute about the Service, You agree to first try to resolve the dispute informally by contacting the Company.
## For European Union (EU) Users
If You are a European Union consumer, you will benefit from any mandatory provisions of the law of the country in which You are resident.
## United States Legal Compliance
You represent and warrant that (i) You are not located in a country that is subject to the United States government embargo, or that has been designated by the United States government as a "terrorist supporting" country, and (ii) You are not listed on any United States government list of prohibited or restricted parties.
## Severability and Waiver
### Severability
If any provision of these Terms is held to be unenforceable or invalid, such provision will be changed and interpreted to accomplish the objectives of such provision to the greatest extent possible under applicable law and the remaining provisions will continue in full force and effect.
### Waiver
Except as provided herein, the failure to exercise a right or to require performance of an obligation under these Terms shall not affect a party's ability to exercise such right or require such performance at any time thereafter nor shall the waiver of a breach constitute a waiver of any subsequent breach.
## Translation Interpretation
These Terms and Conditions may have been translated if We have made them available to You on our Service. You agree that the original English text shall prevail in the case of a dispute.
## Changes to These Terms and Conditions
We reserve the right, at Our sole discretion, to modify or replace these Terms at any time. If a revision is material We will make reasonable efforts to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at Our sole discretion.
By continuing to access or use Our Service after those revisions become effective, You agree to be bound by the revised terms. If You do not agree to the new terms, in whole or in part, please stop using the website and the Service.
## Contact Us
If you have any questions about these Terms and Conditions, You can contact us:
- By visiting this page on our website: [https://discord.gg/nDt7AjGJQH](https://discord.gg/nDt7AjGJQH)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 35 KiB

+181
View File
@@ -0,0 +1,181 @@
![Neutrality Index](https://i.imgur.com/XcGy5rh.png 'Neutrality Index')
# BlitzKit Neutrality Index
> [!CAUTION]
> This is a working draft and is incomplete. Do not implement.
## Why BkPM over WN8?
BkPM addresses a lot of issues with WN8:
- WN8 incorporates win rate into the metric; a metric like this must be a correlate of win rate, not a dependent
- The weights and biases are not dynamic and their formulation is not transparent
- WN8 values do not asymptote under extreme conditions resulting in meaninglessly large or negative values
- WN8 has too many digits; it doesn't make sense to differentiate between players with sub-one-thousandth's worth of precision
## Preface
The goal of this paper is to deliver a numerical metric for judging player performance by converging all statistics down to a single, easy-to-consume, human-readable value. This must be a mathematically elegant process that yields a reasonable number that asymptotes under extreme situations. More specifically, this value should equal 0, on average across all players and tanks. Extreme cases should be mapped onto the range $[-1, 1]$. To attain the human readable value, we will be transforming the raw metric to a scale of $[0, 2s]$ using $M=\operatorname{round}\left(sR+s\right)$ where $M$ is the resulting human-readable metric, $s = 100$ is an arbitrary scaling factor, and $R$ is the raw metric.
Wargaming provides cumulative statistics for players and tanks. The big idea is to average all provided statistics together to get one unified value. We will also incorporate other composite values based on these default statistics into the average. However, averaging this way poses two problems:
1. All statistics do not scale equally. For example, good players performing with 3,000 damage per battle could also attain a kill-to-death ratio of 3. But averaging them as-is would imply damage per battle has weight 1000 times that of the kill ratio. In other words, damage per battle would totally diminish the impact of kill ratios on the average. Hence, there’s a need for normalization. Normalization, in most cases, simply means dividing by the corresponding averages.
2. All statistics are not equally important. For example, dealing damage is arguably far more important than base capture; hence, it does not make sense to average them together. But this does not mean we totally discard this value as it does make an impact albeit very small. Instead, we will be incorporating weighted averages where the weights will be calculated through correlational analysis against win rate. Specifically, the weights of the statistics will be the corresponding correlation coefficient, r. One caveat to look out for is that r can be negative for statistics like damage received which must be minimized. Fortunately, negative weights are okay and make intuitive sense; after all, bleeding health should punish the metric.
## Computation
$\mu$ is a simple weighted average of statistics across all players where $C_{battles}$ is the number of player battles and $x_{i}$ is the statistic for player $i$.
$$
\mu=\frac{\sum_{ }^{ }C_{battles}x_{i}}{\sum_{ }^{ }C_{battles}}
$$
$\sigma$ is the standard deviation of the statistic across all players. Below is a refresher of the formula where $x_{i}$ is the statistic for player $i$ and $n$ is the number of players (or the sample size).
$$
\sigma=\sqrt{\frac{\sum_{ }^{ }\left(x_{i}-\mu\right)^{2}}{n}}
$$
A normalized atomic statistic is provided by the equation below where $x$ is the player's statistic being evaluated, $\mu$ is the mean of the statistic across all players, and $\sigma$ is the standard deviation of the statistic across all players. During computation, one may pre-compute and reuse $\gamma=x-\mu$.
$$
A=\frac{x-\mu}{\left|x-\mu\right|}\left(1-e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}}\right)=\frac{\gamma}{\left|\gamma\right|}\left(1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}\right)
$$
$r$ is the correlation coefficient of the statistic across all players. Below is a refresher of the formula where $x_{i}$ is the statistic for player, $y_{i}$ is the player's win rate, $\mu$ is the mean of the statistic across all players, and $\overline{y}$ is the average win rate across all players.
$$
r=\frac{\sum_{ }^{ }\left(x_{i}-\mu\right)\left(y_{i}-\overline{y}\right)}{\sqrt{\sum_{ }^{ }\left(x_{i}-\mu\right)^{2}\sum_{ }^{ }\left(y_{i}-\overline{y}\right)^{2}}}
$$
$m$ is the slope of the least squares regression line. Below is a refresher of the formula where $x_i$ is the player's statistic being evaluated, $y_i$ is the player's win rate, and $n$ is the number of players (or the sample size).
$$
m=\frac{n\sum_{ }^{ }x_{i}y_{i}-\sum_{ }^{ }x_{i}\sum_{ }^{ }y_{i}}{n\sum_{ }^{ }x_{i}^{2}-\left(\sum_{ }^{ }x_{i}\right)^{2}}
$$
The weight of an atomic statistic is $w$ where $r$ is the correlation coefficient between the statistic and win rate, $\mu$ is the mean of the statistic across all players, and $m$ is the slope of the least squares regression line.
$$
w=\left|r\right|\mu m
$$
The raw metric is the weighted average of all atomic statistics.
$$
R=\frac{\sum_{ }^{ }wA}{\sum_{ }^{ }w}
$$
The final human-readable metric will be passed through the following transformation where $s=100$.
$$
M=\operatorname{round}\left(sR+s\right)
$$
## Constants
A few constants that the rest of the paper depends on. Available under the “constants” object.
```ts
players_per_team = 7;
```
## Wargaming-Provided Statistics
Wargaming provides the following pieces of statistics for each player and tank. These are cumulative; in other words, they simply add up over time and it is up to the recorder to contrast two snapshots of said statistics in time to get periodical statistics. Available under the “all” object.
```ts
battles;
capture_points;
damage_dealt;
damage_received;
dropped_capture_points;
frags; // kills
frags8p; // frags against tanks at or above tier 8
hits;
losses;
max_frags;
max_frags_tank_id;
max_xp;
max_xp_tank_id;
shots;
spotted;
survived_battles;
win_and_survived;
wins;
xp;
```
## Composite Statistics
Raw statistics from Wargaming can be combined into more meaningful numeric snippets. Most of these values are divided by all.battles indicating they are the average across all battles in the given period. Assigned under the “composite” object.
```ts
win_rate = all.wins / all.battles;
capture_points = all.capture_points / all.battles;
damage_dealt = all.damage_dealt / all.battles;
damage_received = all.damage_received / all.battles;
dropped_capture_points = all.dropped_capture_points / all.battles;
frags = all.frags / all.battles;
hits = all.hits / all.battles;
shots = all.shots / all.battles;
spotted = all.spotted / all.battles;
survival_rate = all.survived_battles / all.battles;
xp = all.xp / all.battles;
damage_ratio = all.damage_dealt / all.damage_received;
accuracy = all.hits / all.shots;
damage_per_hit = composite.damage_dealt / composite.hits;
```
## Normalized Statistics
We will be using the standard deviation and the mean of each metric supplied to this expression below to normalize each metric in the range $[-1, 1]$. The goal is to map the mean of the statistic to $0$, and the extrema to $-1$ and $1$ (whichever direction that may be in).
$$
\frac{x-\mu}{\left|x-\mu\right|}\left[1-e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}}\right]
$$
During computation, one may pre-compute and reuse $\gamma=x-\mu$ in:
$$
\frac{\gamma}{\left|\gamma\right|}\left[1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}\right]
$$
Here is an example of HisRoyalFatness scoring a very high $0.988$ with the frags metric with his [XM551 Sheridan](https://blitzkit.app/tools/tankopedia/20257). $\mu=0.7694$, $\sigma=0.2492$, and $x=1.5113$, HisRoyalFatness' average frags. At $x = 0$ (if the player manages to get no frags), the metric drops nearly to $-1$ and vice versa. And, at $x=\mu$, the metric is exactly $0$.
![](https://i.imgur.com/aIUQmGF.png)
### Derivation
We start with the standard normal distribution formula
$$
\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}}
$$
![](https://i.imgur.com/a10m8Xz.png)
We remove the coefficient to transform the range of the function from $\left(0,\frac{1}{\sigma\sqrt{2\pi}}\right]$ to $\left(0,1\right]$. From this point onwards, I will be using the substitution $\gamma=x-\mu$.
$$
e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}
$$
![](https://i.imgur.com/67DO69i.png)
Then we mirror the function across $y=\frac{1}{2}$ to allow the function to be rewarding as you reach the extrema.
$$
1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}
$$
![](https://i.imgur.com/1J0cTyb.png)
Finally, to punish the function as you approach the left extreme, we flip the sign of the function when $x<\mu$. One may choose to implement this as a piece-wise function (especially when implementing this in a computer), but I have chosen to represent it as one unified coefficient in this paper.
$$
\frac{\gamma}{\left|\gamma\right|}\left[1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}\right]
$$
![](https://i.imgur.com/O8stVlJ.png)
@@ -1,9 +1,9 @@
# Blitzkrieg Rating Leaderboard
# Blitzkit Rating Leaderboard
A straightforward way of storing the entire World of Tanks Blitz rating leaderboard to disk.
```cpp
primary BlitzkriegRatingLeaderboard {
primary BlitzkitRatingLeaderboard {
utf8"BKRL" magic;
Header header;
primary Body<header> body;
File renamed without changes.
+18
View File
@@ -0,0 +1,18 @@
# Discovered Ids
```c
primary DiscoveredIds {
utf8"DIDS" magic;
Header header;
primary Body body;
}
Header {
uint16 version; // always 1
}
Body {
uint32 count;
uint32[count] ids;
}
```
+71
View File
@@ -0,0 +1,71 @@
# BlitzKit Regular Tank Stats
A straightforward way of storing the entire World of Tanks Blitz tank statistics for players to disk.
## Manifest `manifest.rtsm`
```cpp
primary RegularTankStatisticsManifest {
utf8"RTSM" magic;
Header header;
primary Body body;
}
Header {
uint16 version; // always 1
}
Body {
uint32 time;
uint8 base;
}
```
## Chunk `*.rtsc`
```cpp
primary RegularTankStatisticsChunk {
utf8"RTSC" magic;
Header header;
primary Body body<header.playerCount>;
}
Header {
uint16 version; // always 1
uint32 playerCount;
}
Body<uint32 playerCount> {
Player[playerCount] players;
}
Player {
uint32 id;
uint16 tankCount;
Tank[tankCount] tanks;
}
Tank {
uint32 id;
uint32 battleLifeTime;
uint32 lastBattleTime;
uint8 markOfMastery;
uint32 battles;
uint32 capturePoints;
uint32 damageDealt;
uint32 damageReceived;
uint32 droppedCapturePoints;
uint32 frags;
uint32 frags8p;
uint32 hits;
uint32 losses;
uint8 maxFrags;
uint16 maxXp;
uint32 shots;
uint32 spotted;
uint32 survivedBattles;
uint32 winAndSurvived;
uint32 wins;
uint32 xp;
}
```
-6
View File
@@ -1,6 +0,0 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || 'https://blitz-krieg.vercel.app',
generateRobotsTxt: true,
sourceDir: 'dist/website',
};
+9
View File
@@ -14,6 +14,15 @@ const nextConfig = {
},
}),
async headers() {
return [
{
source: '/(.*)?',
headers: [{ key: 'X-Frame-Options', value: 'DENY' }],
},
];
},
distDir: 'dist/website',
reactStrictMode: false,
};
+23 -11
View File
@@ -1,17 +1,21 @@
{
"name": "blitzkrieg",
"version": "1.18.0",
"name": "blitzkit",
"version": "1.20.3",
"description": "🎉 Tools for everything World of Tanks Blitz",
"main": "src/server.ts",
"type": "module",
"scripts": {
"build:averages": "bun scripts/averages",
"build:db": "prisma generate",
"build:bot": "vite-node --script scripts/build --production",
"build:website": "next build && next-sitemap --config next-sitemap.config.cjs",
"build:website": "yarn build:db && yarn build:sitemap && next build",
"build:sitemap": "vite-node --script scripts/sitemap",
"build:docs": "vitepress build docs",
"build:ratingleaderboard": "vite-node --script scripts/buildRatingLeaderboard",
"build:assets": "vite-node --max_old_space_size=16384 --script scripts/buildAssets/index",
"build:test": "vite-node --script scripts/buildTest",
"dev:bot": "vite-node --script scripts/build --production && yarn start:bot",
"test": "vite-node --script scripts/test",
"test2": "vite-node --script scripts/test2",
"dev:bot": "vite-node --script scripts/build && yarn start:bot",
"dev:docs": "vitepress dev docs",
"dev:website": "next dev",
"start:bot": "node --enable-source-maps dist/bot/index.cjs",
@@ -26,7 +30,8 @@
"knip": "knip",
"update": "yarn upgrade --latest",
"setup:depotdownloader": "vite-node --script scripts/setupDepotDownloader",
"tunnel": "cloudflared tunnel --url http://localhost:3000"
"tunnel": "cloudflared tunnel --url http://localhost:3000",
"discoverids": "scripts/discoverIds.ts"
},
"license": "MIT",
"dependencies": {
@@ -36,12 +41,13 @@
"@prisma/client": "^5.4.1",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/themes": "^2.0.1",
"@radix-ui/themes": "^3.0.1",
"@react-three/drei": "^9.93.0",
"@react-three/fiber": "^8.15.14",
"@resvg/resvg-js": "^2.4.1",
"@types/three": "^0.160.0",
"@vanilla-extract/css": "^1.13.0",
"adm-zip": "^0.5.12",
"bepaint": "^0.1.0-beta.3",
"decompress": "^4.2.1",
"discord.js": "^14.13.0",
@@ -50,23 +56,26 @@
"express": "^4.18.2",
"false": "^0.0.4",
"fuzzysort": "^2.0.4",
"googleapis": "^134.0.0",
"immer": "^10.0.2",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"lz4js": "^0.2.0",
"markdown-escape": "^2.0.0",
"markdown-to-jsx": "^7.4.7",
"next": "^14.1.0",
"next-sitemap": "^4.2.3",
"parse-dds": "^1.2.1",
"pickleparser": "^0.2.1",
"postprocessing": "^6.34.1",
"progress": "^2.0.3",
"protobufjs": "^7.2.6",
"react": "^18.2.0",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-fuzzysort": "^1.0.1",
"react-promise-suspense": "^0.3.4",
"react-spinners": "^0.13.8",
"satori": "^0.10.13",
"sharp": "0.33.1",
"sharp": "^0.33.4",
"three": "0.159.0",
"three-stdlib": "^2.29.4",
"vite-node": "^0.34.5",
@@ -77,16 +86,19 @@
},
"devDependencies": {
"@total-typescript/ts-reset": "^0.5.1",
"@types/adm-zip": "^0.5.5",
"@types/decompress": "^4.2.7",
"@types/escape-html": "^1.0.2",
"@types/express": "^4.17.18",
"@types/js-yaml": "^4.0.8",
"@types/lodash": "^4.14.199",
"@types/lz4": "^0.6.4",
"@types/lz4js": "^0.2.1",
"@types/markdown-escape": "^1.1.0",
"@types/node": "^20.6.5",
"@types/parse-dds": "^1.0.3",
"@types/pngjs": "^6.0.4",
"@types/progress": "^2.0.7",
"@types/react": "^18.2.22",
"@vanilla-extract/next-plugin": "^2.3.1",
"compare-versions": "^6.1.0",
@@ -96,7 +108,7 @@
"lz4": "^0.6.5",
"prettier": "^3.0.3",
"prisma": "^5.4.1",
"typescript": "^5.2.2"
"typescript": "^5.4.5"
},
"packageManager": "[email protected]"
}
@@ -1,8 +0,0 @@
-- CreateTable
CREATE TABLE "discord_blitz" (
"discord" INT8 NOT NULL,
"region" STRING NOT NULL,
"blitz" INT4 NOT NULL,
CONSTRAINT "discord_blitz_pkey" PRIMARY KEY ("discord")
);
-3
View File
@@ -1,3 +0,0 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "cockroachdb"
+7 -3
View File
@@ -4,11 +4,15 @@ generator client {
datasource db {
provider = "cockroachdb"
url = env("DISCORD_BLITZ_DB")
url = env("DATABASE_URL")
}
model discord_blitz {
model Users {
blitz Int @id
last_used DateTime? @default(now())
}
model DiscordUsers {
discord BigInt @id
region String
blitz Int
}
+2
View File
@@ -0,0 +1,2 @@
appnexus.com, 14163, RESELLER
pubcenter.microsoft.com, 253617120, DIRECT
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 921 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

+7
View File
@@ -0,0 +1,7 @@
User-agent: *
Allow: /
Host: https://blitzkit.app
Sitemap: https://blitzkit.app/sitemap.txt
Sitemap: https://blitzkit.app/sitemap.xml
+2 -2
View File
@@ -3,8 +3,8 @@ import { parse as parsePath } from 'path';
import { parse as parseYaml } from 'yaml';
import { readStringDVPL } from '../src/core/blitz/readStringDVPL';
import { writeDVPL } from '../src/core/blitz/writeDVPL';
import { secrets } from '../src/core/blitzkrieg/secrets';
import { dvp } from '../submodules/closedkrieg/src/dvp';
import { secrets } from '../src/core/blitzkit/secrets';
import { dvp } from '../submodules/blitzkit-closed/src/dvp';
import { DATA } from './buildAssets/constants';
const versionTextFile = await readStringDVPL(`${DATA}/version.txt.dvpl`);
+266
View File
@@ -0,0 +1,266 @@
import { times } from 'lodash';
import { compress } from 'lz4js';
import { argv } from 'process';
import ProgressBar from 'progress';
import { Region, REGIONS } from '../src/constants/regions';
import getTankStats from '../src/core/blitz/getTankStats';
import { idToRegion, MAX_IDS, MIN_IDS } from '../src/core/blitz/idToRegion';
import { asset } from '../src/core/blitzkit/asset';
import {
AverageDefinitions,
AverageDefinitionsAllStats,
} from '../src/core/blitzkit/averageDefinitions';
import { averageDefinitionsAllStatsKeys } from '../src/core/blitzkit/averageDefinitions/constants';
import { commitAssets } from '../src/core/blitzkit/commitAssets';
import { superCompress } from '../src/core/blitzkit/superCompress';
import { DidsReadStream, DidsWriteStream } from '../src/core/streams/dids';
import { IndividualTankStats } from '../src/types/tanksStats';
const RUN_TIME = 1000 * 60 * 60;
const MAX_REQUESTS = 10;
const production = argv.includes('--production');
const startTime = Date.now();
const fields = 'all,tank_id,battle_life_time';
const players: IndividualTankStats[][] = [];
const preDiscovered = await fetch(asset('averages/discovered.dids.lz4')).then(
async (response) => {
if (response.status === 200) {
const buffer = await response.arrayBuffer();
return new DidsReadStream(buffer).dids();
}
return undefined;
},
);
const discoveredIds: number[] = [];
let processes = 0;
if (preDiscovered) {
console.log(
`Revalidating ${preDiscovered.length} pre-discovered ids with ${MAX_REQUESTS} chains...`,
);
const preDiscoveredBar = new ProgressBar(':bar', {
total: preDiscovered.length,
});
let preDiscoveredIndex = 0;
async function chainPreDiscovery() {
processes++;
if (preDiscoveredIndex === preDiscovered!.length) {
processes--;
if (processes !== 0) return;
console.log(
`Rediscovered ${discoveredIds.length} / ${preDiscovered!.length} ids in ${Date.now() - startTime}ms`,
);
discover();
return;
}
const id = preDiscovered![preDiscoveredIndex++];
const region = idToRegion(id);
if (id > MAX_IDS[region]) return;
const stats = await getTankStats(region, id, { fields });
if (stats !== null && stats.length > 0) {
discoveredIds.push(id);
players.push(stats);
preDiscoveredBar.tick();
}
processes--;
setTimeout(chainPreDiscovery); // circumvent max call stack
}
times(MAX_REQUESTS, chainPreDiscovery);
} else {
console.log('No pre-discovered ids found :(');
discover();
}
function discover() {
const index: Record<Region, number> = {
asia:
preDiscovered?.find((id) => idToRegion(id) === 'asia') ?? MIN_IDS.asia,
com: preDiscovered?.find((id) => idToRegion(id) === 'com') ?? MIN_IDS.com,
eu: preDiscovered?.find((id) => idToRegion(id) === 'eu') ?? MIN_IDS.eu,
};
let regionIndex = 0;
let done = 0;
async function chainDiscovery() {
regionIndex = (regionIndex + 1) % REGIONS.length;
const region = REGIONS[regionIndex];
const id = index[region]++;
if (Date.now() - startTime > RUN_TIME || id === MAX_IDS[region]) {
if (++done !== MAX_REQUESTS) return;
console.log(
`Total discovery run time: ${
Date.now() - startTime
}ms\nDiscovered ids: ${discoveredIds.length}`,
);
postWork();
return;
}
if (id > MAX_IDS[region]) return;
const stats = await getTankStats(region, id, { fields });
if (stats !== null && stats.length > 0) {
discoveredIds.push(id);
players.push(stats);
console.log(
`discovered ${id} in ${region} (time left: ${RUN_TIME - (Date.now() - startTime)}ms)`,
);
}
setTimeout(chainDiscovery); // circumvent max call stack
}
console.log(`Spawning ${MAX_REQUESTS} discovery chains...`);
times(MAX_REQUESTS, chainDiscovery);
}
function postWork() {
const tankIds: number[] = [];
const sorted: Record<number, IndividualTankStats[]> = {};
players.forEach((tanks) => {
tanks.forEach((tank) => {
if (tank.all.battles === 0) return;
if (!sorted[tank.tank_id]) {
tankIds.push(tank.tank_id);
sorted[tank.tank_id] = [];
}
sorted[tank.tank_id].push(tank);
});
});
console.log(
`Generating statistics based off ${players.length} players and ${tankIds.length} tanks...`,
);
const averages: AverageDefinitions = {};
tankIds.forEach((id) => {
const tanks = sorted[id];
const samples = tanks.length;
function sum(slice: (tank: AverageDefinitionsAllStats) => number) {
return tanks.reduce((acc, tank) => {
return (
acc + slice({ battle_life_time: tank.battle_life_time, ...tank.all })
);
}, 0);
}
const denominator = sum((tank) => tank.battles);
function moment(slice: (tank: AverageDefinitionsAllStats) => number) {
return tanks.reduce((acc, tank) => {
return (
acc +
tank.all.battles *
slice({ battle_life_time: tank.battle_life_time, ...tank.all })
);
}, 0);
}
function weightedAverage(
slice: (tank: AverageDefinitionsAllStats) => number,
) {
return moment(slice) / denominator;
}
const mu = averageDefinitionsAllStatsKeys.reduce<
Partial<AverageDefinitionsAllStats>
>((acc, key) => {
acc[key] = weightedAverage((tank) => tank[key]);
return acc;
}, {}) as AverageDefinitionsAllStats;
const sigma = averageDefinitionsAllStatsKeys.reduce<
Partial<AverageDefinitionsAllStats>
>((acc, key) => {
acc[key] = Math.sqrt(sum((tank) => (tank[key] - mu[key]) ** 2) / samples);
return acc;
}, {}) as AverageDefinitionsAllStats;
const r = averageDefinitionsAllStatsKeys.reduce<
Partial<AverageDefinitionsAllStats>
>((acc, key) => {
acc[key] =
(samples *
sum(
(tank) => (tank[key] / tank.battles) * (tank.wins / tank.battles),
) -
sum((tank) => tank[key] / tank.battles) *
sum((tank) => tank.wins / tank.battles)) /
Math.sqrt(
(samples * sum((tank) => (tank[key] / tank.battles) ** 2) -
sum((tank) => tank[key] / tank.battles) ** 2) *
(samples * sum((tank) => (tank.wins / tank.battles) ** 2) -
sum((tank) => tank.wins / tank.battles) ** 2),
);
return acc;
}, {}) as AverageDefinitionsAllStats;
const m = averageDefinitionsAllStatsKeys.reduce<
Partial<AverageDefinitionsAllStats>
>((acc, key) => {
acc[key] =
(samples *
sum(
(tank) => (tank[key] / tank.battles) * (tank.wins / tank.battles),
) -
sum((tank) => tank[key] / tank.battles) *
sum((tank) => tank.wins / tank.battles)) /
(samples * sum((tank) => (tank[key] / tank.battles) ** 2) -
sum((tank) => tank[key] / tank.battles) ** 2);
return acc;
}, {}) as AverageDefinitionsAllStats;
const b = averageDefinitionsAllStatsKeys.reduce<
Partial<AverageDefinitionsAllStats>
>((acc, key) => {
acc[key] =
(sum((tank) => tank.wins / tank.battles) -
m[key] * sum((tank) => tank[key] / tank.battles)) /
samples;
return acc;
}, {}) as AverageDefinitionsAllStats;
averages[id] = { samples, mu, sigma, r, m, b };
});
commitAssets(
'averages',
[
{
path: 'definitions/averages.cdon.lz4',
content: superCompress(averages),
encoding: 'base64',
},
{
path: 'definitions/discovered.dids.lz4',
content: Buffer.from(
compress(new DidsWriteStream().dids(discoveredIds).uint8Array),
).toString('base64'),
encoding: 'base64',
},
],
production,
);
}
+8 -4
View File
@@ -2,10 +2,12 @@ import { exec } from 'child_process';
import { build } from 'esbuild';
import { cp, readdir } from 'fs/promises';
import { argv } from 'process';
import { promisify } from 'util';
const execPromise = promisify(exec);
const isProduction = argv.includes('--production');
readdir('src/workers').then((workers) => {
await readdir('src/workers').then((workers) => {
const files = [
'bot',
'index',
@@ -41,8 +43,8 @@ readdir('src/workers').then((workers) => {
});
// copy schema.prisma
cp('prisma/schema.prisma', 'dist/bot/schema.prisma');
readdir('node_modules/prisma').then((files) =>
await cp('prisma/schema.prisma', 'dist/bot/schema.prisma');
await readdir('node_modules/prisma').then((files) =>
files
.filter((file) => file.endsWith('.node'))
.map((file) => cp(`node_modules/prisma/${file}`, `dist/bot/${file}`)),
@@ -51,7 +53,9 @@ readdir('node_modules/prisma').then((files) =>
if (isProduction) {
// install fixed sharp
console.log('Installing fixed sharp...');
exec('yarn init -y && yarn add [email protected] --ignore-engines', {
await execPromise('yarn init -y && yarn add [email protected] --ignore-engines', {
cwd: 'dist/bot',
});
}
console.log('Generated:', await readdir('dist/bot'));
+2 -2
View File
@@ -2,8 +2,8 @@ import { readdir } from 'fs/promises';
import sharp from 'sharp';
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
export async function boosterIcons(production: boolean) {
+2 -2
View File
@@ -1,6 +1,6 @@
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
export async function camouflageIcons(production: boolean) {
+2 -2
View File
@@ -1,7 +1,7 @@
import { readdir } from 'fs/promises';
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
export async function circleFlags(production: boolean) {
@@ -3,8 +3,8 @@ import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
import { ConsumablesCommon, ProvisionsCommon } from './definitions';
+2 -2
View File
@@ -1,7 +1,7 @@
import sharp from 'sharp';
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA } from './constants';
const ICONS = [
+161 -24
View File
@@ -1,27 +1,32 @@
import { readdir, writeFile } from 'fs/promises';
import { readdir } from 'fs/promises';
import { parse as parsePath } from 'path';
import { Vector3Tuple } from 'three';
import { parse as parseYaml } from 'yaml';
import { TankClass } from '../../src/components/Tanks';
import { WARGAMING_APPLICATION_ID } from '../../src/constants/wargamingApplicationID';
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import {
ConsumableDefinitions,
TankFilterDefinitionCategory,
} from '../../src/core/blitzkrieg/consumableDefinitions';
} from '../../src/core/blitzkit/consumableDefinitions';
import {
EquipmentDefinitions,
EquipmentPreset,
EquipmentRow,
} from '../../src/core/blitzkrieg/equipmentDefinitions';
} from '../../src/core/blitzkit/equipmentDefinitions';
import { GameDefinitions } from '../../src/core/blitzkit/gameDefinitions';
import { MapDefinitions } from '../../src/core/blitzkit/mapDefinitions';
import {
ModelArmor,
ModelDefinitions,
} from '../../src/core/blitzkrieg/modelDefinitions';
import { ProvisionDefinitions } from '../../src/core/blitzkrieg/provisionDefinitions';
import { superCompress } from '../../src/core/blitzkrieg/superCompress';
} from '../../src/core/blitzkit/modelDefinitions';
import { ProvisionDefinitions } from '../../src/core/blitzkit/provisionDefinitions';
import { SkillDefinitions } from '../../src/core/blitzkit/skillDefinitions';
import { superCompress } from '../../src/core/blitzkit/superCompress';
import {
Crew,
CrewMember,
@@ -30,11 +35,13 @@ import {
TankDefinitionPrice,
TankDefinitions,
Tier,
} from '../../src/core/blitzkrieg/tankDefinitions';
Unlock,
} from '../../src/core/blitzkit/tankDefinitions';
import { DATA, POI } from './constants';
import { Avatar } from './skillIcons';
import { TankParameters } from './tankIcons';
interface Strings {
export interface BlitzStrings {
[key: string]: string;
}
type ShellKind =
@@ -80,7 +87,7 @@ type VehicleDefinitionArmor = Record<
number | { vehicleDamageFactor: 0; '#text': number }
>;
interface UnlocksInner {
cost: number;
cost: number | string;
'#text': number;
}
type Unlocks = {
@@ -116,6 +123,7 @@ interface VehicleDefinitions {
weight: number;
terrainResistance: string;
rotationSpeed: number;
userString: string;
shotDispersionFactors: {
vehicleMovement: number;
vehicleRotation: number;
@@ -320,7 +328,32 @@ type ConsumablesVehicleFilter =
| { name: string }
| { extendedTags: string };
const blitzShellKindToBLitzkrieg: Record<ShellKind, ShellType> = {
export interface Maps {
maps: {
[key: string]: {
id: number;
tags?: string;
localName: string;
avaliableInTrainingRoom: boolean; // lol wg typo
spriteFrame: number;
supremacyPointsThreshold?: number;
availableModes: number[];
shadowMapsAvailable?: boolean;
assaultRespawnPoints: {
allies: MapAlly[];
enemies: MapAlly[];
};
levels?: number[];
};
};
}
export interface MapAlly {
respawnNumber: number;
points: Array<number[]>;
}
const blitzShellKindToBlitzkit: Record<ShellKind, ShellType> = {
ARMOR_PIERCING: 'ap',
ARMOR_PIERCING_CR: 'ap_cr',
HIGH_EXPLOSIVE: 'he',
@@ -329,28 +362,45 @@ const blitzShellKindToBLitzkrieg: Record<ShellKind, ShellType> = {
const missingStrings: Record<string, string> = {
'#artefacts:tungstentip/name': 'Tungsten Shells',
};
export const botPattern = /^.+((tutorial_bot(\d+)?)|(TU(R?)))$/;
export async function definitions(production: boolean) {
console.log('Building definitions...');
const wargamingTankopedia = (await fetch(
`https://api.wotblitz.com/wotb/encyclopedia/vehicles/?application_id=${WARGAMING_APPLICATION_ID}&fields=description`,
).then((response) => response.json())) as {
data: { [key: number]: { description: null | string } };
};
const gameDefinitions: GameDefinitions = {
version: (await readStringDVPL(`${DATA}/version.txt.dvpl`))
.split(' ')[0]
.split('.')
.slice(0, 3)
.join('.'),
};
const tankDefinitions: TankDefinitions = {};
const modelDefinitions: ModelDefinitions = {};
const mapDefinitions: MapDefinitions = {};
const equipmentDefinitions: EquipmentDefinitions = {
presets: {},
equipments: {},
};
const consumableDefinitions: ConsumableDefinitions = {};
const provisionDefinitions: ProvisionDefinitions = {};
const skillDefinitions: SkillDefinitions = {
classes: { lightTank: [], mediumTank: [], heavyTank: [], 'AT-SPG': [] },
};
const nations = await readdir(`${DATA}/${POI.vehicleDefinitions}`).then(
(nations) => nations.filter((nation) => nation !== 'common'),
);
const tankStringIdMap: Record<string, number> = {};
const stringsPreInstalled = await readYAMLDVPL<Strings>(
const stringsPreInstalled = await readYAMLDVPL<BlitzStrings>(
`${DATA}/${POI.strings}/en.yaml.dvpl`,
);
const stringsCache = await fetch(POI.cachedStrings)
.then((response) => response.text())
.then((string) => parseYaml(string) as Strings);
.then((string) => parseYaml(string) as BlitzStrings);
const optionalDevices = await readXMLDVPL<{ root: OptionalDevices }>(
`${DATA}/${POI.optionalDevices}.dvpl`,
);
@@ -367,7 +417,10 @@ export async function definitions(production: boolean) {
const provisions = await readXMLDVPL<{ root: ProvisionsCommon }>(
`${DATA}/${POI.provisionsCommon}.dvpl`,
);
const avatar = await readXMLDVPL<{ root: Avatar }>(
`${DATA}/XML/item_defs/tankmen/avatar.xml.dvpl`,
);
const maps = await readYAMLDVPL<Maps>(`${DATA}/maps.yaml.dvpl`);
const tankXps = new Map<number, number>();
await Promise.all(
@@ -401,7 +454,49 @@ export async function definitions(production: boolean) {
`${DATA}/${POI.vehicleDefinitions}/${nation}/components/chassis.xml.dvpl`,
);
function resolveUnlocks(unlocks?: Unlocks) {
if (!unlocks) return undefined;
return Object.entries(unlocks)
.map(([type, list]) =>
(Array.isArray(list) ? list : [list]).map((item) => {
const typeTyped = type as keyof Unlocks;
let rawId: number;
if (typeTyped === 'chassis') {
rawId = chassisList.root.ids[item['#text']];
} else if (typeTyped === 'engine') {
rawId = enginesList.root.ids[item['#text']];
} else if (typeTyped === 'gun') {
rawId = gunList.root.ids[item['#text']];
} else if (typeTyped === 'turret') {
rawId = turretList.root.ids[item['#text']];
} else if (typeTyped === 'vehicle') {
rawId = tankList.root[item['#text']].id;
}
return {
type: typeTyped,
id: toUniqueId(nation, rawId!),
cost: {
type:
typeof item.cost === 'number'
? 'xp'
: item.cost.split(':')[0],
value:
typeof item.cost === 'number'
? item.cost
: Number(item.cost.split(':')[1]),
},
} satisfies Unlock;
}),
)
.flat();
}
for (const tankKey in tankList.root) {
if (botPattern.test(tankKey)) continue;
const gunXps = new Map<number, number>();
const turretXps = new Map<number, number>();
const engineXps = new Map<number, number>();
@@ -487,6 +582,8 @@ export async function definitions(production: boolean) {
tankDefinitions[tankId] = {
id: tankId,
description:
wargamingTankopedia.data[tankId]?.description ?? undefined,
fixedCamouflage: fixedCamouflage ? true : undefined,
crew,
weight: tankDefinition.root.hull.weight,
@@ -558,6 +655,7 @@ export async function definitions(production: boolean) {
tankDefinitions[tankId].tracks.push({
id: trackId,
weight: track.weight,
name: strings[track.userString],
traverseSpeed: track.rotationSpeed,
dispersion: {
move: track.shotDispersionFactors.vehicleMovement,
@@ -569,6 +667,7 @@ export async function definitions(production: boolean) {
soft: terrainResistances[2],
},
tier: track.level as Tier,
unlocks: resolveUnlocks(track.unlocks),
});
modelDefinitions[tankId].tracks[trackId] = {
@@ -593,6 +692,7 @@ export async function definitions(production: boolean) {
tier: engineListEntry.level as Tier,
weight: engineListEntry.weight,
power: engineListEntry.power,
unlocks: resolveUnlocks(engine.unlocks),
});
});
@@ -654,6 +754,7 @@ export async function definitions(production: boolean) {
health: turret.maxHealth,
viewRange: turret.circularVisionRadius,
weight: turret.weight,
unlocks: resolveUnlocks(turret.unlocks),
});
modelDefinitions[tankId].turrets[turretId] = {
@@ -717,6 +818,17 @@ export async function definitions(production: boolean) {
const gunArmor: ModelArmor = { thickness: {} };
const shotDispersionFactors =
gun.shotDispersionFactors ?? gunListEntry.shotDispersionFactors;
const maskName = `gun_${gunModel.toString().padStart(2, '0')}`;
const maskEnabled =
tankParameters.maskSlice?.[maskName]?.enabled ?? false;
let mask: number | undefined;
if (maskEnabled) {
const maskRaw = tankParameters.maskSlice![maskName]!;
mask = maskRaw.planePosition[1];
} else {
mask = undefined;
}
totalUnlocks.push(gun.unlocks);
Object.keys(gun.armor)
@@ -761,11 +873,13 @@ export async function definitions(production: boolean) {
shot: shotDispersionFactors.afterShot,
traverse: shotDispersionFactors.turretRotation,
},
unlocks: resolveUnlocks(gun.unlocks),
} as GunDefinition);
modelDefinitions[tankId].turrets[turretId].guns[gunId] = {
armor: gunArmor,
model: gunModel,
mask,
thickness:
gun.armor.gun === undefined
? 0
@@ -818,7 +932,7 @@ export async function definitions(production: boolean) {
caliber: shell.caliber,
normalization: shell.normalizationAngle,
ricochet: shell.ricochetAngle,
type: blitzShellKindToBLitzkrieg[shell.kind],
type: blitzShellKindToBlitzkit[shell.kind],
explosionRadius:
shell.kind === 'HIGH_EXPLOSIVE'
? shell.explosionRadius ?? 0
@@ -845,7 +959,7 @@ export async function definitions(production: boolean) {
const currentTank = tankDefinitions[tankId];
const successorId = toUniqueId(nation, tankListEntry.id);
tankXps.set(successorId, vehicle.cost);
tankXps.set(successorId, vehicle.cost as number);
if (currentTank.successors === undefined) {
currentTank.successors = [];
@@ -859,7 +973,7 @@ export async function definitions(production: boolean) {
case 'gun': {
gunXps.set(
toUniqueId(nation, gunList.root.ids[vehicle['#text']]),
vehicle.cost,
vehicle.cost as number,
);
break;
}
@@ -867,7 +981,7 @@ export async function definitions(production: boolean) {
case 'turret': {
turretXps.set(
toUniqueId(nation, turretList.root.ids[vehicle['#text']]),
vehicle.cost,
vehicle.cost as number,
);
break;
}
@@ -875,7 +989,7 @@ export async function definitions(production: boolean) {
case 'engine': {
engineXps.set(
toUniqueId(nation, enginesList.root.ids[vehicle['#text']]),
vehicle.cost,
vehicle.cost as number,
);
break;
}
@@ -883,7 +997,7 @@ export async function definitions(production: boolean) {
case 'chassis': {
trackXps.set(
toUniqueId(nation, chassisList.root.ids[vehicle['#text']]),
vehicle.cost,
vehicle.cost as number,
);
break;
}
@@ -933,6 +1047,7 @@ export async function definitions(production: boolean) {
equipmentDefinitions.equipments[optionalDeviceEntry.id] = {
name: strings[optionalDeviceEntry.userString],
description: strings[optionalDeviceEntry.description],
};
},
);
@@ -1084,13 +1199,25 @@ export async function definitions(production: boolean) {
}
});
writeFile(
'test.tanks.cdon.lz4',
Buffer.from(superCompress(tankDefinitions), 'base64'),
);
Object.entries(avatar.root.skillsByClasses).forEach(([tankClass, skills]) => {
skillDefinitions.classes[tankClass as TankClass] = skills.split(' ');
});
Object.entries(maps.maps).forEach(([key, map]) => {
mapDefinitions[map.id] = {
id: map.id,
name: strings[`#maps:${key}:${map.localName}`],
};
});
await commitAssets(
'definitions',
[
{
content: superCompress(gameDefinitions),
encoding: 'base64',
path: 'definitions/game.cdon.lz4',
},
{
content: superCompress(tankDefinitions),
encoding: 'base64',
@@ -1116,6 +1243,16 @@ export async function definitions(production: boolean) {
encoding: 'base64',
path: 'definitions/provisions.cdon.lz4',
},
{
content: superCompress(skillDefinitions),
encoding: 'base64',
path: 'definitions/skills.cdon.lz4',
},
{
content: superCompress(mapDefinitions),
encoding: 'base64',
path: 'definitions/maps.cdon.lz4',
},
],
production,
);
+2 -2
View File
@@ -3,8 +3,8 @@ import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
import { OptionalDevices } from './definitions';
+6 -2
View File
@@ -20,16 +20,20 @@ import { equipmentIcons } from './equipmentIcons';
import { moduleIcons } from './moduleIcons';
import { scratchedFlags } from './scratchedFlags';
import { shellIcons } from './shellIcons';
import { skillIcons } from './skillIcons';
import { tankArmors } from './tankArmors';
import { tankIcons } from './tankIcons';
import { tankModels } from './tankModels';
import { videos } from './videos';
if (!targets && !allTargets) throw new Error('No target(s) specified');
const methods = [
definitions,
tankIcons,
videos,
scratchedFlags,
currencies,
skillIcons,
circleFlags,
shellIcons,
moduleIcons,
@@ -37,9 +41,9 @@ const methods = [
consumableProvisionIcons,
camouflageIcons,
boosterIcons,
tankIcons,
tankArmors,
tankModels,
currencies,
];
for (const method of methods) {
+9 -6
View File
@@ -1,7 +1,8 @@
import { readdir } from 'fs/promises';
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import sharp from 'sharp';
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
export async function moduleIcons(production: boolean) {
@@ -16,9 +17,11 @@ export async function moduleIcons(production: boolean) {
.map(async (file) => {
const nameRaw = file.match(/vehicle(.+)\.packed\.webp\.dvpl/)![1];
const name = nameRaw[0].toLowerCase() + nameRaw.slice(1);
const content = await readBase64DVPL(
`${DATA}/${POI.moduleIcons}/${file}`,
);
const content = (
await sharp(await readDVPLFile(`${DATA}/${POI.moduleIcons}/${file}`))
.trim()
.toBuffer()
).toString('base64');
return {
content,
+2 -2
View File
@@ -1,7 +1,7 @@
import { readdir } from 'fs/promises';
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
export async function scratchedFlags(production: boolean) {
+2 -2
View File
@@ -2,8 +2,8 @@ import { readdir } from 'fs/promises';
import sharp from 'sharp';
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
export async function shellIcons(production: boolean) {
+51
View File
@@ -0,0 +1,51 @@
import sharp from 'sharp';
import { TankClass } from '../../src/components/Tanks';
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA } from './constants';
interface SkillIcon {
name: string;
state: number;
}
export interface Avatar {
roles: unknown;
skillsByClasses: Record<TankClass, string>;
skills: {
[name: string]: {
userString: string;
effectDescription: string;
tipDescription: string;
icon: SkillIcon | SkillIcon[];
type: 'continuous' | 'trigger';
};
};
}
export async function skillIcons(production: boolean) {
console.log('Building skill icons...');
const avatar = await readXMLDVPL<{ root: Avatar }>(
`${DATA}/XML/item_defs/tankmen/avatar.xml.dvpl`,
);
const changes = await Promise.all(
Object.values(avatar.root.skills).map(async (skill) => {
const icon = Array.isArray(skill.icon) ? skill.icon[0] : skill.icon;
const name = icon.name.split('/').at(-1)!.replace(/_\d$/, '');
const path = `${DATA}${icon.name.replace('~res:', '')}.packed.webp.dvpl`;
const image = sharp(await readDVPLFile(path)).trim();
const content = (await image.toBuffer()).toString('base64');
return {
content,
encoding: 'base64',
path: `icons/skills/${name}.webp`,
} satisfies FileChange;
}),
);
commitAssets('skill icons', changes, production);
}
+2 -5
View File
@@ -3,8 +3,8 @@ import { readdir } from 'fs/promises';
import { extractArmor } from '../../src/core/blitz/extractArmor';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
import { VehicleDefinitionList } from './definitions';
@@ -28,9 +28,6 @@ export async function tankArmors(production: boolean) {
if (tankKey.includes('tutorial_bot')) return;
const id = toUniqueId(nation, tank.id);
console.log(`Building armor ${id} @ ${nation}/${tankKey}`);
const model = await extractArmor(DATA, `${nation}-${tankKey}`);
changes.push({
+28 -7
View File
@@ -1,11 +1,12 @@
import { readdir } from 'fs/promises';
import sharp from 'sharp';
import { Vector3Tuple } from 'three';
import { NATION_IDS } from '../../src/constants/nations';
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
import { VehicleDefinitionList } from './definitions';
@@ -25,6 +26,20 @@ export interface TankParameters {
averageThickness?: Record<string, number>;
};
};
maskSlice?: {
[key: string]:
| {
enabled: boolean;
planePosition: Vector3Tuple;
planeNormal: Vector3Tuple;
planeAxis: Vector3Tuple;
frustumConeBaseRadius: number;
frustumConeAngleDegrees: number;
planeSliceMode: number;
frustumConeSliceMode: number;
}
| undefined;
};
}
export async function tankIcons(production: boolean) {
@@ -50,23 +65,29 @@ export async function tankIcons(production: boolean) {
const parameters = await readYAMLDVPL<TankParameters>(
`${DATA}/${POI.tankParameters}/${nation}/${tankKey}.yaml.dvpl`,
);
const small = `${DATA}/${parameters.resourcesPath.smallIconPath
const smallPath = `${DATA}/${parameters.resourcesPath.smallIconPath
.replace(/~res:\//, '')
.replace(/\..+/, '')}.packed.webp.dvpl`;
const big = `${DATA}/${parameters.resourcesPath.bigIconPath
const bigPath = `${DATA}/${parameters.resourcesPath.bigIconPath
.replace(/~res:\//, '')
.replace(/\..+/, '')}.packed.webp.dvpl`;
const big = await sharp(await readDVPLFile(bigPath))
.trim()
.toBuffer();
const small = await sharp(await readDVPLFile(smallPath))
.trim()
.toBuffer();
if (big) {
changes.push({
content: await readBase64DVPL(big),
content: big.toString('base64'),
encoding: 'base64',
path: `icons/tanks/big/${id}.webp`,
});
}
if (small) {
changes.push({
content: await readBase64DVPL(small),
content: small.toString('base64'),
encoding: 'base64',
path: `icons/tanks/small/${id}.webp`,
});
+2 -5
View File
@@ -4,8 +4,8 @@ import { extractModel } from '../../src/core/blitz/extractModel';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { FileChange } from '../../src/core/blitzkit/commitMultipleFiles';
import { DATA, POI } from './constants';
import { VehicleDefinitionList } from './definitions';
import { TankParameters } from './tankIcons';
@@ -32,9 +32,6 @@ export async function tankModels(production: boolean) {
if (tankKey.includes('tutorial_bot')) return;
const id = toUniqueId(nation, tank.id);
console.log(`Building model ${id} @ ${nation}/${tankKey}`);
const parameters = await readYAMLDVPL<TankParameters>(
`${DATA}/${POI.tankParameters}/${nation}/${tankKey}.yaml.dvpl`,
);
+142
View File
@@ -0,0 +1,142 @@
import { readdir } from 'fs/promises';
import { google } from 'googleapis';
import { cloneDeep, uniqBy } from 'lodash';
import { parse as parseYaml } from 'yaml';
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
import { VideoDefinitions } from '../../src/core/blitzkit/videos';
import { DATA, POI } from './constants';
import { BlitzStrings, botPattern, VehicleDefinitionList } from './definitions';
const youtubers = [
'UCKBYXp4Xn2I2tL1UL4fpbhw', // droodles
'UCrQ-Dy8lVsm11u8pCJ8W7Tw', // fatness
'UCxRpZqMElssTdPYDK3x7wyg', // n90
];
export async function videos(production: boolean) {
console.log('Building videos...');
const currentVideos = await fetch(
'https://raw.githubusercontent.com/tresabhi/blitzkit-assets/main/definitions/videos.csv',
)
.then((response) => response.text())
.then((lines) => {
return lines
.split('\n')
.map((line) => {
const [idString, lastUpdatedString, ...videos] = line.split(',');
const id = Number(idString);
const lastUpdated = Number(lastUpdatedString);
return { id, lastUpdated, videos };
})
.reduce<VideoDefinitions>(
(accumulator, { id, lastUpdated, videos }) => {
accumulator[id] = { lastUpdated, videos };
return accumulator;
},
{},
);
});
const auth = await google.auth.getClient({
scopes: ['https://www.googleapis.com/auth/youtube.readonly'],
});
const youtube = google.youtube({ version: 'v3', auth });
const nations = await readdir(`${DATA}/${POI.vehicleDefinitions}`).then(
(nations) => nations.filter((nation) => nation !== 'common'),
);
const stringsPreInstalled = await readYAMLDVPL<BlitzStrings>(
`${DATA}/${POI.strings}/en.yaml.dvpl`,
);
const stringsCache = await fetch(POI.cachedStrings)
.then((response) => response.text())
.then((string) => parseYaml(string) as BlitzStrings);
const strings = {
...stringsPreInstalled,
...stringsCache,
};
const tanks: { id: number; name: string; tier: number }[] = [];
await Promise.all(
nations.map(async (nation) => {
const tankList = await readXMLDVPL<{ root: VehicleDefinitionList }>(
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
);
await Promise.all(
Object.entries(tankList.root).map(async ([tankKey, tank]) => {
if (botPattern.test(tankKey)) return null;
const id = toUniqueId(nation, tank.id);
const name =
(tank.shortUserString
? strings[tank.shortUserString]
: undefined) ?? strings[tank.userString];
const tier = tank.level;
tanks.push({ id, name, tier });
}),
);
}),
);
const tanksSanitized = tanks
.sort((a, b) => b.tier - a.tier)
.sort((a, b) => {
const lastUpdatedA = currentVideos[a.id]?.lastUpdated ?? 0;
const lastUpdatedB = currentVideos[b.id]?.lastUpdated ?? 0;
return lastUpdatedA - lastUpdatedB;
});
const videos: VideoDefinitions = cloneDeep(currentVideos);
let done = 0;
for (const tank of tanksSanitized) {
try {
const results = await youtube.search.list({
part: ['snippet'],
q: `World of Tanks Blitz ${tank.name}`,
});
if (!results.data.items || results.data.items.length === 0) continue;
const items = uniqBy(
results.data.items.filter(
(item) =>
item.snippet?.channelId &&
item.id?.videoId &&
youtubers.includes(item.snippet.channelId),
),
(item) => item.snippet!.channelId,
);
videos[tank.id] = {
lastUpdated: Math.round(Date.now() / 1000),
videos: items.map((item) => item.id!.videoId!),
};
console.log(
`${++done} / ${tanks.length} (${Math.round(100 * (done / tanks.length))}%) done; found ${items.length} for ${tank.name}`,
);
await new Promise((resolve) => setTimeout(resolve, 1000 / 5));
} catch (error) {
console.warn('An error occurred, safely exiting prematurely...', error);
break;
}
}
const content = Object.entries(videos)
.map(
([id, { videos, lastUpdated }]) =>
`${id},${lastUpdated},${videos.join(',')}`,
)
.join('\n');
await commitAssets(
'videos',
[{ content, encoding: 'utf-8', path: 'definitions/videos.csv' }],
production,
);
}
+4 -4
View File
@@ -8,10 +8,10 @@ import {
import { RegionSubdomain } from '../src/constants/regions';
import { getAccountInfo } from '../src/core/blitz/getAccountInfo';
import regionSubdomainToRegion from '../src/core/blitz/regionSubdomainToRegion';
import { commitAssets } from '../src/core/blitzkrieg/commitAssets';
import { FileChange } from '../src/core/blitzkrieg/commitMultipleFiles.js';
import { patientFetchJSON } from '../src/core/blitzkrieg/patientFetchJSON';
import { superCompress } from '../src/core/blitzkrieg/superCompress';
import { commitAssets } from '../src/core/blitzkit/commitAssets';
import { FileChange } from '../src/core/blitzkit/commitMultipleFiles.js';
import { patientFetchJSON } from '../src/core/blitzkit/patientFetchJSON';
import { superCompress } from '../src/core/blitzkit/superCompress';
import {
BkrlBaseEntry,
BkrlFormat,
+127
View File
@@ -0,0 +1,127 @@
import { times } from 'lodash';
import { argv } from 'process';
import { Region, REGIONS } from '../src/constants/regions';
import { requestLimitExceededEvent } from '../src/core/blitz/fetchBlitz';
import { getAccountInfo } from '../src/core/blitz/getAccountInfo';
import { idToRegion, MIN_IDS } from '../src/core/blitz/idToRegion';
import { asset } from '../src/core/blitzkit/asset';
import { commitAssets } from '../src/core/blitzkit/commitAssets';
import { DidsReadStream, DidsWriteStream } from '../src/core/streams/dids';
const RUN_TIME = 1000 * 60 * 60 * 5.5;
const MAX_REQUESTS = 10;
const ACCOUNTS_PER_CALL = 100;
const TERMINATION_THRESHOLD = 1000;
const production = argv.includes('--production');
const startTime = Date.now();
const indexableRegions = [...REGIONS];
const preDiscoveredRaw = await fetch(
asset('definitions/ids.dids', !production),
).then(async (response) => {
if (response.status === 200) {
const buffer = await response.arrayBuffer();
return new DidsReadStream(buffer).dids();
}
return undefined;
});
console.log(`Running in ${production ? 'production' : 'development'} mode`);
if (preDiscoveredRaw === undefined) {
console.log('No pre-discovered ids found :(');
} else {
console.log(`Found ${preDiscoveredRaw.length} pre-discovered ids`);
}
const ids: number[] = [...(preDiscoveredRaw ?? [])]; // TODO: re-validate these ids
const regionalIdIndex: Record<Region, number> = {
asia: ids.find((id) => idToRegion(id) === 'asia') ?? MIN_IDS.asia,
com: ids.find((id) => idToRegion(id) === 'com') ?? MIN_IDS.com,
eu: ids.find((id) => idToRegion(id) === 'eu') ?? MIN_IDS.eu,
};
const zeroStreak: Record<Region, number> = { asia: 0, com: 0, eu: 0 };
let regionIndex = 0;
let outOfTimeFlagged = false;
async function verify(region: Region, ids: number[]) {
const infos = await getAccountInfo(region, ids, undefined, {
// cheeky way of requesting nothing
fields: 'account_id,-account_id',
});
const filtered = ids.filter((_, index) => {
const info = infos[index];
return info !== null;
});
return filtered;
}
let discardAttempts = 0;
requestLimitExceededEvent.on(() => {
discardAttempts++;
});
const interval = setInterval(async () => {
if (discardAttempts > 0) return discardAttempts--;
const region = indexableRegions[regionIndex];
const idsToVerify = times(
ACCOUNTS_PER_CALL,
(index) => regionalIdIndex[region] + index,
);
const verified = await verify(region, idsToVerify);
console.log(`${region.padEnd(4)} ${verified.length.toString().padStart(3)}`);
if (verified.length === 0) {
zeroStreak[region]++;
if (zeroStreak[region] >= TERMINATION_THRESHOLD) {
const sliceableIndex = indexableRegions.indexOf(region);
if (sliceableIndex !== -1) {
console.log(`Stopped discovery for ${region}`);
indexableRegions.splice(sliceableIndex, 1);
if (indexableRegions.length === 0) {
console.log('All players discovered exhaustively!');
post();
}
}
}
} else {
zeroStreak[region] = 0;
ids.push(...verified);
}
if (Date.now() - startTime > RUN_TIME && !outOfTimeFlagged) {
outOfTimeFlagged = true;
console.log('Out of time');
post();
}
regionIndex = (regionIndex + 1) % indexableRegions.length;
regionalIdIndex[region] += ACCOUNTS_PER_CALL;
}, 1000 / MAX_REQUESTS);
function post() {
clearInterval(interval);
console.log(`Uploading ${ids.length} ids...`);
const didsWriteStream = new DidsWriteStream().dids(ids);
const content = Buffer.from(didsWriteStream.uint8Array).toString('base64');
commitAssets(
'discovered ids',
[
{
content,
encoding: 'base64',
path: 'definitions/ids.dids',
},
],
production,
);
}
+26
View File
@@ -0,0 +1,26 @@
import { tankDefinitions } from '../src/core/blitzkit/tankDefinitions';
// random vercel bug forces require import
const { writeFileSync } = require('fs');
console.log('Building sitemap...');
const awaitedTankDefinitions = await tankDefinitions;
const values = Object.values(awaitedTankDefinitions);
const txt = values
.map((tank) => `https://blitzkit.app/tools/tankopedia/${tank.id}/`)
.join('\n');
const xml = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
${values
.map(
(tank) =>
`<url><loc>https://blitzkit.app/tools/tankopedia/${tank.id}/</loc></url>`,
)
.join('\n')}
</urlset>`;
writeFileSync('public/sitemap.txt', txt);
writeFileSync('public/sitemap.xml', xml);
console.log(`Built sitemap for ${values.length} tanks`);
+96
View File
@@ -0,0 +1,96 @@
import { chunk, times } from 'lodash';
import { compress } from 'lz4js';
import { argv } from 'process';
import { Region, REGIONS } from '../src/constants/regions';
import getTankStats from '../src/core/blitz/getTankStats';
import { idToRegion } from '../src/core/blitz/idToRegion';
import { commitAssets } from '../src/core/blitzkit/commitAssets';
import { FileChange } from '../src/core/blitzkit/commitMultipleFiles';
import {
RtscWritePlayer,
RtscWriteStream,
RtsmWriteStream,
} from '../src/core/streams/rts';
import usersRaw from '../test.users.json';
const PLAYERS_PER_CHUNK = 256;
const CHUNKS_PER_BATCH = 128;
const production = argv.includes('--production');
const region = argv
.find((argument) => argument.startsWith('--region'))
?.split('=')[1] as Region | undefined;
if (!region || !REGIONS.includes(region)) {
throw new Error('No valid region specified');
}
const today = new Date();
const todayPath = `${today.getUTCFullYear()}/${today.getUTCMonth() + 1}/${today.getUTCDate()}`;
const users = usersRaw.filter(({ blitz }) => idToRegion(blitz) === region);
const base = Math.ceil(users.length / PLAYERS_PER_CHUNK);
const chunks = times(base, (offset) => ({
offset,
users: users.filter((user) => user.blitz % base === offset),
}));
const batches = chunk(chunks, CHUNKS_PER_BATCH);
const manifestWriteStream = new RtsmWriteStream();
console.log(`Found ${users.length} players in ${region}`);
await commitAssets(
`regular tank stats manifests ${todayPath}`,
[
{
encoding: 'base64',
path: `regions/${region}/regular/tanks/${todayPath}/manifest.rtsm`,
content: Buffer.from(
compress(manifestWriteStream.rtsm(base).uint8Array),
).toString('base64'),
},
],
production,
);
let batchesDone = 0;
for (const batch of batches) {
console.log(`Batch ${++batchesDone} of ${batches.length}`);
const changes: FileChange[] = [];
let chunksDone = 0;
for (const chunk of batch) {
console.log(`Chunk ${++chunksDone} of ${chunks.length}`);
let playersDone = 0;
const players = await Promise.all(
chunk.users.map(async (user) => {
const tanks = await getTankStats(region, user.blitz);
console.log(`Player ${++playersDone} of ${chunk.users.length}`);
if (tanks === null) return null;
return {
id: user.blitz,
tanks,
} satisfies RtscWritePlayer;
}),
).then((players) => players.filter((player) => player !== null));
const writeStream = new RtscWriteStream();
writeStream.rtsc(players);
changes.push({
encoding: 'base64',
content: Buffer.from(compress(writeStream.uint8Array)).toString('base64'),
path: `regions/${region}/regular/tanks/${todayPath}/${chunk.offset}.rtsc.lz4`,
});
}
// do not await; commit in background
commitAssets(
`regular tank stats ${todayPath} batch ${batches.indexOf(batch) + 1}`,
changes,
production,
);
}
+36
View File
@@ -0,0 +1,36 @@
import AdmZip from 'adm-zip';
import { readFile } from 'fs/promises';
import { BattleResultsReadStream } from '../src/core/streams/battleResults';
interface WoTBReplayMeta {
version: string;
title: string;
dbid: string;
playerName: string;
battleStartTime: string;
playerVehicleName: string;
mapName: string;
arenaUniqueId: string;
battleDuration: number;
vehicleCompDescriptor: number;
camouflageId: number;
mapId: number;
arenaBonusType: number;
}
const file = await readFile('temp/test.wotbreplay');
const zip = new AdmZip(file);
const entries = zip.getEntries();
const metaRaw = entries.find((entry) => entry.name === 'meta.json');
const battleResultsRaw = entries.find(
(entry) => entry.name === 'battle_results.dat',
);
if (!metaRaw) throw new Error('No meta.json found');
if (!battleResultsRaw) throw new Error('No battle_results.dat found');
const meta = JSON.parse(metaRaw.getData().toString()) as WoTBReplayMeta;
const battleResults = new BattleResultsReadStream(
battleResultsRaw.getData().buffer,
).battleResults();
+62
View File
@@ -0,0 +1,62 @@
'use client';
import { Flex, Heading, Text } from '@radix-ui/themes';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import PageWrapper from '../../../components/PageWrapper';
import { mutateApp } from '../../../stores/app';
export default function Page({
params,
searchParams,
}: {
params: { provider: string };
searchParams: { [key: string]: string };
}) {
const router = useRouter();
useEffect(() => {
switch (params.provider) {
case 'wargaming': {
if (
!searchParams.expires_at ||
!searchParams.access_token ||
!searchParams.account_id
) {
break;
}
mutateApp((draft) => {
draft.login = {
expiresAt: Number(searchParams.expires_at),
id: Number(searchParams.account_id),
token: searchParams.access_token,
};
});
break;
}
default: {
console.error(`Unknown provider: ${params.provider}`);
}
}
router.push(searchParams.return ? searchParams.return : '/');
});
return (
<PageWrapper>
<Flex
style={{ flex: 1 }}
align="center"
justify="center"
direction="column"
gap="2"
>
<Heading>Verifying you...</Heading>
<Text color="gray">You'll be on your way shortly.</Text>
</Flex>
</PageWrapper>
);
}
+156
View File
@@ -0,0 +1,156 @@
'use client';
import {
AlertDialog,
Button,
Flex,
Heading,
Link,
Text,
} from '@radix-ui/themes';
import { usePathname } from 'next/navigation';
import { useEffect, useState } from 'react';
import { extendAuth } from '../../core/blitz/extendAuth';
import { logout } from '../../core/blitz/logout';
import isDev from '../../core/blitzkit/isDev';
import { isLocalhost } from '../../core/blitzkit/isLocalhost';
import { CURRENT_POLICIES_AGREEMENT_INDEX, useApp } from '../../stores/app';
const DEV_BUILD_AGREEMENT_COOLDOWN = 8 * 24 * 60 * 60 * 1000;
export function Checks() {
const [showDevBuildAlert, setShowDevBuildAlert] = useState(false);
const login = useApp((state) => state.login);
const policiesAgreementIndex = useApp(
(state) => state.policiesAgreementIndex,
);
const pathname = usePathname();
const isLegal = pathname.startsWith('/legal');
const [showPoliciesAgreement, setShowPoliciesAgreement] = useState(false);
useEffect(() => {
setShowDevBuildAlert(
isDev() &&
!isLocalhost() &&
Date.now() - useApp.getState().devBuildAgreementTime >=
DEV_BUILD_AGREEMENT_COOLDOWN,
);
}, []);
useEffect(() => {
setShowPoliciesAgreement(
policiesAgreementIndex !== CURRENT_POLICIES_AGREEMENT_INDEX && !isLegal,
);
}, [policiesAgreementIndex, isLegal]);
useEffect(() => {
if (!login) return;
const expiresIn = login.expiresAt - Date.now() / 1000;
const expiresInDays = expiresIn / 60 / 60 / 24;
if (expiresInDays < 0) {
logout();
} else if (expiresInDays < 7) {
extendAuth();
}
});
return (
<>
<AlertDialog.Root open={showDevBuildAlert}>
<AlertDialog.Content>
<AlertDialog.Title>Experimental version!</AlertDialog.Title>
<AlertDialog.Description>
This version may have a lot of issues. Report issues to{' '}
<a href="https://discord.gg/nDt7AjGJQH" target="_blank">
the official Discord server
</a>
. Also consider using{' '}
<a href="https://blitzkit.app/">the more stable release version</a>.
You will be asked again in 8 days.
</AlertDialog.Description>
<Flex justify="end">
<Button
variant="solid"
onClick={() => {
setShowDevBuildAlert(false);
useApp.setState({ devBuildAgreementTime: Date.now() });
}}
>
Continue
</Button>
</Flex>
</AlertDialog.Content>
</AlertDialog.Root>
{showPoliciesAgreement && (
<Flex
align="end"
style={{
position: 'fixed',
top: 0,
left: 0,
width: '100%',
height: '100%',
background: 'var(--color-overlay)',
zIndex: 2,
}}
>
<Flex
p="8"
style={{
width: '100%',
background: 'var(--color-panel-solid)',
}}
justify="center"
>
<Flex
align="start"
gap="4"
style={{
maxWidth: 640 * 2,
}}
direction="column"
>
<Flex direction="column" gap="2">
<Heading>
{policiesAgreementIndex === -1
? "BlitzKit's policies"
: "BlitzKit's policies have changed"}
</Heading>
<Text>
This website utilizes cookies to perform analytics and
personalize your experience. You can learn more through{' '}
<Link href="/docs/legal/privacy-policy">
our privacy policy
</Link>
. You may opt out of personalized advertizement by visiting{' '}
<Link href="https://www.google.com/settings/ads">
Google Ad Settings
</Link>
. By using BlitzKit, you also agree to our{' '}
<Link href="/docs/legal/terms-of-service">
terms of service
</Link>
.
</Text>
</Flex>
<Button
onClick={() => {
useApp.setState({
policiesAgreementIndex: CURRENT_POLICIES_AGREEMENT_INDEX,
});
}}
>
I Agree
</Button>
</Flex>
</Flex>
</Flex>
)}
</>
);
}
+50
View File
@@ -0,0 +1,50 @@
import { Flex, Heading, Text } from '@radix-ui/themes';
import { imgur } from '../../core/blitzkit/imgur';
export function Hero() {
return (
<Flex
align="center"
justify="center"
style={{
position: 'relative',
background: `url(${imgur('rUPie9G', { format: 'jpeg' })})`,
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
}}
px="4"
py="9"
>
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(var(--color-panel-translucent), var(--color-background))',
}}
/>
<Flex
direction="column"
gap="4"
align="center"
justify="center"
position="relative"
width="100%"
>
<Flex direction="column" align="center">
<Heading size="9" weight="bold" align="center">
BlitzKit
</Heading>
<Text color="gray" align="center" size="4">
Everything World of Tanks Blitz
</Text>
</Flex>
</Flex>
</Flex>
);
}
@@ -0,0 +1,38 @@
import { Table } from '@radix-ui/themes';
import Markdown from 'markdown-to-jsx';
import { use } from 'react';
import { Link } from '../../../../components/Link';
import PageWrapper from '../../../../components/PageWrapper';
import isDev from '../../../../core/blitzkit/isDev';
export default function Page({
params,
}: {
params: { document: string; directory: string };
}) {
const markdown = use(
fetch(
`https://raw.githubusercontent.com/tresabhi/blitzkit/${isDev() ? 'dev' : 'main'}/docs/${params.directory}/${params.document}.md`,
).then((response) => response.text()),
);
return (
<PageWrapper>
<Markdown
options={{
overrides: {
a: { component: Link },
table: { component: Table.Root },
thead: { component: Table.Header },
tbody: { component: Table.Body },
tr: { component: Table.Row },
th: { component: Table.ColumnHeaderCell },
td: { component: Table.Cell },
},
}}
>
{markdown}
</Markdown>
</PageWrapper>
);
}
-339
View File
@@ -1,339 +0,0 @@
'use client';
import { ContextMenu } from '@radix-ui/themes';
import { useEffect, useState } from 'react';
import * as Breakdown from '../../../components/Breakdown';
import { WARGAMING_APPLICATION_ID } from '../../../constants/wargamingApplicationID';
import fetchBlitz from '../../../core/blitz/fetchBlitz';
import { resetSession } from '../../../core/blitzkrieg/resetSession';
import {
TankDefinition,
tankDefinitions,
} from '../../../core/blitzkrieg/tankDefinitions';
import { tankAverages } from '../../../core/blitzstars/tankAverages';
import calculateWN8 from '../../../core/statistics/calculateWN8';
import { deltaTankStats } from '../../../core/statistics/deltaTankStats';
import getWN8Percentile from '../../../core/statistics/getWN8Percentile';
import mutateSession, { useSession } from '../../../stores/session';
import { IndividualTankStats, TanksStats } from '../../../types/tanksStats';
import { CustomColumnDisplay } from '../../tools/session/components/CustomColumn';
import { Menu } from '../../tools/session/components/Menu';
const REFRESH_RATE = 1 / 5;
interface SessionPageProps {
naked?: boolean;
}
export default function SessionPage({ naked = true }: SessionPageProps) {
const session = useSession();
const since = session.isTracking ? new Date(session.time) : undefined;
const [diff, setDiff] = useState<
| {
careerWN8: number;
list: {
stats: IndividualTankStats;
tankDefinitions?: TankDefinition;
career: IndividualTankStats;
currentWN8?: number;
careerWN8?: number;
}[];
}
| undefined
>(undefined);
const sessionBattles = diff?.list.reduce(
(accumulator, { stats }) => accumulator + stats.all.battles,
0,
);
const tankStatsArray = session.isTracking
? (Object.values(session.tankStats) as IndividualTankStats[])
: [];
const sessionWinrate = diff
? diff.list.reduce(
(accumulator, { stats }) => accumulator + stats.all.wins,
0,
) / sessionBattles!
: 0;
const careerBattles = tankStatsArray.reduce(
(accumulator, stats) => accumulator + stats.all.battles,
0,
);
const careerWinrate =
tankStatsArray.reduce(
(accumulator, stats) => accumulator + stats.all.wins,
0,
) / careerBattles;
const currentDamage = diff
? diff.list.reduce(
(accumulator, { stats }) => accumulator + stats.all.damage_dealt,
0,
) / sessionBattles!
: 0;
const careerDamage =
tankStatsArray.reduce(
(accumulator, stats) => accumulator + stats.all.damage_dealt,
0,
) / careerBattles;
useEffect(() => {
if (session.title === 'Untitled session') {
mutateSession((draft) => {
if (draft.isTracking) draft.title = draft.nickname;
});
}
}, [session.title]);
useEffect(() => {
async function recalculateDiff() {
if (session.isTracking) {
const { id, region } = session;
const careerRaw = await fetchBlitz<TanksStats>(
`https://api.wotblitz.${region}/wotb/tanks/stats/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`,
);
const career = careerRaw[id].reduce<
Record<number, IndividualTankStats>
>(
(accumulator, curr) => ({
...accumulator,
[curr.tank_id]: curr,
}),
{},
);
const awaitedTankDefinitions = await tankDefinitions;
const awaitedTankAverages = await tankAverages;
const careerWN8 =
careerRaw[id].reduce(
(accumulator, { tank_id, all }) =>
accumulator +
(awaitedTankAverages[tank_id] && all.battles > 0
? all.battles *
calculateWN8(awaitedTankAverages[tank_id].all, all)
: 0),
0,
) /
careerRaw[id].reduce(
(accumulator, { tank_id, all }) =>
accumulator +
(awaitedTankAverages[tank_id] && all.battles > 0
? all.battles
: 0),
0,
);
setDiff({
careerWN8,
list: (
Object.values(
deltaTankStats(session.tankStats, career, session.time / 1000),
) as IndividualTankStats[]
).map((stats) => {
return {
stats,
tankDefinitions: awaitedTankDefinitions[stats.tank_id],
career: career[stats.tank_id],
currentWN8: awaitedTankAverages[stats.tank_id]
? calculateWN8(
awaitedTankAverages[stats.tank_id].all,
stats.all,
)
: undefined,
careerWN8: awaitedTankAverages[stats.tank_id]
? calculateWN8(
awaitedTankAverages[stats.tank_id].all,
career[stats.tank_id].all,
)
: undefined,
};
}),
});
}
}
recalculateDiff();
const interval = setInterval(recalculateDiff, 1000 / REFRESH_RATE);
return () => clearInterval(interval);
}, [session]);
const totalRowStats: Record<
CustomColumnDisplay,
Breakdown.RowStatItem | undefined
> = {
battles: {
title: 'Battles',
current: sessionBattles?.toLocaleString(),
career: tankStatsArray
.reduce((accumulator, stats) => accumulator + stats.all.battles, 0)
.toLocaleString(),
},
winrate: {
title: 'Winrate',
current: sessionBattles ? `${(100 * sessionWinrate).toFixed(2)}%` : '--',
career: `${(100 * careerWinrate).toFixed(2)}%`,
delta: sessionBattles === 0 ? 0 : sessionWinrate - careerWinrate,
},
wn8: (() => {
if (!diff) return undefined;
const battlesWithWN8 = diff.list.reduce(
(accumulator, { currentWN8, stats }) =>
(currentWN8 === undefined ? 0 : stats.all.battles) + accumulator,
0,
);
const currentWN8 =
diff.list.reduce(
(accumulator, { currentWN8, stats }) =>
stats.all.battles * (currentWN8 ?? 0) + accumulator,
0,
) / battlesWithWN8!;
return {
title: 'WN8',
current: battlesWithWN8
? Math.round(currentWN8!).toLocaleString()
: '--',
percentile: battlesWithWN8 ? getWN8Percentile(currentWN8!) : undefined,
career: Math.round(diff.careerWN8).toLocaleString(),
};
})(),
damage: {
title: 'Damage',
delta: sessionBattles === 0 ? 0 : currentDamage - careerDamage,
current: sessionBattles
? Math.round(currentDamage).toLocaleString()
: '--',
career: Math.round(careerDamage).toLocaleString(),
},
none: undefined,
};
return (
<ContextMenu.Root>
<ContextMenu.Trigger>
<div>
<Breakdown.Root>
{session.showTotal &&
session.isTracking &&
since !== undefined &&
diff !== undefined && (
<Breakdown.Row
naked={naked}
color={session.color}
minimized={!session.showCareer}
title={session.title}
stats={session.customColumns.map((customColumn) => {
const rowStat = totalRowStats[customColumn.display];
if (!rowStat) return undefined;
return {
...rowStat,
delta:
customColumn.showDelta &&
rowStat.percentile === undefined
? rowStat.delta
: undefined,
};
})}
/>
)}
{diff?.list
.sort(
(a, b) => b.stats.last_battle_time - a.stats.last_battle_time,
)
.map(
({ stats, tankDefinitions, career, careerWN8, currentWN8 }) => {
const rowStats: Record<
CustomColumnDisplay,
Breakdown.RowStatItem | undefined
> = {
battles: {
title: 'Battles',
current: stats.all.battles.toLocaleString(),
career: career.all.battles.toLocaleString(),
},
winrate: {
title: 'Winrate',
current: `${(
100 *
(stats.all.wins / stats.all.battles)
).toFixed(2)}%`,
career: `${(
100 *
(career.all.wins / career.all.battles)
).toFixed(2)}%`,
delta:
stats.all.wins / stats.all.battles -
career.all.wins / career.all.battles,
},
wn8: {
title: 'WN8',
current:
currentWN8 === undefined
? undefined
: Math.round(currentWN8).toLocaleString(),
career:
careerWN8 === undefined
? undefined
: Math.round(careerWN8).toLocaleString(),
percentile:
currentWN8 === undefined
? undefined
: getWN8Percentile(currentWN8),
},
damage: {
title: 'Damage',
current: Math.round(
stats.all.damage_dealt / stats.all.battles,
).toLocaleString(),
career: Math.round(
career.all.damage_dealt / career.all.battles,
).toLocaleString(),
delta:
stats.all.damage_dealt / stats.all.battles -
career.all.damage_dealt / career.all.battles,
},
none: undefined,
};
return (
<Breakdown.Row
naked={naked}
color={session.color}
key={stats.tank_id}
minimized={!session.showCareer}
title={
tankDefinitions?.name ?? `Unknown tank ${stats.tank_id}`
}
type="tank"
tankType={tankDefinitions?.class}
treeType={tankDefinitions?.treeType}
stats={session.customColumns.map((customColumn) => {
const rowStat = rowStats[customColumn.display];
if (!rowStat) return undefined;
return {
...rowStat,
delta:
customColumn.showDelta &&
rowStat.percentile === undefined
? rowStat.delta
: undefined,
};
})}
/>
);
},
)}
</Breakdown.Root>
</div>
</ContextMenu.Trigger>
<Menu reset={resetSession} Builder={ContextMenu} />
</ContextMenu.Root>
);
}
+8
View File
@@ -0,0 +1,8 @@
*,
html {
scroll-behavior: smooth;
}
.radix-themes {
--default-font-family: var(--font-inter);
}
+45 -115
View File
@@ -1,25 +1,20 @@
'use client';
import { CaretRightIcon } from '@radix-ui/react-icons';
import { AlertDialog, Button, Flex, Text, Theme } from '@radix-ui/themes';
import { Flex, Theme } from '@radix-ui/themes';
import '@radix-ui/themes/styles.css';
import { config } from 'dotenv';
import { Roboto_Flex } from 'next/font/google';
import { usePathname } from 'next/navigation';
import { ReactNode, useEffect, useState } from 'react';
import { SkyLine } from '../assets/art/SkyLine';
import { Analytics } from '../components/Analytics';
import Navbar from '../components/Navbar';
import PageWrapper from '../components/PageWrapper';
import isDev from '../core/blitzkrieg/isDev';
import { isLocalhost } from '../core/blitzkrieg/isLocalhost';
import { useApp } from '../stores/app';
import { mintTheme } from '../themes/mint';
import { ReactNode, Suspense } from 'react';
import { Footer } from '../components/Footer';
import { Loader } from '../components/Loader';
import Navbar, { NAVBAR_HEIGHT } from '../components/Navbar';
import { Party3 } from '../components/Party3';
import { Checks } from './components/Checks';
import './layout.css';
config();
const DEV_BUILD_AGREEMENT_COOLDOWN = 8 * 24 * 60 * 60 * 1000;
interface RootLayoutProps {
children: ReactNode;
}
@@ -27,134 +22,69 @@ interface RootLayoutProps {
const robotoFlex = Roboto_Flex({
subsets: ['latin'],
display: 'swap',
variable: '--font-roboto-flex',
});
export default function RootLayout({ children }: RootLayoutProps) {
const pathname = usePathname();
const isEmbed = pathname.split('/')[1] === 'embeds';
const [showDevBuildAlert, setShowDevBuildAlert] = useState(false);
useEffect(() => {
setShowDevBuildAlert(
isDev() &&
!isLocalhost() &&
Date.now() - useApp.getState().devBuildAgreementTime >=
DEV_BUILD_AGREEMENT_COOLDOWN,
);
}, []);
const isRoot = pathname === '/';
return (
<html lang="en" className={robotoFlex.className}>
<head>
<title>Blitzkrieg</title>
<meta
name="description"
content="🎉 Tools for everything World of Tanks Blitz"
/>
<Analytics />
{isRoot && (
<>
<title>BlitzKit</title>
<meta
name="description"
content="🎉 Tools for everything World of Tanks Blitz"
/>
</>
)}
<meta property="og:site_name" content="BlitzKit" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<Party3 />
</head>
<body
style={{
margin: 0,
paddingTop: isEmbed ? 0 : '3.25rem',
backgroundColor: isEmbed ? 'transparent' : undefined,
}}
>
<Theme
appearance="dark"
panelBackground="translucent"
panelBackground="solid"
radius="full"
accentColor="amber"
suppressHydrationWarning
suppressContentEditableWarning
>
{!isEmbed && <Navbar />}
<AlertDialog.Root open={showDevBuildAlert}>
<AlertDialog.Content>
<AlertDialog.Title>Experimental version!</AlertDialog.Title>
<AlertDialog.Description>
This version may have a lot of issues. Report issues to{' '}
<a href="https://discord.gg/nDt7AjGJQH" target="_blank">
the official Discord server
</a>
. Also consider using{' '}
<a href="https://blitz-krieg.vercel.app/">
the more stable release version
</a>
. You will be asked again in 8 days.
</AlertDialog.Description>
<Flex
direction="column"
style={{
minHeight: '100vh',
paddingTop: isEmbed ? undefined : NAVBAR_HEIGHT,
}}
>
{!isEmbed && <Navbar />}
<Flex justify="end">
<Button
variant="solid"
onClick={() => {
setShowDevBuildAlert(false);
useApp.setState({ devBuildAgreementTime: Date.now() });
}}
>
Continue
</Button>
</Flex>
</AlertDialog.Content>
</AlertDialog.Root>
<Checks />
<Flex direction="column">{children}</Flex>
<Suspense
fallback={
<div style={{ flex: 1 }}>
<Loader />
</div>
}
>
{children}
</Suspense>
{!isEmbed && (
<PageWrapper>
<a
target="_blank"
href="https://ko-fi.com/tresabhi"
style={{ textDecoration: 'none' }}
>
<Flex
align="center"
style={{
padding: 16,
borderRadius: 8,
backgroundColor: mintTheme.colors.componentInteractive,
position: 'relative',
overflow: 'hidden',
}}
>
<Flex
direction="column"
gap="1"
style={{
flex: 1,
zIndex: 1,
}}
>
<Text size="4" color="mint">
Blitzkrieg. Free forever. For everyone.
</Text>
<Text color="mint">
<b>Consider supporting today 🍀</b>
</Text>
</Flex>
<Text
color="mint"
style={{
zIndex: 1,
}}
>
<Flex>
<CaretRightIcon width={32} height={32} />
</Flex>
</Text>
<SkyLine
style={{
position: 'absolute',
right: 'min(8vw, 15%)',
top: '5%',
}}
/>
</Flex>
</a>
</PageWrapper>
)}
{!isEmbed && <Footer />}
</Flex>
</Theme>
</body>
</html>
-15
View File
@@ -1,15 +0,0 @@
import { styleVariants } from '@vanilla-extract/css';
import { theme } from '../stitches.config';
export const tool = styleVariants({
enabled: {
boxShadow: `inset 0 -256px 512px -128px ${theme.colors.appBackground1}`,
':hover': {
boxShadow: `inset 0 -160px 128px -128px ${theme.colors.appBackground1}`,
},
},
disabled: {
boxShadow: `inset 0 -192px 128px -128px ${theme.colors.appBackground1}`,
},
});
+131 -77
View File
@@ -1,95 +1,149 @@
'use client';
import { CaretRightIcon, MagnifyingGlassIcon } from '@radix-ui/react-icons';
import { Flex, Text, TextField } from '@radix-ui/themes';
import { CaretRightIcon } from '@radix-ui/react-icons';
import { Box, Button, Flex, Grid, Heading, Text } from '@radix-ui/themes';
import Link from 'next/link';
import { useRef } from 'react';
import { Search, SearchItem } from 'react-fuzzysort';
import PageWrapper from '../components/PageWrapper';
import { TOOLS } from '../constants/tools';
import { theme } from '../stitches.config';
import * as styles from './page.css';
import { ImgurSize, imgur } from '../core/blitzkit/imgur';
import { Hero } from './components/Hero';
export default function Page() {
const input = useRef<HTMLInputElement>(null);
return (
<PageWrapper>
<TextField.Root>
<TextField.Slot>
<MagnifyingGlassIcon height="16" width="16" />
</TextField.Slot>
<TextField.Input ref={input} placeholder="Search tools..." />
</TextField.Root>
<>
<Hero />
<Flex gap="3" wrap="wrap" align="center" justify="center">
<Search
input={input}
list={TOOLS.map(
(tool) =>
({
node: (
<Link
href={tool.href ?? `/tools/${tool.id}`}
target={tool.href ? '_blank' : undefined}
className={
tool.disabled ? styles.tool.disabled : styles.tool.enabled
}
<PageWrapper size={1028}>
<Grid
p="4"
gap="4"
columns={{
initial: undefined,
sm: '2',
}}
flow="row-dense"
>
{TOOLS.map((tool) => {
const size = tool.significant
? ImgurSize.HugeThumbnail
: ImgurSize.LargeThumbnail;
return (
<Flex
key={tool.id}
style={{
position: 'relative',
borderRadius: 'var(--radius-2)',
overflow: 'hidden',
backgroundImage: `url(${imgur(tool.image, { format: 'jpeg', size })})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
height: tool.significant ? 'min(320px, 50vh)' : '256px',
}}
gridColumn={{
initial: undefined,
sm: tool.significant ? '1 / 3' : undefined,
}}
>
<Link
href={tool.href ?? `/tools/${tool.id}`}
style={{
display: 'flex',
width: '100%',
height: '100%',
flexDirection: 'column',
textDecoration: 'none',
color: 'inherit',
}}
>
<Box
flexGrow="1"
style={{
backgroundImage: `url(/assets/banners/${tool.id}.webp)`,
cursor: tool.disabled ? 'default' : 'pointer',
opacity: tool.disabled ? 0.25 : 1,
height: 128,
minWidth: 256,
flex: 1,
borderRadius: 8,
textDecoration: 'none',
backgroundImage: `url(${imgur(tool.image, { format: 'jpeg', size })})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
justifyContent: 'flex-end',
padding: 16,
gap: 4,
transition: `box-shadow ${theme.durations.regular}`,
}}
onClick={(event) => {
if (tool.disabled) event.preventDefault();
/>
<Flex
px={{
initial: '6',
md: tool.significant ? '8' : '6',
}}
py={{
initial: '4',
sm: tool.significant ? '6' : '4',
}}
gap="4"
align="center"
justify="between"
width="100%"
direction={{
initial: 'column',
sm: 'row',
}}
style={{
backgroundColor: 'var(--color-panel-translucent)',
backdropFilter: 'blur(64px)',
WebkitBackdropFilter: 'blur(64px)',
}}
>
<span
style={{
fontSize: 32,
color: theme.colors.textHighContrast,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
<Flex
direction="column"
justify="center"
align={{
initial: 'center',
sm: 'start',
}}
>
{tool.title}
<CaretRightIcon style={{ width: '1em', height: '1em' }} />
</span>
<span
style={{
color: theme.colors.textLowContrast,
fontSize: 16,
}}
>
{tool.disabled ? 'Coming soon!' : tool.description}
</span>
</Link>
),
query: `${tool.title} ${tool.description}`,
}) satisfies SearchItem,
)}
/>
</Flex>
<Heading
align={{
initial: 'center',
sm: 'left',
}}
size={{
initial: '6',
sm: tool.significant ? '7' : '5',
}}
weight="medium"
>
{tool.title}
</Heading>
<Text
align={{
initial: 'center',
sm: 'left',
}}
size={{
initial: '3',
sm: tool.significant ? '4' : '3',
}}
color="gray"
>
{tool.description}
</Text>
</Flex>
<Text size="1" color="gray" align="center">
Images courtesy of Wargaming Art Department
</Text>
</PageWrapper>
<Button
size={{
initial: undefined,
sm: tool.significant ? '3' : undefined,
}}
color={tool.button.color}
style={{
cursor: 'inherit',
}}
>
{tool.button.text}
<CaretRightIcon />
</Button>
</Flex>
</Link>
</Flex>
);
})}
</Grid>
</PageWrapper>
<div style={{ flex: 1 }} />
</>
);
}
+29
View File
@@ -0,0 +1,29 @@
'use client';
import { Flex, Heading, Switch, Text } from '@radix-ui/themes';
import PageWrapper from '../../components/PageWrapper';
import { useApp } from '../../stores/app';
export default function Page() {
const developerMode = useApp((state) => state.developerMode);
return (
<PageWrapper justify="center" align="center">
<Flex direction="column" gap="4">
<Flex gap="3" direction="column">
<Heading size="5">Advanced</Heading>
<Flex align="center" gap="2">
<Text>Developer mode</Text>
<Switch
checked={developerMode}
onCheckedChange={(checked) =>
useApp.setState({ developerMode: checked })
}
/>
</Flex>
</Flex>
</Flex>
</PageWrapper>
);
}
@@ -0,0 +1,76 @@
import { ExternalLinkIcon, LoopIcon, TrashIcon } from '@radix-ui/react-icons';
import { Dialog, Flex, IconButton } from '@radix-ui/themes';
import Link from 'next/link';
import { use, useState } from 'react';
import { provisionDefinitions } from '../../../../core/blitzkit/provisionDefinitions';
import { tankToCompareMember } from '../../../../core/blitzkit/tankToCompareMember';
import { mutateCompareTemporary } from '../../../../stores/compare';
import { TankSearch } from '../../tankopedia/components/TankSearch';
interface TankControlProps {
index: number;
id: number;
}
export function TankControl({ index, id }: TankControlProps) {
const awaitedProvisionDefinitions = use(provisionDefinitions);
const [switchTankDialogOpen, setSwitchTankDialogOpen] = useState(false);
return (
<Flex gap="3" justify="center" style={{ width: '100%' }}>
<IconButton
variant="ghost"
onClick={() => {
mutateCompareTemporary((draft) => {
draft.members.splice(index, 1);
draft.sorting = undefined;
});
}}
>
<TrashIcon />
</IconButton>
<Dialog.Root
open={switchTankDialogOpen}
onOpenChange={setSwitchTankDialogOpen}
>
<Dialog.Trigger>
<IconButton variant="ghost">
<LoopIcon />
</IconButton>
</Dialog.Trigger>
<Dialog.Content>
<Flex gap="4" direction="column">
<Flex
direction="column"
gap="4"
style={{ flex: 1 }}
justify="center"
>
<TankSearch
compact
onSelect={(tank) => {
mutateCompareTemporary((draft) => {
draft.members[index] = tankToCompareMember(
tank,
awaitedProvisionDefinitions,
);
draft.sorting = undefined;
});
setSwitchTankDialogOpen(false);
}}
/>
</Flex>
</Flex>
</Dialog.Content>
</Dialog.Root>
<Link href={`/tools/tankopedia/${id}`}>
<IconButton variant="ghost">
<ExternalLinkIcon />
</IconButton>
</Link>
</Flex>
);
}
File diff suppressed because it is too large. Load diff
-52
View File
@@ -1,52 +0,0 @@
import { blackA } from '@radix-ui/colors';
import { Flex, Text } from '@radix-ui/themes';
import { PuffLoader } from 'react-spinners';
import { theme } from '../../../stitches.config';
const NAV_HEIGHT = 52.65;
interface LoaderProps {
naked?: boolean;
color?: string;
progress?: number;
}
export function Loader({ naked, color, progress }: LoaderProps) {
const animation = (
<div style={{ position: 'relative' }}>
{progress !== undefined && (
<Text
style={{
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translate(calc(-50% + 5px), calc(-50% + 5px))',
}}
>
{Math.round(progress * 100)}%
</Text>
)}
<PuffLoader color={color ?? theme.colors.solidBackground} />
</div>
);
if (naked) return animation;
return (
<Flex
style={{
backgroundColor: blackA.blackA10,
position: 'fixed',
top: NAV_HEIGHT,
left: 0,
width: '100%',
height: `calc(100% - ${NAV_HEIGHT}px)`,
padding: theme.spaces.paddingMajor,
}}
align="center"
justify="center"
>
{animation}
</Flex>
);
}
+26 -6
View File
@@ -2,10 +2,10 @@
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { ReactNode, Suspense } from 'react';
import { ReactNode } from 'react';
import { TOOLS } from '../../constants/tools';
import { ImgurSize, imgur } from '../../core/blitzkit/imgur';
import { theme } from '../../stitches.config';
import { Loader } from './components/Loader';
interface ToolsLayoutProps {
children: ReactNode;
@@ -15,11 +15,31 @@ export default function ToolsLayout({ children }: ToolsLayoutProps) {
const pathname = usePathname();
const pathSplit = pathname.split('/');
const toolId = pathSplit.at(2);
const isToolRoot = pathname === `/tools/${toolId}`;
const tool = TOOLS.find((tool) => tool.id === toolId);
return (
<>
{tool && <title>{tool.title}</title>}
{tool && (
<>
{isToolRoot && (
<>
<title>{tool.title}</title>
<meta property="og:image" content={imgur(tool.image)} />
{tool.pageDescription !== undefined && (
<>
<meta name="description" content={tool.pageDescription} />
<meta
property="og:description"
content={tool.pageDescription}
/>
</>
)}
</>
)}
</>
)}
{pathSplit.length === 3 && (
<div
@@ -37,7 +57,7 @@ export default function ToolsLayout({ children }: ToolsLayoutProps) {
<div
style={{
position: 'absolute',
backgroundImage: `url(/assets/banners/${toolId}.webp)`,
backgroundImage: `url(${imgur(tool!.image, { format: 'jpeg', size: ImgurSize.HugeThumbnail })})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
width: '100%',
@@ -45,7 +65,7 @@ export default function ToolsLayout({ children }: ToolsLayoutProps) {
top: 0,
left: 0,
zIndex: -1,
filter: 'blur(4px)',
// filter: 'blur(4px)',
transform: 'scale(calc((128 + 8) / 128))',
}}
/>
@@ -73,7 +93,7 @@ export default function ToolsLayout({ children }: ToolsLayoutProps) {
</div>
)}
<Suspense fallback={<Loader />}>{children}</Suspense>
{children}
</>
);
}
@@ -3,7 +3,7 @@ import {
CaretRightIcon,
SymbolIcon,
} from '@radix-ui/react-icons';
import { Button, Flex, TextField } from '@radix-ui/themes';
import { Flex, IconButton, TextField } from '@radix-ui/themes';
import { range } from 'lodash';
import { useEffect, useRef } from 'react';
import { infiniteSpin } from './index.css';
@@ -42,7 +42,7 @@ export function PageTurner({
return (
<Flex justify="center" wrap="wrap" gap="2">
<Flex gap="2">
<Button
<IconButton
variant="soft"
onClick={() => onPageChange(Math.max(page - 1, 0), true)}
disabled={page === 0 || leftLoading}
@@ -52,33 +52,30 @@ export function PageTurner({
) : (
<CaretLeftIcon />
)}
</Button>
<TextField.Root>
</IconButton>
<TextField.Root
type="number"
ref={pageInput}
style={{ textAlign: 'center' }}
min={1}
max={pages}
onBlur={(event) => {
onPageChange(
Math.max(0, Math.min(pages - 1, event.target.valueAsNumber - 1)),
false,
);
}}
onKeyDown={(event) => {
if (event.key === 'Enter') {
(event.target as HTMLInputElement).blur();
}
}}
>
<TextField.Slot>Page</TextField.Slot>
<TextField.Input
type="number"
ref={pageInput}
style={{ width: 64, textAlign: 'center' }}
min={1}
max={pages}
onBlur={(event) => {
onPageChange(
Math.max(
0,
Math.min(pages - 1, event.target.valueAsNumber - 1),
),
false,
);
}}
onKeyDown={(event) => {
if (event.key === 'Enter') {
(event.target as HTMLInputElement).blur();
}
}}
/>
<TextField.Slot>out of {pages}</TextField.Slot>
</TextField.Root>
<Button
<IconButton
variant="soft"
onClick={() => {
onPageChange(Math.min(page + 1, pages - 1), true);
@@ -90,7 +87,7 @@ export function PageTurner({
) : (
<CaretRightIcon />
)}
</Button>
</IconButton>
</Flex>
</Flex>
);
+98 -102
View File
@@ -25,7 +25,6 @@ import {
Region,
UNLOCALIZED_REGION_NAMES,
} from '../../../constants/regions';
import { WARGAMING_APPLICATION_ID } from '../../../constants/wargamingApplicationID';
import fetchBlitz from '../../../core/blitz/fetchBlitz';
import { getClanAccountInfo } from '../../../core/blitz/getClanAccountInfo';
import getRatingInfo from '../../../core/blitz/getRatingInfo';
@@ -36,9 +35,9 @@ import {
AccountList,
AccountListItem,
} from '../../../core/blitz/searchPlayersAcrossRegions';
import { getArchivedLatestSeasonNumber } from '../../../core/blitzkrieg/getArchivedLatestSeasonNumber';
import getArchivedRatingInfo from '../../../core/blitzkrieg/getArchivedRatingInfo';
import { getArchivedRatingLeaderboard } from '../../../core/blitzkrieg/getArchivedRatingLeaderboard';
import { getArchivedLatestSeasonNumber } from '../../../core/blitzkit/getArchivedLatestSeasonNumber';
import getArchivedRatingInfo from '../../../core/blitzkit/getArchivedRatingInfo';
import { getArchivedRatingLeaderboard } from '../../../core/blitzkit/getArchivedRatingLeaderboard';
import { theme } from '../../../stitches.config';
import { PageTurner } from './components/PageTurner';
@@ -605,7 +604,7 @@ export default function Page() {
<Dialog.Content>
<Flex gap="4" justify="center">
<TextField.Input
<TextField.Root
ref={scoreInput}
type="number"
placeholder="Type a score..."
@@ -638,7 +637,7 @@ export default function Page() {
<Dialog.Content>
<Flex gap="4" justify="center">
<TextField.Input
<TextField.Root
ref={positionInput}
type="number"
placeholder="Type a position..."
@@ -759,105 +758,102 @@ export default function Page() {
<Dialog.Content>
<Flex gap="4" direction="column">
<TextField.Root>
<TextField.Root
onChange={debounce(
async (event: ChangeEvent<HTMLInputElement>) => {
const trimmedSearch = event.target.value.trim();
const encodedSearch = encodeURIComponent(trimmedSearch);
if (trimmedSearch) {
if (season === 0) {
setSearchLoading(true);
const accountList = await searchCurrentRatingPlayers(
region,
trimmedSearch,
);
const values = Object.values(accountList).filter(
(searchedPlayer) => !searchedPlayer.skip,
);
const valuesWithTypes =
values as ((typeof values)[number] & {
skip: false;
})[];
useLeaderboardCache.setState(
produce((draft: LeaderboardCache) => {
if (draft) {
values.forEach((player) => {
const playerWithTypes =
player as typeof player & { skip: false };
draft[region][season][
playerWithTypes.number - 1
] = playerWithTypes.spa_id;
});
}
}),
);
useNameCache.setState(
produce((draft: typeof names) => {
valuesWithTypes.forEach((searchedPlayer) => {
if (searchedPlayer.nickname) {
draft[region][searchedPlayer.spa_id] = {
nickname: searchedPlayer.nickname,
clan: searchedPlayer.clan_tag,
};
}
});
}),
);
setSearchResults(
valuesWithTypes.map((searchedPlayer) => ({
account_id: searchedPlayer.spa_id,
nickname: searchedPlayer.nickname,
number: searchedPlayer.number,
})),
);
setSearchLoading(false);
} else {
setSearchLoading(true);
const accountList = await fetchBlitz<AccountList>(
region,
'account/list',
{ search: encodedSearch },
);
const playerKeys = Object.keys(
leaderboard[region][season],
);
setSearchResults(
accountList
.map((searchedPlayer) => ({
...searchedPlayer,
number: parseInt(
playerKeys.find(
(indexAsString) =>
leaderboard[region][season][
parseInt(indexAsString)
] === searchedPlayer.account_id,
)!,
),
}))
.filter((player) => !Number.isNaN(player.number)),
);
setSearchLoading(false);
}
} else {
setSearchResults(undefined);
}
},
500,
)}
placeholder="Search for player..."
>
<TextField.Slot>
<MagnifyingGlassIcon height="16" width="16" />
</TextField.Slot>
<TextField.Input
onChange={debounce(
async (event: ChangeEvent<HTMLInputElement>) => {
const trimmedSearch = event.target.value.trim();
const encodedSearch = encodeURIComponent(trimmedSearch);
if (trimmedSearch) {
if (season === 0) {
setSearchLoading(true);
const accountList =
await searchCurrentRatingPlayers(
region,
trimmedSearch,
);
const values = Object.values(accountList).filter(
(searchedPlayer) => !searchedPlayer.skip,
);
const valuesWithTypes =
values as ((typeof values)[number] & {
skip: false;
})[];
useLeaderboardCache.setState(
produce((draft: LeaderboardCache) => {
if (draft) {
values.forEach((player) => {
const playerWithTypes =
player as typeof player & { skip: false };
draft[region][season][
playerWithTypes.number - 1
] = playerWithTypes.spa_id;
});
}
}),
);
useNameCache.setState(
produce((draft: typeof names) => {
valuesWithTypes.forEach((searchedPlayer) => {
if (searchedPlayer.nickname) {
draft[region][searchedPlayer.spa_id] = {
nickname: searchedPlayer.nickname,
clan: searchedPlayer.clan_tag,
};
}
});
}),
);
setSearchResults(
valuesWithTypes.map((searchedPlayer) => ({
account_id: searchedPlayer.spa_id,
nickname: searchedPlayer.nickname,
number: searchedPlayer.number,
})),
);
setSearchLoading(false);
} else {
setSearchLoading(true);
const accountList = await fetchBlitz<AccountList>(
`https://api.wotblitz.${region}/wotb/account/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${encodedSearch}`,
);
const playerKeys = Object.keys(
leaderboard[region][season],
);
setSearchResults(
accountList
.map((searchedPlayer) => ({
...searchedPlayer,
number: parseInt(
playerKeys.find(
(indexAsString) =>
leaderboard[region][season][
parseInt(indexAsString)
] === searchedPlayer.account_id,
)!,
),
}))
.filter(
(player) => !Number.isNaN(player.number),
),
);
setSearchLoading(false);
}
} else {
setSearchResults(undefined);
}
},
500,
)}
placeholder="Search for player..."
/>
</TextField.Root>
<Flex direction="column" gap="2">
@@ -1,61 +0,0 @@
import { ContextMenu, DropdownMenu } from '@radix-ui/themes';
import mutateSession, { useSession } from '../../../../stores/session';
export type CustomColumnDisplay =
| 'battles'
| 'winrate'
| 'wn8'
| 'damage'
| 'none';
const NO_DELTA: CustomColumnDisplay[] = ['battles', 'wn8', 'none'];
interface CustomColumn {
Builder: typeof DropdownMenu | typeof ContextMenu;
column: number;
}
export function CustomColumn({ column, Builder }: CustomColumn) {
const customColumn = useSession((state) => state.customColumns[column]);
return (
<Builder.Sub>
<Builder.SubTrigger>Column {column + 1}</Builder.SubTrigger>
<Builder.SubContent>
<Builder.RadioGroup
value={customColumn.display}
onValueChange={(event) =>
mutateSession((draft) => {
draft.customColumns[column].display =
event as CustomColumnDisplay;
})
}
>
<Builder.RadioItem value="battles">Battles</Builder.RadioItem>
<Builder.RadioItem value="winrate">Winrate</Builder.RadioItem>
<Builder.RadioItem value="wn8">WN8</Builder.RadioItem>
<Builder.RadioItem value="damage">Damage</Builder.RadioItem>
<Builder.RadioItem value="none">None</Builder.RadioItem>
</Builder.RadioGroup>
{!NO_DELTA.includes(customColumn.display) && (
<>
<Builder.Separator />
<Builder.CheckboxItem
checked={customColumn.showDelta}
onCheckedChange={(checked) =>
mutateSession((draft) => {
draft.customColumns[column].showDelta = checked;
})
}
>
Show delta
</Builder.CheckboxItem>
</>
)}
</Builder.SubContent>
</Builder.Sub>
);
}
-136
View File
@@ -1,136 +0,0 @@
import {
Button,
ContextMenu,
Dialog,
DropdownMenu,
Flex,
Heading,
TextField,
} from '@radix-ui/themes';
import { createColors } from 'bepaint';
import { useRef, useState } from 'react';
import {
ACCENT_COLORS,
AccentColor,
GRAY_COLORS,
GrayColor,
PALETTES,
} from '../../../../constants/radixColors';
import { useSession } from '../../../../stores/session';
import { CustomColumn } from './CustomColumn';
interface ContextMenuProps {
Builder: typeof DropdownMenu | typeof ContextMenu;
reset: () => void;
}
export function Menu({ Builder, reset }: ContextMenuProps) {
const session = useSession();
const [showTitleEditor, setShowTitleEditor] = useState(false);
const titleInput = useRef<HTMLInputElement>(null);
return (
<>
<Dialog.Root open={showTitleEditor} onOpenChange={setShowTitleEditor}>
<Dialog.Content>
<Flex direction="column" gap="4">
<Heading size="4">Edit title</Heading>
<Flex gap="2" style={{ width: '100%' }}>
<TextField.Root style={{ flex: 1 }}>
<TextField.Input
ref={titleInput}
defaultValue={session.title}
placeholder="Enter title..."
onKeyDown={(event) => {
if (event.key === 'Enter' && titleInput.current) {
setShowTitleEditor(false);
useSession.setState({ title: titleInput.current!.value });
}
}}
/>
</TextField.Root>
<Dialog.Close>
<Button
onClick={() =>
useSession.setState({ title: titleInput.current!.value })
}
>
Set
</Button>
</Dialog.Close>
</Flex>
</Flex>
</Dialog.Content>
</Dialog.Root>
<Builder.Content>
<Builder.Sub>
<Builder.SubTrigger>Accent color</Builder.SubTrigger>
<Builder.SubContent>
<Builder.RadioGroup
value={session.color}
onValueChange={(value) =>
useSession.setState({ color: value as AccentColor | GrayColor })
}
>
{[...ACCENT_COLORS, ...GRAY_COLORS].map((color) => (
<Builder.RadioItem value={color} key={color}>
<Flex gap="2" align="center">
<div
style={{
backgroundColor: createColors(PALETTES[color])
.solidBackground,
width: 16,
height: 16,
borderRadius: '100%',
}}
/>
{`${color.charAt(0).toUpperCase()}${color.slice(1)}`}
</Flex>
</Builder.RadioItem>
))}
</Builder.RadioGroup>
</Builder.SubContent>
</Builder.Sub>
<Builder.Separator />
<Builder.Item onClick={() => setShowTitleEditor(true)}>
Edit title...
</Builder.Item>
<CustomColumn Builder={Builder} column={0} />
<CustomColumn Builder={Builder} column={1} />
<CustomColumn Builder={Builder} column={2} />
<CustomColumn Builder={Builder} column={3} />
<Builder.Separator />
<Builder.CheckboxItem
checked={session.showTotal}
onCheckedChange={(checked) =>
useSession.setState({ showTotal: checked })
}
>
Show total
</Builder.CheckboxItem>
<Builder.CheckboxItem
checked={session.showCareer}
onCheckedChange={(checked) =>
useSession.setState({ showCareer: checked })
}
>
Show career
</Builder.CheckboxItem>
<Builder.Separator />
<Builder.Item color="red" onClick={reset}>
Reset
</Builder.Item>
</Builder.Content>
</>
);
}
-40
View File
@@ -1,40 +0,0 @@
import { style } from '@vanilla-extract/css';
import { theme } from '../../../stitches.config';
export const toolBar = style({
'@media': {
'screen and (min-width: 640px)': {
flexDirection: 'row',
},
},
flexDirection: 'column',
display: 'flex',
gap: 8,
});
export const toolbarButton = style({
'@media': {
'screen and (min-width: 640px)': {
flex: 0,
},
},
flex: 1,
});
export const searchButton = style({
border: 'none',
background: 'none',
fontSize: 16,
display: 'flex',
padding: 8,
alignItems: 'center',
justifyContent: 'space-between',
cursor: 'pointer',
':hover': {
backgroundColor: theme.colors.componentInteractiveHover,
borderRadius: 4,
},
});
Loaded 100 of 376 files, more files were not shown because too many files have changed in this diff. Show more