Compare commits

..
480 Commits
Author SHA1 Message Date
tresabhi 830bde1169 Merge branch 'main' of https://github.com/blitzkit/blitzkit into ue 2026-07-05 14:46:48 -05:00
tresabhi d55c9b4cd3 purge unused packages 2026-06-30 14:06:22 -05:00
tresabhi 2ee72b40ab purge some dead code 2026-06-30 14:03:34 -05:00
tresabhi 878ada0d10 some secret shit 2026-06-24 21:30:07 -05:00
tresabhi b285e9f1d0 discover servers 2026-06-24 20:21:05 -05:00
tresabhi c292ddcd6a update decorators 2026-06-23 14:41:44 -05:00
tresabhi 81cc43bd08 setup 2026-06-22 20:44:09 -05:00
tresabhi f41eeba25e idk bro 2026-06-22 20:23:51 -05:00
tresabhi 4e72ea567f Merge branch 'main' of https://github.com/blitzkit/blitzkit into ue 2026-06-17 12:35:55 -05:00
tresabhi b572ac5ea8 graphics and settings 2026-06-16 19:44:58 -05:00
tresabhi 7e2fba35d0 move characteristics 2026-06-16 14:12:59 -05:00
tresabhi e6fa17a911 tank model part as components 2026-06-14 14:37:52 -05:00
tresabhi a7d5bd6c75 center correction 2026-06-14 13:35:44 -05:00
tresabhi d424679257 undistrubed animation 2026-06-14 13:09:32 -05:00
tresabhi 4248e19f68 abstract away camera initials 2026-06-14 12:49:34 -05:00
tresabhi 59ef527967 more robust contorls 2026-06-14 12:40:42 -05:00
tresabhi 39aeba0766 first try at custom camera controls 2026-06-14 12:29:52 -05:00
tresabhi c6f8c1e6a5 lighting and correct rotation ZY swap 2026-06-13 21:13:33 -05:00
tresabhi 333c310d5b model transformations 2026-06-13 21:06:37 -05:00
tresabhi c6c0e02fea ao maps 2026-06-13 20:26:43 -05:00
tresabhi 028f4230e5 fix banner paths 2026-06-13 20:02:27 -05:00
tresabhi cf31ad8f7a implement buffer proxy caching 2026-06-13 15:08:00 -05:00
tresabhi 9418526897 fix r3f types 2026-06-13 14:53:56 -05:00
TrèsAbhi dacdc9ae53 layout 2026-06-13 09:43:56 -05:00
TrèsAbhi 30296d020b encyclopedia 2026-06-13 09:35:15 -05:00
TrèsAbhi 43b7b4159f layout 2026-06-12 23:50:24 -05:00
TrèsAbhi 1aeae3b93b submodules 2026-06-12 23:41:28 -05:00
TrèsAbhi d657cd2360 clone 2026-06-12 23:38:56 -05:00
TrèsAbhi 222746be26 game 2026-06-12 23:34:38 -05:00
TrèsAbhi 95dd73de52 protoc 2026-06-12 23:29:36 -05:00
TrèsAbhi c893fa0a03 .net 2026-06-12 23:19:12 -05:00
TrèsAbhi c0e7f2f00a bun 2026-06-12 23:16:17 -05:00
TrèsAbhi 4dce8046cb Linux 2026-06-12 23:13:47 -05:00
TrèsAbhi 7df2425f76 readme 2026-06-12 23:06:35 -05:00
tresabhi e3cf2d51cc lighting 2026-06-12 20:59:43 -05:00
tresabhi 91ac93670f more control over model parts 2026-06-12 20:22:02 -05:00
tresabhi 8a9b02e584 okay, i swear, this is actually proper grouping 2026-06-12 20:12:19 -05:00
tresabhi c16ccc4b4c proper grouping 2026-06-12 19:45:37 -05:00
tresabhi 5dc11473bb format 2026-06-12 14:36:02 -05:00
tresabhi 2213f7d032 Merge branch 'ue' of https://github.com/blitzkit/blitzkit into ue 2026-06-12 14:18:05 -05:00
tresabhi 9d12c936b4 print 2026-06-12 14:17:43 -05:00
tresabhi 3f54e467d8 names groups 2026-06-12 14:17:29 -05:00
tresabhi 3dd0c4916d recursive mesh exporitng 2026-06-12 13:43:58 -05:00
TrèsAbhi d2ee528c52 reduce 2026-06-10 22:58:38 -05:00
tresabhi 0531fbf3ef always cancel 2026-06-10 20:23:56 -05:00
tresabhi 415aab3824 chunk upload 2026-06-10 20:23:00 -05:00
tresabhi f16e508e59 keys 2026-06-10 20:15:10 -05:00
tresabhi 3299ce069e texture caching 2026-06-10 20:12:18 -05:00
tresabhi 6395dd3f3d disable fail fast 2026-06-10 19:57:17 -05:00
tresabhi 9536cd2d39 update avatars 2026-06-10 19:55:53 -05:00
tresabhi 61abddc41b oodle 2026-06-10 13:50:13 -05:00
tresabhi b23f88b8a5 more debug 2026-06-10 13:43:09 -05:00
tresabhi 007ad3be15 more debug 2026-06-10 13:36:24 -05:00
tresabhi 218684b85c add debug 2026-06-10 13:30:45 -05:00
tresabhi 2e17ed16ed only use 9x 2026-06-10 13:18:45 -05:00
tresabhi 173c476fb4 Merge branch 'main' into ue 2026-06-10 13:11:59 -05:00
tresabhi e12ba1e78f Merge branch 'ue' of https://github.com/blitzkit/blitzkit into ue 2026-06-10 12:51:10 -05:00
tresabhi 648344d7cc module selection 2026-06-10 12:51:06 -05:00
TrèsAbhi 3e0130a200 debug 2026-06-09 21:07:52 -05:00
TrèsAbhi fc0f77a459 install 9 2026-06-09 20:58:55 -05:00
TrèsAbhi 9ba6d3ca56 add js 2026-06-09 20:49:57 -05:00
TrèsAbhi ba017936fb restore 2026-06-09 20:43:24 -05:00
TrèsAbhi ac47f11460 use script 2026-06-09 20:38:45 -05:00
TrèsAbhi 507e6fe7f9 log debug 2026-06-09 20:11:44 -05:00
tresabhi 965acadc3f all objects 2026-06-09 14:00:24 -05:00
tresabhi 14a2658a83 pbr rendering 2026-06-09 13:44:25 -05:00
tresabhi 5cbe08fe1c cleaner and unique stub 2026-06-09 13:30:40 -05:00
tresabhi 05dd4dbd98 textures load!!! 2026-06-09 12:48:52 -05:00
tresabhi a348e005f7 texture discovery 2026-06-09 12:43:14 -05:00
tresabhi 62b629fe3a go higher 2026-06-08 20:25:15 -05:00
tresabhi f790d07ed6 point to textures 2026-06-08 20:24:51 -05:00
tresabhi c86b269cf2 cleanup 2026-06-08 20:14:55 -05:00
tresabhi a878a7a143 texture mapping actually works omg! 2026-06-08 19:46:18 -05:00
tresabhi 76fc900a15 context shit 2026-06-08 19:17:27 -05:00
tresabhi 667d8c8f7c i should probably commit now 2026-06-08 14:26:58 -05:00
tresabhi 9cc94635a8 the mesh loads! 2026-06-06 21:45:25 -05:00
tresabhi 39ffc6ae51 restore monogltf 2026-06-06 13:22:54 -05:00
tresabhi 4b0035345e forgot to add mono gltf 2026-06-05 20:53:39 -05:00
tresabhi ef7e002e8c this has taken hours 2026-06-05 20:53:28 -05:00
tresabhi 81e17317be remove json apis 2026-06-05 12:00:00 -05:00
tresabhi 333866a9d6 externalize game 2026-06-05 11:58:15 -05:00
tresabhi 152e0a6680 remove redundant char 2026-06-05 11:42:54 -05:00
tresabhi 417b717b63 use ids instead of name 2026-06-05 11:38:46 -05:00
tresabhi c134131127 use relative paths for api backgrounds 2026-06-05 11:36:47 -05:00
tresabhi 516df13f62 use relative static paths for media avatars 2026-06-05 11:29:21 -05:00
tresabhi 0c8bb4be21 avatars use id 2026-06-05 11:28:25 -05:00
tresabhi 1f204918a5 git Merge branch 'ue' of https://github.com/blitzkit/blitzkit into ue 2026-06-05 11:05:39 -05:00
tresabhi 0507f63177 start on models 2026-06-05 11:05:19 -05:00
TrèsAbhi 0f84ae45b6 add models 2026-06-05 09:17:41 -05:00
TrèsAbhi ff16a26bd8 use id for backgrounds 2026-06-04 21:49:26 -05:00
tresabhi 85ddedd481 tank icons 2026-06-04 20:17:31 -05:00
tresabhi 125f6c721d build chunk 2026-06-03 13:44:12 -05:00
tresabhi 4bad35239b stack tracable error messages 2026-06-03 13:39:35 -05:00
tresabhi ff7716ce6c some more stats 2026-06-03 13:37:27 -05:00
tresabhi 231e4aad0e exclude 0 item groups 2026-06-03 13:25:19 -05:00
tresabhi 632989087c clip characteristics 2026-06-03 13:00:36 -05:00
tresabhi bb0b932d26 unit rendering 2026-06-03 12:56:30 -05:00
tresabhi 3714c74394 render modules if ALT is not available, not the other way around 2026-06-02 20:09:48 -05:00
tresabhi 168e85d838 clipping potential 2026-06-02 20:08:23 -05:00
tresabhi 666f44d9e6 some units 2026-06-02 20:05:05 -05:00
tresabhi 595db8709b names and icons 2026-06-02 19:48:28 -05:00
tresabhi 18a6f30a4b closer to a square 2026-06-02 12:31:37 -05:00
tresabhi 9b8d4c4e3c final layout 2026-06-02 12:27:32 -05:00
tresabhi 73de6e3521 new basic layout 2026-06-01 13:48:16 -05:00
tresabhi 6aa14d2faf oh shit i forgot to commit... uhh i added state icons 2026-05-31 14:45:20 -05:00
tresabhi 477b9a9630 status buttons 2026-05-30 14:29:17 -05:00
tresabhi b297babde5 state buttons 2026-05-29 14:27:38 -05:00
tresabhi c854e8f7cb characteristics rendering 2026-05-29 14:16:45 -05:00
tresabhi 06832e156f names 2026-05-29 14:09:53 -05:00
tresabhi 22b77398ad grid layout 2026-05-29 14:01:12 -05:00
tresabhi 665d5c0f2d toy and items layout 2026-05-29 13:44:11 -05:00
tresabhi d9b22431fa refine layout 2026-05-28 14:13:19 -05:00
tresabhi 0a186399b6 some more tankoepdia layout 2026-05-28 14:03:27 -05:00
tresabhi d2b4cc3e7d consumable prices 2026-05-28 13:14:38 -05:00
tresabhi 885c260605 add consumable buttons 2026-05-28 12:55:11 -05:00
tresabhi f8a71feb46 use tag system for equipment 2026-05-28 12:34:14 -05:00
tresabhi 0cb4aadec3 consumable icons 2026-05-27 20:54:48 -05:00
tresabhi f58d06b3c3 remove caching 2026-05-27 08:46:58 -05:00
tresabhi 2c44bd8374 right bar 2026-05-27 08:46:13 -05:00
tresabhi 699b445f79 basic tankopedia layout 2026-05-26 12:54:12 -05:00
tresabhi 26bb350709 tooltips 2026-05-26 12:25:38 -05:00
tresabhi 6fb51e703d fix overly-aggressive tank exclusive compatibility 2026-05-26 12:07:00 -05:00
tresabhi 7a7c73d77b adrenaline inclusivitiy 2026-05-26 11:55:51 -05:00
tresabhi f945786e2f unselect all equipment button 2026-05-26 11:41:08 -05:00
tresabhi c678830fd2 pretty and visually functional stock and upgraded buttons 2026-05-26 11:36:45 -05:00
tresabhi 006b2fef78 correct flag and tank media paths 2026-05-25 14:20:46 -05:00
tresabhi 26a0c1f176 temporarily disable build steps to see caching speed 2026-05-25 14:09:09 -05:00
tresabhi 403d1e7849 update wotb vars 2026-05-25 14:04:25 -05:00
tresabhi c9d8f6b445 oops, forgot the script 2026-05-25 13:53:42 -05:00
tresabhi 73c53d6ef5 download entire game on miss 2026-05-25 13:50:37 -05:00
tresabhi f8e8fd4016 game cache fingerprinting 2026-05-25 13:43:21 -05:00
tresabhi 15b29f439a steam username and password 2026-05-25 13:31:44 -05:00
tresabhi fd96cd5975 fingerprinting 2026-05-25 13:24:11 -05:00
tresabhi 66b9a9076f set up depot downloader 2026-05-25 12:58:19 -05:00
tresabhi 746c7963de add website build 2026-05-24 12:59:42 -05:00
tresabhi ae96ae34c0 move media to /media 2026-05-24 12:55:30 -05:00
tresabhi 1f690d11c7 equipment icons 2026-05-24 12:42:08 -05:00
tresabhi 8cf3da12fa well its working now at least i guess 2026-05-23 14:30:52 -05:00
tresabhi a8ae806f8b what 2026-05-23 14:25:32 -05:00
tresabhi 8a6841adea remove 2026-05-23 13:18:52 -05:00
tresabhi 5e88f5a73d update module 2026-05-23 13:18:09 -05:00
tresabhi aa1f357538 equipment icon parsing on c# end 2026-05-22 19:42:32 -05:00
tresabhi ca270e2010 beginnings of equipment icon 2026-05-22 13:51:30 -05:00
tresabhi 17264c1adc simplify compatibility logic 2026-05-20 13:57:05 -05:00
tresabhi 2627aba938 some consumable compatibility code 2026-05-20 13:48:20 -05:00
tresabhi a2574efb9c some equipment groundwork 2026-05-20 13:09:19 -05:00
tresabhi d3ab4bac51 error wrapper hoc 2026-05-20 12:22:03 -05:00
tresabhi ad78e45f1b hocs 2026-05-20 12:17:09 -05:00
tresabhi 5ea7bbd6a1 react boundary 2026-05-19 19:02:22 -05:00
tresabhi 2b955a281b basic error screen 2026-05-19 14:38:28 -05:00
tresabhi 676601b06e use prefixed ids 2026-05-19 14:03:07 -05:00
tresabhi b81d9985ee alts and batch alignemnt 2026-05-19 13:43:43 -05:00
tresabhi d66d25a261 module wrapping 2026-05-19 13:20:54 -05:00
tresabhi 402d054b30 stuff icon 2026-05-18 17:08:12 -05:00
tresabhi 61d6d42742 hide modules for no-up 2026-05-18 16:57:21 -05:00
tresabhi 03e06b050e separate game interface import better 2026-05-18 16:45:36 -05:00
tresabhi cca46957bc apply correct media prefixes 2026-05-18 16:32:46 -05:00
tresabhi 3c92ab3a19 force latest node 2026-05-18 16:25:10 -05:00
tresabhi 6c31f663f6 better ssr checking 2026-05-18 16:21:23 -05:00
tresabhi bd140f0eda remove duplicate setup script in package.json 2026-05-18 16:00:50 -05:00
tresabhi a3d8fcb960 i feel like these are going to fail, so here they are, fixed 2026-05-18 15:58:46 -05:00
tresabhi 06304cf075 update workflow to work with build chunks 2026-05-18 15:54:07 -05:00
tresabhi 416d061df1 all paths 2026-05-18 15:33:38 -05:00
tresabhi 47c87970cd add build chiunking 2026-05-18 13:54:03 -05:00
tresabhi ff3ed9d656 remove log 2026-05-17 17:14:03 -05:00
tresabhi 4e9c3df5eb equipment stage parameters 2026-05-17 14:03:02 -05:00
tresabhi c100a1e655 cleaner equipment and modules ui 2026-05-17 13:46:53 -05:00
tresabhi 26cc0cc723 fix currency icon paths 2026-05-17 13:31:19 -05:00
tresabhi f697f94bd5 equipment selection 2026-05-17 13:29:03 -05:00
tresabhi 30fa18f0fd start of equipment ui 2026-05-17 13:19:28 -05:00
tresabhi c45af8e156 equipment data 2026-05-17 12:56:23 -05:00
tresabhi f95a6e3495 handle nested messages correctly 2026-05-17 12:16:24 -05:00
tresabhi 0e637d772e fix hac 2026-05-15 22:53:43 -05:00
tresabhi a834d48a38 update imports 2026-05-15 22:52:25 -05:00
tresabhi f550386fd9 simplify imports 2026-05-15 22:46:36 -05:00
tresabhi 0a4b81cde4 fix paths 2026-05-15 22:30:52 -05:00
tresabhi e1cc60ea5e some work on equipment 2026-05-15 21:58:30 -05:00
tresabhi a40860901b stock/upgrade buttons 2026-05-15 21:41:40 -05:00
tresabhi f3e96718eb exclusive alternate guns 2026-05-15 21:18:01 -05:00
tresabhi a00411919d patch da code 2026-05-15 18:43:08 -05:00
tresabhi b298874f0d reorganize some code 2026-05-15 18:31:17 -05:00
tresabhi 7011d4d20f bigger icons 2026-05-15 18:25:25 -05:00
tresabhi d9ce16b41a currency icons 2026-05-15 18:16:06 -05:00
tresabhi f0e0d849d5 module price rendering 2026-05-15 10:54:36 -05:00
tresabhi 6d2573ee95 softer buttons 2026-05-11 17:18:44 -05:00
tresabhi 4c77cc2282 feat: dynamic color scales 2026-05-11 17:08:44 -05:00
tresabhi 32f6916266 combined alternative modules 2026-05-11 17:00:30 -05:00
tresabhi 3a91e082d5 feat: compact icons 2026-05-11 16:49:14 -05:00
tresabhi 2184c1c703 feat: pitch limits and modules 2026-05-11 16:17:15 -05:00
tresabhi 95ad6bade7 feat: update shit 2026-05-07 22:22:29 -05:00
tresabhi 8bda4a5331 fix: keys 2026-05-05 18:11:49 -05:00
tresabhi 16c77f587a fix: separate server and client for cu mode 2026-05-05 17:43:12 -05:00
tresabhi a218c791a9 fix: tank card min width on the home page 2026-05-05 17:30:00 -05:00
tresabhi dccdf55bfc feat: simpler warning 2026-05-05 17:25:32 -05:00
tresabhi 1ba6e70c56 feat: warning 2026-05-05 17:23:22 -05:00
tresabhi 0e76184813 feat: cu flags 2026-05-05 17:11:57 -05:00
tresabhi c674da29d5 feat: cu tank icons 2026-05-05 17:08:43 -05:00
tresabhi ba4e6dfd68 feat: some implementation for client unmounted mode 2026-05-05 16:48:16 -05:00
TrèsAbhi 980fd6e50e what 2026-04-30 22:39:38 -05:00
TrèsAbhiandCopilot 44e7cd7505 feat: module icons
Co-authored-by: Copilot <[email protected]>
2026-04-29 16:27:13 -05:00
TrèsAbhiandCopilot 3a60535564 fix: null rendering
Co-authored-by: Copilot <[email protected]>
2026-04-29 15:22:12 -05:00
TrèsAbhi 9abfeb749c feat: subtler shadows in light mode 2026-04-29 15:20:19 -05:00
TrèsAbhiandCopilot 0442c789f1 feat: class, type and nation
Co-authored-by: Copilot <[email protected]>
2026-04-29 15:17:59 -05:00
TrèsAbhiandCopilot 76dc9f0742 feat: node rendering
Co-authored-by: Copilot <[email protected]>
2026-04-29 10:46:37 -05:00
TrèsAbhi ff56f1441e feat: tier rendering 2026-04-29 10:31:36 -05:00
TrèsAbhiandCopilot e3db886923 feat: game strings in characteristics
Co-authored-by: Copilot <[email protected]>
2026-04-29 10:17:53 -05:00
TrèsAbhiandCopilot 249f62759e feat: characteristics
Co-authored-by: Copilot <[email protected]>
2026-04-28 22:31:28 -05:00
TrèsAbhi 7767481633 armor groups 2026-04-28 22:19:38 -05:00
TrèsAbhi a97b1383d8 fix: patch stage 0 2026-04-28 22:15:18 -05:00
TrèsAbhi 1b224b3949 fix: upgrade requirements 2026-04-28 22:11:57 -05:00
TrèsAbhiandCopilot 018aa33a7f feat: some aggregation
Co-authored-by: Copilot <[email protected]>
2026-04-28 21:22:50 -05:00
TrèsAbhiandCopilot 4b7b8b3392 feat: module selection
Co-authored-by: Copilot <[email protected]>
2026-04-28 16:56:38 -05:00
TrèsAbhi 272824a72f fix: tool banner padding 2026-04-28 16:12:06 -05:00
TrèsAbhi ac02d65db0 fix: name width 2026-04-28 15:52:46 -05:00
TrèsAbhi 9bcaff9fd3 fix: light mode skeleton style 2026-04-28 15:50:32 -05:00
TrèsAbhiandCopilot 7b650bf39b feat: incremental loader
Co-authored-by: Copilot <[email protected]>
2026-04-28 15:31:21 -05:00
TrèsAbhi ee1ecb83b7 feat: class and type sorting 2026-04-28 15:11:20 -05:00
TrèsAbhi d6e37119a8 feat: search 2026-04-27 19:57:44 -05:00
TrèsAbhi 385cc3b6d2 feat: tier sorting 2026-04-27 19:34:06 -05:00
TrèsAbhi b4936bf13b feat: smaller tank icons 2026-04-27 14:43:49 -05:00
TrèsAbhiandCopilot e1e9403c60 fix: home pag credit
Co-authored-by: Copilot <[email protected]>
2026-04-27 14:41:00 -05:00
TrèsAbhiandCopilot 0828d50830 feat: less spamming api
Co-authored-by: Copilot <[email protected]>
2026-04-27 14:39:47 -05:00
TrèsAbhiandCopilot 0817ba18bd feat: homescreen light mode
Co-authored-by: Copilot <[email protected]>
2026-04-26 20:06:59 -05:00
TrèsAbhi 121a80d079 feat: light theme 2026-04-26 19:59:56 -05:00
TrèsAbhiandCopilot 932c414b0c fix: implement tank list on client
Co-authored-by: Copilot <[email protected]>
2026-04-26 19:44:27 -05:00
TrèsAbhiandCopilot 3a38441d42 feat: theme switching
Co-authored-by: Copilot <[email protected]>
2026-04-26 19:43:10 -05:00
TrèsAbhi 3e039d34c2 feat: grid sizing 2026-04-26 19:31:16 -05:00
TrèsAbhiandCopilot 2bae132d18 feat: tankopedia list
Co-authored-by: Copilot <[email protected]>
2026-04-26 18:19:09 -05:00
TrèsAbhi bc0004574a feat: nation flags 2026-04-26 18:02:45 -05:00
TrèsAbhi 2e208507c3 feat: simplify scrollbar 2026-04-20 21:01:54 -05:00
TrèsAbhi 33209a6d31 fix: tank names 2026-04-20 20:55:24 -05:00
TrèsAbhi 13311245a5 feat: dlcs 2026-04-20 20:51:57 -05:00
TrèsAbhi 4067357b54 fix: home-page popular tank overflow 2026-04-20 20:44:45 -05:00
TrèsAbhi fd6b69edc1 fix: missing tank icon handling 2026-04-18 00:30:21 -05:00
TrèsAbhi 2504833a29 fix: optimize async cache 2026-04-17 23:52:33 -05:00
TrèsAbhi 6d31dcb74b fix: styles of home page 2026-04-17 23:35:56 -05:00
TrèsAbhi a149af50fd fix: some more imports 2026-04-14 20:34:28 -05:00
TrèsAbhi 13927927b3 feat: update remote storage and parsing 2026-04-10 14:56:30 -05:00
TrèsAbhi 68edf520c5 fix: update imports 2026-04-09 22:07:26 -05:00
TrèsAbhi f7933a1295 fix: update builders 2026-04-09 22:05:21 -05:00
TrèsAbhi 9a1c09490f feat: import google 2026-04-09 21:59:58 -05:00
TrèsAbhi c8b5c216e3 feat: format 2026-04-09 21:53:05 -05:00
TrèsAbhi 344954513a feat: reorganize protos 2026-04-09 21:47:12 -05:00
TrèsAbhi f8029bdf67 feat: update protos 2026-04-09 21:25:02 -05:00
TrèsAbhi d9c7d31017 Merge branch 'main' into ue 2026-04-09 21:21:20 -05:00
TrèsAbhi 79dba0fe2c feat: update package 2026-04-04 22:48:41 -05:00
TrèsAbhi c0376182f8 Merge branch 'main' into ue 2026-04-04 20:25:51 -05:00
TrèsAbhi 8e3b5de249 feat: use decorators 2026-03-23 18:06:26 -05:00
TrèsAbhi 44711a58c7 feat: discrimination 2026-03-20 20:40:45 -05:00
TrèsAbhi e7337145d2 feat: some caching 2026-03-20 20:38:04 -05:00
TrèsAbhi c116b40dfc feat: some more docs 2026-03-20 19:58:56 -05:00
TrèsAbhi d88f7ad539 fix: arrays 2026-03-20 19:51:27 -05:00
TrèsAbhi b5d61cebb3 fix: omit non-source files 2026-03-20 19:33:43 -05:00
TrèsAbhi 551108e047 feat: some more docs 2026-03-20 19:13:37 -05:00
TrèsAbhi 5feec9bf1e fix: types 2026-03-20 14:57:00 -05:00
TrèsAbhi 313691d3e9 feat: better gutter and headings 2026-03-20 14:52:06 -05:00
TrèsAbhi 950c99d3d7 feat: clean 2026-03-20 14:48:38 -05:00
TrèsAbhi 80cc74a945 feat: typescript types 2026-03-20 14:43:12 -05:00
TrèsAbhi 4e586253c0 feat: smaller heaings 2026-03-19 18:48:50 -05:00
TrèsAbhi 08980158e4 fix: tool banner alignment 2026-03-19 18:47:58 -05:00
TrèsAbhi 1e917c7b89 feat: big 2026-03-19 18:45:30 -05:00
TrèsAbhi 8d3678ddcb feat: macro names 2026-03-19 18:44:00 -05:00
TrèsAbhi 6a58c5ea1d feat: form fields 2026-03-19 18:31:00 -05:00
TrèsAbhi b9bbf22f2c feat: more decoration 2026-03-19 18:26:08 -05:00
TrèsAbhi c99ed0cb53 feat: types 2026-03-19 18:17:36 -05:00
TrèsAbhi cef18d4f64 feat: see macro 2026-03-19 17:17:23 -05:00
TrèsAbhi 824169fc25 feat: zooweemama 2026-03-19 13:26:34 -05:00
TrèsAbhi 841b5708ae feat: in-heading testing 2026-03-18 20:43:41 -05:00
TrèsAbhi 8ad110f73b test 2026-03-18 18:30:06 -05:00
TrèsAbhi 0869ea09c8 fix: gap 2026-03-18 18:03:47 -05:00
TrèsAbhi 0e57943d33 feat: cleaner api rendering 2026-03-15 23:29:33 -05:00
TrèsAbhi 8b01b7c192 feat: cleaner api rendering 2026-03-15 23:23:29 -05:00
TrèsAbhi a7bd671309 feat: tank card links 2026-03-15 22:42:13 -05:00
TrèsAbhi 406ad52c8d feat: flesh out popular tanks 2026-03-15 22:37:46 -05:00
tresabhi b6c4c4e852 Merge branch 'main' into ue 2026-03-11 16:53:56 -05:00
tresabhi f193d5c503 feat: port to linux 2026-03-11 16:43:58 -05:00
tresabhi 6a06cb17a3 Merge branch 'main' into ue 2026-03-06 14:11:24 -06:00
TrèsAbhi bf218b0975 Merge branch 'main' into ue 2026-02-21 22:36:19 -06:00
TrèsAbhi 5412c479c8 Merge branch 'main' into ue 2026-02-18 19:19:21 -06:00
TrèsAbhi ccb86ae824 feat: start migration to proto for popular tanks 2026-02-11 15:13:23 -06:00
TrèsAbhi 001709c25c Merge branch 'main' into ue 2026-02-10 08:58:21 -06:00
TrèsAbhi e50b8d11bf feat: comment for future 2026-02-03 15:20:10 -06:00
TrèsAbhi ea782af079 feat: popular tanks 2026-02-03 09:04:36 -06:00
TrèsAbhi 0ebf9f6c3d feat: tank icon api 2026-02-02 22:00:46 -06:00
TrèsAbhi 6fec467ec8 feat: blitzkit cue4parse branch 2026-02-02 21:53:48 -06:00
TrèsAbhi 8b0f1cdfed update skiasharp version to latest 2026-02-02 21:42:19 -06:00
TrèsAbhi f6008bd288 feat: image 2026-02-02 20:09:46 -06:00
TrèsAbhi 1776c8fc15 feat: capture some error 2026-02-02 19:57:15 -06:00
TrèsAbhi 99f41b9805 feat: exporting 2026-02-02 19:04:54 -06:00
TrèsAbhi d4f11fc52a make mount sync 2026-02-02 18:17:25 -06:00
TrèsAbhi 750aeb39c9 reinit cue4parse 2026-02-02 18:14:02 -06:00
TrèsAbhi 0f355bc2fc make mount truely syncronous 2026-02-02 18:07:20 -06:00
TrèsAbhi 6ebd3063ed fix: remove oodle sync 2026-02-02 17:37:36 -06:00
TrèsAbhi b070cad92a SynchronousOodleHelper 2026-02-02 17:35:02 -06:00
TrèsAbhi 204fbbff59 feat: some cleanup 2026-02-02 17:28:24 -06:00
TrèsAbhi 98e7760142 feat: some syncronouse stuff 2026-02-02 17:24:20 -06:00
TrèsAbhi 6c1c088d44 feat: custom provider 2026-02-02 17:08:37 -06:00
TrèsAbhi 0b7f717057 feat: cue4parse submodule 2026-02-01 21:34:03 -06:00
TrèsAbhi 728cb43f05 feat: reading some files 2026-02-01 21:05:38 -06:00
TrèsAbhi ff02f06cbc feat: tanksDirectoryNations 2026-02-01 19:34:36 -06:00
TrèsAbhi 7a817cbe8c feat: smooth curtains 2026-02-01 12:42:52 -06:00
TrèsAbhi 58e0876aa0 feat: curtains 2026-02-01 12:41:29 -06:00
TrèsAbhi f84f846e76 feat: scroll functionality 2026-02-01 12:31:51 -06:00
TrèsAbhi ddb869e767 feat: start of scroller 2026-02-01 12:24:55 -06:00
TrèsAbhi 015d457d23 feat: proper api 2026-02-01 00:14:58 -06:00
TrèsAbhi ba6a83a9cb fix: docs 2026-02-01 00:09:06 -06:00
TrèsAbhi 689985ed93 feat: delete workflows 2026-02-01 00:06:39 -06:00
TrèsAbhi bf9262f1f1 feat: some work on footer 2026-01-31 23:21:43 -06:00
TrèsAbhi 821bd363ad feat: more groups 2026-01-31 23:06:46 -06:00
TrèsAbhi 4a9fc65e71 feat: tanks section 2026-01-31 22:54:00 -06:00
TrèsAbhi 81877f5abd feat: tank cards 2026-01-31 22:32:59 -06:00
TrèsAbhi 01eed3e045 fix: remove unused class test 2026-01-31 21:46:16 -06:00
TrèsAbhi 7bc423b570 fix: stack overflow on closing wss 2026-01-31 21:46:05 -06:00
TrèsAbhi dba56f8946 feat: blitz provider 2026-01-27 08:59:34 -06:00
TrèsAbhi c1f765d5f7 feat: setup interop 2026-01-25 21:27:24 -06:00
TrèsAbhi 7f5b5b614f feat: setup game interface 2026-01-25 19:32:30 -06:00
TrèsAbhi 5cd149b2b9 feat: higher constrast low contrast 2026-01-25 19:21:07 -06:00
TrèsAbhi 0bc2d0aaf6 feat: home page tools 2026-01-25 16:13:36 -06:00
TrèsAbhi 1dc9a341d1 fix: inconsistentcies 2026-01-25 15:57:44 -06:00
TrèsAbhi 2ad1e71176 feat: revert navbar 2026-01-25 15:55:30 -06:00
TrèsAbhi ca6973f529 feat: update protos to pre-ut4 2026-01-23 10:25:45 -06:00
TrèsAbhi 323d624ec7 feat: idk bro 2026-01-18 18:38:26 -06:00
TrèsAbhi 49f84db473 feat: recently viewed 2026-01-18 17:55:38 -06:00
TrèsAbhi 7399c402af feat: ahhhhhhhhhh 2026-01-18 15:14:26 -06:00
TrèsAbhi cbfcb29691 feat: new navbar 2026-01-18 14:51:55 -06:00
TrèsAbhi ae616fbaf3 feat: cleaner popup 2026-01-18 14:12:20 -06:00
TrèsAbhi 35275d4aa8 fix: use animation 2026-01-17 13:54:19 -06:00
TrèsAbhi dda63830ec feat: glow 2026-01-17 13:50:53 -06:00
TrèsAbhi 79b4f05809 feat: start of popup 2026-01-17 13:36:17 -06:00
TrèsAbhi b50c47b744 feat: skeleton 2026-01-16 20:37:11 -06:00
TrèsAbhi f7c6fdd861 fix: onChange 2026-01-16 20:14:47 -06:00
TrèsAbhi 47b583821e fix: hydration 2026-01-16 20:13:56 -06:00
TrèsAbhi 369ac113fa feat: custom loader 2026-01-16 19:28:10 -06:00
TrèsAbhi fc4d8b5ad0 fix: some cleanup 2026-01-16 13:17:17 -06:00
TrèsAbhi 72e1cf7d6a feat: postcss 2026-01-16 13:11:23 -06:00
TrèsAbhi dd96556e2a Change Section import to named import 2026-01-15 14:43:34 -06:00
TrèsAbhi a7ee51526a fix: reset count on change 2026-01-15 14:36:52 -06:00
TrèsAbhi 610b59f4c6 feat: search functionality 2026-01-15 14:30:40 -06:00
TrèsAbhi 63ce327458 feat: avatars search bar ui 2026-01-15 14:13:34 -06:00
TrèsAbhi 6ec7a50320 feat: lint fixes 2026-01-15 13:58:34 -06:00
TrèsAbhi 60a29ef2e7 feat: fancier navbar 2026-01-15 13:48:37 -06:00
TrèsAbhi 52c3a0abe0 feat: number indexed 2026-01-15 12:58:05 -06:00
TrèsAbhi 5bbe5c2720 feat: count badge 2026-01-15 12:55:18 -06:00
TrèsAbhi c0c6a21e43 feat: groups 2026-01-14 13:58:53 -06:00
TrèsAbhi a7f93698a6 feat: tool banners 2026-01-14 13:30:12 -06:00
TrèsAbhi 1a18058228 feat: split hooks 2026-01-14 12:41:51 -06:00
TrèsAbhi 67024daa25 fix: some cleanup 2026-01-14 12:37:42 -06:00
TrèsAbhi de6137d1a5 feat: incremtal loading 2026-01-14 12:34:28 -06:00
TrèsAbhi 11e87bd519 feat: sort 2026-01-14 11:56:44 -06:00
TrèsAbhi 3b4e089756 fix: store trimmed only in cache 2026-01-14 11:48:55 -06:00
TrèsAbhi 4a6f5845f9 feat: shadows for outlines 2026-01-13 20:49:40 -06:00
TrèsAbhi e9684ce033 feat: navbar rewrite 2026-01-13 20:33:14 -06:00
TrèsAbhi 27abf1b0de feat: string hooks 2026-01-13 20:15:55 -06:00
TrèsAbhi f5f3f70e35 feat: client side game strings 2026-01-13 13:30:09 -06:00
TrèsAbhi 2d282a3261 feat: game strings api 2026-01-13 13:18:55 -06:00
TrèsAbhi a2d0d2d8c0 feat: card styles 2026-01-13 12:46:34 -06:00
TrèsAbhi ea412086d4 feat: start of avatars 2026-01-12 14:13:21 -06:00
TrèsAbhi 455679a981 feat: some footer 2026-01-12 14:00:13 -06:00
TrèsAbhi a21bc6174d feat: some navbar 2026-01-12 13:46:58 -06:00
TrèsAbhi fae1a89402 feat: some more apis 2026-01-12 13:20:08 -06:00
TrèsAbhi 5a1a0c59f1 feat: profile and backgroud apis 2026-01-12 13:12:11 -06:00
TrèsAbhi c98271f783 feat: darker input 2026-01-12 12:48:47 -06:00
TrèsAbhi 033660c2d9 fix: webp 2026-01-11 13:48:27 -06:00
TrèsAbhi 1a639c51e1 feat: update backgrounds 2026-01-11 13:46:54 -06:00
TrèsAbhi 1366579dd1 feat: some unification 2026-01-11 13:40:01 -06:00
TrèsAbhi f5ed2c2c40 feat: concurrency 2026-01-11 11:52:28 -06:00
TrèsAbhi 1598de9f5f feat: imageProxy 2026-01-11 11:51:02 -06:00
TrèsAbhi 6f47f5cc99 feat: bumps 2026-01-10 13:49:11 -06:00
TrèsAbhi 1117dcb935 feat: links 2026-01-10 13:19:59 -06:00
TrèsAbhi 01a58f9aa8 feat: finalize tool cards 2026-01-10 13:07:59 -06:00
TrèsAbhi 9096644d51 feat: cards 2026-01-10 12:43:39 -06:00
TrèsAbhi d42fc0e3f6 Merge branch 'main' into ue 2026-01-09 14:06:57 -06:00
TrèsAbhi 17d1526b6f Merge branch 'main' into ue 2026-01-09 14:05:43 -06:00
TrèsAbhi db8ac195d4 feat: start of cards 2026-01-09 14:04:59 -06:00
TrèsAbhi c5f5f69fd6 feat: more home page 2026-01-09 13:57:28 -06:00
TrèsAbhi 44203223fd feat: server side strings 2026-01-09 13:38:00 -06:00
TrèsAbhi bdabadcd49 feat: some more styles 2026-01-09 13:02:58 -06:00
TrèsAbhi 220e4388d4 feat: start on header 2026-01-08 20:39:44 -06:00
TrèsAbhi 51b2d1ce86 feat: cleaner output 2026-01-08 20:17:11 -06:00
TrèsAbhi f3c1825c57 fix: complete protos implementation 2026-01-08 20:16:01 -06:00
TrèsAbhi 359dfcd102 feat: move some 2026-01-08 20:06:14 -06:00
TrèsAbhi 649cdd893f feat: styles 2026-01-08 20:02:24 -06:00
TrèsAbhi 0cb974acf5 feat: scales 2026-01-07 20:36:55 -06:00
TrèsAbhi 9bca5dccc7 feat: start of new protos 2026-01-04 15:35:58 -06:00
TrèsAbhi d707f1cc5d Merge branch 'main' into ue 2026-01-04 15:23:43 -06:00
TrèsAbhi 4ed4395535 feat: start of strings 2026-01-03 13:29:15 -06:00
TrèsAbhi 0209d48475 feat: backgrounds 2026-01-02 20:17:24 -06:00
TrèsAbhi 437bee4a85 feat: proxy avatars 2026-01-02 20:04:19 -06:00
TrèsAbhi 4b8e73fa57 feat: cache 2026-01-02 14:26:05 -06:00
TrèsAbhi b96f925d9a feat: avatars 2026-01-02 14:20:29 -06:00
TrèsAbhi 1551dc50fd Merge branch 'main' into ue 2026-01-02 12:51:20 -06:00
TrèsAbhi daf4cef61c feat: mode apis 2025-12-28 12:20:45 -06:00
TrèsAbhi 496e127f64 Merge branch 'main' into ue 2025-12-28 12:11:40 -06:00
TrèsAbhi da1af66c77 feat: start of mechanics 2025-12-26 20:07:22 -06:00
TrèsAbhi 01409985a2 feat: list 2025-12-26 19:43:44 -06:00
TrèsAbhi a86ac0619a feat: stop working on ranking since a lot of tanks are broken 2025-12-26 19:37:52 -06:00
TrèsAbhi 385d165512 feat: optimize tankList 2025-12-26 19:21:14 -06:00
TrèsAbhi fcfc97b964 feat: start of all tanks 2025-12-26 14:59:09 -06:00
TrèsAbhi 53d05e73a6 feat: some docs 2025-12-26 14:21:04 -06:00
TrèsAbhi 40a1eb861d feat: meta section 2025-12-26 14:14:29 -06:00
TrèsAbhi 1d3cb95b89 fix: assert wotb server 2025-12-26 11:33:04 -06:00
TrèsAbhi 010303a818 feat: camo 2025-12-24 20:30:19 -06:00
TrèsAbhi 7281b9fed0 feat: power_to_weight 2025-12-24 20:10:06 -06:00
TrèsAbhi c5785c7ae6 feat: more controllers 2025-12-24 19:57:26 -06:00
TrèsAbhi 698731cb9a feat: generalize render chars 2025-12-24 19:48:01 -06:00
TrèsAbhi 99bae8f2c5 fix: array rendering 2025-12-24 19:39:26 -06:00
TrèsAbhi 5034ec1aa0 feat: terrain hardness 2025-12-24 19:37:21 -06:00
TrèsAbhi be821c1f8b Merge branch 'ue' of https://github.com/blitzkit/blitzkit into ue 2025-12-24 19:33:04 -06:00
TrèsAbhi a364b79a9b feat: autoreloader dom 2025-12-24 19:33:01 -06:00
TrèsAbhi 0aa6e1e79a Update deployment condition for GitHub Pages 2025-12-20 20:03:27 -06:00
TrèsAbhi d2a6379131 feat: abstracted meta 2025-12-20 19:10:11 -06:00
TrèsAbhi 07ce61d19f fix: depression 2025-12-20 19:05:42 -06:00
TrèsAbhi ad9f2d8609 feat: start of pitch yaw limits 2025-12-20 19:03:57 -06:00
TrèsAbhi 57702d8a43 fix: repo 2025-12-20 18:10:24 -06:00
TrèsAbhi 9a30af3818 fix: proper pitch limits 2025-12-20 10:26:25 -06:00
TrèsAbhi 23751fbdf3 feat: dynamic dispersion 2025-12-20 10:15:23 -06:00
TrèsAbhi db6d181f78 feat: use max stage 2025-12-20 09:59:26 -06:00
TrèsAbhi 56ca4dcc61 feat: more accents 2025-12-19 22:23:03 -06:00
TrèsAbhi d08b537721 feat: some styling 2025-12-19 21:25:55 -06:00
TrèsAbhi c1a2edb489 feat: baselayout 2025-12-19 17:55:26 -06:00
TrèsAbhi 164b7fa454 feat: api renderer 2025-12-19 17:50:59 -06:00
TrèsAbhi 428483cf4c fix: disable minifySyntax 2025-12-19 16:14:36 -06:00
TrèsAbhi 89f02eb399 minifySyntax 2025-12-19 16:11:26 -06:00
TrèsAbhi 4ce127516c minifyWhitespace 2025-12-19 16:09:27 -06:00
TrèsAbhi 6f4f487dfe minifyIdentifiers 2025-12-19 16:07:34 -06:00
TrèsAbhi 57dd60e804 feat: no minify 2025-12-19 16:01:58 -06:00
TrèsAbhi d24fd2250c feat: deploy on ue 2025-12-19 15:53:30 -06:00
TrèsAbhi e00bcdfc06 feat: latest node 2025-12-19 15:51:47 -06:00
TrèsAbhi 67dd204ee6 fix: typo 2025-12-19 15:48:07 -06:00
TrèsAbhi e130583fa4 fix: build:catalogitemaccesssor 2025-12-19 15:46:40 -06:00
TrèsAbhi 6ad20a0fcf feat: cron 2025-12-19 15:44:32 -06:00
TrèsAbhi 9fad644d7a feat: workflow 2025-12-19 15:42:38 -06:00
TrèsAbhi 8cb523dd06 fix: remove pwa 2025-12-19 15:35:50 -06:00
TrèsAbhi b50ee23a26 feat: re-install 2025-12-19 15:34:16 -06:00
TrèsAbhi a973cf699b fix: cleaner stage0 hack 2025-12-19 15:26:47 -06:00
TrèsAbhi 102abf49c4 fix: default isPump 2025-12-19 15:20:58 -06:00
TrèsAbhi 8929e503ea fix: pump times 2025-12-19 15:17:45 -06:00
TrèsAbhi a2a794eb74 fix: use order instead of group 2025-12-19 15:11:33 -06:00
TrèsAbhi 2e95f5dd95 fix: unit conversion 2025-12-19 15:09:46 -06:00
TrèsAbhi 23a42230cb feat: units 2025-12-19 15:04:35 -06:00
TrèsAbhi e66daed7ae feat: dpm 2025-12-19 14:51:18 -06:00
TrèsAbhi f2d0f68f07 feat: primary_armor 2025-12-19 14:34:17 -06:00
TrèsAbhi be4af0bf84 feat: implement some 2025-12-18 21:29:10 -06:00
TrèsAbhi 15172e8b33 fix: fetch correct stages 2025-12-18 17:00:06 -06:00
TrèsAbhi c6b7918525 feat: shells 2025-12-18 16:45:02 -06:00
TrèsAbhi 4f1c4421e5 feat: some more 2025-12-18 16:29:13 -06:00
TrèsAbhi 7b830f5a71 feat: start of more attrs 2025-12-18 16:12:01 -06:00
TrèsAbhi 6ce1135835 feat: rename a bit 2025-12-18 15:30:18 -06:00
TrèsAbhi 66eaaef6de feat: implement shell attr 2025-12-18 15:07:04 -06:00
TrèsAbhi 48fbf59036 feat: override common data 2025-12-18 13:20:35 -06:00
TrèsAbhi 0e0f4fbe9f fix: find att0 correctly 2025-12-18 13:16:20 -06:00
TrèsAbhi 6ba6e10108 feat: rename 2025-12-18 13:08:42 -06:00
TrèsAbhi cf8fa4ffb4 feat: remaining stagers 2025-12-18 12:59:12 -06:00
TrèsAbhi 2b0180dce2 Merge branch 'main' into ue 2025-12-18 12:45:10 -06:00
TrèsAbhi caee848a47 Merge branch 'main' into ue 2025-12-15 22:29:11 -06:00
TrèsAbhi d01b7cf707 feat: shells 2025-12-14 22:00:45 -06:00
TrèsAbhi 8921f84c38 feat: verbose 2025-12-14 21:41:26 -06:00
TrèsAbhi 6830df01fa penetration_groups_upgrades 2025-12-14 21:38:18 -06:00
TrèsAbhi 67da59ef41 feat: start of stages 2025-12-13 23:35:38 -06:00
TrèsAbhi 036cc9915d feat: start of atts 2025-12-13 23:10:51 -06:00
TrèsAbhi 57b6ba19f0 feat: rename 2025-12-13 22:15:48 -06:00
TrèsAbhi 32b5593d07 feat: lenient strings 2025-12-13 13:16:42 -06:00
TrèsAbhi 3b757562d2 Merge branch 'main' into ue 2025-12-10 22:52:49 -06:00
TrèsAbhi 4c8c2d0868 feat: auto pick localization entity 2025-12-05 21:35:58 -06:00
TrèsAbhi b2f266401f Merge branch 'main' into ue 2025-12-05 21:23:39 -06:00
TrèsAbhi 5541eca23d feat: start of derived statistics 2025-12-01 16:51:11 -06:00
TrèsAbhi 122d65840e feat: aggregateAttributes 2025-12-01 13:09:55 -06:00
TrèsAbhi ed4b72d85c feat: upgrade stages 2025-11-30 22:26:13 -06:00
TrèsAbhi 4033e8618f feat: useAwait 2025-11-30 22:12:46 -06:00
TrèsAbhi 42cada1811 feat: move and api 2025-11-30 21:06:17 -06:00
TrèsAbhi ff7ed213c8 feat: complete 2025-11-30 21:01:53 -06:00
TrèsAbhi a0367af06b feat: start of stats 2025-11-30 20:54:36 -06:00
TrèsAbhi 58c2965c53 Merge branch 'main' into ue 2025-11-30 20:27:42 -06:00
TrèsAbhi edae41409a feat: tank data 2025-11-29 14:22:32 -06:00
TrèsAbhi 383d3a36ef feat: load tank data 2025-11-28 14:21:26 -06:00
TrèsAbhi 6a958da390 feat: implement strings 2025-11-28 14:13:03 -06:00
TrèsAbhi ef154f99d5 feat: start of scraping 2025-11-28 13:51:17 -06:00
TrèsAbhi 4a20102de3 feat: base work 2025-11-28 13:19:15 -06:00
TrèsAbhi 4e170f2917 feat: port minimal files 2025-11-28 13:03:33 -06:00
TrèsAbhi a70d788f6b feat: init ue website 2025-11-28 13:00:41 -06:00
895 changed files with 18088 additions and 36859 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
indentSize: 2
-45
View File
@@ -1,45 +0,0 @@
name: Discover IDs
on:
push:
branches: production
schedule:
- cron: 0 */6 * * *
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
discover:
name: Discover IDs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: production
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Setup Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Discover IDs
run: bun run discover-ids
env:
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
GH_TOKEN: ${{ secrets.IDS_TOKEN }}
+45 -119
View File
@@ -2,98 +2,46 @@ name: Website
on:
push:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
inputs:
branch:
description: Branch
type: choice
required: true
default: production
options:
- production
- main
environment:
description: Environment
type: choice
required: true
default: production
options:
- development
- beta
- production
- preview
- opentest
client_provider:
description: Client provider
type: choice
required: true
default: steam
options:
- steam
- zip
- wgpkg
client_source:
description: Client source
type: string
required: true
default: 444200/windows
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ inputs.environment || github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# client
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
CLIENT_PROVIDER: ${{ inputs.client_provider || 'steam' }}
CLIENT_SOURCE: ${{ inputs.client_source || '444200/windows' }}
CLIENT_DIR: ../../temp/game
# blitzkit
PUBLIC_ENVIRONMENT: ${{ inputs.environment || 'production' }}
PUBLIC_PROMOTE_OPENTEST: false
PUBLIC_STATIC_ASSET_BASE: https://assets.blitzkit.app
PUBLIC_GUIDE_WEBSITE: https://guidesblitz.com
# blitz
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
WOTB_SERVER: ${{ secrets.WOTB_SERVER }}
WOTB_VERSION: ${{ secrets.WOTB_VERSION }}
PUBLIC_WOTB_CLIENT: ../../temp/game
WOTB_USMAP: ../closed/blitz.usmap
# google
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
# wargaming
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
# steam
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
STEAM_APP: 3341250
STEAM_OS: windows
STEAM_FINGERPRINT: Manifest_UFSFiles_Win64.txt
# debug
DOTNET_EnableDiagnostics: 1
jobs:
build:
name: Build website
name: Build chunk ${{ matrix.chunk }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
chunk: [default, api]
chunk: [pages, api, media, models, textures]
steps:
- name: Free disk space
@@ -102,68 +50,46 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ inputs.branch || 'production' }}
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
- name: Setup bun
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Setup protoc
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: latest
- name: Set up Dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
- name: Set up Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GH_TOKEN }}
- name: Setup CLIs
- name: Set up project
run: |
sudo apt-get update
sudo apt-get install -y aria2 libarchive-tools
bun run setup
./scripts/setup_depot_downloader.sh
- name: Install dependencies
run: bun install
- name: Download Steam game
run: scripts/download_game.sh
- name: Download Client
run: bun run download-client
- name: Enable core dumps
run: |
ulimit -c unlimited
- name: Build
run: bun run --bun build
run: bun run build-website
env:
CHUNK: ${{ matrix.chunk }}
BUILD_CHUNK: ${{ matrix.chunk }}
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
name: chunk-${{ matrix.chunk }}
path: dist/website
- name: Trigger deployment
if: ${{ github.ref == 'refs/heads/production' }}
env:
TOKEN: ${{ secrets.GH_NODE_DEPLOY_TOKEN }}
CHUNK: ${{ matrix.chunk }}
run: |
ENV_FILE="environments/${PUBLIC_ENVIRONMENT}.json"
TARGET_REPO=$(jq -r ".nodes.\"$CHUNK\"" "$ENV_FILE")
if [ "$TARGET_REPO" == "null" ] || [ -z "$TARGET_REPO" ]; then
exit 1
fi
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $TOKEN" \
"https://api.github.com/repos/$TARGET_REPO/dispatches" \
-d "{
\"event_type\": \"deploy-pages\",
\"client_payload\": {
\"source_repo\": \"${{ github.repository }}\",
\"run_id\": \"${{ github.run_id }}\",
\"artifact_id\": \"${{ steps.upload.outputs.artifact-id }}\",
\"chunk\": \"$CHUNK\"
}
}"
path: ${{ matrix.chunk == 'pages' && 'dist/website' || format('dist/website/{0}', matrix.chunk) }}
+4 -2
View File
@@ -1,7 +1,7 @@
node_modules
_node_modules
package-lock.json
.env
*.env
/test-results/
/playwright-report/
/playwright/.cache/
@@ -22,11 +22,12 @@ depots
public/sitemap*
/firebase.json
target
# packages/core/src/protos/*.ts
packages/website-ue/src/protos/*.ts
/.vercel
.astro
.vercel
/src
/packages/bot/src/prisma
dev-dist
# Logs
logs
@@ -52,3 +53,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
*.lscache
+3
View File
@@ -1,3 +1,6 @@
[submodule "packages/closed"]
path = packages/closed
url = https://github.com/blitzkit/closed.git
[submodule "packages/cue4parse"]
path = packages/cue4parse
url = https://github.com/tresabhi/CUE4Parse.git
+3
View File
@@ -0,0 +1,3 @@
{
"tabWidth": 2
}
-4
View File
@@ -1,4 +0,0 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
-11
View File
@@ -1,11 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
-258
View File
@@ -1,258 +0,0 @@
{
"cSpell.words": [
"AABBOX",
"Abhi",
"absarc",
"accountinfo",
"adsense",
"aeson",
"alphatest",
"analyticsdata",
"analyticsreporting",
"APAC",
"apcr",
"appinfo",
"applypatches",
"artefacts",
"astrojs",
"astrolib",
"atgm",
"autocrop",
"Autoloader",
"Autoreloader",
"AYUV",
"battleresults",
"bbox",
"beforeinstallprompt",
"bepaint",
"betakrieg",
"BINORMAL",
"Binormals",
"bkni",
"BKRL",
"BKRTS",
"BKRTSMANIFEST",
"bkwd",
"blitzkit",
"blitzrinth",
"blitzstars",
"bufbuild",
"cacheable",
"Callouts",
"Camo",
"Carro",
"CCPAOPTOUT",
"CDON",
"clanid",
"classname",
"cleandist",
"closedkrieg",
"cockroackdb",
"Coef",
"Combattimento",
"cooldown",
"corelations",
"corsproxy",
"CUBEMAP",
"CUBETEXCOORD",
"customperiod",
"datasource",
"Dava",
"dbid",
"Ddpf",
"Ddsd",
"deadrail",
"debugflags",
"deburr",
"decalmask",
"decompressor",
"décor",
"dedup",
"defence",
"degressive",
"depotdownloader",
"devkrieg",
"diacriticless",
"DIDS",
"donotremove",
"drei",
"Droodles",
"dvpd",
"dvpl",
"DVPLCRC",
"dvpm",
"dxgi",
"easimon",
"echarts",
"Everytime",
"FASTNAME",
"favicons",
"flexdirection",
"fontsource",
"FOURCC",
"frameloop",
"fsformat",
"Fullscreen",
"fullstats",
"fuzzysort",
"gamemode",
"gameplay",
"glsl",
"GLTF",
"GSOR",
"gtag",
"haha",
"Herdbreaker",
"Hetz",
"highp",
"iife",
"imgur",
"immer",
"Inclusivity",
"JOINTINDEX",
"JOINTWEIGHT",
"kranvagn",
"krieg",
"Leaderboard",
"leaderboards",
"lerp",
"LINEARSIZE",
"linktarget",
"lmao",
"loadouts",
"loddist",
"lods",
"lossrate",
"Maddoxkkm",
"malum",
"mantlets",
"mediump",
"metallicness",
"metalness",
"minitelrose",
"Minotauro",
"MIPMAPCOUNT",
"mišek",
"mmnow",
"modeltransform",
"MURICA",
"nanostores",
"NEGATIVEX",
"NEGATIVEY",
"NEGATIVEZ",
"networkidle",
"NITROPAY",
"nivo",
"nmatname",
"noout",
"normalmap",
"oneof",
"oopsies",
"Oopsy",
"opentest",
"OPTML",
"otemp",
"outdir",
"outfile",
"ownedtanks",
"padder",
"partytown",
"patchnotes",
"PIXELFORMAT",
"playerachievements",
"playerinfo",
"playform",
"pngjs",
"POSITIVEX",
"POSITIVEY",
"POSITIVEZ",
"precompute",
"Promisable",
"proto",
"protobuf",
"protoc",
"protos",
"proxyclient",
"prunestrings",
"Pyogenics",
"ratingleaderboard",
"raycaster",
"Redirector",
"Relogin",
"researchable",
"Resvg",
"rizz",
"roboto",
"rtsc",
"RTSM",
"SCPG",
"scroller",
"searchclans",
"searchplayers",
"searchtanks",
"SHAREDEXP",
"SKLLD",
"sluggify",
"smoothstep",
"Smri",
"Specularity",
"SSAO",
"startcase",
"statkit",
"statsfull",
"steamapps",
"Stringifying",
"struct",
"structs",
"strvk",
"subnation",
"Synx",
"tankaverages",
"Tankerch",
"tankmen",
"tankopedia",
"tankopedias",
"tankstats",
"tauri",
"texconv",
"TEXCOORD",
"tresabhi",
"tungstentip",
"Turretless",
"TYPELESS",
"ubjson",
"Unicum",
"UNLOCALIZED",
"UNORM",
"unpickled",
"Unregistering",
"unrotate",
"unwrapper",
"userns",
"vercel",
"vickers",
"vitepress",
"Vovko",
"wargaming",
"webp",
"wgpkg",
"whitespaces",
"WHSS",
"winrate",
"wireframe",
"Woah",
"WOTB",
"wotblitz",
"wotbreplay",
"WOTINSPECTOR",
"xffn",
"xkdkw",
"XMLDVPL",
"YAMLDVPL",
"yolo",
"youtuber",
"youtubers",
"zoomable"
],
"typescript.tsdk": "node_modules\\typescript\\lib"
}
+95 -31
View File
@@ -1,41 +1,105 @@
# BlitzKit
Tools for everything and anything, World of Tanks Blitz.
Encyclopedia for World of Tanks Blitz.
This GitHub repository contains the code for BlitzKit and all its services. If you are here, looking to use BlitzKit, go to https://blitzkit.app/.
## Development
If you intend to contribute to the code, note that you may need to check out sensitive, closed-source submodules to locally develop certain aspects of BlitzKit. Communicate with `@tresabhi` on Discord to get started or discuss sensitive content, such as environment variables or submodules.
Setting up a local developer environment for BlitzKit is more complex than most projects, but this section will guide you through all the steps. If you're ever lost or confused, feel free to ask for help in [the official Discord server](https://discord.gg/nDt7AjGJQH).
## Packages
### Prerequisites
| Package | Title | Source | Memo |
| ------------------------------------ | -------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [packages/core](packages/core) | | | Mutual internal code shared between all other packages. |
| [packages/i18n](packages/i18n) | | [Crowdin](https://crowdin.com/project/blitzkrieg) | Translations served as JSON shared across all other packages, including some utility code. |
| [packages/scripts](packages/scripts) | | | CLI utilities for the development and deployment of BlitzKit services. |
| [packages/varuna](packages/varuna) | Varuna | [NPM](https://www.npmjs.com/package/varuna) | React and Astro-oriented state management library, awaiting separation from BlitzKit. Unavailable from NPM at this time. |
| [packages/website](packages/website) | BlitzKit | https://blitzkit.app | The BlitzKit website provides a wide range of tools, APIs, and interconnects all other services. |
Before you touch any code, you'll need the following.
## Submodules
#### Linux
| Submodule | Title | Source | Memo |
| ------------------------------------------------------ | --------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [submodules/blitzkit-closed](packages/blitzkit-closed) | ClosedKit | [blitzkit/closed](https://github.com/blitzkit/closed) | Closed source, sensitive code hidden from the public to prevent bad actors from abusing the game. Discuss with `@tresabhi` on Discord for **special permission** to access. |
Because Node API for .NET doesn't resolve runtime-specific object files for libraries, the entirety of the BlitzKit project is "vendor-locked" to a single OS. GitHub Actions, responsible for BlitzKit CD/CI works best with Ubuntu, thus we must also use a Linux OS.
## Environment Variables
#### Windows (Optional)
| Name | Source | BlitzKit Default | Memo |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `PUBLIC_WARGAMING_APPLICATION_ID` | [Wargaming Developer's Room](https://developers.wargaming.net/) | | Application ID needed to communicate with Wargaming APIs. |
| `PUBLIC_PROMOTE_OPENTEST` | | `false` | Optional boolean dictating whether the website advertises [the opentest subdomain of BlitzKit](https://opentest.blitzkit.app/). |
| `WOTB_GLOSSARY`, `WOTB_GLOSSARY_DOMAIN`, `WOTB_GLOSSARY_PATH` | | | |
| `PUBLIC_GOOGLE_TAG_MANAGER_ID` | [Google Tag Manager](https://tagmanager.google.com/) | `G-GL2JVHCGPQ` | Google Tag Manager's unique identifier for analytical purposes. |
| `PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID` | [Google Analytics](https://analytics.google.com/) | `430711767` | Google Analytics' unique property ID for [BlitzKit's apex domain](https://blitzkit.app/) and subdomains. |
| `GOOGLE_APPLICATION_CREDENTIALS` | [Google Cloud](https://cloud.google.com/) | | Google Cloud's API key, primarily used for ranking popular tanks and finding relevant tank review videos in Tankopedia. |
| `PUBLIC_DISCORD_SERVER_ID` | [BlitzKit Discord Server](https://discord.gg/nDt7AjGJQH) | `734786591205359697` | BlitzKit Discord Server's id. |
| `PUBLIC_ASSET_BASE` | [blitzkit/assets](https://github.com/blitzkit/assets) | `https://blitzkit.github.io/assets` | The root domain and path that serves the external assets like tank models and icons. |
| `PUBLIC_GUIDE_WEBSITE` | [GuidesBlitz](https://guidesblitz.com/) | `https://guidesblitz.com` | The website that serves the encyclopedia-like content in BlitzKit. |
| `SERVICING` | | `false` | Wether the website is down for servicing. |
| `GH_TOKEN` | [GitHub Fine-Grained Tokens](https://github.com/settings/personal-access-tokens) | | The GitHub API key used for checking out private submodules and pushing content to the asset repository. |
| `DATABASE_URL` | [CockroachDB](https://www.cockroachlabs.com/) | | The CockroachDB-SQL database URL used to link Wargaming and Discord users. |
| `WOTB_DLC_CDN` | | | |
...
#### Bun
https://bun.com/
BlitzKit is written mostly in TypeScript, with packages fetched from NPM, managed by Bun.
#### .NET
https://dotnet.microsoft.com/download/dotnet/9.0/
You'll need the .NET 9.0 SDK to build and run the interface layer between BlitzKit and your local installation of World of Tanks Blitz.
#### Protocol Buffers
https://protobuf.dev/installation/
Both BlitzKit and World of Tanks Blitz encode their APIs with Protocol Buffers.
#### World of Tanks Blitz
https://store.steampowered.com/app/444200/
You'll need an up-to-date installation of World of Tanks Blitz on your computer. You may use the same installation that you play, even on a Windows partition if you dual boot.
#### UE4SS
...
#### protodump
...
#### FModel (Optional)
...
### Set Up
Now we can start installing and initiating the code of BlitzKit.
#### Cloning
BlitzKit is a massive monorepo with a lot of submodules. You'll likely not need all the branches and commit history. So, clone with depth 1.
```bash
git clone --depth 1 https://github.com/blitzkit/blitzkit.git
cd blitzkit
git submodule update --init --recursive --depth 1
```
#### Proto Files
...
#### Mappings
...
#### Environment Variables
...
#### The Big One
...
### Modifying The Code
This is where you can start changing things and proposing them through pull requests.
#### Server
...
#### Building
...
#### Branches & Pull Requests
...
#### Updating
...
-10
View File
@@ -1,10 +0,0 @@
{
"folders": [
{
"path": ".",
},
{
"path": "C:/Program Files/WindowsApps/7458BE2C.WorldofTanksBlitz_11.1.256.0_x64__x4tje2y229k00/Data",
},
],
}
+1315 -536
View File
File diff suppressed because it is too large. Load diff
+24 -3
View File
@@ -1,6 +1,27 @@
{
"words": [
"gamemodes",
"Tankopedia"
"gltf",
"amogos",
"Tankopedia",
"uasset",
"oodle",
"blitzkit",
"webp",
"hocs",
"cooldown",
"Lods",
"Skia",
"RMAO",
"Verts",
"drei",
"frameloop",
"pointermove",
"pointerup",
"pointerdown"
],
"userWords": [
"WOTB",
"USMAP",
"favicons"
]
}
}
-20
View File
@@ -1,20 +0,0 @@
# BlitzKit 1.30.7
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
## Features
- Dragging items in the Tier List now automatically scrolls the screen if you reach the top/bottom edge of the screen
## Fixes
- [Mark Greene] Clicking on the armor multiple times with HE no longer crashes BlitzKit
- [Mark Greene] Ricochets that later intersect with external modules no longer falsely claim a successful damaging penetration
- The lighting animation no longer stops prematurely when BlitzKit is unfocused
- The spot light angle has been increased to more evenly light up larger tanks
- BlitzKit once again uses soft shadows, reducing the pixelated shadows
- Fixed the weird patterns that formed on the tracks of tanks under self-shadows
- Increased the floor size and light decay to create the illusion that the floor is infinite
- [Mark Greene] Safari no longer crashes when unloading textures for unloaded tanks
- The gun depression transition between two constraints (like often behind tanks) now uses a gentler zoned and can never be 0
- [Mark Greene] Armor plate names in Static Armor are now properly capitalized in English and translated to other languages
-9
View File
@@ -1,9 +0,0 @@
# BlitzKit 1.30.8
Support for tanks with Chinese names.
## Fixes
- The URL generator for BlitzKit now handles names that have only Chinese characters
- The Mixed Virtual File System now handles non-existent directories correctly
- Updated equipments to match the game again
-40
View File
@@ -1,40 +0,0 @@
# BlitzKit 1.31.0
This update massively upgrades BlitzKit's graphical fidelity (while making it faster) and updates the way BlitzKit deploys updates, speeding up future versions.
## Features
- Improved the performance of the Tank Sandbox in Tankopedia
- Reduced the number of lights by 25%
- Reduced the resolution of shadows by 50%
- Improved the graphical fidelity of tanks in the Tankopedia
- Added soft contact shadows below tanks
- Added sky and ground reflected lighting to the top and bottom of tanks
- Removed the fog that used to darken tanks when zoomed far away
- Made BlitzKitLand™ fade out circularly to hide the sharp edges
- Pointed the lights 1.5m above the ground
- This genuinely makes BlitzKit almost photo-realistic in my opinion
- Non-PBR tanks are now lit up brighter to accommodate for their dark textures
## Fixes
- Fixed a bug where the ambient occlusion map (a measure of how dark a part of a tank gets due to low light bounces) was applied to the color of the tank directly, making many tanks appear dark even in direct light
- Tanks with chinese characters now generate urls through transliteration
## Known Issues
- The flags found behind the selected tank in the tech tree section of the Tankopedia is offset incorrectly
## Technical Features
- BlitzKit can now calculate and store performance statistics and account details for up 10,000,000,000 players
- This will help make the BlitzKit Performance tool more accurate, and play well with an upcoming, unannounced major feature
## Technical Changes
- The `production` branch now deploys updates to `blitzkit.app` instead of the `main` branch
- `robots.txt` now disables indexing of BlitzKit variants based on the environment
- The website is now compiled in "chunks" of which the `api` chunk now takes on the task of mangling what was previously stored in `assets3`
- `assets3` will be removed in `1.31.1`, please migrate to the new `api` if you use any BlitzKit assets
- Removed the `bot` and `app` packages
- Removed Prisma
-3
View File
@@ -1,3 +0,0 @@
# BlitzKit 1.31.1
This update adds capabilities to release BlitzKit OpenTest and Preview.
+11
View File
@@ -2,6 +2,17 @@
🎉 Services for everything and anything World of Tanks Blitz
## Bot
BlitzKit is available as a Discord bot and can be [installed very easily](/guide/invite).
- Track statistics
- Find inactive players in a clan
- Lookup owned tanks
- Create embeds for streams
- Track a player/tanks statistical evolution
- ...and a variety of other similar things
## Website
Provides a bunch of very helpful tools; https://blitzkit.app/
+3
View File
@@ -0,0 +1,3 @@
# Inviting the Bot
Go to [application directory for BlitzKit](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go.
+13
View File
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.3.0",
"commands": [
"csharpier"
],
"rollForward": false
}
}
}
-17
View File
@@ -1,17 +0,0 @@
{
"robots": false,
"canonical": "https://blitzkit.app",
"paths": {
"default": null,
"api": null
},
"nodes": {
"default": "blitzkit/deploy-node-beta.blitzkit.app",
"api": "blitzkit/deploy-node-api.beta.blitzkit.app"
},
"aliases": {
"api": "https://api.beta.blitzkit.app",
"static": "https://static.beta.blitzkit.app"
}
}
-14
View File
@@ -1,14 +0,0 @@
{
"robots": false,
"canonical": "https://blitzkit.app",
"paths": {
"default": null,
"api": "api"
},
"nodes": {},
"aliases": {
"api": "/api",
"static": "https://static.blitzkit.app"
}
}
-17
View File
@@ -1,17 +0,0 @@
{
"robots": false,
"canonical": "https://blitzkit.app",
"paths": {
"default": null,
"api": null
},
"nodes": {
"default": "blitzkit/deploy-node-opentest.blitzkit.app",
"api": "blitzkit/deploy-node-api.opentest.blitzkit.app"
},
"aliases": {
"api": "https://api.opentest.blitzkit.app",
"static": "https://static.opentest.blitzkit.app"
}
}
-17
View File
@@ -1,17 +0,0 @@
{
"robots": false,
"canonical": "https://blitzkit.app",
"paths": {
"default": null,
"api": null
},
"nodes": {
"default": "blitzkit/deploy-node-preview.blitzkit.app",
"api": "blitzkit/deploy-node-api.preview.blitzkit.app"
},
"aliases": {
"api": "https://api.preview.blitzkit.app",
"static": "https://static.preview.blitzkit.app"
}
}
-17
View File
@@ -1,17 +0,0 @@
{
"robots": true,
"canonical": "https://blitzkit.app",
"paths": {
"default": null,
"api": null
},
"nodes": {
"default": "blitzkit/deploy-node-blitzkit.app",
"api": "blitzkit/deploy-node-api.blitzkit.app"
},
"aliases": {
"api": "https://api.blitzkit.app",
"static": "https://static.blitzkit.app"
}
}
+7 -10
View File
@@ -1,24 +1,21 @@
{
"name": "blitzkit",
"version": "1.31.1",
"version": "2.0.0-beta.3",
"license": "BlitzKit License",
"private": true,
"scripts": {
"dev": "cd packages/website && bun run dev",
"build": "cd packages/website && bun run build",
"discover-ids": "cd packages/scripts && bun run discover-ids",
"build-protos": "cd packages/scripts && bun run build-protos",
"record-performance": "cd packages/scripts && bun run record-performance",
"download-client": "cd packages/scripts && bun run download-client"
"setup": "chmod a+x scripts/*.sh && ./scripts/setup.sh",
"dev": "./scripts/dev.sh",
"build-game": "./scripts/build_game.sh",
"build-website": "./scripts/build_website.sh",
"discover-servers": "./scripts/discover_servers.sh"
},
"type": "module",
"workspaces": [
"packages/*"
],
"dependencies": {
"@gltf-transform/extensions": "^4.4.2",
"lz4js": "^0.2.0",
"sharp": "^0.34.5",
"prettier": "^3.8.3",
"typescript": "^5.9.3"
}
}
+4 -3
View File
@@ -8,11 +8,12 @@
"@bufbuild/protobuf": "^2.9.0",
"@octokit/plugin-throttling": "^11.0.1",
"@octokit/rest": "^22.0.0",
"@prisma/client": "^6.16.2",
"@types/adm-zip": "^0.5.7",
"@types/bun": "^1.3.14",
"@types/bun": "^1.3.1",
"@types/lodash-es": "^4.17.12",
"@types/lz4js": "^0.2.1",
"@types/three": "^0.180.0",
"@types/three": "^0.184.1",
"adm-zip": "^0.5.16",
"crc": "^4.3.2",
"dotenv": "^17.2.2",
@@ -20,7 +21,7 @@
"lodash-es": "^4.17.21",
"pickleparser": "^0.2.1",
"protobufjs": "^7.5.4",
"three": "^0.180.0",
"three": "^0.184.0",
"ts-proto": "^2.7.7",
"yaml": "^2.8.1"
}
-89
View File
@@ -1,89 +0,0 @@
import { assertSecret, EventManager } from "../blitzkit";
import { patientFetch } from "../blitzkit/patientFetch";
import type { Region } from "./regions";
const RETRY_ERRORS = ["REQUEST_LIMIT_EXCEEDED", "SOURCE_NOT_AVAILABLE"];
export const retryAbleBlitzFetchEvent = new EventManager();
export const blitzFetchQueueAvailableEvent = new EventManager();
type BlitzResponse<Data extends object> =
| {
status: "error";
error: { field: string; message: string; code: 402; value: null };
}
| {
status: "ok";
data: Data;
};
const MAX_CALLS_PER_SECOND = 10;
const queue: { url: string; resolve: (data: object) => void }[] = [];
let inProgress = 0;
function decrement() {
inProgress--;
blitzFetchQueueAvailableEvent.emit(undefined);
manageQueue();
}
async function manageQueue() {
if (queue.length > 0 && inProgress < MAX_CALLS_PER_SECOND) {
inProgress++;
const timeout = setTimeout(decrement, 1000);
const request = queue.shift()!;
const data = (await patientFetch(request.url)
.then((response) => response.json())
.catch((error) => ({ status: "error", error }))) as BlitzResponse<
typeof request.resolve
>;
if (data.status === "ok") {
request.resolve(data.data);
} else {
if (RETRY_ERRORS.includes(data.error.message)) {
retryAbleBlitzFetchEvent.emit(undefined);
clearTimeout(timeout);
setTimeout(() => {
queue.push(request);
decrement();
}, 1000 / MAX_CALLS_PER_SECOND);
} else {
clearTimeout(timeout);
decrement();
throw new Error(`Wargaming response error status: "${data.status}"`, {
cause: `Message: "${data.error.message}"\nURL: "${request.url}"`,
});
}
}
}
}
export type FetchBlitzParams = Record<string, string | number | undefined>;
export function fetchBlitz<Data extends object>(
region: Region,
path: string,
params: FetchBlitzParams = {}
) {
return new Promise<Data>((resolve) => {
queue.push({
url: `https://api.wotblitz.${region}/wotb/${path}/?${Object.entries({
application_id: assertSecret(
import.meta.env.PUBLIC_WARGAMING_APPLICATION_ID
),
...params,
})
.filter(([_, value]) => value !== undefined)
.map(([key, value]) => `${key}=${encodeURIComponent(value!)}`)
.join("&")}`,
resolve(data) {
resolve(data as Data);
},
});
manageQueue();
});
}
-11
View File
@@ -1,11 +0,0 @@
import { assertSecret } from "../blitzkit";
import type { BlitzGlossary } from "../types";
export async function fetchGlossary(locale: string) {
const response = await fetch(
`${assertSecret(
import.meta.env.WOTB_GLOSSARY_DOMAIN,
)}/${locale}${assertSecret(import.meta.env.WOTB_GLOSSARY_PATH)}`,
);
return (await response.json()) as BlitzGlossary;
}
@@ -1,35 +0,0 @@
import { fetchBlitz } from "./fetchBlitz";
import { normalizeIds } from "./normalizeIds";
import type { Region } from "./regions";
interface IndividualAccountAchievements {
achievements: {
[achievement: string]: number;
};
max_series: {
[achievement: string]: number;
};
}
export interface AccountAchievements {
[id: number]: IndividualAccountAchievements;
}
export async function getAccountAchievements<
Ids extends number | number[],
ReturnType = Ids extends number
? IndividualAccountAchievements
: IndividualAccountAchievements[],
>(region: Region, ids: Ids) {
const object = await fetchBlitz<AccountAchievements>(
region,
"account/achievements",
{ account_id: normalizeIds(ids) }
);
if (typeof ids === "number") {
return object[ids as number] as ReturnType;
} else {
return ids.map((id) => object[id]) as ReturnType;
}
}
-96
View File
@@ -1,96 +0,0 @@
import { BlitzStats } from "../statistics";
import { FetchBlitzParams, fetchBlitz } from "./fetchBlitz";
import { normalizeIds } from "./normalizeIds";
import { Region } from "./regions";
export interface SupplementaryStats {
WN8?: number;
tier?: number;
}
export interface ClanStats {
spotted: number;
max_frags_tank_id: number;
hits: number;
frags: number;
max_xp: number;
max_xp_tank_id: number;
wins: number;
losses: number;
capture_points: number;
battles: number;
damage_dealt: number;
damage_received: number;
max_frags: number;
shots: number;
frags8p: number;
xp: number;
win_and_survived: number;
survived_battles: number;
dropped_capture_points: number;
}
export interface RatingStats {
spotted: number;
calibration_battles_left: number;
hits: number;
frags: number;
recalibration_start_time: number;
mm_rating: number;
wins: number;
losses: number;
is_recalibration: boolean;
capture_points: number;
battles: number;
damage_dealt: number;
damage_received: number;
shots: number;
frags8p: number;
xp: number;
win_and_survived: number;
survived_battles: number;
dropped_capture_points: number;
}
export interface IndividualAccountInfo {
account_id: number;
created_at: number;
updated_at: number;
private: null;
last_battle_time: number;
nickname: string;
statistics: {
all: BlitzStats;
clan: ClanStats;
rating?: RatingStats;
frags: null | number;
};
}
export interface AccountInfo {
[accountId: number]: IndividualAccountInfo;
}
export async function getAccountInfo<
Ids extends number | number[],
ReturnType = Ids extends number
? IndividualAccountInfo
: IndividualAccountInfo[],
>(
region: Region,
ids: Ids,
extra: string[] = [],
params: FetchBlitzParams = {}
) {
const object = await fetchBlitz<AccountInfo>(region, "account/info", {
account_id: normalizeIds(ids),
extra: extra.length === 0 ? undefined : extra.join(","),
...params,
});
if (typeof ids === "number") {
return object[ids as number] as ReturnType;
} else {
return ids.map((id) => object[id]) as ReturnType;
}
}
@@ -1,46 +0,0 @@
import { fetchBlitz } from "./fetchBlitz";
import { normalizeIds } from "./normalizeIds";
import type { Region } from "./regions";
type IndividualClanAccountInfo = {
account_id: number;
joined_at: number;
clan_id: number;
role: string;
account_name: string;
clan?: {
members_count: number;
name: string;
created_at: number;
tag: string;
clan_id: number;
emblem_set_id: number;
};
} | null;
interface ClanAccountInfo {
[accountId: number]: IndividualClanAccountInfo;
}
export async function getClanAccountInfo<
Ids extends number | number[],
ReturnType = Ids extends number
? IndividualClanAccountInfo
: IndividualClanAccountInfo[],
>(region: Region, ids: Ids, extra: string[] = []) {
const object = await fetchBlitz<ClanAccountInfo>(
region,
"clans/accountinfo",
{
account_id: normalizeIds(ids),
extra: extra.length === 0 ? undefined : extra.join(","),
}
);
if (typeof ids === "number") {
return object[ids as number] as ReturnType;
} else {
return ids.map((id) => object[id]) as ReturnType;
}
}
-51
View File
@@ -1,51 +0,0 @@
import { fetchBlitz } from "./fetchBlitz";
import { normalizeIds } from "./normalizeIds";
import type { Region } from "./regions";
interface IndividualClanInfo {
recruiting_options: {
vehicles_level: number;
wins_ratio: number;
average_battles_per_day: number;
battles: number;
average_damage: number;
};
members_count: number;
name: string;
creator_name: string;
clan_id: number;
created_at: number;
updated_at: number;
leader_name: string;
members_ids: number[];
recruiting_policy: string;
tag: string;
is_clan_disbanded: boolean;
old_name: string;
emblem_set_id: number;
creator_id: number;
motto: string;
renamed_at: number;
old_tag: null;
leader_id: number;
description: string;
}
interface ClanInfo {
[clanId: number]: IndividualClanInfo;
}
export async function getClanInfo<
Ids extends number | number[],
ReturnType = Ids extends number ? IndividualClanInfo : IndividualClanInfo[],
>(region: Region, ids: Ids) {
const object = await fetchBlitz<ClanInfo>(region, "clans/info", {
clan_id: normalizeIds(ids),
});
if (typeof ids === "number") {
return object[ids as number] as ReturnType;
} else {
return ids.map((id) => object[id]) as ReturnType;
}
}
@@ -0,0 +1,5 @@
import { LEAGUES } from "./rating";
export function getLeagueFromScore(score: number) {
return LEAGUES.find(({ minScore }) => score >= minScore)!;
}
+42
View File
@@ -0,0 +1,42 @@
import { context } from "../blitzkit/context";
import { patientFetch } from "../blitzkit/patientFetch";
import type { RatingLeague, RatingReward } from "./rating";
import type { Region } from "./regions";
import { regionToRegionSubdomain } from "./regionToRegionSubdomain";
export type RatingInfo =
| {
detail: undefined;
title: string;
icon: string | null;
start_at: string;
finish_at: string;
current_season: number;
updated_at: string;
count: number;
rewards: RatingReward[];
leagues: RatingLeague[];
}
| { detail: { error: string } };
const cache: Partial<Record<Region, RatingInfo>> = {};
export async function getRatingInfo(region: Region) {
if (cache[region]) return cache[region]!;
const response = await patientFetch(
context === "website"
? `/api/${region}/rating/current/info`
: `https://${regionToRegionSubdomain(
region
)}.wotblitz.com/en/api/rating-leaderboards/season/`,
undefined
);
const data = (await response.json()) as RatingInfo;
cache[region] = data;
return data;
}
@@ -0,0 +1,29 @@
import { context } from "../blitzkit/context";
import { patientFetch } from "../blitzkit/patientFetch";
import type { RatingPlayer } from "../statistics";
import type { LeagueTop } from "./rating";
import type { Region } from "./regions";
import { regionToRegionSubdomain } from "./regionToRegionSubdomain";
export async function getRatingLeague(
region: Region,
league: number,
usePatientFetcher = false
) {
const fetcher = (url: string) =>
usePatientFetcher
? patientFetch(url, undefined, { cache: "no-store" })
: fetch(url, { cache: "no-store" });
const response = await fetcher(
context === "website"
? `/api/${region}/rating/current/league/${league}`
: `https://${regionToRegionSubdomain(
region
)}.wotblitz.com/en/api/rating-leaderboards/league/${league}/top/`
);
const json = await response.json();
return context === "website"
? (json as RatingPlayer[])
: (json as LeagueTop).result;
}
@@ -0,0 +1,27 @@
import { patientFetch } from "../blitzkit/patientFetch";
import { withCORSProxy } from "../blitzkit/withCORSProxy";
import type { RatingNeighbors } from "./rating";
import type { Region } from "./regions";
import { regionToRegionSubdomain } from "./regionToRegionSubdomain";
export async function getRatingNeighbors(
region: Region,
id: number,
count: number,
usePatientFetcher = false
) {
const fetcher = (url: string) =>
usePatientFetcher
? patientFetch(url, undefined, { cache: "no-store" })
: fetch(url, { cache: "no-store" });
const response = await fetcher(
withCORSProxy(
`https://${regionToRegionSubdomain(
region
)}.wotblitz.com/en/api/rating-leaderboards/user/${id}/?neighbors=${count}`
)
);
const json = (await response.json()) as RatingNeighbors;
return json;
}
-16
View File
@@ -1,16 +0,0 @@
import type { TanksStats } from "../types";
import { type FetchBlitzParams, fetchBlitz } from "./fetchBlitz";
import type { Region } from "./regions";
export async function getTankStats(
region: Region,
id: number,
params?: FetchBlitzParams
) {
const tankStats = await fetchBlitz<TanksStats>(region, "tanks/stats", {
account_id: id,
...params,
});
return tankStats[id];
}
+6 -10
View File
@@ -3,16 +3,13 @@ export * from "./clans";
export * from "./classes";
export * from "./constants";
export * from "./equipmentPrice";
export * from "./fetchBlitz";
export * from "./fetchGlossary";
export * from "./generateStats";
export * from "./getAccountAchievements";
export * from "./getAccountInfo";
export * from "./getClanAccountInfo";
export * from "./getClanInfo";
export * from "./getTankStats";
export * from "./getLeagueFromScore";
export * from "./getRatingInfo";
export * from "./getRatingLeague";
export * from "./getRatingNeighbors";
export * from "./idToRegion";
export * from "./isValidBlitzId";
export * from "./isOnGoingRatingSeason";
export * from "./nations";
export * from "./normalizeExtra";
export * from "./normalizeIds";
@@ -22,6 +19,5 @@ export * from "./readDVPL";
export * from "./regions";
export * from "./regionSubdomainToRegion";
export * from "./regionToRegionSubdomain";
export * from "./searchClansAcrossRegions";
export * from "./searchPlayersAcrossRegions";
export * from "./searchCurrentRatingPlayers";
export * from "./toUniqueId";
@@ -0,0 +1,6 @@
import { getRatingInfo } from "./getRatingInfo";
export async function isOnGoingRatingSeason() {
const ratingInfo = await getRatingInfo("com");
return ratingInfo.detail === undefined;
}
-32
View File
@@ -1,32 +0,0 @@
import { assertSecret } from "../blitzkit";
import { idToRegion } from "./idToRegion";
import { Region } from "./regions";
export async function isValidBlitzId(id: number, token?: string) {
let region: Region;
try {
region = idToRegion(id);
} catch (error) {
return false;
}
const json = await fetch(
`https://api.wotblitz.${region}/wotb/account/info/?account_id=${id}&application_id=${assertSecret(
import.meta.env.PUBLIC_WARGAMING_APPLICATION_ID
)}${
token === undefined ? "" : `&access_token=${token}`
}&fields=account_id%2C-account_id`
).then(
(response) =>
response.json() as Promise<
| {
status: "ok";
data: Record<number, {} | null>;
}
| { status: "error" }
>
);
return json.status === "ok" && json.data[id] !== null;
}
@@ -1,51 +0,0 @@
import type { ClanList } from "./clans";
import { fetchBlitz } from "./fetchBlitz";
import type { Region } from "./regions";
export async function searchClansAcrossRegions(search: string, limit = 25) {
const trimmed = search.trim();
if (trimmed.length < 3 && trimmed.length > 100) return [];
const normalizedLimit = Math.floor(limit / 3);
// TODO: remove splice once wargaming fixes the functionality of the limit felid
return (
await Promise.all([
fetchBlitz<ClanList>("com", "clans/list", {
search,
limit: normalizedLimit,
}).then((value) =>
value
.map((account) => ({
...account,
region: "com" as Region,
}))
.splice(0, normalizedLimit)
),
fetchBlitz<ClanList>("eu", "clans/list", {
search,
limit: normalizedLimit,
}).then((value) =>
value
.map((account) => ({
...account,
region: "eu" as Region,
}))
.splice(0, normalizedLimit)
),
fetchBlitz<ClanList>("asia", "clans/list", {
search,
limit: normalizedLimit,
}).then((value) =>
value
.map((account) => ({
...account,
region: "asia" as Region,
}))
.splice(0, normalizedLimit)
),
])
)
.filter(Boolean)
.flat();
}
@@ -0,0 +1,40 @@
import { context } from "../blitzkit/context";
import { type Region } from "./regions";
import { regionToRegionSubdomain } from "./regionToRegionSubdomain";
type CurrentRatingPlayerSearch = Record<
number,
{
spa_id: number;
nickname: string;
clan_tag: string;
} & (
| {
skip: true;
}
| {
skip: false;
mmr: number;
season_number: number;
calibrationBattlesLeft: number;
number: number;
updated_at: string;
neighbors: [];
}
)
>;
export async function searchCurrentRatingPlayers(region: Region, name: string) {
const encodedSearch = encodeURIComponent(name);
const response = await fetch(
context === "website"
? `/api/${region}/rating/current/search/${encodedSearch}`
: `https://${regionToRegionSubdomain(
region
)}.wotblitz.com/en/api/rating-leaderboards/search/?prefix=${encodedSearch}`,
{ cache: "no-store" }
);
const accountList = (await response.json()) as CurrentRatingPlayerSearch;
return accountList;
}
@@ -1,2 +0,0 @@
export const usernamePattern = /^[a-zA-Z0-9_]{3,24}$/;
export const usernamePatternWithoutPosition = /[a-zA-Z0-9_]{3,24}/;
@@ -1,64 +0,0 @@
import { fetchBlitz } from "../fetchBlitz";
import type { Region } from "../regions";
import { usernamePattern } from "./constants";
export interface AccountListItem {
nickname: string;
account_id: number;
}
export type AccountList = AccountListItem[];
export type AccountListWithServer = (AccountListItem & {
region: Region;
})[];
export async function searchPlayersAcrossRegions(search: string, limit = 25) {
const trimmed = search.trim();
if (trimmed.length < 3 && trimmed.length > 100) return [];
const normalizedLimit = Math.floor(limit / 3);
if (usernamePattern.test(trimmed)) {
return (
await Promise.all([
fetchBlitz<AccountList>("com", "account/list", {
search,
limit: normalizedLimit,
}).then(
(value) =>
value &&
value.map((account) => ({
...account,
region: "com" as Region,
}))
),
fetchBlitz<AccountList>("eu", "account/list", {
search,
limit: normalizedLimit,
}).then(
(value) =>
value &&
value.map((account) => ({
...account,
region: "eu" as Region,
}))
),
fetchBlitz<AccountList>("asia", "account/list", {
search,
limit: normalizedLimit,
}).then(
(value) =>
value &&
value.map((account) => ({
...account,
region: "asia" as Region,
}))
),
])
)
.filter(Boolean)
.flat() as AccountListWithServer;
} else {
return [] as AccountListWithServer;
}
}
export * from "./constants";
-13
View File
@@ -1,13 +0,0 @@
import { environmentConfig } from "@blitzkit/core";
export function alias(alias: string, path: string) {
const environment = environmentConfig();
if (!(alias in environment.aliases)) {
throw new Error(`Invalid alias "${alias}"`);
}
const base = environment.aliases[alias];
return `${base}${path}`;
}
-25
View File
@@ -1,25 +0,0 @@
import {
CamouflageDefinitions,
ConsumableDefinitions,
EquipmentDefinitions,
Gallery,
GameDefinitions,
MapDefinitions,
ModelDefinitions,
ProvisionDefinitions,
SkillDefinitions,
TankDefinitions,
} from "@blitzkit/core";
export abstract class BlitzKitAPI {
abstract skillDefinitions(): Promise<SkillDefinitions>;
abstract provisionDefinitions(): Promise<ProvisionDefinitions>;
abstract consumableDefinitions(): Promise<ConsumableDefinitions>;
abstract equipmentDefinitions(): Promise<EquipmentDefinitions>;
abstract mapDefinitions(): Promise<MapDefinitions>;
abstract modelDefinitions(): Promise<ModelDefinitions>;
abstract camouflageDefinitions(): Promise<CamouflageDefinitions>;
abstract tankDefinitions(): Promise<TankDefinitions>;
abstract gameDefinitions(): Promise<GameDefinitions>;
abstract galleryDefinitions(): Promise<Gallery>;
}
-69
View File
@@ -1,69 +0,0 @@
import { alias } from "@blitzkit/core";
import { fetchPB } from "../../protobuf";
import {
CamouflageDefinitions,
ConsumableDefinitions,
EquipmentDefinitions,
Gallery,
GameDefinitions,
MapDefinitions,
ModelDefinitions,
ProvisionDefinitions,
SkillDefinitions,
TankDefinitions,
} from "../../protos";
import { BlitzKitAPI } from "./base";
export class ClientBlitzKitAPI extends BlitzKitAPI {
gameDefinitions() {
return fetchPB(alias("api", "/definitions/game.pb"), GameDefinitions);
}
consumableDefinitions() {
return fetchPB(
alias("api", "/definitions/consumables.pb"),
ConsumableDefinitions,
);
}
tankDefinitions() {
return fetchPB(alias("api", "/definitions/tanks.pb"), TankDefinitions);
}
camouflageDefinitions() {
return fetchPB(
alias("api", "/definitions/camouflage.pb"),
CamouflageDefinitions,
);
}
provisionDefinitions() {
return fetchPB(
alias("api", "/definitions/provisions.pb"),
ProvisionDefinitions,
);
}
modelDefinitions() {
return fetchPB(alias("api", "/definitions/models.pb"), ModelDefinitions);
}
skillDefinitions() {
return fetchPB(alias("api", "/definitions/skills.pb"), SkillDefinitions);
}
equipmentDefinitions() {
return fetchPB(
alias("api", "/definitions/equipment.pb"),
EquipmentDefinitions,
);
}
galleryDefinitions() {
return fetchPB(alias("api", "/definitions/gallery.pb"), Gallery);
}
mapDefinitions() {
return fetchPB(alias("api", "/definitions/maps.pb"), MapDefinitions);
}
}
@@ -1,304 +0,0 @@
import {
BlitzCrewType,
BlitzModuleType,
BlitzStrings,
BlitzTankClass,
BlitzTankFilterDefinitionCategory,
CamouflagesXml,
CamouflagesYaml,
CombatRolesYaml,
ConsumablesCommon,
ConsumableTankCategoryFilterCategory,
CrewType,
I18nString,
MapsYaml,
ModuleType,
OptionalDevices,
OptionalDeviceSlots,
ProvisionsCommon,
ShellKind,
ShellType,
SquadBattleTypeStylesYaml,
TankClass,
TankmenAvatar,
toUniqueId,
VehicleDefinitionList,
} from "@blitzkit/core";
import { AbstractVFS } from "@blitzkit/core/src/blitzkit/vfs/abstract";
import { SUPPORTED_LOCALE_BLITZ_MAP } from "@blitzkit/i18n";
import locales from "@blitzkit/i18n/locales.json";
import { parse as parseYaml } from "yaml";
import { BlitzKitAPI } from "../base";
export abstract class ServerBlitzKitAPI0 extends BlitzKitAPI {
protected vfs: AbstractVFS;
protected nationSlugDiscriminators = {
china: "cn",
european: "eu",
france: "fr",
germany: "de",
japan: "jp",
other: "ot",
uk: "gb",
usa: "us",
ussr: "ru",
};
protected blitzModuleTypeToBlitzkit: Record<
keyof BlitzModuleType,
ModuleType
> = {
chassis: ModuleType.MODULE_TYPE_TRACKS,
engine: ModuleType.MODULE_TYPE_ENGINE,
gun: ModuleType.MODULE_TYPE_GUN,
turret: ModuleType.MODULE_TYPE_TURRET,
vehicle: ModuleType.MODULE_TYPE_VEHICLE,
};
protected blitzkitCrewTypeToBlitz: Record<CrewType, BlitzCrewType> = {
[CrewType.CREW_TYPE_COMMANDER]: "commander",
[CrewType.CREW_TYPE_DRIVER]: "driver",
[CrewType.CREW_TYPE_GUNNER]: "gunner",
[CrewType.CREW_TYPE_LOADER]: "loader",
[CrewType.CREW_TYPE_RADIOMAN]: "radioman",
};
protected blitzCrewTypeToBlitzkit: Record<BlitzCrewType, CrewType> = {
commander: CrewType.CREW_TYPE_COMMANDER,
driver: CrewType.CREW_TYPE_DRIVER,
gunner: CrewType.CREW_TYPE_GUNNER,
loader: CrewType.CREW_TYPE_LOADER,
radioman: CrewType.CREW_TYPE_RADIOMAN,
};
protected blitzTankClassToBlitzkit: Record<BlitzTankClass, TankClass> = {
lightTank: TankClass.TANK_CLASS_LIGHT,
"AT-SPG": TankClass.TANK_CLASS_TANK_DESTROYER,
heavyTank: TankClass.TANK_CLASS_HEAVY,
mediumTank: TankClass.TANK_CLASS_MEDIUM,
};
protected blitzShellKindToBlitzkit: Record<ShellKind, ShellType> = {
ARMOR_PIERCING: ShellType.SHELL_TYPE_AP,
ARMOR_PIERCING_CR: ShellType.SHELL_TYPE_APCR,
HIGH_EXPLOSIVE: ShellType.SHELL_TYPE_HE,
HOLLOW_CHARGE: ShellType.SHELL_TYPE_HEAT,
};
protected blitzTankFilterDefinitionCategoryToBlitzkit: Record<
BlitzTankFilterDefinitionCategory,
ConsumableTankCategoryFilterCategory
> = {
clip: ConsumableTankCategoryFilterCategory.CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP,
};
protected botPattern = /^.+((tutorial_bot(\d+)?)|(TU))$/;
protected stringsI18n: Record<string, Record<string, string>> = {};
protected nationsDir?: string[];
protected tankStringIdMap: Record<string, number> = {};
protected consumablesCommon: ConsumablesCommon = {};
protected provisionsCommon: ProvisionsCommon = {};
// TODO: suffix with "yaml"s and "xml"s
protected optionalDevices?: { root: OptionalDevices };
protected optionalDeviceSlots?: { root: OptionalDeviceSlots };
protected tankmenAvatar?: { root: TankmenAvatar };
protected mapsYaml?: MapsYaml;
protected camouflagesXml?: { root: CamouflagesXml };
protected camouflagesYaml?: CamouflagesYaml;
protected squadBattleTypeStyles?: SquadBattleTypeStylesYaml;
protected gameTypeSelectorStyles?: SquadBattleTypeStylesYaml;
protected combatRoles?: CombatRolesYaml;
protected tierEqualizer?: string[][];
constructor(vfs: AbstractVFS) {
super();
this.vfs = vfs;
}
async init() {
console.log("Initializing virtual file system...");
await this.vfs.init();
console.log("Fetching game data...");
this.nationsDir = await this.vfs
.dir("Data/XML/item_defs/vehicles")
.then((files) => files.filter((nation) => nation !== "common"));
this.optionalDevices = await this.vfs.xml<{ root: OptionalDevices }>(
"Data/XML/item_defs/vehicles/common/optional_devices.xml",
);
this.optionalDeviceSlots = await this.vfs.xml<{
root: OptionalDeviceSlots;
}>("Data/XML/item_defs/vehicles/common/optional_device_slots.xml");
this.tankmenAvatar = await this.vfs.xml<{ root: TankmenAvatar }>(
"Data/XML/item_defs/tankmen/avatar.xml",
);
this.mapsYaml = await this.vfs.yaml<MapsYaml>("Data/maps.yaml");
this.camouflagesXml = await this.vfs.xml<{ root: CamouflagesXml }>(
"Data/XML/item_defs/vehicles/common/camouflages.xml",
);
this.camouflagesYaml = await this.vfs.yaml<CamouflagesYaml>(
"Data/camouflages.yaml",
);
this.squadBattleTypeStyles = await this.vfs.yaml<SquadBattleTypeStylesYaml>(
`Data/UI/Screens3/Lobby/Hangar/Squad/SquadBattleType.yaml`,
);
this.gameTypeSelectorStyles =
await this.vfs.yaml<SquadBattleTypeStylesYaml>(
`Data/UI/Screens/Lobby/Hangar/GameTypeSelector.yaml`,
);
this.combatRoles = await this.vfs.yaml<CombatRolesYaml>(
`Data/XML/item_defs/vehicles/common/combat_roles.yaml`,
);
this.tierEqualizer = await this.vfs.csv(
// spell:disable-next-line
`Data/XML/item_defs/vehicles/common/tier_equializer.csv`,
{ delimiter: ";" },
);
console.log("Fetching game localizations...");
if (import.meta.env.DEV) {
locales.supported = [locales.supported[0]];
}
let fetchedLocalizations = 0;
await Promise.all(
locales.supported.map(async ({ locale }) => {
const blitzLocale = SUPPORTED_LOCALE_BLITZ_MAP[locale];
const cache = await fetch(
`https://stufficons.wgcdn.co/localizations/${blitzLocale}.yaml`,
)
.then((response) => response.text())
.then((string) => parseYaml(string) as BlitzStrings);
const preInstalled = await this.vfs.yaml<BlitzStrings>(
`Data/Strings/${blitzLocale}.yaml`,
);
this.stringsI18n[locale] = {
...cache,
...preInstalled,
};
console.log(
`Fetched localizations for ${locale} (${++fetchedLocalizations}/${locales.supported.length})`,
);
}),
);
console.log("Fetching consumable and provision data...");
for (const match of (
await this.vfs.text(
`Data/XML/item_defs/vehicles/common/consumables/list.xml`,
)
).matchAll(/<items path="(.+)\.xml"\/>/g)) {
if (match[1] === "prototypes") continue;
Object.assign(
this.consumablesCommon,
(
await this.vfs.xml<{ root: ConsumablesCommon }>(
`Data/XML/item_defs/vehicles/common/consumables/${match[1]}.xml`,
)
).root,
);
}
for (const match of (
await this.vfs.text(
`Data/XML/item_defs/vehicles/common/provisions/list.xml`,
)
).matchAll(/<items path="(.+)\.xml"\/>/g)) {
if (match[1] === "prototypes") continue;
Object.assign(
this.provisionsCommon,
(
await this.vfs.xml<{ root: ConsumablesCommon }>(
`Data/XML/item_defs/vehicles/common/provisions/${match[1]}.xml`,
)
).root,
);
}
for (const nation of this.nationsDir!) {
const tankList = await this.vfs.xml<{ root: VehicleDefinitionList }>(
`Data/XML/item_defs/vehicles/${nation}/list.xml`,
);
for (const tankKey in tankList.root) {
if (this.botPattern.test(tankKey)) continue;
const tank = tankList.root[tankKey];
const tankId = toUniqueId(nation, tank.id);
this.tankStringIdMap[`${nation}:${tankKey}`] = tankId;
}
}
return this;
}
protected getString(name: string) {
const collection: Record<string, string> = {
[locales.default]: this.stringsI18n[locales.default][name],
};
for (const { locale } of locales.supported) {
const localizedString = this.stringsI18n[locale][name];
if (
localizedString === undefined ||
localizedString === collection[locales.default]
) {
continue;
}
collection[locale] = localizedString;
}
return { locales: collection } satisfies I18nString;
}
}
export function Cache(disableInDev = false) {
const cache = new WeakMap<object, Map<string, Promise<unknown>>>();
return function <This, Arguments extends any[], Return>(
target: (this: This, ...args: Arguments) => Promise<Return>,
// TODO: evaluate if we need context to make the error trace easier
// context: ClassMethodDecoratorContext<
// This,
// (this: This, ...args: Arguments) => Promise<Return>
// >,
) {
return async function replacementMethod(this: This, ...args: Arguments) {
const key = args.join("-");
let thisCache: Map<string, Promise<Return>>;
if (cache.has(this as object)) {
thisCache = cache.get(this as object) as Map<string, Promise<Return>>;
} else {
thisCache = new Map();
cache.set(this as object, thisCache);
}
const disabled = disableInDev && import.meta.env.DEV;
if (thisCache.has(key) && !disabled) {
return thisCache.get(key)!;
}
const promise = (async () => {
try {
return await target.apply(this, args);
} catch (error) {
thisCache!.delete(key);
throw error;
}
})();
thisCache.set(key, promise);
return promise;
};
};
}
@@ -1,67 +0,0 @@
import { Avatar, fetchGlossary, Gallery } from "@blitzkit/core";
import locales from "@blitzkit/i18n/locales.json";
import { extname } from "path";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI9 } from "./9_gameDefinitions";
export abstract class ServerBlitzKitAPI10 extends ServerBlitzKitAPI9 {
@Cache()
async galleryDefinitions() {
const avatars: Record<string, { avatar: Avatar; url: string }> = {};
await Promise.all(
locales.supported.map(async (supported) => {
const glossary = await fetchGlossary(
supported.blitz ?? supported.locale,
);
console.log(
`Found ${Object.keys(glossary).length} things for ${supported.locale}`,
);
for (const key in glossary) {
const glossaryEntry = glossary[key];
if (
!key.startsWith("avatar") ||
key.endsWith("_part") ||
glossaryEntry.image_url === null
) {
continue;
}
if (key in avatars) {
avatars[key].avatar.name!.locales[supported.locale] =
glossaryEntry.title;
} else {
const extension = extname(glossaryEntry.image_url);
avatars[key] = {
url: glossaryEntry.image_url,
avatar: {
id: key,
name: { locales: { [supported.locale]: glossaryEntry.title } },
extension,
},
};
}
}
}),
);
const gallery: Gallery = { avatars: [] };
await Promise.all(
Object.entries(avatars).map(async ([key, { url, avatar }]) => {
if (!(locales.default in avatars[key].avatar.name!.locales)) {
console.warn(`Avatar ${key} has no ${locales.default} name`);
return;
}
gallery.avatars.push(avatar);
}),
);
return gallery;
}
}
@@ -1,718 +0,0 @@
import {
AssaultRanges,
BlitzCrewType,
BlitzModuleType,
BlitzTankClass,
ChassisDefinitionsList,
Crew,
EngineDefinitionsList,
Equalizer,
GunDefinition,
GunDefinitionsList,
ModuleType,
ResearchCost,
ShellDefinitionsList,
ShellKind,
sluggify,
TankDefinitions,
TankPrice,
TankPriceType,
TankType,
toUniqueId,
TurretDefinitionsList,
Unlock,
UnlocksListing,
VehicleDefinitionList,
VehicleDefinitions,
} from "@blitzkit/core";
import { Cache, ServerBlitzKitAPI0 } from "./0_base";
export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
private parseResearchCost(raw: number | string) {
if (typeof raw === "number") {
return {
research_cost_type: { $case: "xp", value: raw },
} satisfies ResearchCost;
} else {
return {
research_cost_type: {
$case: "seasonal_tokens",
value: {
season: Number(/prx_season_(\d+):\d+/.exec(raw)![1]),
tokens: Number(/prx_season_\d+:(\d+)/.exec(raw)![1]),
},
},
} satisfies ResearchCost;
}
}
@Cache()
async tankDefinitions() {
const tankDefinitions = TankDefinitions.create();
const gameModeNativeNames: Record<string, number> = {};
const squadBattleTypeGameModeNativeNameMatches =
this.squadBattleTypeStyles!.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
/"(\d+)" -> "(battleType\/([a-zA-Z]+))"/g,
);
const gameTypeGameModeNativeNameMatches =
this.gameTypeSelectorStyles!.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
/eGameMode\.([a-zA-Z]+) -> "~res:\/Gfx\/UI\/Hangar\/GameTypes\/battle-type_([^"]+)"/g,
);
for (const match of squadBattleTypeGameModeNativeNameMatches) {
const id = Number(match[1]);
gameModeNativeNames[match[3]] = id;
}
for (const match of gameTypeGameModeNativeNameMatches) {
Object.entries(gameModeNativeNames).forEach(([key, value]) => {
if (key.toLowerCase() === match[2].toLowerCase()) {
gameModeNativeNames[match[1]] = value;
}
});
}
const slugRequesters = new Map<string, { id: number; key: string }[]>();
const idToNation: Record<number, string> = {};
for (const nation of this.nationsDir!) {
const tankList = await this.vfs.xml<{ root: VehicleDefinitionList }>(
`Data/XML/item_defs/vehicles/${nation}/list.xml`,
);
for (const tankKey in tankList.root) {
if (this.botPattern.test(tankKey)) continue;
const tank = tankList.root[tankKey];
const tankId = toUniqueId(nation, tank.id);
const name = (
(tank.shortUserString
? this.getString(tank.shortUserString)
: undefined) ?? this.getString(tank.userString)
).locales.en;
let slug = sluggify(name);
idToNation[tankId] = nation;
if (slugRequesters.has(slug)) {
slugRequesters.get(slug)!.push({ id: tankId, key: tankKey });
} else {
slugRequesters.set(slug, [{ id: tankId, key: tankKey }]);
}
}
}
const slugs = new Map<number, string>();
slugRequesters.forEach((requesters, slug) => {
if (requesters.length === 1) {
slugs.set(requesters[0].id, slug);
return;
}
console.warn(
`Multiple tanks share slug ${slug}: ${requesters
.map(({ key }) => key)
.join(", ")}`,
);
if (requesters.length !== 2) {
throw new Error("Unresolvable number of duplicates :(");
}
const nonCanonical = requesters.find(({ key }) => key.endsWith("TUR"));
if (nonCanonical === undefined) {
console.log("Using nations to discriminate");
// both are non-tutorial tanks, will have to discriminate using nation
requesters.forEach(({ id, key }) => {
const nation = idToNation[id];
const discriminator =
this.nationSlugDiscriminators[
nation as keyof typeof this.nationSlugDiscriminators
];
console.log(`Solution: ${key} -> ${slug}-${discriminator}`);
slugs.set(id, `${slug}-${discriminator}`);
});
} else {
console.log("Using tutorial bot suffix to discriminate");
const canonical = requesters.find(({ key }) => !key.endsWith("TUR"));
if (canonical === undefined) {
throw new Error(
"Two tutorial bots share the same slug? The world is truly broken.",
);
}
console.log(`Solution: ${canonical.key} -> ${slug}`);
slugs.set(canonical.id, slug);
console.log(`Solution: ${nonCanonical.key} -> ${slug}-tur`);
slugs.set(nonCanonical.id, `${slug}-tur`);
}
});
const tankXps = new Map<number, ResearchCost>();
for (const nation of this.nationsDir!) {
const tankList = await this.vfs.xml<{ root: VehicleDefinitionList }>(
`Data/XML/item_defs/vehicles/${nation}/list.xml`,
);
const turretList = await this.vfs.xml<{
root: TurretDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/turrets.xml`);
const gunList = await this.vfs.xml<{
root: GunDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/guns.xml`);
const shellList = await this.vfs.xml<{
root: ShellDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/shells.xml`);
const enginesList = await this.vfs.xml<{
root: EngineDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/engines.xml`);
const chassisList = await this.vfs.xml<{
root: ChassisDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/chassis.xml`);
function resolveUnlocks(
blitzModuleTypeToBlitzkit: Record<keyof BlitzModuleType, ModuleType>,
unlocks?: BlitzModuleType,
) {
if (!unlocks) return [];
return Object.entries(unlocks)
.map(([type, list]) =>
(Array.isArray(list) ? list : [list]).map((item) => {
const typeTyped = type as keyof BlitzModuleType;
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 {
id: toUniqueId(nation, rawId!),
type: blitzModuleTypeToBlitzkit[typeTyped],
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 (this.botPattern.test(tankKey)) continue;
const gunXps = new Map<number, ResearchCost>();
const turretXps = new Map<number, ResearchCost>();
const engineXps = new Map<number, ResearchCost>();
const trackXps = new Map<number, ResearchCost>();
const tank = tankList.root[tankKey];
let tankPrice: TankPrice;
const tankDefinition = await this.vfs.xml<{ root: VehicleDefinitions }>(
`Data/XML/item_defs/vehicles/${nation}/${tankKey}.xml`,
);
const tankId = toUniqueId(nation, tank.id);
const tankTags = tank.tags.split(" ");
const equipment = tankDefinition.root.optDevicePreset;
const slug = slugs.get(tankId);
if (slug === undefined) {
throw new Error(
`Could not find slug for ${nation}/${tankKey} (${tankId})`,
);
}
if (tank.sellPrice) {
tankPrice = {
type: TankPriceType.TANK_PRICE_TYPE_GOLD,
value: tank.sellPrice["#text"] * 2,
};
} else if (typeof tank.price === "number") {
tankPrice = {
type: TankPriceType.TANK_PRICE_TYPE_CREDITS,
value: tank.price,
};
} else {
tankPrice = {
type: TankPriceType.TANK_PRICE_TYPE_CREDITS,
value: tank.price["#text"] * 400,
};
}
const crew: Crew[] = [];
const fixedCamouflage = tankTags.includes("eventCamouflage_user");
const totalUnlocks: UnlocksListing[] = [];
for (const crewKey in tankDefinition.root.crew) {
const value = tankDefinition.root.crew[crewKey as BlitzCrewType];
let entry: Crew;
const index = crew.findIndex(
({ type }) => this.blitzkitCrewTypeToBlitz[type] === crewKey,
);
if (index === -1) {
if (crewKey === "#text") continue;
entry = {
type: this.blitzCrewTypeToBlitzkit[crewKey as BlitzCrewType],
count: 0,
substitute: [],
};
crew.push(entry);
} else {
entry = crew[index];
}
if (typeof value === "string") {
entry.count++;
if (value !== "") {
entry.substitute = value.split(/\n| /).map((member) => {
return this.blitzCrewTypeToBlitzkit[
member.trim() as BlitzCrewType
];
});
}
} else {
if (entry.count === undefined) {
entry.count = value.length;
} else {
entry.count += value.length;
}
}
}
const camouflages = Object.entries(
this.camouflagesXml!.root.camouflages,
)
.filter(([, camo]) => {
if (!camo.vehicleFilter.include) return false;
if (camo.unlockCostCategory !== "legendary-skins-gold")
return false;
const includeArray = Array.isArray(camo.vehicleFilter.include)
? camo.vehicleFilter.include
: [camo.vehicleFilter.include];
return includeArray.some((filter) => {
if ("vehicle" in filter && filter.vehicle?.name) {
return filter.vehicle.name === `${nation}:${tankKey}`;
}
return false;
});
})
.map(([, camo]) => camo.id);
let equalizerEntry = this.tierEqualizer!.find(
(line) => line[0] === `${nation}:${tankKey}`,
);
let equalizer: Equalizer | undefined;
if (equalizerEntry) {
const [health, penetration, module_health, damage, armor] =
equalizerEntry?.slice(1).map(Number);
equalizer = { health, penetration, module_health, damage, armor };
}
tankDefinitions.tanks[tankId] = {
ancestors: [],
successors: [],
id: tankId,
dev_name: tankKey,
roles: {},
camouflages: camouflages,
fixed_camouflage: fixedCamouflage,
crew,
weight: tankDefinition.root.hull.weight,
health: tankDefinition.root.hull.maxHealth,
speed_forwards: tankDefinition.root.speedLimits.forward,
speed_backwards: tankDefinition.root.speedLimits.backward,
equipment_preset:
typeof equipment === "string" ? equipment : equipment.at(-1)!,
max_consumables: tankDefinition.root.consumableSlots,
max_provisions: tankDefinition.root.provisionSlots,
name:
(tank.shortUserString
? this.getString(tank.shortUserString)
: undefined) ?? this.getString(tank.userString),
slug,
nation,
type: tankTags.includes("collectible")
? TankType.TANK_TYPE_COLLECTOR
: (typeof tank.price === "number" ? false : "gold" in tank.price)
? TankType.TANK_TYPE_PREMIUM
: TankType.TANK_TYPE_RESEARCHABLE,
tier: tank.level,
class: this.blitzTankClassToBlitzkit[tankTags[0] as BlitzTankClass],
testing: tankTags.includes("testTank"),
deprecated: tankTags.includes("deprecated"),
price: tankPrice,
camouflage_still: tankDefinition.root.invisibility.still,
camouflage_moving: tankDefinition.root.invisibility.moving,
camouflage_on_fire: tankDefinition.root.invisibility.firePenalty,
turrets: [],
engines: [],
tracks: [],
equalizer,
};
if (tank.combatRole) {
Object.entries(tank.combatRole).forEach(([gameMode, role]) => {
const id = Object.entries(gameModeNativeNames).find(
([key]) => key.toLowerCase() === gameMode.toLowerCase(),
)?.[1];
if (id === undefined) {
throw new Error(
`Unknown game mode in tank ${tankKey}: ${gameMode}`,
);
}
tankDefinitions.tanks[tankId].roles[id] =
this.combatRoles![role].id;
});
}
Object.keys(tankDefinition.root.chassis).forEach((key) => {
const track = tankDefinition.root.chassis[key];
const trackId = toUniqueId(nation, chassisList.root.ids[key]);
const terrainResistances = track.terrainResistance
.split(" ")
.map(Number);
totalUnlocks.push(track.unlocks);
tankDefinitions.tanks[tankId].tracks.push({
id: trackId,
weight: track.weight,
name: this.getString(track.userString),
traverse_speed: track.rotationSpeed,
dispersion_move: track.shotDispersionFactors.vehicleMovement,
dispersion_traverse: track.shotDispersionFactors.vehicleRotation,
resistance_hard: terrainResistances[0],
resistance_medium: terrainResistances[1],
resistance_soft: terrainResistances[2],
tier: track.level,
unlocks: resolveUnlocks(
this.blitzModuleTypeToBlitzkit,
track.unlocks,
),
});
});
Object.keys(tankDefinition.root.engines).forEach((engineKey) => {
const engine = tankDefinition.root.engines[engineKey];
const engineListEntry = enginesList.root.shared[engineKey];
const engineId = toUniqueId(nation, enginesList.root.ids[engineKey]);
totalUnlocks.push(engine.unlocks);
tankDefinitions.tanks[tankId].engines.push({
id: engineId,
name: this.getString(engineListEntry.userString),
fire_chance: engineListEntry.fireStartingChance,
tier: engineListEntry.level,
weight: engineListEntry.weight,
power: engineListEntry.power,
unlocks: resolveUnlocks(
this.blitzModuleTypeToBlitzkit,
engine.unlocks,
),
});
});
let turretIndex = 0;
for (const turretKey in tankDefinition.root.turrets0) {
const turret = tankDefinition.root.turrets0[turretKey];
const turretId = toUniqueId(nation, turretList.root.ids[turretKey]);
totalUnlocks.push(turret.unlocks);
tankDefinitions.tanks[tankId].turrets.push({
id: turretId,
traverse_speed: turret.rotationSpeed,
name: this.getString(turret.userString),
tier: turret.level,
guns: [],
health: turret.maxHealth,
view_range: turret.circularVisionRadius,
weight: turret.weight,
unlocks: resolveUnlocks(
this.blitzModuleTypeToBlitzkit,
turret.unlocks,
),
});
let gunIndex = 0;
for (const gunKey in turret.guns) {
const gun = turret.guns[gunKey];
const gunId = toUniqueId(nation, gunList.root.ids[gunKey]);
const gunListEntry = gunList.root.shared[gunKey];
const gunName = this.getString(gunListEntry.userString);
const gunType =
"clip" in gun
? gun.pumpGunMode
? "autoReloader"
: "autoLoader"
: "regular";
const gunClipCount = gunType === "regular" ? 1 : gun.clip!.count;
const shotDispersionFactors =
gun.shotDispersionFactors ?? gunListEntry.shotDispersionFactors;
let assault_ranges: AssaultRanges | undefined;
if (gun.extras?.trayShell) {
const types = gun.extras.trayShell.kinds
.split(" ")
.map((string) => {
const trimmed = string.trim();
if (trimmed in this.blitzShellKindToBlitzkit) {
return this.blitzShellKindToBlitzkit[trimmed as ShellKind];
}
throw new SyntaxError(`Invalid shell kind: ${trimmed}`);
});
const sectorNames = Object.keys(gun.extras.trayShell.sectors);
if (sectorNames.length !== 1 || sectorNames[0] !== "sector") {
throw new SyntaxError("Invalid tray shell sector");
}
const sector = gun.extras.trayShell.sectors.sector;
assault_ranges = {
types,
ranges: sector.map((value) => ({
factor: value.factor,
distance: value.distance,
})),
};
}
totalUnlocks.push(gun.unlocks);
tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push({
id: gunId,
weight: gunListEntry.weight,
rotation_speed: gunListEntry.rotationSpeed,
name: gunName,
tier: gunListEntry.level,
shells: [],
camouflage_loss:
typeof gun.invisibilityFactorAtShot === "number"
? gun.invisibilityFactorAtShot
: gun.invisibilityFactorAtShot.at(-1)!,
aim_time: gun.aimingTime ?? gunListEntry.aimingTime,
dispersion_base:
gun.shotDispersionRadius ?? gunListEntry.shotDispersionRadius,
dispersion_damaged: shotDispersionFactors.whileGunDamaged,
dispersion_shot: shotDispersionFactors.afterShot,
dispersion_traverse: shotDispersionFactors.turretRotation,
unlocks: resolveUnlocks(
this.blitzModuleTypeToBlitzkit,
gun.unlocks,
),
shell_capacity: gun.maxAmmo ?? gunListEntry.maxAmmo,
assault_ranges,
burst:
gun.burst && gun.burst.count > 1
? {
count: gun.burst.count,
interval: 60 / gun.burst.rate,
}
: undefined,
gun_type:
gunType === "regular"
? {
$case: "regular",
value: {
reload: gun.reloadTime,
},
}
: gunType === "autoReloader"
? {
$case: "auto_reloader",
value: {
intra_clip: 60 / gun.clip!.rate,
shell_count: gunClipCount,
shell_reloads: gun
.pumpGunReloadTimes!.split(" ")
.map(Number),
},
}
: {
$case: "auto_loader",
value: {
intra_clip: 60 / gun.clip!.rate,
clip_reload: gun.reloadTime,
shell_count: gunClipCount,
},
},
} satisfies GunDefinition);
for (const shellKey in gunListEntry.shots) {
const gunShellEntry = gunListEntry.shots[shellKey];
const shell = shellList.root[shellKey];
const shellId = toUniqueId(nation, shell.id);
const shellName = this.getString(shell.userString);
const penetrationRaw = gunShellEntry.piercingPower
.split(" ")
.filter((penetrationString) => penetrationString !== "")
.map(Number);
tankDefinitions.tanks[tankId].turrets[turretIndex].guns[
gunIndex
].shells.push({
id: shellId,
name: shellName,
velocity: gunShellEntry.speed,
armor_damage: shell.damage.armor,
module_damage: shell.damage.devices,
caliber: shell.caliber,
normalization: shell.normalizationAngle,
ricochet: shell.ricochetAngle,
type: this.blitzShellKindToBlitzkit[shell.kind],
explosion_radius:
shell.kind === "HIGH_EXPLOSIVE"
? (shell.explosionRadius ?? 0)
: undefined,
icon: shell.icon,
penetration: {
near: penetrationRaw[0],
far: penetrationRaw[1],
},
range: gunShellEntry.maxDistance,
});
}
gunIndex++;
}
turretIndex++;
}
for (const unlocks of totalUnlocks) {
if (unlocks === undefined) continue;
for (const key in unlocks) {
const value = unlocks[key as keyof BlitzModuleType];
for (const vehicle of Array.isArray(value) ? value : [value]) {
switch (key as keyof BlitzModuleType) {
case "vehicle": {
const tankListEntry = tankList.root[vehicle["#text"]];
const currentTank = tankDefinitions.tanks[tankId];
const successorId = toUniqueId(nation, tankListEntry.id);
tankXps.set(
successorId,
this.parseResearchCost(vehicle.cost),
);
if (currentTank.successors === undefined) {
currentTank.successors = [];
}
if (!currentTank.successors!.includes(successorId)) {
currentTank.successors!.push(successorId);
}
break;
}
case "gun": {
gunXps.set(
toUniqueId(nation, gunList.root.ids[vehicle["#text"]]),
this.parseResearchCost(vehicle.cost),
);
break;
}
case "turret": {
turretXps.set(
toUniqueId(nation, turretList.root.ids[vehicle["#text"]]),
this.parseResearchCost(vehicle.cost),
);
break;
}
case "engine": {
engineXps.set(
toUniqueId(nation, enginesList.root.ids[vehicle["#text"]]),
this.parseResearchCost(vehicle.cost),
);
break;
}
case "chassis": {
trackXps.set(
toUniqueId(nation, chassisList.root.ids[vehicle["#text"]]),
this.parseResearchCost(vehicle.cost),
);
break;
}
}
}
}
}
Object.values(tankDefinitions.tanks[tankId].turrets).forEach(
(turret) => {
turret.research_cost = turretXps.get(turret.id);
Object.values(turret.guns).forEach((gunRaw) => {
gunRaw.research_cost = gunXps.get(gunRaw.id);
});
},
);
Object.values(tankDefinitions.tanks[tankId].engines).forEach(
(engine) => {
engine.research_cost = engineXps.get(engine.id);
},
);
Object.values(tankDefinitions.tanks[tankId].tracks).forEach((track) => {
track.research_cost = trackXps.get(track.id);
});
}
}
Object.values(tankDefinitions.tanks).forEach((tank) => {
tank.research_cost = tankXps.get(tank.id);
});
Object.values(tankDefinitions.tanks).forEach((tank) => {
tank.successors?.forEach((predecessorId) => {
if (
!tankDefinitions.tanks[predecessorId].ancestors?.includes(tank.id)
) {
tankDefinitions.tanks[predecessorId].ancestors?.push(tank.id);
}
});
});
return tankDefinitions;
}
}
@@ -1,34 +0,0 @@
import { CamouflageDefinitions } from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI1 } from "./1_tankDefinitions";
export abstract class ServerBlitzKitAPI2 extends ServerBlitzKitAPI1 {
@Cache()
async camouflageDefinitions() {
const camouflageDefinitions = CamouflageDefinitions.create();
for (const camoKey in this.camouflagesXml!.root.camouflages) {
const camo = this.camouflagesXml!.root.camouflages[camoKey];
const yamlEntry = this.camouflagesYaml![camoKey];
const fullName = yamlEntry.userString
? this.getString(yamlEntry.userString)
: undefined;
const shortName = yamlEntry.shortUserString
? this.getString(yamlEntry.shortUserString)
: undefined;
const resolvedTankName = shortName ?? fullName;
const resolvedTankNameFull =
resolvedTankName === fullName ? undefined : fullName;
camouflageDefinitions.camouflages[camo.id] = {
id: camo.id,
name: this.getString(camo.userString),
tank_name: resolvedTankName,
tank_name_full: resolvedTankNameFull,
};
}
return camouflageDefinitions;
}
}
@@ -1,333 +0,0 @@
import {
Armor,
BlitzCrewType,
ChassisDefinitionsList,
Crew,
EngineDefinitionsList,
GunDefinitionsList,
ModelDefinitions,
ResearchCost,
TankParameters,
toUniqueId,
TurretDefinitionsList,
Vector3,
VehicleDefinitionArmor,
VehicleDefinitionList,
VehicleDefinitions,
} from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI2 } from "./2_camouflageDefinitions";
import { parse as parsePath } from "path";
import { Vector3Tuple } from "three";
export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
private vector3TupleToBlitzkit(tuple: Vector3Tuple) {
return { x: tuple[0], y: tuple[1], z: tuple[2] } satisfies Vector3;
}
private assignArmor(
raw: VehicleDefinitionArmor[string],
id: number,
armor: Armor,
) {
if (typeof raw === "number") {
armor.thickness[id] = raw;
} else if (Array.isArray(raw)) {
armor.thickness[id] = raw.at(-1)!;
} else {
if (!armor.spaced) armor.spaced = [];
armor.thickness[id] = raw["#text"];
armor.spaced.push(id);
}
}
@Cache()
async modelDefinitions() {
const modelDefinitions = ModelDefinitions.create();
for (const nation of this.nationsDir!) {
const tankList = await this.vfs.xml<{ root: VehicleDefinitionList }>(
`Data/XML/item_defs/vehicles/${nation}/list.xml`,
);
const turretList = await this.vfs.xml<{
root: TurretDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/turrets.xml`);
const gunList = await this.vfs.xml<{
root: GunDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/guns.xml`);
const enginesList = await this.vfs.xml<{
root: EngineDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/engines.xml`);
const chassisList = await this.vfs.xml<{
root: ChassisDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/chassis.xml`);
for (const tankKey in tankList.root) {
if (this.botPattern.test(tankKey)) continue;
const gunXps = new Map<number, ResearchCost>();
const turretXps = new Map<number, ResearchCost>();
const engineXps = new Map<number, ResearchCost>();
const trackXps = new Map<number, ResearchCost>();
const tank = tankList.root[tankKey];
const tankDefinition = await this.vfs.xml<{ root: VehicleDefinitions }>(
`Data/XML/item_defs/vehicles/${nation}/${tankKey}.xml`,
);
const tankParameters = await this.vfs.yaml<TankParameters>(
`Data/3d/Tanks/Parameters/${nation}/${tankKey}.yaml`,
);
const turretOrigin = tankDefinition.root.hull.turretPositions.turret
.split(" ")
.map(Number) as Vector3Tuple;
const tankId = toUniqueId(nation, tank.id);
const hullArmor: Armor = { spaced: [], thickness: {} };
this.tankStringIdMap[`${nation}:${tankKey}`] = tankId;
Object.keys(tankDefinition.root.hull.armor)
.filter((name) => name.startsWith("armor_"))
.forEach((name) => {
const armorIdString = name.match(/armor_(\d+)/)?.[1];
if (armorIdString === undefined) {
throw new SyntaxError(`Invalid armor id: ${name}`);
}
const armorId = parseInt(armorIdString);
const armorRaw = tankDefinition.root.hull.armor[name];
this.assignArmor(armorRaw, armorId, hullArmor);
});
const crew: Crew[] = [];
for (const crewKey in tankDefinition.root.crew) {
const value = tankDefinition.root.crew[crewKey as BlitzCrewType];
let entry: Crew;
const index = crew.findIndex(
({ type }) => this.blitzkitCrewTypeToBlitz[type] === crewKey,
);
if (index === -1) {
if (crewKey === "#text") continue;
entry = {
type: this.blitzCrewTypeToBlitzkit[crewKey as BlitzCrewType],
count: 0,
substitute: [],
};
crew.push(entry);
} else {
entry = crew[index];
}
if (typeof value === "string") {
entry.count++;
if (value !== "") {
entry.substitute = value.split(/\n| /).map((member) => {
return this.blitzCrewTypeToBlitzkit[
member.trim() as BlitzCrewType
];
});
}
} else {
if (entry.count === undefined) {
entry.count = value.length;
} else {
entry.count += value.length;
}
}
}
modelDefinitions.models[tankId] = {
armor: hullArmor,
turret_origin: this.vector3TupleToBlitzkit(turretOrigin),
initial_turret_rotation: tankDefinition.root.hull
.turretInitialRotation
? {
yaw: tankDefinition.root.hull.turretInitialRotation.yaw,
pitch: tankDefinition.root.hull.turretInitialRotation.pitch,
roll: tankDefinition.root.hull.turretInitialRotation.roll,
}
: undefined,
bounding_box: {
min: this.vector3TupleToBlitzkit(
tankParameters.collision.hull.bbox.min,
),
max: this.vector3TupleToBlitzkit(
tankParameters.collision.hull.bbox.max,
),
},
turrets: {},
tracks: {},
};
for (const key in tankDefinition.root.chassis) {
const track = tankDefinition.root.chassis[key];
const trackId = toUniqueId(nation, chassisList.root.ids[key]);
const trackArmorRaw = track.armor.leftTrack;
const hullOrigin = track.hullPosition
.split(" ")
.map(Number) as Vector3Tuple;
modelDefinitions.models[tankId].tracks[trackId] = {
thickness:
typeof trackArmorRaw === "number"
? trackArmorRaw
: trackArmorRaw["#text"],
origin: this.vector3TupleToBlitzkit(hullOrigin),
};
}
Object.keys(tankDefinition.root.turrets0).forEach((turretKey) => {
const turret = tankDefinition.root.turrets0[turretKey];
const turretModel = Number(
parsePath(turret.models.undamaged).name.split("_")[1],
);
const turretId = toUniqueId(nation, turretList.root.ids[turretKey]);
const turretYaw = (
typeof turret.yawLimits === "string"
? turret.yawLimits
: turret.yawLimits.at(-1)!
)
.split(" ")
.map(Number) as [number, number];
const gunOrigin = (
typeof turret.gunPosition === "string"
? turret.gunPosition
: turret.gunPosition[0]
)
.split(" ")
.map(Number) as Vector3Tuple;
const turretArmor: Armor = { thickness: {}, spaced: [] };
Object.keys(turret.armor)
.filter((name) => name.startsWith("armor_"))
.forEach((name) => {
const armorIdString = name.match(/armor_(\d+)/)?.[1];
if (armorIdString === undefined) {
throw new SyntaxError(`Invalid armor id: ${name}`);
}
const armorId = parseInt(armorIdString);
const armorRaw = turret.armor[name];
this.assignArmor(armorRaw, armorId, turretArmor);
});
turret.userString;
modelDefinitions.models[tankId].turrets[turretId] = {
armor: turretArmor,
gun_origin: this.vector3TupleToBlitzkit(gunOrigin),
model_id: turretModel,
yaw:
-turretYaw[0] + turretYaw[1] === 360
? undefined
: { min: turretYaw[0], max: turretYaw[1] },
guns: {},
bounding_box: {
min: this.vector3TupleToBlitzkit(
tankParameters.collision[
parsePath(turret.hitTester.collisionModel).name.toLowerCase()
].bbox.min,
),
max: this.vector3TupleToBlitzkit(
tankParameters.collision[
parsePath(turret.hitTester.collisionModel).name.toLowerCase()
].bbox.max,
),
},
};
Object.keys(turret.guns).forEach((gunKey, gunIndex) => {
const gun = turret.guns[gunKey];
const gunId = toUniqueId(nation, gunList.root.ids[gunKey]);
const gunListEntry = gunList.root.shared[gunKey];
const pitchLimitsRaw = gun.pitchLimits ?? gunListEntry.pitchLimits;
const gunPitch = (
typeof pitchLimitsRaw === "string"
? pitchLimitsRaw
: pitchLimitsRaw.at(-1)!
)
.split(" ")
.map(Number) as [number, number];
const gunModel = Number(
parsePath(gun.models.undamaged).name.split("_")[1],
);
const front = gun.extraPitchLimits?.front
? gun.extraPitchLimits.front.split(" ").map(Number)
: undefined;
const back = gun.extraPitchLimits?.back
? gun.extraPitchLimits.back.split(" ").map(Number)
: undefined;
const transition = gun.extraPitchLimits?.transition
? typeof gun.extraPitchLimits.transition === "number"
? gun.extraPitchLimits.transition
: gun.extraPitchLimits.transition.at(-1)!
: undefined;
const gunArmor: Armor = { thickness: {}, spaced: [] };
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;
}
Object.keys(gun.armor)
.filter((name) => name.startsWith("armor_"))
.forEach((name) => {
const armorIdString = name.match(/armor_(\d+)/)?.[1];
if (armorIdString === undefined) {
throw new SyntaxError(`Invalid armor id: ${name}`);
}
const armorId = parseInt(armorIdString);
const armorRaw = gun.armor[name];
this.assignArmor(armorRaw, armorId, gunArmor);
});
modelDefinitions.models[tankId].turrets[turretId].guns[gunId] = {
armor: gunArmor,
model_id: gunModel,
mask,
thickness:
gun.armor.gun === undefined
? 0
: typeof gun.armor.gun === "number"
? gun.armor.gun
: gun.armor.gun["#text"],
pitch: {
min: gunPitch[0],
max: gunPitch[1],
front: front
? {
min: front[0],
max: front[1],
range: front[2],
}
: undefined,
back: back
? {
min: back[0],
max: back[1],
range: back[2],
}
: undefined,
transition,
},
};
});
});
}
}
return modelDefinitions;
}
}
@@ -1,21 +0,0 @@
import { MapDefinitions } from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI3 } from "./3_modelDefinitions";
export abstract class ServerBlitzKitAPI4 extends ServerBlitzKitAPI3 {
@Cache()
async mapDefinitions() {
const mapDefinitions = MapDefinitions.create();
for (const key in this.mapsYaml!.maps) {
const map = this.mapsYaml!.maps[key];
mapDefinitions.maps[map.id] = {
id: map.id,
name: this.getString(`#maps:${key}:${map.localName}`),
};
}
return mapDefinitions;
}
}
@@ -1,42 +0,0 @@
import { EquipmentDefinitions, EquipmentSlot } from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI4 } from "./4_mapDefinitions";
export abstract class ServerBlitzKitAPI5 extends ServerBlitzKitAPI4 {
@Cache()
async equipmentDefinitions() {
const equipmentDefinitions = EquipmentDefinitions.create();
Object.entries(this.optionalDevices!.root).forEach(
([optionalDeviceKey, optionalDeviceEntry]) => {
if (optionalDeviceKey === "nextAvailableId") return;
equipmentDefinitions.equipments[optionalDeviceEntry.id] = {
name: this.getString(optionalDeviceEntry.userString),
description: this.getString(optionalDeviceEntry.description),
};
},
);
Object.entries(this.optionalDeviceSlots!.root.presets).forEach(
([optionalDeviceSlotKey, optionalDeviceSlotEntry]) => {
if (optionalDeviceSlotKey === "emptyPreset") return;
equipmentDefinitions.presets[optionalDeviceSlotKey] = {
slots: Object.values(optionalDeviceSlotEntry)
.map((level) => {
return Object.values(level).map((options) => {
return {
left: this.optionalDevices!.root[options.device0].id,
right: this.optionalDevices!.root[options.device1].id,
} satisfies EquipmentSlot;
});
})
.flat(),
};
},
);
return equipmentDefinitions;
}
}
@@ -1,114 +0,0 @@
import {
BlitzTankFilterDefinitionCategory,
Consumable,
ConsumableDefinitions,
} from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI5 } from "./5_equipmentDefinitions";
export abstract class ServerBlitzKitAPI6 extends ServerBlitzKitAPI5 {
@Cache()
async consumableDefinitions() {
const consumableDefinitions = ConsumableDefinitions.create();
Object.entries(this.consumablesCommon).forEach(([key, consumable]) => {
const entry: Consumable = {
id: consumable.id,
game_mode_exclusive: "gameModeFilter" in consumable,
cooldown: consumable.script.cooldown,
duration: consumable.script.duration,
name: this.getString(consumable.userString),
exclude: [],
include: [],
};
consumableDefinitions.consumables[consumable.id] = entry;
const includeRaw = consumable.vehicleFilter?.include.vehicle;
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
if (includeRaw) {
entry.include = [];
if ("minLevel" in includeRaw) {
entry.include.push({
filter_type: {
$case: "tiers",
value: {
min: includeRaw.minLevel,
max: includeRaw.maxLevel,
},
},
});
} else if ("name" in includeRaw) {
entry.include.push({
filter_type: {
$case: "ids",
value: {
ids: includeRaw.name.split(/ +/).map((key) => {
return this.tankStringIdMap[key];
}),
},
},
});
} else throw new SyntaxError("Unhandled include type");
if (consumable.vehicleFilter?.include.nations) {
entry.include.push({
filter_type: {
$case: "nations",
value: {
nations: consumable.vehicleFilter.include.nations.split(" "),
},
},
});
}
}
if (excludeRaw) {
entry.exclude = [];
if ("name" in excludeRaw) {
entry.exclude!.push({
filter_type: {
$case: "ids",
value: {
ids: excludeRaw.name.split(/ +/).map((key) => {
return this.tankStringIdMap[key];
}),
},
},
});
} else if ("extendedTags" in excludeRaw) {
entry.exclude!.push({
filter_type: {
$case: "categories",
value: {
categories: excludeRaw.extendedTags
.split(" ")
.map(
(item) =>
this.blitzTankFilterDefinitionCategoryToBlitzkit[
item as BlitzTankFilterDefinitionCategory
],
),
},
},
});
} else throw new SyntaxError("Unhandled exclude type");
if (consumable.vehicleFilter?.exclude?.nations) {
entry.exclude!.push({
filter_type: {
$case: "nations",
value: {
nations: consumable.vehicleFilter.exclude.nations.split(" "),
},
},
});
}
}
});
return consumableDefinitions;
}
}
@@ -1,117 +0,0 @@
import {
BlitzTankFilterDefinitionCategory,
Provision,
ProvisionDefinitions,
} from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI6 } from "./6_consumableDefinitions";
export abstract class ServerBlitzKitAPI7 extends ServerBlitzKitAPI6 {
@Cache()
async provisionDefinitions() {
const provisionDefinitions = ProvisionDefinitions.create();
Object.entries(this.provisionsCommon).forEach(([, provision]) => {
const entry: Provision = {
id: provision.id,
exclude: [],
include: [],
game_mode_exclusive: "gameModeFilter" in provision,
name: this.getString(provision.userString),
};
provisionDefinitions.provisions[provision.id] = entry;
const includeRaw = provision.vehicleFilter?.include.vehicle;
const excludeRaw = provision.vehicleFilter?.exclude?.vehicle;
if (includeRaw) {
entry.include = [];
if ("minLevel" in includeRaw) {
entry.include.push({
filter_type: {
$case: "tiers",
value: {
min: includeRaw.minLevel,
max: includeRaw.maxLevel,
},
},
});
} else if ("name" in includeRaw) {
entry.include.push({
filter_type: {
$case: "ids",
value: {
ids: includeRaw.name.split(/ +/).map((key) => {
return this.tankStringIdMap[key];
}),
},
},
});
} else throw new SyntaxError("Unhandled include type");
if (provision.vehicleFilter?.include.nations) {
entry.include.push({
filter_type: {
$case: "nations",
value: {
nations: provision.vehicleFilter.include.nations.split(" "),
},
},
});
}
}
if (excludeRaw) {
entry.exclude = [];
if ("name" in excludeRaw) {
entry.exclude!.push({
filter_type: {
$case: "ids",
value: {
ids: excludeRaw.name
.split(/ +/)
.map((key) => this.tankStringIdMap[key]),
},
},
});
} else if ("extendedTags" in excludeRaw) {
entry.exclude!.push({
filter_type: {
$case: "categories",
value: {
categories: excludeRaw.extendedTags
.split(" ")
.map(
(item) =>
this.blitzTankFilterDefinitionCategoryToBlitzkit[
item as BlitzTankFilterDefinitionCategory
],
),
},
},
});
} else throw new SyntaxError("Unhandled exclude type");
if (provision.vehicleFilter?.exclude?.nations) {
entry.exclude!.push({
filter_type: {
$case: "nations",
value: {
nations: provision.vehicleFilter.exclude.nations.split(" "),
},
},
});
}
}
if (provision.script.bonusValues?.crewLevelIncrease !== undefined) {
provisionDefinitions.provisions[provision.id].crew =
provision.script.bonusValues?.crewLevelIncrease;
}
});
return provisionDefinitions;
}
}
@@ -1,21 +0,0 @@
import { BlitzTankClass, SkillDefinitions } from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI7 } from "./7_provisionDefinitions";
export abstract class ServerBlitzKitAPI8 extends ServerBlitzKitAPI7 {
@Cache()
async skillDefinitions() {
const skillDefinitions = SkillDefinitions.create();
for (const tankClass in this.tankmenAvatar!.root.skillsByClasses) {
const skills = this.tankmenAvatar!.root.skillsByClasses[tankClass];
skillDefinitions.classes[
this.blitzTankClassToBlitzkit[tankClass as BlitzTankClass]
] = { skills: skills.split(" ") };
}
return skillDefinitions;
}
}
@@ -1,58 +0,0 @@
import { AvailableNationsYaml, GameDefinitions } from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI8 } from "./8_skillDefinitions";
export abstract class ServerBlitzKitAPI9 extends ServerBlitzKitAPI8 {
@Cache()
async gameDefinitions() {
const gameDefinitions = GameDefinitions.create();
const consumableNativeNames: Record<string, number> = {};
const provisionNativeNames: Record<string, number> = {};
Object.entries(this.consumablesCommon).forEach(([key, consumable]) => {
consumableNativeNames[key] = consumable.id;
});
Object.entries(this.provisionsCommon).forEach(([key, provision]) => {
provisionNativeNames[key] = provision.id;
});
const version = (await this.vfs.text("Data/version.txt")).split(" ")[0];
gameDefinitions.version = version;
gameDefinitions.nations = (
await this.vfs.yaml<AvailableNationsYaml>("Data/available_nations.yaml")
).available_nations;
for (const match of this.squadBattleTypeStyles!.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
/"(\d+)" -> "(battleType\/([a-zA-Z]+))"/g,
)) {
const id = Number(match[1]);
const name = this.getString(match[2]);
gameDefinitions.gameModes[id] = {
name,
};
}
Object.entries(this.combatRoles!).forEach(([, value]) => {
gameDefinitions.roles[value.id] = { provisions: [], consumables: [] };
value.default_abilities.forEach((ability) => {
if (ability in consumableNativeNames) {
gameDefinitions.roles[value.id].consumables.push(
consumableNativeNames[ability],
);
} else if (ability in provisionNativeNames) {
gameDefinitions.roles[value.id].provisions.push(
provisionNativeNames[ability],
);
} else throw new Error(`Unknown ability ${ability}`);
});
});
return gameDefinitions;
}
}
@@ -1,3 +0,0 @@
import { ServerBlitzKitAPI10 } from "@blitzkit/core/src/blitzkit/api/server/10_galleryDefinitions";
export class ServerBlitzKitAPI extends ServerBlitzKitAPI10 {}
@@ -1,4 +0,0 @@
export function assertSecret(secret?: string) {
if (secret === undefined) throw new Error("Missing secret");
return secret;
}
@@ -1,22 +0,0 @@
import { emptyAllStats } from '../../blitz/constants';
import { Samples } from '../../protos';
import type { BlitzkitStats } from '../../statistics';
export const emptyAverageDefinitionsAllStats: BlitzkitStats = {
...emptyAllStats,
battle_life_time: 0,
};
export const averageDefinitionsAllStatsKeys = Object.keys(
emptyAverageDefinitionsAllStats,
) as (keyof BlitzkitStats)[];
export const emptySamples: Samples = {
d_1: 0,
d_7: 0,
d_30: 0,
d_60: 0,
d_90: 0,
d_120: 0,
total: 0,
};
@@ -1,17 +0,0 @@
import { staticAsset } from "@blitzkit/core";
import { fetchPB } from "../../protobuf";
import { AverageDefinitions } from "../../protos";
export interface AverageDefinitionsManifest {
version: 1;
/**
* epoch in days
*/
latest: number;
}
export async function fetchAverageDefinitions() {
return await fetchPB(staticAsset("averages.pb"), AverageDefinitions);
}
export * from "./constants";
@@ -1,12 +0,0 @@
import { staticAsset } from "@blitzkit/core";
export interface DiscoveredIdsDefinitions {
time: number;
chunks: number;
count: number;
}
export async function fetchDiscoveredIdsDefinitions() {
const response = await fetch(staticAsset("ids/manifest.json"));
return response.json() as Promise<DiscoveredIdsDefinitions>;
}
-47
View File
@@ -1,47 +0,0 @@
import { assertSecret } from "@blitzkit/core";
interface EnvironmentConfig {
robots: boolean;
canonical: string;
paths: Record<string, string | null>;
nodes: Record<string, string>;
aliases: Record<string, string>;
}
let hasReadEnvironments = false;
const environments: Record<string, EnvironmentConfig> = {};
/**
* This is set up this way to avoid errors in runtimes where
* `import.meta.glob` does not exist.
*/
function readEnvironments() {
if (hasReadEnvironments) return;
hasReadEnvironments = true;
const glob = import.meta.glob("../../../../environments/*.json", {
eager: true,
import: "default",
}) as Record<string, EnvironmentConfig>;
const root = "../../../../environments";
for (const key in glob) {
const trimmed = key.slice(root.length + 1, -5);
environments[trimmed] = glob[key];
delete environments[key];
}
}
export function environmentConfig() {
readEnvironments();
const environment = assertSecret(import.meta.env.PUBLIC_ENVIRONMENT);
if (!(environment in environments)) {
throw new Error(`Invalid environment "${environment}"`);
}
return environments[environment];
}
@@ -0,0 +1,30 @@
// import { RatingInfo, Region, asset } from '@blitzkit/core';
// const cache: Record<
// Region,
// Record<
// number,
// RatingInfo & {
// detail: undefined;
// }
// >
// > = {
// com: {},
// eu: {},
// asia: {},
// };
// export async function getArchivedRatingInfo(region: Region, season: number) {
// if (!cache[region][season]) {
// const info = await fetch(
// asset(`regions/${region}/rating/${season}/info.cdon.lz4`),
// )
// .then((response) => response.arrayBuffer())
// .then((buffer) =>
// superDecompress<RatingInfo & { detail: undefined }>(buffer),
// );
// cache[region][season] = info;
// }
// return cache[region][season];
// }
+3 -15
View File
@@ -1,34 +1,22 @@
export * from "./alias";
export * from "./assertSecret";
export * from "./availableProvisions";
export * from "./averageDefinitions";
export * from "./coefficient";
export * from "./createDefaultProvisions";
export * from "./createDefaultSkills";
export * from "./degressiveStat";
export * from "./discoveredIdDefinitions";
export * from "./emblemURL";
export * from "./environment";
export * from "./eventManager";
export * from "./getTimeDaysAgo";
export * from "./isExplosive";
export * from "./metaSortTank";
export * from "./normalizeBoundingBox";
export * from "./patientFetchJSON";
export * from "./popularTanks";
export * from "./progressiveStat";
export * from "./resolveDpm";
export * from "./resolvePenetrationCoefficient";
export * from "./reviews";
export * from "./romanize";
export * from "./sluggify";
export * from "./staticAsset";
export * from "./sum";
export * from "./tankDefinitions";
export * from "./tankIcon";
export * from "./tankNames";
export * from "./unionBoundingBox";
export * from "./uniqueGuns";
export * from "./unwrapBlitzkitResponse";
export * from "./votes";
export * from "./createDefaultProvisions";
export * from "./metaSortTank";
export * from "./romanize";
export * from "./youtubers";
@@ -1,7 +0,0 @@
import { staticAsset } from "@blitzkit/core";
import { fetchPB } from "../protobuf";
import { PopularTanks } from "../protos";
export function fetchPopularTanks() {
return fetchPB(staticAsset("definitions/popular-tanks.pb"), PopularTanks);
}
@@ -8,12 +8,12 @@ export function resolvePenetrationCoefficient(
) {
const calibrated = calibratedShells
? type === ShellType.SHELL_TYPE_AP
? 1.06
? 1.08
: type === ShellType.SHELL_TYPE_APCR
? 1.06
? 1.05
: type === ShellType.SHELL_TYPE_HEAT
? 1.07
: 1.07
? 1.13
: 1.08
: 1;
const equalizer = (equalize ? equalizerObj?.penetration : undefined) ?? 1;
-7
View File
@@ -1,7 +0,0 @@
import { staticAsset } from "@blitzkit/core";
import { fetchPB } from "../protobuf";
import { Reviews } from "../protos";
export function fetchReviews() {
return fetchPB(staticAsset("definitions/reviews.pb"), Reviews);
}
+2 -2
View File
@@ -1,4 +1,4 @@
import { slugify } from "transliteration";
import { deburr } from "lodash-es";
const nonAlphanumericRegex = /[^a-z0-9]/g;
const multipleDashesRegex = /--+/g;
@@ -6,7 +6,7 @@ const trailingDashRegex = /-$/g;
const leadingDashRegex = /^-/g;
export function sluggify(value: string) {
let slug = slugify(value);
let slug = deburr(value).toLowerCase();
slug = slug.replaceAll(nonAlphanumericRegex, "-");
slug = slug.replaceAll(multipleDashesRegex, "-");
slug = slug.replaceAll(trailingDashRegex, "");
@@ -1,5 +0,0 @@
import { assertSecret } from "./assertSecret";
export function staticAsset(path: string) {
return `${assertSecret(import.meta.env.PUBLIC_STATIC_ASSET_BASE)}/${path}`;
}
@@ -1,74 +0,0 @@
import { times } from "lodash-es";
import { CrewType, ShellType, TankClass, TankType } from "../../protos";
export const SHELL_NAMES: Record<ShellType, string> = {
[ShellType.SHELL_TYPE_AP]: "AP",
[ShellType.SHELL_TYPE_APCR]: "APCR",
[ShellType.SHELL_TYPE_HEAT]: "HEAT",
[ShellType.SHELL_TYPE_HE]: "HE",
};
export const CREW_MEMBER_NAMES = {
[CrewType.CREW_TYPE_COMMANDER]: "commander",
[CrewType.CREW_TYPE_DRIVER]: "driver",
[CrewType.CREW_TYPE_GUNNER]: "gunner",
[CrewType.CREW_TYPE_LOADER]: "loader",
[CrewType.CREW_TYPE_RADIOMAN]: "radioman",
} as const;
/**
* @deprecated use svg
*/
export const TANK_ICONS: Record<TankClass, string> = {
[TankClass.TANK_CLASS_TANK_DESTROYER]: "https://i.imgur.com/BIHSEH0.png",
[TankClass.TANK_CLASS_LIGHT]: "https://i.imgur.com/CSNha5V.png",
[TankClass.TANK_CLASS_MEDIUM]: "https://i.imgur.com/wvf3ltm.png",
[TankClass.TANK_CLASS_HEAVY]: "https://i.imgur.com/ECeqlZa.png",
};
/**
* @deprecated use svg
*/
export const TANK_ICONS_PREMIUM: Record<TankClass, string> = {
[TankClass.TANK_CLASS_TANK_DESTROYER]: "https://i.imgur.com/TCu3EdR.png",
[TankClass.TANK_CLASS_LIGHT]: "https://i.imgur.com/zdkpTRb.png",
[TankClass.TANK_CLASS_MEDIUM]: "https://i.imgur.com/3z7eHX6.png",
[TankClass.TANK_CLASS_HEAVY]: "https://i.imgur.com/P3vbmyA.png",
};
/**
* @deprecated use svg
*/
export const TANK_ICONS_COLLECTOR: Record<TankClass, string> = {
[TankClass.TANK_CLASS_TANK_DESTROYER]: "https://i.imgur.com/WTjeirB.png",
[TankClass.TANK_CLASS_LIGHT]: "https://i.imgur.com/EwhtKkU.png",
[TankClass.TANK_CLASS_MEDIUM]: "https://i.imgur.com/u8YDMBh.png",
[TankClass.TANK_CLASS_HEAVY]: "https://i.imgur.com/8xRf3nc.png",
};
export const TIERS = times(10, (index) => index + 1);
export const TIER_ROMAN_NUMERALS: Record<number, string> = {
1: "I",
2: "II",
3: "III",
4: "IV",
5: "V",
6: "VI",
7: "VII",
8: "VIII",
9: "IX",
10: "X",
};
export const flags: Record<string, string> = {
ussr: "<:ussr:1218421042033197197>",
germany: "🇩🇪",
usa: "🇺🇸",
china: "🇨🇳",
uk: "🇬🇧",
france: "🇫🇷",
japan: "🇯🇵",
european: "🇪🇺",
other: "<:other:1218421572243558482>",
};
export const TREE_TYPE_ICONS: Record<TankType, Record<TankClass, string>> = {
[TankType.TANK_TYPE_RESEARCHABLE]: TANK_ICONS,
[TankType.TANK_TYPE_PREMIUM]: TANK_ICONS_PREMIUM,
[TankType.TANK_TYPE_COLLECTOR]: TANK_ICONS_COLLECTOR,
};
@@ -1 +0,0 @@
export * from "./constants";
-7
View File
@@ -1,7 +0,0 @@
import { alias } from "@blitzkit/core";
export const BLITZKIT_TANK_ICON_SIZE = { width: 40 * 16, height: 30 * 16 };
export function tankIcon(id: number, size: "big" | "small" = "big") {
return alias("api", `/tanks/${id}/icons/${size}.webp`);
}
-51
View File
@@ -1,51 +0,0 @@
import { BlitzKitAPI } from "@blitzkit/core";
import locales from "@blitzkit/i18n/locales.json";
import { deburr } from "lodash-es";
import { I18nString } from "../protos";
export async function fetchTankNames(api: BlitzKitAPI) {
const [tankDefinitions, camouflageDefinitions] = await Promise.all([
api.tankDefinitions(),
api.camouflageDefinitions(),
]);
const tankDefinitionsArray = Object.values(tankDefinitions.tanks);
return await Promise.all(
tankDefinitionsArray.map(async (tank) => {
const searchableNameDeburr: I18nString = { locales: {} };
Object.entries(tank.name!).forEach(([key, value]) => {
searchableNameDeburr.locales[key] = deburr(value);
});
return {
id: tank.id,
name: tank.name,
searchableName: tank.name,
searchableNameDeburr,
camouflages: tank.camouflages
?.map((id) =>
locales.supported.map(
({ locale }) =>
camouflageDefinitions.camouflages[id]?.name!.locales[locale],
),
)
.flat()
.filter(Boolean)
.map(deburr)
.join(" "),
treeType: tank.type,
};
}),
);
}
export const SEARCH_KEYS = [
...locales.supported
.map(({ locale }) => [
`searchableName.locales.${locale}`,
`searchableNameDeburr.locales.${locale}`,
])
.flat(),
"camouflages",
];
+1 -1
View File
@@ -4,7 +4,7 @@ export * from "./imgur";
export * from "./math";
export * from "./patreon";
export * from "./protobuf";
export * from "./protos";
export * from "./statistics";
export * from "./streams";
export * from "./types";
export * from "./secrets";
+3
View File
@@ -0,0 +1,3 @@
export function copySign(a: number, b: number) {
return b >= 0 ? Math.abs(a) : -Math.abs(a);
}
+1
View File
@@ -3,6 +3,7 @@ export * from "./fisherYates";
export * from "./formatCompact";
export * from "./isNumber";
export * from "./NaNFallback";
export * from "./normalizeAngleDeg";
export * from "./normalizeAngleRad";
export * from "./normalToEuler";
export * from "./numberToRomanNumeral";
@@ -0,0 +1,6 @@
export function normalizeAngleDeg(angle: number) {
const newAngle = angle % 360;
if (newAngle > 360) return newAngle - 360;
if (newAngle < -360) return newAngle + 360;
return newAngle;
}
+5 -5
View File
@@ -1,11 +1,11 @@
import { assertSecret } from '../blitzkit/assertSecret';
import { secret } from "../secrets";
export function patreonLoginUrl() {
const params = new URLSearchParams({
response_type: 'code',
client_id: assertSecret(import.meta.env.PUBLIC_PATREON_CLIENT_ID),
redirect_uri: assertSecret(import.meta.env.PUBLIC_PATREON_REDIRECT_URI),
scope: 'identity',
response_type: "code",
client_id: secret("PUBLIC_PATREON_CLIENT_ID"),
redirect_uri: secret("PUBLIC_PATREON_REDIRECT_URI"),
scope: "identity",
});
return `https://www.patreon.com/oauth2/authorize?${params}`;
+5
View File
@@ -0,0 +1,5 @@
import { PassableSecretName } from "./secret";
export function hasSecret(name: PassableSecretName) {
return name in import.meta.env;
}
+3
View File
@@ -0,0 +1,3 @@
export * from "./secret";
export * from "./hasSecret";
export * from "./wellKnown";
+35
View File
@@ -0,0 +1,35 @@
import { hasSecret } from "./hasSecret";
import { WellKnownSecret } from "./wellKnown";
export enum SecretType {
String,
Number,
}
export type PassableSecretName = WellKnownSecret;
export function secret(
name: PassableSecretName,
type?: SecretType.String,
): string;
export function secret(
name: PassableSecretName,
type: SecretType.Number,
): number;
export function secret(name: PassableSecretName, type = SecretType.String) {
if (!hasSecret(name)) {
throw new Error(`Secret "${name}" not defined`);
}
const value = import.meta.env[name];
switch (type) {
case SecretType.String:
return String(value);
case SecretType.Number:
return Number(value);
}
}
+17
View File
@@ -0,0 +1,17 @@
export type WellKnownSecret =
// development set-up
| "TEMP"
// website
| "BUILD_CHUNK"
| "TEXTURE_CHUNKS"
// wotb
| "WOTB_SERVER"
| "WOTB_VERSION"
| "PUBLIC_WOTB_CLIENT"
| "WOTB_USMAP"
// google
| "GOOGLE_APPLICATION_CREDENTIALS"
| "PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID"
// patreon
| "PUBLIC_PATREON_CLIENT_ID"
| "PUBLIC_PATREON_REDIRECT_URI";
+51
View File
@@ -0,0 +1,51 @@
import { times } from 'lodash-es';
import { ReadStream, WriteStream } from './buffer';
export class DidsReadStream extends ReadStream {
dids() {
this.magic();
this.header();
return this.body();
}
magic() {
const magic = this.utf8(4);
if (magic !== 'DIDS') {
throw new Error(`Invalid DIDS magic number: "${magic}"`);
}
}
header() {
return {
version: this.uint16(),
};
}
body() {
const count = this.uint32();
return times(count, () => this.uint32());
}
}
export class DidsWriteStream extends WriteStream {
dids(ids: number[]) {
this.magic();
this.header();
this.body(ids);
return this;
}
magic() {
this.utf8('DIDS');
}
header() {
this.uint16(1);
}
body(ids: number[]) {
this.uint32(ids.length);
ids.forEach((id) => this.uint32(id));
}
}
+11 -9
View File
@@ -1,9 +1,11 @@
export * from "./buffer";
export * from "./bufferToBigInt";
export * from "./dds";
export * from "./pvr";
export * from "./rts";
export * from "./sc2";
export * from "./scg";
export * from "./scpg";
export * from "./windows";
export * from './buffer';
export * from './bufferToBigInt';
export * from './dds';
export * from './dids';
export * from './pvr';
export * from './rts';
export * from './sc2';
export * from './scg';
export * from './scpg';
export * from './windows';
@@ -1,3 +0,0 @@
export interface AvailableNationsYaml {
available_nations: string[];
}
@@ -1,10 +0,0 @@
export type BlitzModuleType = {
[key in "vehicle" | "engine" | "chassis" | "turret" | "gun"]:
| UnlocksInner
| UnlocksInner[];
};
interface UnlocksInner {
cost: number | string;
"#text": number;
}
-3
View File
@@ -1,3 +0,0 @@
export interface BlitzStrings {
[key: string]: string;
}
@@ -1 +0,0 @@
export type BlitzTankFilterDefinitionCategory = "clip";
-33
View File
@@ -1,33 +0,0 @@
export interface CamouflagesXml {
camouflages: Record<
string,
{
id: number;
userString: string;
description: string;
category: string;
group: string;
kind: string;
notInShop: boolean;
unlockCostCategory?: string;
vehicleFilter: {
include?: CamouflagesInclude | CamouflagesInclude[];
};
script: string[] | string;
icon?: string;
unlockPremium?: string;
unlockQuest?: string;
unlockClanLevel?: number;
unlockShopBundle?: string;
unlockTankRank?: number;
}
>;
}
type CamouflagesInclude =
| {
nations?: string;
}
| {
vehicle?: { name?: string; minLevel?: number; maxLevel?: number };
};
@@ -1,7 +0,0 @@
export type CamouflagesYaml = Record<
string,
{
userString?: string;
shortUserString?: string;
}
>;
@@ -1,4 +0,0 @@
export interface ChassisDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
}
@@ -1,7 +0,0 @@
export type CombatRolesYaml = Record<
string,
{
id: number;
default_abilities: string[];
}
>;
@@ -1,24 +0,0 @@
import { ConsumablesVehicleFilter } from "./consumablesVehicleFilter";
export interface ConsumablesCommon {
[key: string]: {
id: number;
userString: string;
description: string;
icon: string;
category: string;
tags: string;
vehicleFilter?: {
include: { vehicle: ConsumablesVehicleFilter; nations?: string };
exclude?: { vehicle: ConsumablesVehicleFilter; nations?: string };
};
script: {
"#text": string;
automatic?: boolean;
cooldown: number;
duration?: number;
shotEffect?: string;
bonusValues?: { [key: string]: number };
} & Record<string, string>;
};
}
@@ -1,4 +0,0 @@
export type ConsumablesVehicleFilter =
| { minLevel: number; maxLevel: number }
| { name: string }
| { extendedTags: string };
@@ -1,13 +0,0 @@
export interface EngineDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
shared: {
[key: string]: {
userString: string;
level: number;
fireStartingChance: number;
weight: number;
power: number;
};
};
}
@@ -1,31 +0,0 @@
export interface GunDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
shared: {
[key: string]: {
rotationSpeed: number;
weight: number;
shotDispersionFactors: {
turretRotation: number;
afterShot: number;
whileGunDamaged: number;
};
maxAmmo: number;
aimingTime: number;
shotDispersionRadius: number;
userString: string;
tags: string;
level: number;
pitchLimits: string;
burst?: { count: number; rate: number };
clip?: { count: number; rate: number };
shots: {
[key: string]: {
speed: number;
piercingPower: string;
maxDistance: number;
};
};
};
};
}
Loaded 100 of 895 files, more files were not shown because too many files have changed in this diff. Show more