mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba17aae706 | ||
|
|
30ca5c053a | ||
|
|
c36419f5b6 | ||
|
|
1879895db2 | ||
|
|
c964e3c8ec | ||
|
|
2ef6d18f82 | ||
|
|
10b672572b | ||
|
|
2a4efa8cd2 | ||
|
|
5a8435da29 | ||
|
|
3461349a96 | ||
|
|
3791e9df12 | ||
|
|
b3c36aac93 | ||
|
|
c0895409bc | ||
|
|
438b565cbb | ||
|
|
cf1a82e89b | ||
|
|
0506e361b2 | ||
|
|
d6a1357a82 | ||
|
|
a5a1dbd51b | ||
|
|
5201350e44 | ||
|
|
6a84b9d5ae | ||
|
|
cf04fe21b3 | ||
|
|
84eb3c2da3 | ||
|
|
22bf2dc1d8 | ||
|
|
b9c339daa7 | ||
|
|
ef3006cac1 | ||
|
|
e482fd40c1 | ||
|
|
cc4569966e | ||
|
|
3708a3ced7 | ||
|
|
0ae59c2fd7 | ||
|
|
7027f63236 | ||
|
|
6725e79021 | ||
|
|
5ca3cee9da | ||
|
|
602a5a1e99 | ||
|
|
bfbf3bdc39 | ||
|
|
644686582e | ||
|
|
1c00bc81f8 | ||
|
|
ac3b69bec5 | ||
|
|
3e14c943b6 | ||
|
|
d33633be2c | ||
|
|
4bf70d02d0 | ||
|
|
377bcf0e38 | ||
|
|
884b6d4318 | ||
|
|
ee94d762d0 | ||
|
|
bcde319ac1 | ||
|
|
a4828774ca | ||
|
|
e59725d763 | ||
|
|
a62179a853 | ||
|
|
38ba940a98 | ||
|
|
a07d6c775e | ||
|
|
f9f7468544 | ||
|
|
98724df711 | ||
|
|
5499cb5cca | ||
|
|
122b3f6478 | ||
|
|
d2b24fc953 | ||
|
|
bb557a7dd7 | ||
|
|
f1612e8fe3 | ||
|
|
d12f4fb00e | ||
|
|
ad555ece9a | ||
|
|
9aee8feaf4 | ||
|
|
baa16840df | ||
|
|
4e80490fd4 | ||
|
|
6233c16b88 | ||
|
|
c4f1d9f3b0 | ||
|
|
2c365cdea0 | ||
|
|
18afa4cd28 | ||
|
|
ef9778ea96 | ||
|
|
d8459d373c | ||
|
|
7900c61a9b | ||
|
|
ceb7842d49 | ||
|
|
e0c897025e | ||
|
|
ade6ec8af1 | ||
|
|
06cbe1e733 | ||
|
|
cb3e759f75 | ||
|
|
e4558d978c | ||
|
|
260d819c77 | ||
|
|
ffe58de179 | ||
|
|
6fbe1d6339 | ||
|
|
835d03d12c | ||
|
|
2b208fa6a0 | ||
|
|
66d63d5c60 | ||
|
|
6ccffa0458 | ||
|
|
4c0c10e39e | ||
|
|
3d41c56c73 | ||
|
|
e0dda567f4 | ||
|
|
91b367cd70 | ||
|
|
5a65fee1d1 | ||
|
|
c7856364ad | ||
|
|
65899a06c4 | ||
|
|
571ae81306 | ||
|
|
6b2dda0f9d | ||
|
|
9de41529d1 | ||
|
|
7dfdf4c11b | ||
|
|
db4132f666 | ||
|
|
d9688f6051 | ||
|
|
12e89a6b65 | ||
|
|
2d524cd273 | ||
|
|
1d44ecab18 | ||
|
|
bf9addf589 | ||
|
|
4deee2d709 | ||
|
|
309fda1ed1 | ||
|
|
d6e7f35214 | ||
|
|
7cd9131b60 | ||
|
|
599b81934e | ||
|
|
3f595d0d8a | ||
|
|
9afed23bb8 | ||
|
|
fc869f8b45 | ||
|
|
cf7ba1c6b5 | ||
|
|
07ca41e82a | ||
|
|
c487d9af61 | ||
|
|
9be6725043 | ||
|
|
e0daf85561 | ||
|
|
8203db3dc2 | ||
|
|
eb5527706e | ||
|
|
1f577c2317 | ||
|
|
68362c22b1 | ||
|
|
844965bcb0 | ||
|
|
1843eb3bcf | ||
|
|
60ab845326 | ||
|
|
3bbc083b2a | ||
|
|
8df159b182 | ||
|
|
c7238b0342 | ||
|
|
ba6006a320 | ||
|
|
43b9252f21 | ||
|
|
d727ceaaf6 | ||
|
|
eb95230a5f | ||
|
|
b6fd5eaa66 | ||
|
|
117f9892d6 | ||
|
|
c20caf45a2 | ||
|
|
670b678348 | ||
|
|
b1f0d4d844 | ||
|
|
e9d1c82a60 | ||
|
|
cc4345f1a3 | ||
|
|
6d8326861b | ||
|
|
8517ecfdb6 | ||
|
|
a38b5d7ddd | ||
|
|
f726793819 | ||
|
|
19531aa9ae | ||
|
|
6d6bae847b | ||
|
|
cc70b3ccc3 | ||
|
|
e3bf619808 | ||
|
|
f6cb4f2518 | ||
|
|
f396d6c4a1 | ||
|
|
768c420ae4 | ||
|
|
7fba197bef | ||
|
|
b074481e1a | ||
|
|
987e35ef8f | ||
|
|
83c77b5945 | ||
|
|
e4f0120d67 | ||
|
|
2055c00154 | ||
|
|
c814230dcb | ||
|
|
2f31aadb29 | ||
|
|
3113bf3a47 | ||
|
|
70bd54e03b | ||
|
|
8863ac5fde | ||
|
|
b62009ce2b | ||
|
|
0f3d230f42 | ||
|
|
9db6b997c3 | ||
|
|
d9fcbd028b | ||
|
|
db74058075 | ||
|
|
4180736d37 | ||
|
|
382f04229e | ||
|
|
3c9ba9ec53 | ||
|
|
4848234264 | ||
|
|
2ad0fcfdf9 | ||
|
|
8f0894364b | ||
|
|
3695b8f7f4 | ||
|
|
4f8c1d416f | ||
|
|
453286677a | ||
|
|
53a49f199a | ||
|
|
fdfde46342 | ||
|
|
1d836b2053 | ||
|
|
6d448dc5c4 | ||
|
|
75d4d60b30 | ||
|
|
e7f47fd2fd | ||
|
|
50a3d1e922 | ||
|
|
e296267ccd | ||
|
|
d9aca6a3ed | ||
|
|
d07a6e954e | ||
|
|
6bcaf685f8 | ||
|
|
066f17a2f3 | ||
|
|
374d6c22f9 | ||
|
|
55927258ca | ||
|
|
bb99220497 | ||
|
|
4f6b41e264 | ||
|
|
f9c4cee30c | ||
|
|
d865043b34 | ||
|
|
a4080f21b9 | ||
|
|
853c520d8a | ||
|
|
d78f8c6ec4 | ||
|
|
318a71bd32 | ||
|
|
2458d2c80c | ||
|
|
37a72e3bb5 | ||
|
|
bc9c9ad4e7 | ||
|
|
b38c732983 | ||
|
|
415861f6e8 | ||
|
|
3124afa253 | ||
|
|
8523b9f44f | ||
|
|
71e0404890 | ||
|
|
c01fd1f4ff | ||
|
|
905ba59f4e | ||
|
|
33eea3f261 | ||
|
|
2237d460bb | ||
|
|
12e7d664e5 | ||
|
|
9e4bdcd458 | ||
|
|
03ec44c765 | ||
|
|
d9f6acea2d | ||
|
|
5b5e204cce | ||
|
|
60b2e62713 | ||
|
|
5e7620ccf4 | ||
|
|
c3a83abe5d | ||
|
|
73cb3873d9 | ||
|
|
3b429a6c05 | ||
|
|
76fe6b5e20 | ||
|
|
5c8af447b6 | ||
|
|
5a805b1cec | ||
|
|
326ae548b6 | ||
|
|
3a2e75ab02 | ||
|
|
b4f8340f49 | ||
|
|
5e0d0a3d6d | ||
|
|
4122ff5bf1 | ||
|
|
d937f62ac1 | ||
|
|
b4f0a9f1b9 | ||
|
|
68535149e3 | ||
|
|
2419934638 | ||
|
|
c0076e9ef9 | ||
|
|
1cd7438d5d | ||
|
|
ab798b722f | ||
|
|
4e513998a9 | ||
|
|
df34226a22 | ||
|
|
2f7f2362bb | ||
|
|
66a54a9996 | ||
|
|
fdcbb8f29f | ||
|
|
5ab0a12f4c | ||
|
|
d19d4e0e26 | ||
|
|
2f9791d34c | ||
|
|
cd53136dce | ||
|
|
2eadad8612 | ||
|
|
2fe3c50bef | ||
|
|
10c7e4a19d | ||
|
|
143c84f52f | ||
|
|
0c54905384 | ||
|
|
437c5e0f57 | ||
|
|
b4e4702415 | ||
|
|
4b8a154142 | ||
|
|
31a61c8a6b | ||
|
|
631af6205e | ||
|
|
a78543c60f | ||
|
|
00783749ba | ||
|
|
9aba91a773 | ||
|
|
6667e548b2 | ||
|
|
67f9147aac | ||
|
|
20f54a39d6 | ||
|
|
26d3bdaac7 | ||
|
|
dd3c86aa5b | ||
|
|
f770ba0e5e | ||
|
|
c444210294 | ||
|
|
74ac5b5ac2 | ||
|
|
7188014fbb | ||
|
|
c039862c56 | ||
|
|
3d6d18267d | ||
|
|
dced738055 | ||
|
|
e5ddbc7297 | ||
|
|
7f9a54ef85 | ||
|
|
65c52c2e82 | ||
|
|
5a34a35638 | ||
|
|
1281503de9 | ||
|
|
7a3bdd8f35 | ||
|
|
d7e556e136 | ||
|
|
0997e2b089 | ||
|
|
33c0fbbb9b | ||
|
|
bef33659e5 | ||
|
|
ede1c90f10 | ||
|
|
84dcfe4a14 | ||
|
|
7a3541439b | ||
|
|
7ab8a01fb6 | ||
|
|
88729e0eca | ||
|
|
4218626cbf | ||
|
|
08eed5ce31 | ||
|
|
63a6e47878 | ||
|
|
984dad4111 | ||
|
|
00e89cff55 | ||
|
|
2540b71fb7 | ||
|
|
cda83639b2 | ||
|
|
e4e1903a2a | ||
|
|
a5df2528f6 | ||
|
|
74c0740941 | ||
|
|
74e85f82f1 | ||
|
|
80fca2e53a | ||
|
|
4d0ca1cd1a | ||
|
|
50aeb01e0a | ||
|
|
a1a218c325 | ||
|
|
e560754bb6 | ||
|
|
dbc23c6473 | ||
|
|
a2bd62da92 | ||
|
|
c0d16b51de | ||
|
|
d68870c254 | ||
|
|
d91b46d730 | ||
|
|
0758f0d8aa | ||
|
|
eacd63d472 | ||
|
|
39240e908d | ||
|
|
2f734c237b | ||
|
|
f155bae9bf | ||
|
|
1d37df710e | ||
|
|
d35ed8a212 | ||
|
|
33cd556c45 | ||
|
|
2dd8ffe570 | ||
|
|
a22f9ca072 | ||
|
|
520d530155 | ||
|
|
5a4326dd32 | ||
|
|
eb41434565 | ||
|
|
bd160efdb2 | ||
|
|
766a7081db | ||
|
|
e091cf5d06 | ||
|
|
c81f6d08c0 | ||
|
|
ced3897696 | ||
|
|
5f256ed84d | ||
|
|
53d811eeef | ||
|
|
ef91eadaea | ||
|
|
17bfb7c397 | ||
|
|
f5d06631c2 | ||
|
|
258279205d | ||
|
|
6ace0aa38a | ||
|
|
bae1e944b7 | ||
|
|
62d4ec07f0 | ||
|
|
5e912e5b51 | ||
|
|
a08107d0b2 | ||
|
|
6a28fb0277 | ||
|
|
37b8e75f83 | ||
|
|
7a9f43657d | ||
|
|
6ca3ce731b | ||
|
|
ff48cdc44e | ||
|
|
2fe0e9379e | ||
|
|
e48c57068f | ||
|
|
755f879192 | ||
|
|
73a51cbb40 | ||
|
|
fa72e8efab | ||
|
|
166c26b65a | ||
|
|
7ff4da1fc1 | ||
|
|
6a8e1d14ee | ||
|
|
edf434ed95 | ||
|
|
5bf6a14cff | ||
|
|
fcb848df5b | ||
|
|
8089a5eaa6 | ||
|
|
4a7927b300 | ||
|
|
6822298ae3 | ||
|
|
19aaba9728 | ||
|
|
6b98f4d59b | ||
|
|
c20d3b6b67 | ||
|
|
a4451de79c | ||
|
|
5ae6961a13 | ||
|
|
02aed3e3a5 | ||
|
|
e06aaa4bcf | ||
|
|
f1c31c6d79 | ||
|
|
d851a05f53 | ||
|
|
0db4be4d20 | ||
|
|
eb6aa5bc5b | ||
|
|
b9895b1c0f | ||
|
|
71c1f8dac9 | ||
|
|
aee1ddb948 | ||
|
|
28e6b0eb98 | ||
|
|
b54d4a59cf | ||
|
|
b45ec7ae9e | ||
|
|
d9958558b5 | ||
|
|
b9f68d99e1 | ||
|
|
bb6fbf286f | ||
|
|
9277e45be5 | ||
|
|
c056cdfafe | ||
|
|
e586e90ecc | ||
|
|
b73676ad3c | ||
|
|
ee3616e30b | ||
|
|
182744e8f4 | ||
|
|
2d9d167788 | ||
|
|
132209c7fe | ||
|
|
039e760570 | ||
|
|
a8dcf9b279 | ||
|
|
65705ebda0 | ||
|
|
1a4ade76b7 | ||
|
|
429076c297 | ||
|
|
d165a1fc35 | ||
|
|
9687720a83 | ||
|
|
b9d4c391fe | ||
|
|
1da517746a | ||
|
|
19664d55aa | ||
|
|
a40f86f982 | ||
|
|
e0e5ea8995 | ||
|
|
cd277fb2f1 | ||
|
|
ffe6ccaed0 | ||
|
|
bc60b4b42c | ||
|
|
a83ce6d350 | ||
|
|
ac35540871 | ||
|
|
84dd3317dc | ||
|
|
a53c20fa6a | ||
|
|
87d01dab3f | ||
|
|
0dea93241b | ||
|
|
395240394f | ||
|
|
696b5a54b8 | ||
|
|
21fcc23548 | ||
|
|
48dd9bec2a | ||
|
|
970d93e7e0 | ||
|
|
387a67266f | ||
|
|
ea013c4df8 | ||
|
|
420bda8202 | ||
|
|
b48515bf37 | ||
|
|
d5d0a8b308 | ||
|
|
5b76a08167 | ||
|
|
e68b4bea5d | ||
|
|
b893409a0a | ||
|
|
8dd4d80fca | ||
|
|
81e7f78e55 | ||
|
|
4584490b0d | ||
|
|
5cf8e48747 | ||
|
|
3e2bfc453a | ||
|
|
dbc3d0df3a | ||
|
|
9a1c66932a | ||
|
|
e364d1fda2 | ||
|
|
0e6b79dcbe | ||
|
|
88a682bae8 | ||
|
|
1ea1b7fa41 | ||
|
|
b95d021144 | ||
|
|
e4a35600a4 | ||
|
|
3b933f2cbc | ||
|
|
3da154b75d | ||
|
|
c4fa6cebfa | ||
|
|
2d3e45df73 | ||
|
|
cb45faf83c | ||
|
|
0722ff6bfb | ||
|
|
594b1eb311 | ||
|
|
f2f7d8aa3d | ||
|
|
1cf6a9e76a | ||
|
|
8c0d48447f | ||
|
|
0e869307c3 | ||
|
|
c7d2009418 | ||
|
|
a8c3d482a5 | ||
|
|
703bb36226 | ||
|
|
f3b585827c | ||
|
|
5e4170be7a | ||
|
|
d660fa6375 | ||
|
|
cefacbeb25 | ||
|
|
ea9cb79d84 | ||
|
|
ceaf1ea70a | ||
|
|
205d9c0ddf | ||
|
|
2608d69ffe | ||
|
|
d910ed9f5e | ||
|
|
f1767bf5d7 | ||
|
|
86eecd202a | ||
|
|
6b8433c690 | ||
|
|
a2b67e215d | ||
|
|
42c1cb653a | ||
|
|
5ab6c45868 | ||
|
|
2e39b77c80 | ||
|
|
a58079eed6 | ||
|
|
06c1e05205 | ||
|
|
bc57231d53 | ||
|
|
a7a164d991 | ||
|
|
fa279292b0 | ||
|
|
c4ada11886 | ||
|
|
913bc82350 | ||
|
|
6f00728187 | ||
|
|
0beaf3f9d6 | ||
|
|
5deafff3ab | ||
|
|
e05f02099d | ||
|
|
0f29145ab0 | ||
|
|
563ada179b | ||
|
|
046b9f4de4 | ||
|
|
8512557e76 | ||
|
|
3c7a10a949 | ||
|
|
fa489a665a | ||
|
|
a0d6aecf7a | ||
|
|
94099412b0 | ||
|
|
abd63b92a8 | ||
|
|
a5aad61cb7 | ||
|
|
3293afba76 | ||
|
|
71c9d1461f | ||
|
|
7a8ad6c290 | ||
|
|
8d190b62b0 | ||
|
|
b69abbc75e | ||
|
|
1836f0041d | ||
|
|
5285f8fab1 | ||
|
|
9daab37ba1 | ||
|
|
cee082ab67 | ||
|
|
fd1884542d | ||
|
|
489fb23683 | ||
|
|
b3d206b0ae | ||
|
|
98797a6cf5 | ||
|
|
cd69023dff | ||
|
|
ab0d3f7170 | ||
|
|
282b8f8a37 | ||
|
|
d1f5ef01c9 | ||
|
|
4a1f3ea12d | ||
|
|
8c1fc6f9df | ||
|
|
cc734f3934 | ||
|
|
58271befde | ||
|
|
05c8e50e82 | ||
|
|
a28d6c49da | ||
|
|
f7f11aac58 | ||
|
|
88acf6bce6 | ||
|
|
5866072aa7 | ||
|
|
76016ae41f | ||
|
|
532315f37c | ||
|
|
68e79cb6b8 | ||
|
|
670debbe26 | ||
|
|
28de3a0283 | ||
|
|
f1c50c2531 | ||
|
|
e17470e419 | ||
|
|
515791e52f | ||
|
|
f6cf4a87f9 | ||
|
|
2c0965f437 | ||
|
|
3698826ac4 | ||
|
|
a2685394fd | ||
|
|
c51065e512 | ||
|
|
602f332ec5 | ||
|
|
95fea65409 | ||
|
|
90f4b2f8f3 | ||
|
|
760ddca1f3 | ||
|
|
28edce8033 | ||
|
|
b7e6bfa205 | ||
|
|
96844a074a | ||
|
|
a3bd3fcd41 | ||
|
|
454d1ad159 | ||
|
|
0cd5ea0322 | ||
|
|
ea77120bc5 | ||
|
|
eb6aa03a5e | ||
|
|
104ddab5a4 | ||
|
|
c708ab6004 | ||
|
|
bb6044a704 | ||
|
|
ab83015418 | ||
|
|
5e6f0e5d18 | ||
|
|
f2da3994e4 | ||
|
|
dee0dc6a14 | ||
|
|
973d24a615 | ||
|
|
221492c645 | ||
|
|
243c81cb0c | ||
|
|
7cef95e150 | ||
|
|
d71ea5c383 | ||
|
|
c98c19dc36 | ||
|
|
c8bb1f190a | ||
|
|
d8f6e8fe8e | ||
|
|
c7cb135a24 | ||
|
|
2f95c57b7f | ||
|
|
e40fd2d2b4 | ||
|
|
919c1fcd36 | ||
|
|
641e6c9d9f | ||
|
|
46fb043920 | ||
|
|
e5ec1a70d2 | ||
|
|
c1e472a6ab | ||
|
|
650dbf66a9 | ||
|
|
c92d355484 | ||
|
|
5f6780f0f7 | ||
|
|
0ba319432c | ||
|
|
236271d279 | ||
|
|
61d53936b2 | ||
|
|
76a8f8396b | ||
|
|
31f7618a09 | ||
|
|
099e878c55 | ||
|
|
1f7b78dabc | ||
|
|
2fd9205662 | ||
|
|
fa9ed570ce | ||
|
|
66ad7371ac | ||
|
|
495f20cd90 | ||
|
|
f673aefb8f | ||
|
|
458915473c | ||
|
|
72ff2574cd | ||
|
|
fda9c72980 | ||
|
|
b02963323e | ||
|
|
5b02f3ad02 | ||
|
|
ed59d8eefa | ||
|
|
4e6a1de6ca | ||
|
|
b52f742527 | ||
|
|
031c1948e7 | ||
|
|
700bb544a3 | ||
|
|
3d82a2ec75 | ||
|
|
eba2057306 | ||
|
|
8c0ddd473c | ||
|
|
0df58d2d2c | ||
|
|
da8025a0ad | ||
|
|
aa8bb1c040 | ||
|
|
b1f29a6148 | ||
|
|
5a5643ce3d | ||
|
|
dfc55b745b | ||
|
|
7b1fedf657 | ||
|
|
18869712e1 | ||
|
|
ea70033b08 | ||
|
|
ec9a3cb2ce | ||
|
|
0412eb478e | ||
|
|
30cb319c1e | ||
|
|
40f3311ff7 | ||
|
|
5510c25a59 | ||
|
|
1778529030 | ||
|
|
ad89679959 | ||
|
|
4f5a8c9a37 | ||
|
|
9bc745bc0e | ||
|
|
a17a8888ff | ||
|
|
97b9137e9a | ||
|
|
201f8f94a5 | ||
|
|
799d5e3fe2 | ||
|
|
d8d1b4a016 | ||
|
|
dea84321d4 | ||
|
|
adf00a0bbd | ||
|
|
a06fc87009 | ||
|
|
7af06d2120 | ||
|
|
8e26413628 | ||
|
|
b7d5e3eeab | ||
|
|
b48e6c4739 | ||
|
|
48441d0cda | ||
|
|
d0f277e878 | ||
|
|
7230d6663d | ||
|
|
cec79736bc | ||
|
|
0fc8ea8777 | ||
|
|
3d41198178 | ||
|
|
c195e5f440 | ||
|
|
11bbe9309e | ||
|
|
749d3fa7c5 | ||
|
|
2c15190606 | ||
|
|
0674112df6 | ||
|
|
9604eb90e1 | ||
|
|
9005383c65 | ||
|
|
9923efe8ab | ||
|
|
e52063c12d | ||
|
|
53662c1174 | ||
|
|
bba8118dd7 | ||
|
|
513105a624 | ||
|
|
1e64cb9e7d | ||
|
|
9ad3fb220f | ||
|
|
559f3edd06 | ||
|
|
e3c1306ef3 | ||
|
|
8a381b5d24 | ||
|
|
83586bdb71 | ||
|
|
a652fd29ae | ||
|
|
1f6eab2ef8 | ||
|
|
96b0761832 | ||
|
|
91bd3f7769 | ||
|
|
ddecff827a | ||
|
|
66f33746cb | ||
|
|
ae0e2f45dc | ||
|
|
1bd4c498c2 | ||
|
|
afb730924c | ||
|
|
25fe926cba | ||
|
|
7cf353df80 | ||
|
|
796f6685e7 | ||
|
|
76d83185a5 | ||
|
|
8073e4aa2d | ||
|
|
acb52b9888 | ||
|
|
6dffe3db45 | ||
|
|
5fcc42e065 | ||
|
|
fc8e0e55f0 | ||
|
|
ef52434a42 | ||
|
|
ea490628fb | ||
|
|
dc37b23727 | ||
|
|
746dd998aa | ||
|
|
e234b29e16 | ||
|
|
8d51ce2bea | ||
|
|
b31c7a6738 | ||
|
|
320aead17b | ||
|
|
b5cb2acdf4 | ||
|
|
0808bb0d9b | ||
|
|
95bb67bcf1 | ||
|
|
96310a9d63 | ||
|
|
53a9c5f2de | ||
|
|
f14ca394b5 | ||
|
|
79bc259565 | ||
|
|
94f67e30f1 | ||
|
|
78dce028d9 | ||
|
|
61fe8c7e7c | ||
|
|
3e18d5a8db | ||
|
|
57170469f2 | ||
|
|
9b134fab27 | ||
|
|
9cced11199 | ||
|
|
370ef2df65 | ||
|
|
45dc99e1ce | ||
|
|
d8a08a93e0 | ||
|
|
d90a3cc010 | ||
|
|
53c0f48437 | ||
|
|
a54ba78dbf | ||
|
|
2b5ffb2b84 | ||
|
|
f1410cf321 | ||
|
|
ffa1395b50 | ||
|
|
408b561b75 | ||
|
|
187230439b | ||
|
|
e241870ece | ||
|
|
0537418f6a | ||
|
|
cf4fa83d44 | ||
|
|
a6f60ac0de | ||
|
|
f02ae9833d | ||
|
|
18edc38433 | ||
|
|
4c5ad23edf | ||
|
|
6288e3f69a | ||
|
|
eebc33581c | ||
|
|
c873c32d09 | ||
|
|
36583add1d | ||
|
|
829df50eca | ||
|
|
264832d8a2 | ||
|
|
85491c7f22 | ||
|
|
8670e5f9a7 | ||
|
|
6b4dc4ca8d | ||
|
|
502dcf4e54 | ||
|
|
a1721eb05e | ||
|
|
292df5f5d9 | ||
|
|
fcac6e36fd | ||
|
|
8d9ca3d716 | ||
|
|
9640920863 | ||
|
|
887d3079df | ||
|
|
250b61b68d | ||
|
|
d306b51c2c | ||
|
|
8f44cdedd4 | ||
|
|
3a968fa8e5 | ||
|
|
7249c3be9e | ||
|
|
3d23ea1497 | ||
|
|
de6a4d5675 | ||
|
|
5e989a16bc | ||
|
|
fd2e2f9c7b | ||
|
|
843992e631 | ||
|
|
c51ddbc725 | ||
|
|
4f24db0956 | ||
|
|
25cfb7db74 | ||
|
|
636c54aa36 | ||
|
|
f30e9f810e | ||
|
|
2c9a7f9a99 | ||
|
|
7c6f381bbe | ||
|
|
6c0b46725d | ||
|
|
7b86c4e4eb | ||
|
|
5ab30c373e | ||
|
|
3c80a43435 | ||
|
|
9ae8b0ac49 | ||
|
|
135dd85a82 | ||
|
|
4055988478 | ||
|
|
6285f33989 | ||
|
|
e1c8194beb | ||
|
|
73c7bdf0c0 | ||
|
|
14f39d71ac | ||
|
|
943335f8a9 | ||
|
|
d269eb178d | ||
|
|
6fe7ce3952 | ||
|
|
3a66ccb6d2 | ||
|
|
7e9acfdd7b | ||
|
|
525c9ceac3 | ||
|
|
7b903f4fc7 | ||
|
|
17869d85c6 | ||
|
|
3f12b08a85 | ||
|
|
d2269a53cc | ||
|
|
8e3e26f677 | ||
|
|
449b4f59e5 | ||
|
|
b13d675692 | ||
|
|
46f1461de6 | ||
|
|
952523d3f9 | ||
|
|
319c865ef0 | ||
|
|
018c6802f4 | ||
|
|
583522c3a2 | ||
|
|
8461f6514a | ||
|
|
eef26defb4 | ||
|
|
68e2ececce | ||
|
|
169f757fb2 | ||
|
|
cbb5392525 | ||
|
|
bc088a699f | ||
|
|
8e004d0e3a | ||
|
|
ac2c7fe9ab | ||
|
|
d8a48043c5 | ||
|
|
a7ee81458c | ||
|
|
e067b1bf94 | ||
|
|
a774f631f0 | ||
|
|
720eb77341 | ||
|
|
a5bbbfc960 | ||
|
|
46c0726277 | ||
|
|
8ca2315874 | ||
|
|
bac2f097f2 | ||
|
|
f0ca38e828 | ||
|
|
176eb1424d | ||
|
|
2f10e68e98 | ||
|
|
33ccf47a92 | ||
|
|
13faad0977 | ||
|
|
ee9dbdaf74 | ||
|
|
76625dc7b2 | ||
|
|
eac15cc15d | ||
|
|
4e66f57150 | ||
|
|
4f80169f9b | ||
|
|
8b183269d1 | ||
|
|
c5e2c1fd0f | ||
|
|
2d2d31adf7 | ||
|
|
798df862f7 | ||
|
|
c3c16bf607 | ||
|
|
c3e449745e | ||
|
|
cd0769675e | ||
|
|
86e369af19 | ||
|
|
0bba768fbf | ||
|
|
8f12a77e12 | ||
|
|
0c2877d42f | ||
|
|
e22156e779 | ||
|
|
6a6eab1c94 | ||
|
|
bfb7928a74 | ||
|
|
9566065160 | ||
|
|
6949b27aa7 | ||
|
|
2482efba29 | ||
|
|
dc60f3c970 | ||
|
|
84cd18d1d5 | ||
|
|
770cd1f928 | ||
|
|
cf17b56cc7 | ||
|
|
0dd3e71353 | ||
|
|
be9b3a41a8 | ||
|
|
be7943d5e2 | ||
|
|
3ef102ba55 | ||
|
|
660e901283 | ||
|
|
b42d2a96a2 | ||
|
|
10d5e2453e | ||
|
|
e4d3e61bbb | ||
|
|
ab1c8a825f | ||
|
|
4b06e2a175 | ||
|
|
08e07957a7 | ||
|
|
ab4602094a | ||
|
|
efe380bdfe | ||
|
|
1bc7a49cdb | ||
|
|
4c30ce65ab | ||
|
|
6464708514 | ||
|
|
d642116dd4 | ||
|
|
4ef0b6d37f | ||
|
|
57b58775c6 | ||
|
|
7e076a1e34 | ||
|
|
27a958079f | ||
|
|
c9570e5fe8 | ||
|
|
71af5d2166 | ||
|
|
5da177e520 | ||
|
|
c6106f1b92 | ||
|
|
b2bcc8548f | ||
|
|
3005cadc97 | ||
|
|
c79a5a55ac | ||
|
|
b9c978548a | ||
|
|
48dcbbc227 | ||
|
|
ed041b78bb | ||
|
|
e11ab1ae33 | ||
|
|
e99b125517 | ||
|
|
f2d40d40fd | ||
|
|
21ece80187 | ||
|
|
f58b6dcd17 | ||
|
|
579f604b9f | ||
|
|
49b4810a78 | ||
|
|
51f28b5936 | ||
|
|
37a50f8bc1 | ||
|
|
e0ab00386c | ||
|
|
62fd98e075 | ||
|
|
aef020c744 | ||
|
|
5be9c94641 | ||
|
|
0ce34670c4 | ||
|
|
5bcfa88f48 | ||
|
|
7391937070 | ||
|
|
3d5b8e31c8 | ||
|
|
6cc616d993 | ||
|
|
9a686230c6 | ||
|
|
22831cc268 | ||
|
|
2f183896eb | ||
|
|
633090f967 | ||
|
|
ece0791a08 | ||
|
|
8bc4eab2c0 | ||
|
|
bb0b39fabb | ||
|
|
2b02158e19 | ||
|
|
2e97ccd40d | ||
|
|
da6691928e | ||
|
|
1a1b8c3a65 | ||
|
|
8ebd604cde | ||
|
|
d9521ce1e5 | ||
|
|
f91dd1e2c0 | ||
|
|
474846e9c2 | ||
|
|
cae2bcc3ea | ||
|
|
13784345af | ||
|
|
2f5e1eeadc | ||
|
|
69676da446 | ||
|
|
ed283d4d2e | ||
|
|
f7e1b08788 | ||
|
|
66e65587bd | ||
|
|
59d837bbb2 | ||
|
|
5dc55914ed | ||
|
|
912f134eb6 | ||
|
|
aeed328c18 | ||
|
|
17526ca59c | ||
|
|
c19eeb01e1 | ||
|
|
575fdbbcc3 | ||
|
|
679bd2956b | ||
|
|
e6b29a4ab8 | ||
|
|
d45637a407 | ||
|
|
876dee1870 | ||
|
|
263740dd30 | ||
|
|
09848c7b21 | ||
|
|
c2abc94241 | ||
|
|
781d2da933 | ||
|
|
cfe0060121 | ||
|
|
434d2d3d5d | ||
|
|
e6a1a98fd3 | ||
|
|
5b3723322e | ||
|
|
631dc547fa | ||
|
|
59324f7438 | ||
|
|
2727b2babe | ||
|
|
89f8136137 | ||
|
|
165e9c62e8 | ||
|
|
5091066d6c | ||
|
|
e8c1ce333c | ||
|
|
9b83cde515 | ||
|
|
c4a6b4a680 | ||
|
|
9c784228fb | ||
|
|
16e2f9ac96 | ||
|
|
b747d31574 | ||
|
|
14fccf3f6e | ||
|
|
c73eb0d951 | ||
|
|
2b008ecabe | ||
|
|
8908a720f3 | ||
|
|
d67b0ef5ab | ||
|
|
72769fbcb0 | ||
|
|
7268e5fc11 | ||
|
|
ec547af49e | ||
|
|
8f54b8a576 | ||
|
|
9d36ad6dab | ||
|
|
f64e85c1cf | ||
|
|
5f3a1b1311 | ||
|
|
207b9ae36c | ||
|
|
afd99a1dfe | ||
|
|
bc9e1c3007 | ||
|
|
4b88a52fcf | ||
|
|
ca7c01bbc8 | ||
|
|
7fcd4a1e94 | ||
|
|
6a3fefd513 | ||
|
|
b329152dc3 | ||
|
|
1cf31c67f8 | ||
|
|
5d603cc246 | ||
|
|
44f35a813c | ||
|
|
7e6e480788 | ||
|
|
987a14b68d | ||
|
|
d9c2f53c6a | ||
|
|
4811668832 | ||
|
|
354be775ad | ||
|
|
e9d5de7e97 | ||
|
|
b25814e399 | ||
|
|
91d98c6aad | ||
|
|
1132018d16 | ||
|
|
f07aa9a2a7 | ||
|
|
3e00860f7f | ||
|
|
6ada813dd5 | ||
|
|
643c7272ca | ||
|
|
97b251e3a3 | ||
|
|
94db2c9159 | ||
|
|
9d346082ea | ||
|
|
ea7d822420 | ||
|
|
3058756346 | ||
|
|
6cfa3b9c70 | ||
|
|
d43391e625 | ||
|
|
7f796c5ec1 | ||
|
|
8d32c7ce23 | ||
|
|
820c125912 | ||
|
|
79a01da317 | ||
|
|
d1a4b0d1d1 | ||
|
|
35db670f5c | ||
|
|
b2c4bfc926 | ||
|
|
400c6ebfe1 | ||
|
|
2b08ecad7f | ||
|
|
6303fbb961 | ||
|
|
d1fe7f6533 | ||
|
|
899aefd851 | ||
|
|
c04e1ae0f5 | ||
|
|
9f77936e3e | ||
|
|
34c2cfdb2a | ||
|
|
1359452f67 | ||
|
|
1fcb60ab3f | ||
|
|
33a0af1bcd | ||
|
|
acf36ec461 | ||
|
|
31666c9bb6 | ||
|
|
64139e301b | ||
|
|
84893842e9 | ||
|
|
11cc3aa783 | ||
|
|
bcd4f279a8 | ||
|
|
27cfc225de | ||
|
|
94623c43eb | ||
|
|
e8b8b19332 | ||
|
|
1b376746a2 | ||
|
|
1a2f440e11 | ||
|
|
b0dfa6949c | ||
|
|
de9254a221 | ||
|
|
c278bb094a | ||
|
|
bfc7d76853 | ||
|
|
4b2367699a | ||
|
|
ca39b8e215 | ||
|
|
38f3ccfbd8 | ||
|
|
4d9cf4329c | ||
|
|
33674a0d5b | ||
|
|
6a18abf17f | ||
|
|
6984794be1 | ||
|
|
f666023bef | ||
|
|
6830aa7ac0 | ||
|
|
6bcf5c25dc | ||
|
|
b559878667 | ||
|
|
c6184acf26 | ||
|
|
5d58530661 | ||
|
|
e04bfcde3c | ||
|
|
c8be2257ef | ||
|
|
0f45476a8b | ||
|
|
99cdf931a8 | ||
|
|
ed4658adcc | ||
|
|
0cc9089156 | ||
|
|
71e0e8e09e | ||
|
|
0dc708ab2a | ||
|
|
f73426df6a | ||
|
|
abc8acb6ed | ||
|
|
1944745902 | ||
|
|
e9bb76e698 | ||
|
|
5810ca8f81 | ||
|
|
c6249c5a83 | ||
|
|
2c0f9184db | ||
|
|
15cf4ec0f1 | ||
|
|
8ba56069c4 | ||
|
|
3889c0f75d | ||
|
|
b1685bcc12 | ||
|
|
d0055bb118 | ||
|
|
8a7d18d586 | ||
|
|
b6f235efcd | ||
|
|
b609fcbac7 | ||
|
|
969c9a903e | ||
|
|
c4b5baf6cc | ||
|
|
0aca2dab6c | ||
|
|
6fa70711d7 | ||
|
|
14cbd67e04 | ||
|
|
f8aa51941d | ||
|
|
f86a4022ea | ||
|
|
cddfef1b9f | ||
|
|
c12fb0d668 | ||
|
|
ce3c9b936b | ||
|
|
7c3bc8884d | ||
|
|
6ebced6f01 | ||
|
|
6e7df526ff | ||
|
|
5d1352590a | ||
|
|
b0aff726b5 | ||
|
|
ca002623b8 | ||
|
|
f0e8153a67 | ||
|
|
a0612b2beb | ||
|
|
3071c887cc | ||
|
|
47d7ebb15f | ||
|
|
2512134e15 | ||
|
|
e682172486 | ||
|
|
0c9714b5a5 | ||
|
|
f13622836e | ||
|
|
1a91214dd0 | ||
|
|
ceb759aba1 | ||
|
|
e88fdd861f | ||
|
|
85166a2614 | ||
|
|
fde9319bbd | ||
|
|
5d733a79ef | ||
|
|
ee58b3543e | ||
|
|
3d0c87579b | ||
|
|
4f7b4f1602 | ||
|
|
b1c3453d38 | ||
|
|
23974ee83a | ||
|
|
84951026e0 | ||
|
|
8cae642243 | ||
|
|
8b5638f82d | ||
|
|
16500793a5 | ||
|
|
e294f2e286 | ||
|
|
a237e1541b | ||
|
|
ffdb75d028 | ||
|
|
9ea307d90a | ||
|
|
1059b3e6e6 | ||
|
|
5ec40271f8 | ||
|
|
adf0aecd13 | ||
|
|
5ab102ed55 | ||
|
|
aec96d70d2 | ||
|
|
da50b5c8c8 | ||
|
|
043bc0494a | ||
|
|
d9a8fa82fa | ||
|
|
fe938772b6 | ||
|
|
fed9e5d157 | ||
|
|
f706eec483 | ||
|
|
a4e511bbca | ||
|
|
7402e30226 | ||
|
|
d3f519fa0b | ||
|
|
9850b21e2b | ||
|
|
9a193dde5e | ||
|
|
b814981828 | ||
|
|
39967154bb | ||
|
|
d6911c3e08 | ||
|
|
ccf08cd48a | ||
|
|
9978a0c2b3 | ||
|
|
a076025bb8 | ||
|
|
2f3e1d7ae4 | ||
|
|
377a00aaf1 | ||
|
|
3f83fffade | ||
|
|
9ffd20ffbf | ||
|
|
6ecabe1d77 | ||
|
|
0d71288df5 | ||
|
|
43671ee754 | ||
|
|
2d3aec62fe | ||
|
|
5cbfe50455 | ||
|
|
0646be5b6a | ||
|
|
9bc2d12ff0 | ||
|
|
f3140ce0af | ||
|
|
0952d7e770 | ||
|
|
031bdbe0b5 | ||
|
|
4ac1dbf23b | ||
|
|
6e26420e0e | ||
|
|
0808505af3 | ||
|
|
793c07d1ed | ||
|
|
447b4629ce | ||
|
|
7e22f4596d | ||
|
|
ef5169f669 | ||
|
|
5c787dfd7f | ||
|
|
b7eae89a4e | ||
|
|
2272cd319e | ||
|
|
43fb2f423e | ||
|
|
887d9b8017 | ||
|
|
c6028b9868 | ||
|
|
f3174e8567 | ||
|
|
80811724b6 | ||
|
|
421ea6c20a | ||
|
|
56460937ca | ||
|
|
85e483e696 | ||
|
|
499cafad50 | ||
|
|
424904207d | ||
|
|
232cb4db4e | ||
|
|
3019af942b | ||
|
|
7c097d4dd8 | ||
|
|
faabea9c06 | ||
|
|
f1383c54bc | ||
|
|
8eb76b1efd | ||
|
|
03ce75c15d | ||
|
|
d6fc037d4f | ||
|
|
8a0e258a7f | ||
|
|
7eb13c199b | ||
|
|
3244a0fd8a | ||
|
|
e86dc4ecc5 | ||
|
|
fe98d52c31 | ||
|
|
c39351929c | ||
|
|
11e75e48ce | ||
|
|
db4c207708 | ||
|
|
d86af7e7ab | ||
|
|
0a836826c2 | ||
|
|
6f387e28f9 | ||
|
|
c27ebdbcb3 | ||
|
|
74d4b8edf4 | ||
|
|
b0b68f3fd3 | ||
|
|
dde92bf1ec | ||
|
|
c5b3f6adad | ||
|
|
423ffdb24f | ||
|
|
2286a398cf | ||
|
|
6a2631ea72 | ||
|
|
2ba00f3477 | ||
|
|
697497b11e | ||
|
|
332c1787f4 | ||
|
|
eaaea114a0 | ||
|
|
cf841c9bb2 | ||
|
|
5aa4b262f8 | ||
|
|
8b70aa12e4 | ||
|
|
f423f8f797 | ||
|
|
3a31191d9a | ||
|
|
84bbb05d43 | ||
|
|
5bf9f8ca9e | ||
|
|
f0fc23712a | ||
|
|
4d99e61bfb | ||
|
|
dae902fe03 | ||
|
|
eb87463f08 | ||
|
|
d34bc4db06 | ||
|
|
b27d200ae6 | ||
|
|
86d7007dc2 | ||
|
|
499bcde320 | ||
|
|
a7f68364f3 | ||
|
|
b556f5f7e8 | ||
|
|
cc51f660d4 | ||
|
|
3c9fcfa623 | ||
|
|
555c94f3b1 | ||
|
|
33c67b9416 | ||
|
|
b965893bfc | ||
|
|
595941ab9c | ||
|
|
127ffc787e | ||
|
|
ac243a3cdd | ||
|
|
3542cb1ece | ||
|
|
4c6369b8b4 | ||
|
|
4b46eb59e0 | ||
|
|
d8b9dd63b5 | ||
|
|
3deaa1e9bd | ||
|
|
366a5111b7 | ||
|
|
29af2101f4 | ||
|
|
39137ae14b | ||
|
|
084d44e53f | ||
|
|
d6ed395716 | ||
|
|
51da286dc7 | ||
|
|
e28408bc3a | ||
|
|
2dcfd13457 | ||
|
|
16bee48989 | ||
|
|
ea305b8ce5 | ||
|
|
f400794e64 | ||
|
|
fe21e268e5 | ||
|
|
7fe0d8bdb4 | ||
|
|
4c56eba5dd | ||
|
|
daf21467ad | ||
|
|
0443a92693 | ||
|
|
9edc2cffad | ||
|
|
db83ac40b4 | ||
|
|
1d112bb633 | ||
|
|
574c789233 | ||
|
|
6c6cf6b76d | ||
|
|
c6c78f2661 | ||
|
|
dd9b3ce869 | ||
|
|
51c998163d | ||
|
|
0dc6af440b | ||
|
|
88d8f4f14b | ||
|
|
63a608b3df | ||
|
|
1ad75d8dc5 | ||
|
|
47c3b2de0e | ||
|
|
f002c23e70 | ||
|
|
bb561847ad | ||
|
|
1dc85253c9 | ||
|
|
11cca03f2c | ||
|
|
5474cc8d9e | ||
|
|
5b833bab11 | ||
|
|
b032de4a62 | ||
|
|
4bc0a95973 | ||
|
|
6ef0610331 | ||
|
|
9f89903a6e | ||
|
|
cf68c9812c | ||
|
|
1eddb33380 | ||
|
|
604345d909 | ||
|
|
4bcd3bffdc | ||
|
|
0136dda0dd | ||
|
|
8d2ec5f5b4 | ||
|
|
abac64f01b | ||
|
|
8abdc3f824 | ||
|
|
ed17366365 | ||
|
|
ffaa368f81 | ||
|
|
33012f9f21 | ||
|
|
de22efabc4 | ||
|
|
bdbc0073a8 | ||
|
|
2928db2727 | ||
|
|
0558f27347 | ||
|
|
3767f3e51e | ||
|
|
8b082ed31f | ||
|
|
7cc086b999 | ||
|
|
d6caeabe68 | ||
|
|
6eba9e6b94 | ||
|
|
d186368c98 | ||
|
|
9485b0e36c | ||
|
|
e0e8c3554a | ||
|
|
8bcd74262c | ||
|
|
77105b514e | ||
|
|
337398debe | ||
|
|
4ff7d23027 | ||
|
|
798ef10469 | ||
|
|
fe945cced1 | ||
|
|
0c74cb90e9 | ||
|
|
31158b9d68 | ||
|
|
ea9d3685a1 | ||
|
|
9d71471529 | ||
|
|
dab5e14297 | ||
|
|
742290b3c0 | ||
|
|
42b169cf60 | ||
|
|
ff4be57faf | ||
|
|
1d65dc755f | ||
|
|
948a655296 | ||
|
|
01af4d457a | ||
|
|
a5fd786d64 | ||
|
|
b9acaccae5 | ||
|
|
03fcb3b91e | ||
|
|
1fc3c5c087 | ||
|
|
b18e8d282d | ||
|
|
62ec1e4a19 | ||
|
|
fb6bff00d7 | ||
|
|
533c5dd055 | ||
|
|
36eeec6766 | ||
|
|
e1f0fdf2b7 | ||
|
|
0f38cd8f34 | ||
|
|
c0b437f207 | ||
|
|
02198f052d | ||
|
|
9b141fc49a | ||
|
|
38b2b6025f | ||
|
|
479a165149 | ||
|
|
a1d80a2ab2 | ||
|
|
8e438757fd | ||
|
|
c8e207b6a2 | ||
|
|
a57734cdee | ||
|
|
df8b32b7cd | ||
|
|
5b7ce1ae7b | ||
|
|
7225fb0231 | ||
|
|
7e5357dfe7 | ||
|
|
34cbfd2c9b | ||
|
|
4927f1315c | ||
|
|
b4bb0dcc67 | ||
|
|
b689ecba9f | ||
|
|
3ccbb7895c | ||
|
|
eb53b59e32 | ||
|
|
a84943fdaa | ||
|
|
243bc1104e | ||
|
|
e96ac14770 | ||
|
|
4a69d57adf | ||
|
|
5f7330271c | ||
|
|
7554f1ffed | ||
|
|
3e0479824d | ||
|
|
83527fed7d | ||
|
|
136805067f | ||
|
|
48ee173cbc | ||
|
|
faf5bc3619 | ||
|
|
68d8a6925c | ||
|
|
463371de18 | ||
|
|
7584fe1ba3 | ||
|
|
2d6b8105d2 | ||
|
|
e6d2817524 | ||
|
|
4d462508bc | ||
|
|
e966c8df16 | ||
|
|
bcabb65857 | ||
|
|
9f38f16d2b | ||
|
|
57fa29cc6e | ||
|
|
14e45d97d2 | ||
|
|
6d5f958167 | ||
|
|
0a0376312b | ||
|
|
cb09f57a91 | ||
|
|
a7e89c2147 | ||
|
|
03aa690247 | ||
|
|
84929f9732 | ||
|
|
b4173e780b | ||
|
|
9d0abdb135 | ||
|
|
c900af6e33 | ||
|
|
1aaff323bf | ||
|
|
55d0c1926c | ||
|
|
e3eb0f458d | ||
|
|
ea18fe9247 | ||
|
|
73289d7ff8 | ||
|
|
865c8991b2 | ||
|
|
690ed2aa7e | ||
|
|
22cc7b367c | ||
|
|
ac81c68889 | ||
|
|
c26dd277a8 | ||
|
|
903a2e9be1 | ||
|
|
fa4c1cea56 | ||
|
|
1e36a24aff | ||
|
|
8901a3664b | ||
|
|
bb00f7be31 | ||
|
|
c645e8929a | ||
|
|
626eb7e2d6 | ||
|
|
de5dfbab8e | ||
|
|
e2cef42667 | ||
|
|
e370a53473 | ||
|
|
1fd9c9e6b0 | ||
|
|
fe9e300c80 | ||
|
|
785407c8ff | ||
|
|
2ed0a6963f | ||
|
|
0523619aee | ||
|
|
9e2677586c | ||
|
|
c42fc908c7 | ||
|
|
93c4d80dd0 | ||
|
|
227022e755 | ||
|
|
996c56ed43 | ||
|
|
9f2a40e73c | ||
|
|
318ef9afca | ||
|
|
5e8a69d2d8 | ||
|
|
dc5e4fc2de | ||
|
|
521b0e8906 | ||
|
|
73f1851f3c | ||
|
|
e13d0c0e33 |
No files matched your search
@@ -0,0 +1,149 @@
|
||||
name: Build Assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
cdn_branch:
|
||||
type: string
|
||||
required: false
|
||||
default: main
|
||||
description: What CDN branch to write to
|
||||
zip_url:
|
||||
type: string
|
||||
required: false
|
||||
description: ZIP URL to download instead of Steam client
|
||||
zip_root:
|
||||
type: string
|
||||
required: false
|
||||
description: Root dir of ZIP which houses the executable and Data dir
|
||||
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.cdn_branch }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
WOTB_DLC_CDN: ${{ secrets.WOTB_DLC_CDN }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ github.event.inputs.cdn_branch || secrets.PUBLIC_ASSET_BRANCH }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: true
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
PUBLIC_PATREON_CLIENT_ID: ${{ secrets.PUBLIC_PATREON_CLIENT_ID }}
|
||||
PUBLIC_PATREON_REDIRECT_URI: ${{ secrets.PUBLIC_PATREON_REDIRECT_URI }}
|
||||
PATREON_CLIENT_SECRET: ${{ secrets.PATREON_CLIENT_SECRET }}
|
||||
PUBLIC_NITROPAY_ID: ${{ secrets.PUBLIC_NITROPAY_ID }}
|
||||
PUBLIC_DEBUG_MISSING_I18N: false
|
||||
|
||||
jobs:
|
||||
download_client:
|
||||
name: Download client
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: (ZIP) Maximize build space
|
||||
if: github.event.inputs.zip_url != ''
|
||||
uses: easimon/maximize-build-space@master
|
||||
with:
|
||||
root-reserve-mb: 512
|
||||
swap-size-mb: 1024
|
||||
remove-dotnet: 'true'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: (Steam) Setup bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
if: github.event.inputs.zip_url == ''
|
||||
|
||||
- name: (Steam) Install dependencies
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: bun install
|
||||
|
||||
- name: (Steam) Setup DepotDownloader
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: bun run setup:depotdownloader
|
||||
|
||||
- name: (Steam) Download client
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: |
|
||||
chmod +x ./temp/depotDownloader/DepotDownloader
|
||||
./temp/depotDownloader/DepotDownloader -q -os windows -app 444200 -username ${{ secrets.DEPOT_DOWNLOADER_USERNAME }} -password "${{ secrets.DEPOT_DOWNLOADER_PASSWORD }}"
|
||||
|
||||
- name: (Steam) Apply patches
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: bun setup:patches --depot
|
||||
|
||||
- name: (ZIP) Download client
|
||||
if: github.event.inputs.zip_url != ''
|
||||
env:
|
||||
ZIP_URL: ${{ github.event.inputs.zip_url }}
|
||||
ZIP_ROOT: ${{ github.event.inputs.zip_root }}
|
||||
run: |
|
||||
wget -q -O client.zip $ZIP_URL
|
||||
unzip -q client.zip -d client
|
||||
rm client.zip
|
||||
mkdir -p depots/444202/0
|
||||
mv client/$ZIP_ROOT/* depots/444202/0
|
||||
|
||||
- name: Archive depots
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: depots
|
||||
path: depots
|
||||
|
||||
build_assets:
|
||||
name: Build assets
|
||||
runs-on: ubuntu-latest
|
||||
needs: download_client
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Setup bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Lint
|
||||
run: bun run lint:website
|
||||
|
||||
- name: Download depots
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: depots
|
||||
path: depots
|
||||
|
||||
- name: AppArmor hack
|
||||
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
|
||||
|
||||
- name: Start server and build assets
|
||||
run: |
|
||||
bun dev:website --verbosepa &
|
||||
SERVER_PID=$!
|
||||
|
||||
bun run build:assets --all-targets --depot --production
|
||||
|
||||
kill $SERVER_PID || true
|
||||
@@ -0,0 +1,36 @@
|
||||
name: Averages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build averages
|
||||
env:
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
run: bun run build:averages --production
|
||||
@@ -1,11 +1,8 @@
|
||||
name: CD Discover IDs
|
||||
name: Build Bot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -13,6 +10,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -22,5 +20,14 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Discover IDs
|
||||
run: DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} GH_TOKEN=${{ secrets.GH_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} bun scripts/discoverIds.ts --production
|
||||
- name: Build Prisma
|
||||
run: bun run build:prisma
|
||||
|
||||
- name: Build bot
|
||||
run: bun run build:bot
|
||||
|
||||
- name: Archive build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bot
|
||||
path: dist/bot
|
||||
@@ -1,67 +0,0 @@
|
||||
name: CD Build Assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Add fixed sharp
|
||||
run: yarn add [email protected] --ignore-engines
|
||||
|
||||
- name: Setup DepotDownloader
|
||||
run: yarn setup:depotdownloader
|
||||
|
||||
- name: Run DepotDownloader
|
||||
run: ./temp/depotDownloader/DepotDownloader.exe -app 444200 -username ${{ secrets.DEPOT_DOWNLOADER_USERNAME }} -password "${{ secrets.DEPOT_DOWNLOADER_PASSWORD }}"
|
||||
|
||||
- name: Apply patches
|
||||
run: |
|
||||
$env:GH_TOKEN = "${{ secrets.GH_TOKEN }}"
|
||||
$env:DISCORD_TOKEN = "${{ secrets.DISCORD_TOKEN }}"
|
||||
$env:DATABASE_URL = "${{ secrets.DATABASE_URL }}"
|
||||
$env:WOTB_DLC_CDN = "${{ secrets.WOTB_DLC_CDN }}"
|
||||
yarn setup:patches --depot
|
||||
|
||||
- name: Build assets
|
||||
run: |
|
||||
$env:GH_TOKEN = "${{ secrets.GH_TOKEN }}"
|
||||
$env:DISCORD_TOKEN = "${{ secrets.DISCORD_TOKEN }}"
|
||||
$env:DATABASE_URL = "${{ secrets.DATABASE_URL }}"
|
||||
$env:VIDEOS_SHEET = "${{ secrets.VIDEOS_SHEET }}"
|
||||
$env:GOOGLE_APPLICATION_CREDENTIALS = "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
|
||||
yarn build:assets --all-targets --depot ${{ github.ref == 'refs/heads/main' && '--production' || '' }}
|
||||
@@ -1,25 +0,0 @@
|
||||
name: CD Averages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# schedule:
|
||||
# - cron: '0 12 * * 0'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build averages
|
||||
run: |
|
||||
GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} VIDEOS_SHEET=${{ secrets.VIDEOS_SHEET }} GOOGLE_APPLICATION_CREDENTIALS=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} bun scripts/averages.ts
|
||||
@@ -1,60 +0,0 @@
|
||||
name: CD Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build docs
|
||||
run: yarn build:docs
|
||||
|
||||
- name: Configure pages
|
||||
uses: actions/configure-pages@v2
|
||||
|
||||
- name: Upload pages artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: dist/docs
|
||||
|
||||
- name: Deploy
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
|
||||
- name: Archive build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: docs/.vitepress/dist
|
||||
@@ -1,36 +0,0 @@
|
||||
name: CD Host
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
schedule:
|
||||
- cron: '0 */5 * * *'
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [created, published, released, edited]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Download release assets
|
||||
run: |
|
||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkit/releases/latest \
|
||||
| grep "browser_download_url.*bot.zip" \
|
||||
| cut -d : -f 2,3 \
|
||||
| tr -d \")
|
||||
curl -L -o bot.zip $DOWNLOAD_URL
|
||||
unzip bot.zip
|
||||
|
||||
- name: Run bot
|
||||
run: NODE_ENV=production GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} node --enable-source-maps index.cjs
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CD Rating Asia
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 17 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Generate leaderboard
|
||||
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=asia --target=midnight --production
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CD Rating Europe
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 23 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Generate leaderboard
|
||||
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=eu --target=midnight --production
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CD Rating Latest
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Generate all leaderboards
|
||||
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=na,asia,eu --target=latest --production
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CD Rating North America
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Generate leaderboard
|
||||
run: GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} DATABASE_URL=${{ secrets.DATABASE_URL }} yarn publish:ratingleaderboard --region=na --target=midnight --production
|
||||
@@ -1,46 +0,0 @@
|
||||
name: CI Build Bot
|
||||
|
||||
on: push
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build Prisma
|
||||
run: yarn prisma generate
|
||||
|
||||
- name: Build
|
||||
run: yarn build:bot --production
|
||||
|
||||
- name: Archive build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bot
|
||||
path: dist/bot
|
||||
@@ -1,43 +0,0 @@
|
||||
name: CI Build Docs
|
||||
|
||||
on: push
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build
|
||||
run: yarn build:docs
|
||||
|
||||
- name: Archive build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docs
|
||||
path: dist/docs
|
||||
@@ -1,43 +0,0 @@
|
||||
name: CI Build Website
|
||||
|
||||
on: push
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install --location=global yarn
|
||||
|
||||
- name: Use node_modules cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build
|
||||
run: yarn build:website
|
||||
|
||||
- name: Archive build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: website
|
||||
path: dist/website
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Discover IDs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 1'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Discover IDs
|
||||
run: bun build:ids --production
|
||||
@@ -0,0 +1,50 @@
|
||||
name: Host Bot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
schedule:
|
||||
- cron: '0 */5 * * *'
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [created, published, released, edited]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
# with:
|
||||
# bun-version: 1.1.33
|
||||
|
||||
- name: Download release assets
|
||||
run: |
|
||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkit/releases/latest \
|
||||
| grep "browser_download_url.*bot.zip" \
|
||||
| cut -d : -f 2,3 \
|
||||
| tr -d \")
|
||||
curl -L -o bot.zip $DOWNLOAD_URL
|
||||
mkdir -p dist/bot
|
||||
unzip bot.zip -d dist/bot
|
||||
|
||||
- name: Install sharp
|
||||
run: bun init -y && bun add sharp
|
||||
|
||||
- name: Move directories
|
||||
run: mv dist/bot/prisma .
|
||||
|
||||
- name: Run bot
|
||||
run: bun run dist/bot/main.js
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Rating Asia
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 17 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Generate leaderboard
|
||||
env:
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
run: bun build:ratingleaderboard --region=asia
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Rating Europe
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 23 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Generate leaderboard
|
||||
env:
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
run: bun build:ratingleaderboard --region=eu
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Rating North America
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
host:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Generate leaderboard
|
||||
env:
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
run: bun build:ratingleaderboard --region=com
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Reviews
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: 0 0 * * 2
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Find reviews
|
||||
run: bun packages/scripts/src/reviews.ts
|
||||
@@ -0,0 +1,68 @@
|
||||
name: Website
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: '0 4 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
env:
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: true
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
- uses: actions/configure-pages@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build website
|
||||
run: bun run build:website
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: dist/website
|
||||
|
||||
deploy-github-pages:
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
name: Deploy to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
environment:
|
||||
name: Production
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
+10
-2
@@ -1,4 +1,5 @@
|
||||
node_modules
|
||||
_node_modules
|
||||
package-lock.json
|
||||
.env
|
||||
/test-results/
|
||||
@@ -7,7 +8,7 @@ package-lock.json
|
||||
dist/
|
||||
dist.*
|
||||
yarn-error.log
|
||||
/test.*
|
||||
test.*
|
||||
/docs/.vitepress/dist
|
||||
/docs/.vitepress/cache
|
||||
servers.csv
|
||||
@@ -19,4 +20,11 @@ temp/
|
||||
/.yarn
|
||||
depots
|
||||
public/sitemap*
|
||||
/firebase.json
|
||||
/firebase.json
|
||||
target
|
||||
# packages/core/src/protos/*
|
||||
# !packages/core/src/protos/*.proto
|
||||
/.vercel
|
||||
/.astro
|
||||
.vercel
|
||||
/src
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"recommendations": ["astro-build.astro-vscode"],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "./node_modules/.bin/astro dev",
|
||||
"name": "Development server",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+39
-5
@@ -2,16 +2,21 @@
|
||||
"cSpell.words": [
|
||||
"AABBOX",
|
||||
"Abhi",
|
||||
"absarc",
|
||||
"accountinfo",
|
||||
"adsense",
|
||||
"aeson",
|
||||
"alphatest",
|
||||
"analyticsdata",
|
||||
"analyticsreporting",
|
||||
"APAC",
|
||||
"apcr",
|
||||
"applypatches",
|
||||
"artefacts",
|
||||
"astrojs",
|
||||
"atgm",
|
||||
"Avearges",
|
||||
"Autoloader",
|
||||
"Autoreloader",
|
||||
"AYUV",
|
||||
"battleresults",
|
||||
"bbox",
|
||||
@@ -19,6 +24,7 @@
|
||||
"betakrieg",
|
||||
"BINORMAL",
|
||||
"Binormals",
|
||||
"bkni",
|
||||
"BKRL",
|
||||
"BKRTS",
|
||||
"BKRTSMANIFEST",
|
||||
@@ -26,7 +32,10 @@
|
||||
"blitzkit",
|
||||
"blitzrinth",
|
||||
"blitzstars",
|
||||
"cacheable",
|
||||
"Callouts",
|
||||
"Camo",
|
||||
"CCPAOPTOUT",
|
||||
"CDON",
|
||||
"classname",
|
||||
"cleandist",
|
||||
@@ -34,17 +43,20 @@
|
||||
"cockroackdb",
|
||||
"Coef",
|
||||
"cooldown",
|
||||
"corelations",
|
||||
"corsproxy",
|
||||
"CUBEMAP",
|
||||
"CUBETEXCOORD",
|
||||
"customperiod",
|
||||
"datasource",
|
||||
"Dava",
|
||||
"dbid",
|
||||
"Ddpf",
|
||||
"Ddsd",
|
||||
"debugflags",
|
||||
"deburr",
|
||||
"decalmask",
|
||||
"decompressor",
|
||||
"defence",
|
||||
"degressive",
|
||||
"devkrieg",
|
||||
@@ -52,20 +64,21 @@
|
||||
"DIDS",
|
||||
"donotremove",
|
||||
"drei",
|
||||
"Droodles",
|
||||
"dvpd",
|
||||
"dvpl",
|
||||
"DVPLCRC",
|
||||
"dvpm",
|
||||
"dxgi",
|
||||
"echarts",
|
||||
"Everytime",
|
||||
"FASTNAME",
|
||||
"flexdirection",
|
||||
"FOURCC",
|
||||
"frameloop",
|
||||
"fsformat",
|
||||
"Fullscreen",
|
||||
"fullstats",
|
||||
"fuzzysort",
|
||||
"gamemode",
|
||||
"gameplay",
|
||||
"glsl",
|
||||
"GLTF",
|
||||
@@ -83,25 +96,36 @@
|
||||
"leaderboards",
|
||||
"lerp",
|
||||
"LINEARSIZE",
|
||||
"lmao",
|
||||
"loadouts",
|
||||
"loddist",
|
||||
"lods",
|
||||
"lossrate",
|
||||
"Maddoxkkm",
|
||||
"malum",
|
||||
"mantlets",
|
||||
"metallicness",
|
||||
"metalness",
|
||||
"minitelrose",
|
||||
"Minotauro",
|
||||
"MIPMAPCOUNT",
|
||||
"mišek",
|
||||
"mmnow",
|
||||
"modeltransform",
|
||||
"MURICA",
|
||||
"nanostores",
|
||||
"NEGATIVEX",
|
||||
"NEGATIVEY",
|
||||
"NEGATIVEZ",
|
||||
"NITROPAY",
|
||||
"nivo",
|
||||
"nmatname",
|
||||
"noout",
|
||||
"normalmap",
|
||||
"oneof",
|
||||
"oopsies",
|
||||
"Oopsy",
|
||||
"opentest",
|
||||
"OPTML",
|
||||
"outdir",
|
||||
"outfile",
|
||||
@@ -113,7 +137,9 @@
|
||||
"POSITIVEX",
|
||||
"POSITIVEY",
|
||||
"POSITIVEZ",
|
||||
"precompute",
|
||||
"Promisable",
|
||||
"proto",
|
||||
"protobuf",
|
||||
"protos",
|
||||
"Pyogenics",
|
||||
@@ -136,6 +162,7 @@
|
||||
"Specularity",
|
||||
"SSAO",
|
||||
"startcase",
|
||||
"statkit",
|
||||
"statsfull",
|
||||
"steamapps",
|
||||
"Stringifying",
|
||||
@@ -161,12 +188,16 @@
|
||||
"UNORM",
|
||||
"unpickled",
|
||||
"Unregistering",
|
||||
"unrotate",
|
||||
"unwrapper",
|
||||
"vercel",
|
||||
"vickers",
|
||||
"vitepress",
|
||||
"Vovko",
|
||||
"wargaming",
|
||||
"webp",
|
||||
"whitespaces",
|
||||
"WHSS",
|
||||
"winrate",
|
||||
"wireframe",
|
||||
"Woah",
|
||||
@@ -178,11 +209,14 @@
|
||||
"xkdkw",
|
||||
"XMLDVPL",
|
||||
"YAMLDVPL",
|
||||
"yolo",
|
||||
"youtuber",
|
||||
"youtubers",
|
||||
"zustand"
|
||||
],
|
||||
"deno.enable": false,
|
||||
"deno.unstable": false,
|
||||
"cSpell.enableFiletypes": ["glsl"],
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib"
|
||||
"cSpell.enableFiletypes": ["glsl", "proto3"],
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
"liveServer.settings.multiRootWorkspaceName": "blitzkit"
|
||||
}
|
||||
@@ -1,21 +1,661 @@
|
||||
MIT License
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (c) 2023 TrèsAbhi
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Preamble
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
@@ -1,23 +1,13 @@
|
||||
# BlitzKit
|
||||
## BlitzKit
|
||||
|
||||
[](https://codeium.com)
|
||||
Your premier source for all things Blitz.
|
||||
|
||||
Tools for everything World of Tanks Blitz
|
||||
### https://blitzkit.app/
|
||||
|
||||

|
||||
|
||||
## Invite 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.
|
||||
|
||||

|
||||
|
||||
## Visit the website
|
||||
|
||||
### https://blitzkit.app/
|
||||
|
||||

|
||||
|
||||
## Visit the documentation website
|
||||
|
||||
### https://tresabhi.github.io/blitzkit/
|
||||
|
||||

|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": ".",
|
||||
},
|
||||
{
|
||||
"path": "C:/Program Files/WindowsApps/7458BE2C.WorldofTanksBlitz_11.1.256.0_x64__x4tje2y229k00/Data",
|
||||
},
|
||||
],
|
||||
}
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
files:
|
||||
- source: /src/lang/en-US.json
|
||||
translation: /src/lang/%locale%.json
|
||||
- source: /packages/i18n/strings/en.json
|
||||
translation: /%original_path%/%locale%.json
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"client_id": "1097673957865443370",
|
||||
"client_id_dev": "1099063696015229078",
|
||||
|
||||
"sklld_guild_id": "894784231677513819",
|
||||
"sklld_verify_channel": "909968131873726545",
|
||||
"sklld_verify_role": "909968395154358333",
|
||||
"sklld_peasant_role": "896878529512370228",
|
||||
|
||||
"tres_guild_id": "734786591205359697",
|
||||
"tres_log_channel": "1109262265850544148",
|
||||
|
||||
"test_guild_id": "1124729294829142116"
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import { compareVersions } from 'compare-versions';
|
||||
import { readdirSync } from 'fs';
|
||||
import { parse } from 'path';
|
||||
import { defineConfig } from 'vitepress';
|
||||
import { getSidebar } from 'vitepress-plugin-auto-sidebar';
|
||||
|
||||
export default defineConfig({
|
||||
title: 'BlitzKit',
|
||||
description: '🎉 All-in-one Discord bot for everything World of Tanks Blitz',
|
||||
base: '/blitzkit/',
|
||||
outDir: '../dist/docs',
|
||||
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{ text: 'Home', link: '/' },
|
||||
{ text: 'Guide', link: '/guide/introduction' },
|
||||
],
|
||||
|
||||
sidebar: [
|
||||
...getSidebar({
|
||||
collapsed: false,
|
||||
contentDirs: ['guide', 'legal'],
|
||||
contentRoot: '/docs/',
|
||||
}),
|
||||
|
||||
{
|
||||
text: 'Changelogs',
|
||||
items: readdirSync('./docs/changelogs')
|
||||
.map((file) => parse(file).name)
|
||||
.sort(compareVersions)
|
||||
.map((name) => ({ text: name, link: `/changelogs/${name}.html` })),
|
||||
},
|
||||
],
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/tresabhi/blitzkit' },
|
||||
],
|
||||
},
|
||||
});
|
||||
@@ -1,16 +0,0 @@
|
||||
// https://vitepress.dev/guide/custom-theme
|
||||
import { h } from 'vue';
|
||||
import Theme from 'vitepress/theme';
|
||||
import './style.css';
|
||||
|
||||
export default {
|
||||
extends: Theme,
|
||||
Layout: () => {
|
||||
return h(Theme.Layout, null, {
|
||||
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
||||
});
|
||||
},
|
||||
enhanceApp({ app, router, siteData }) {
|
||||
// ...
|
||||
},
|
||||
};
|
||||
@@ -1,90 +0,0 @@
|
||||
/**
|
||||
* Customize default theme styling by overriding CSS variables:
|
||||
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
|
||||
*/
|
||||
|
||||
/**
|
||||
* Colors
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-c-brand: #646cff;
|
||||
--vp-c-brand-light: #747bff;
|
||||
--vp-c-brand-lighter: #9499ff;
|
||||
--vp-c-brand-lightest: #bcc0ff;
|
||||
--vp-c-brand-dark: #535bf2;
|
||||
--vp-c-brand-darker: #454ce1;
|
||||
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-button-brand-border: var(--vp-c-brand-light);
|
||||
--vp-button-brand-text: var(--vp-c-white);
|
||||
--vp-button-brand-bg: var(--vp-c-brand);
|
||||
--vp-button-brand-hover-border: var(--vp-c-brand-light);
|
||||
--vp-button-brand-hover-text: var(--vp-c-white);
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
|
||||
--vp-button-brand-active-border: var(--vp-c-brand-light);
|
||||
--vp-button-brand-active-text: var(--vp-c-white);
|
||||
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Home
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-home-hero-name-color: transparent;
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(
|
||||
120deg,
|
||||
#bd34fe 30%,
|
||||
#41d1ff
|
||||
);
|
||||
|
||||
--vp-home-hero-image-background-image: linear-gradient(
|
||||
-45deg,
|
||||
#bd34fe 50%,
|
||||
#47caff 50%
|
||||
);
|
||||
--vp-home-hero-image-filter: blur(40px);
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(72px);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Custom Block
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-custom-block-tip-border: var(--vp-c-brand);
|
||||
--vp-custom-block-tip-text: var(--vp-c-brand-darker);
|
||||
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--vp-custom-block-tip-border: var(--vp-c-brand);
|
||||
--vp-custom-block-tip-text: var(--vp-c-brand-lightest);
|
||||
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Algolia
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.DocSearch {
|
||||
--docsearch-primary-color: var(--vp-c-brand) !important;
|
||||
}
|
||||
@@ -5,6 +5,7 @@ BlitzKit is a one man band **TrèsAbhi** but I am far from solo.
|
||||
| Role | People |
|
||||
| ------------------------------ | ------------------------------ |
|
||||
| Bot verification | S0AP |
|
||||
| General testing | Prince_NA |
|
||||
| Bot advertisement platform | S0AP |
|
||||
| Bot rendering pipeline | Vovko |
|
||||
| Game asset decompression | Maddox |
|
||||
@@ -12,6 +13,7 @@ BlitzKit is a one man band **TrèsAbhi** but I am far from solo.
|
||||
| Game file layout | Aeson |
|
||||
| 3-caliber rule edge cases | Minitelrose, ChickenMan7777 |
|
||||
| Embed UX | \_34, HisRoyalFatness, Synx |
|
||||
| Tankopedia pre-release testing | [OPTML], Aeson, \_34, Droodles |
|
||||
| Website advertisement platform | Aeson, Droodles |
|
||||
| Compare pre-release testing | [OPTML], Droodles |
|
||||
| Tankopedia pre-release testing | [OPTML], Aeson, \_34, xkdkw |
|
||||
| Website advertisement platform | Aeson |
|
||||
| Compare pre-release testing | [OPTML] |
|
||||
| Redacted | GonnaHetzMe |
|
||||
@@ -6,6 +6,6 @@ A minor-major fix to the armor sandbox. This update only affects the website.
|
||||
|
||||
- Guns are now clipped properly allowing some tanks like the 252U and T34's mantlets to be penetrable (usually with premium shells) as they are in-game
|
||||
|
||||
| Before | After |
|
||||
| ------------------------------------------ | ----------------------------------------- |
|
||||
|  |  |
|
||||
| Before | After |
|
||||
| ------------------------------------------- | ------------------------------------------ |
|
||||
|  |  |
|
||||
@@ -0,0 +1,13 @@
|
||||
# BlitzKit 1.20.4
|
||||
|
||||
Continuing the revamping UI train, this release tanks the tank search page.
|
||||
|
||||
## Changes
|
||||
|
||||
- Tanks are now displayed naked, not bounded by a button
|
||||
- The filters are now far more compact, responsive, and intuitive
|
||||
- The search bar is now faster and shows skeletons when loading
|
||||
- The sort feature now displays the values of tanks used to sort underneath the tank's names
|
||||
- Nations are now ordered in the way they are in-game
|
||||
- When filtering tanks in testing, a work-in-progress warning is shown
|
||||
- When there are no results, a proper message is shown
|
||||
@@ -0,0 +1,28 @@
|
||||
# BlitzKit 1.20.5
|
||||
|
||||
Some QOL changes incoming!
|
||||
|
||||
## Changes
|
||||
|
||||
- The penetration of the shooter is now displayed above the shell switcher
|
||||
- The shot display card is now shown below the tank instead of to the side on narrow screens
|
||||
- Added a few more stats to Compare and Tankopedia
|
||||
- Max dispersion
|
||||
- Clipping potential for auto-loaders and auto-reloaders
|
||||
- Raw terrain resistance coefficients
|
||||
- Renamed the "Fire" section to "Firepower"
|
||||
- The shell selector for the protagonist tank has been moved to the Firepower section's title
|
||||
- The table layout of Compare has been compacted and indented in places
|
||||
- The tank class and type has now displayed in the hero section of the Tankopedia
|
||||
- Removed the default tier X filter
|
||||
- Added draggable tracks
|
||||
- Added the ability to sort by premium shell DPM
|
||||
|
||||
## Fixes
|
||||
|
||||
- Clicking enter no longer changes the tank you're viewing when selecting the shooter tank
|
||||
- The open in new tab button in Compare now opens in a new tab
|
||||
- HEAT shells no longer display ricochet angle
|
||||
- The gun depression is now properly reported for the Minotauro line
|
||||
- Stopped autofocus of the ghost button in the login card
|
||||
- Patreon login now handles bad responses
|
||||
@@ -0,0 +1,19 @@
|
||||
# BlitzKit 1.21.0
|
||||
|
||||
Introducing the Tank performance tool! This release only affects the websites.
|
||||
|
||||
## Features
|
||||
|
||||
- Added the Tank performance tool which lists all tanks in the game and how players are performing in them
|
||||
- This tool features the same tank filters as the Tankopedia search page
|
||||
- The number of players in any given period can be viewed by switching the period from the dropdown
|
||||
- This list updated daily
|
||||
- The tankopedia search page now loads much faster
|
||||
- Not all tanks are loaded at once; rather, more tanks are loaded as you scroll down the page (the same as Tank performance)
|
||||
- The tank pages also load lightning fast now
|
||||
- Tank compare now feature sticky headers and runs must faster
|
||||
- Reduced ads in a few places
|
||||
|
||||
## Fixes
|
||||
|
||||
- The footer is now better centered
|
||||
@@ -0,0 +1,22 @@
|
||||
# BlitzKit 1.21.1
|
||||
|
||||
One wise man said, experimental is literally in the name of experimental technology.
|
||||
|
||||
## Features
|
||||
|
||||
- Added a button on the right above the shells to quickly switch antagonist guns
|
||||
- Terrain resistance coefficients are now displayed as coefficients
|
||||
|
||||
## Fixes
|
||||
|
||||
- The shot display card now once again shows up on-screen
|
||||
- The shot tracer is also now correctly aligned
|
||||
- Tank tracks no longer interfere with camera rotation
|
||||
- "NaN" deltas don't show up in the stats section
|
||||
- The default provisions algorithm has been improved so most tanks should now have the best provisions by default
|
||||
- The tree type icon in the Tankopedia hero section is now colored properly
|
||||
- Removed "Battles" from Tank performance as it's simply inaccurate
|
||||
- This feature will come back when player stats are released
|
||||
- Tank cell headers are now more consistently sized
|
||||
- Armor mode no longer causes Next.js hydration issues (even faster Tankopedia loading!)
|
||||
- The antagonist selector for the Tankopedia page now once again works
|
||||
@@ -0,0 +1,8 @@
|
||||
# BlitzKit 1.21.2
|
||||
|
||||
Freshly baked buns, anyone? This update only affects the bot.
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Switched from Node to Bun (faster everything!)
|
||||
- Removed legacy features like the custom welcome message for the SKLLD Discord server
|
||||
@@ -0,0 +1,17 @@
|
||||
# BlitzKit 1.21.3
|
||||
|
||||
Splashing with HE got splashier! This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added HE splash radius visualization to the armor sandbox
|
||||
- Added a count for the number of tanks in the Tankopedia search page
|
||||
|
||||
## Fixes
|
||||
|
||||
- The Session tool's player search no longer clips into the footer
|
||||
- The shell tracer is no longer bugged when switching between tanks
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- "BlitzKit" in the navigation bar is now simple text instead of an image
|
||||
@@ -0,0 +1,26 @@
|
||||
# BlitzKit 1.22.0
|
||||
|
||||
Introducing the long awaited Static Armor mode! This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added static armor mode which display solid colors for each plate of armor
|
||||
- Different type of armors have different scales and can be toggled by clicking the color scales
|
||||
- Checking on "Edit" allows you to change the thicknesses to test hypothetical values
|
||||
- Changes you make are also reflected in the Blitz-styled dynamic armor highlighter
|
||||
- Added a segmented controller to switch between Model, Dynamic Armor, and Static Armor modes
|
||||
- Track dragging has been disabled in both armor modes
|
||||
- Penetration tracer has been disabled for model mode
|
||||
- Penetration and thickness cards are now placed to better cooperate with screen real estate
|
||||
- "Core" armor has been renamed to "primary" across the website
|
||||
|
||||
## Fixes
|
||||
|
||||
- Penetration card now displays in fullscreen mode on mobile devices once again
|
||||
- Penetration of external modules after ricochets are no longer reported as "successful penetrations"
|
||||
- Gun barrels are no longer incorrectly incorporated into the shell tracer
|
||||
- Japanese gun depression equipment has been swapped back to the correct values
|
||||
|
||||
## Technical Features
|
||||
|
||||
- In dev mode, the ID of the selected armor plates is shown in static mode
|
||||
@@ -0,0 +1,19 @@
|
||||
# BlitzKit 1.22.1
|
||||
|
||||
## Features
|
||||
|
||||
- Legendary camouflage names are now included in the Tankopedia search (for example, you can search up "Shark" and the T54E2 will show up)
|
||||
- Provision and consumable buttons in the Tankopedia and Compare tools are now separate buttons
|
||||
|
||||
## Fixes
|
||||
|
||||
- The name and icons of tanks in the Tankopedia search page are now properly aligned and trimmed
|
||||
- The Tankopedia search is now stricter; thus, filters out nonsensical results
|
||||
- The most optimal shell index once again shows the correct index
|
||||
- The DPM listing is now in parity with the game which is what "Max DPM" used to be previously
|
||||
- The Max DPM value is now also correct since the optimal shell index has been corrected
|
||||
- The mastery of crew members who play a secondary role in the tank is now handled properly
|
||||
- The turret of tanks cannot be accidentally rotated when dragging over other objects (like the body of the tank)
|
||||
- Penetrations are once again calculated after a ricochet
|
||||
- Camouflage values are now calculated properly when the Camouflage Net equipment is applied
|
||||
- Removed the redundant Configure tab when selecting an antagonist tank
|
||||
@@ -0,0 +1,38 @@
|
||||
# BlitzKit 1.22.2
|
||||
|
||||
This update packs a punch.
|
||||
|
||||
## Features
|
||||
|
||||
- Added "Game mode abilities" section to the tankopedia pages
|
||||
- Shows the game mode provisions and consumables underneath the corresponding mode's banner
|
||||
- Reworked the tech tree section
|
||||
- Now shows the whole line and if multiple paths exist, they are can be selected
|
||||
- The selected tank is now highlighted with the flag of the corresponding country
|
||||
- This section now also shows the total required XP and credits required
|
||||
- Added a battle count which indicates the number of games required to reach the next tank (not including module upgrades) based on average xp earnings of players
|
||||
- XP multipliers can also be applied to get a sense of how many battles you will really have to play
|
||||
- Reworked the "Review videos" section
|
||||
- Removed all previews videos; we will be starting from scratch
|
||||
- Added names of content creators under their corresponding videos
|
||||
- Added a way for YouTubers to apply to be a part of the review videos section
|
||||
- Reworked the navbar
|
||||
- This are a lot more compact and contrastive
|
||||
- Tool names are now separated with vertical lines now
|
||||
- The hamburger menu now looks more like the homepage cards
|
||||
- Added a warning for test tanks
|
||||
- Switched to on-demand rendering
|
||||
- This makes it so that the canvas only renders upon interaction and not the continuously synced with the screen's refresh rate
|
||||
- Added the meta information section to the tankopedia pages
|
||||
- Lists the full name, nation, tier, class, type, restoration, purchase, and sale prices
|
||||
- Added tooltips to a lot of places
|
||||
- Reduced ads on the tankopedia pages
|
||||
- Added a screenshot button to take screenshots of the tank
|
||||
- Added crew training slider to the compare tool
|
||||
|
||||
## Fixes
|
||||
|
||||
- Invalid Wargaming logins are now handled properly
|
||||
- Season currencies are now displayed properly
|
||||
- Tank filters are now persistent but will be reset on refresh
|
||||
- The search for a tank now populates the search bar when navigating back to the search page
|
||||
@@ -0,0 +1,16 @@
|
||||
# BlitzKit 1.22.3
|
||||
|
||||
This should've been in the last update lol.
|
||||
|
||||
## Features
|
||||
|
||||
- The "meta information" section has been moved to the hero section on larger screens
|
||||
- Added an option to take a screenshot directly to the clipboard
|
||||
- Removed the number from the BlitzKit logo
|
||||
- The tank playground now stops rendering when it is offscreen, hence fixing a lot of crashes
|
||||
|
||||
## Fixes
|
||||
|
||||
- The hero section of the Tankopedia is now better sized on smaller screens
|
||||
- The shell penetration over distance slider now instantly updates the corresponding input instead after a delay
|
||||
- The game mode banner info is now visible on Apple devices
|
||||
@@ -0,0 +1,11 @@
|
||||
# BlitzKit 1.22.4
|
||||
|
||||
This update makes some technical internal changes to allow the website to switch to the opentest version of the game when it is released. The opentest variant of BlitzKit will be available on https://opentest.blitzkit.app/ in the future (currently, it just redirects to https://blitzkit.app).
|
||||
|
||||
## Features
|
||||
|
||||
- Renamed "Tank performance" to "Performance"
|
||||
- Added auto-redirect for old tool names:
|
||||
- "ratings" -> "rating"
|
||||
- "tank-performance" -> "performance"
|
||||
- Added a 404 page
|
||||
@@ -0,0 +1,27 @@
|
||||
# BlitzKit 1.22.5
|
||||
|
||||
This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- CDN branch names are now outline
|
||||
- Added an "unaffiliated to Wargaming" note to the footer
|
||||
- Added a warning when viewing deprecated tanks
|
||||
- Added partial support for dynamic armor
|
||||
- The armor behaves properly in both dynamic and static armor modes but the visual 3D model doesn't update as of yet
|
||||
- I'm working on it!
|
||||
- Reworked the hero and meta information section of the tankopedia pages
|
||||
- The grid is now more visible at steeper angles
|
||||
- Re-introduced the "swap" tanks button in the tankopedia
|
||||
- Added an opentest plug at homepage (you'll see what this is soon™)
|
||||
|
||||
## Fixes
|
||||
|
||||
- Titles for a few pages are once again static
|
||||
- Some links that opened in a new tab even though they were BlitzKit links now once again behave properly
|
||||
- Missing page titles for documentation pages now work properly
|
||||
- Toggling equipments through the tank canvas now update the render properly
|
||||
- The sorting feature in tank search properly updates once again
|
||||
- Dragging on the tracks to move them once again renders properly
|
||||
- Correct tier I tanks are now shown in tech trees where deprecated tanks previously occupied the slot
|
||||
- Reward icons once again display properly for archived rating seasons
|
||||
@@ -0,0 +1,21 @@
|
||||
# BlitzKit 1.22.6
|
||||
|
||||
This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added a "cool projects" section at the bottom of the homepage
|
||||
- If you have any other cool projects, feel free to let me know
|
||||
- Added raw terrain coefficients along side the percentage values
|
||||
- The account name is displayed instead of "Wargaming" when logged in
|
||||
- Added an opentest button to the Tankopedia pages
|
||||
|
||||
## Fixes
|
||||
|
||||
- Protobuf files are now loaded more deterministically on both the server and client which resolves one of the issues that caused Error 500
|
||||
- Removed a server-side incompatible method which fixes the other issue that caused Error 500
|
||||
- Shot penetration is now displayed properly on mobile devices again
|
||||
- Center aligned Wargaming login regions buttons on smaller screen sizes
|
||||
- The dynamic armor button is no longer inverted
|
||||
- BlitzKit opentest is not longer promoted on opentest
|
||||
- The settings link in the navbar no longer open in a new tab
|
||||
@@ -0,0 +1,17 @@
|
||||
# BlitzKit 1.23.0
|
||||
|
||||
I rewrote the whole website for performance and lower bandwidth. This update does not affect the bot. If I did my job right, you should not notice a difference.
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed documentation website, all the docs are now available within https://blitzkit.app/
|
||||
- Removed the Rating tool
|
||||
- Removed the ability to log in with Patreon
|
||||
- Removed all ads
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Converted BlitzKit to a monorepo
|
||||
- The whole website is now static with no server-side rendering
|
||||
- Gotta go fast ⚡
|
||||
- All structural data is now stored in protocol buffers
|
||||
@@ -0,0 +1,12 @@
|
||||
# BlitzKit 1.23.1
|
||||
|
||||
Some critical fixes. This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added a cool new interactive banner to the homepage
|
||||
- This was primary done to reduce load times due to the high-definition image behind the "BlitzKit" heading
|
||||
|
||||
## Fixes
|
||||
|
||||
- The Session tool once again works
|
||||
@@ -0,0 +1,25 @@
|
||||
# BlitzKit 1.23.2
|
||||
|
||||
I made some oopsies so it's time to fix them. This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added an experimental "Charts" tab to the Performance tool feature a single player distribution chart for now
|
||||
|
||||
## Fixes
|
||||
|
||||
- The player count in the Performance tool is now more accurate
|
||||
- The "Total" option in the Performance player count dropdown is now accessible
|
||||
- The tier in the meta section of the Tankopedia page is no longer off by 1
|
||||
- The HE splash animation no longer stutters
|
||||
- Module damage is no longer affected by Reactive Armor, Dynamic Armor, and Spall Liner
|
||||
- Lower raw terrain coefficients are now correctly flagged as better in the Compare tool
|
||||
- The Vanilla website is now promoted in the OpenTest version of the Tankopedia page
|
||||
- Removed the crew mastery slider
|
||||
- Removed the annoying tooltips in tank filters which would block the buttons up above
|
||||
- The default gun depression transition angle is now 0 instead of 10deg
|
||||
- The capitalization of "BlitzKit" in the terms of service is now correct
|
||||
- The lighting in static mode is now consistent between PBR and non-PBR tanks
|
||||
- On-click penetration testing now correctly applies enhanced armor
|
||||
- Crew member count is now longer off by 1
|
||||
- These values may take up to 24 hours to update on your end
|
||||
@@ -0,0 +1,20 @@
|
||||
# BlitzKit 1.24.0
|
||||
|
||||
Introducing a new tool: the Gallery, an exhaustive collection of player avatars. This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added the Gallery tool with a blazing fast search bar
|
||||
- Click on an avatar to get the full resolution image which you can download using the download button
|
||||
- External modules in static mode is now denoted by gray
|
||||
- Added a crew count to the Crew Training section
|
||||
|
||||
## Fixes
|
||||
|
||||
- Crew skill levels are not longer off by 1
|
||||
- Crew members with no substitutes are no longer shown with substitutes
|
||||
- PBR tanks no longer are blasted with excessive lighting
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Added page pre-fetching for faster anchors
|
||||
@@ -0,0 +1,9 @@
|
||||
# BlitzKit 1.25.0
|
||||
|
||||
## Features
|
||||
|
||||
- Added embeds
|
||||
- This tool is intended for streamers and content creators but feel free to generate embeds for personal use!
|
||||
- There are tons of options and an infinite amount of possible customizations
|
||||
- BlitzKit only offers 1 embed at the moment but feel free to suggest more
|
||||
- Tank models are now 4x smaller (meaning it's 4x faster to load)
|
||||
@@ -0,0 +1,14 @@
|
||||
# BlitzKit 1.25.1
|
||||
|
||||
## Features
|
||||
|
||||
- Added shell range and capacity to Tankopedia, Compare, and tank search sort
|
||||
- These values will appear "0" for a few hours as the website slowly syncs with the game
|
||||
- Added a skeleton loading screen to Tankopedia
|
||||
- Added gun type filters and module damage sorting to tank search
|
||||
- Added the camouflage button to Compare
|
||||
- Gave camouflage percentages 2 decimals places of precision
|
||||
|
||||
## Fixes
|
||||
|
||||
- Tankopedia no longer displays "0 battles" under tier X tanks in the tech tree section
|
||||
@@ -0,0 +1,13 @@
|
||||
# BlitzKit 1.25.2
|
||||
|
||||
## Features
|
||||
|
||||
- Added custom shells
|
||||
- This shows up as a "fourth" shell below the antagonist's shells
|
||||
- Here, you can customize the shell type, caliber, and penetration
|
||||
- If the shell type is AP or APCR, you can further customize the ricochet and normalization angles
|
||||
|
||||
## Fixes
|
||||
|
||||
- The Tankopedia now renders more efficiently by not rendering frames when not needed and unnecessarily rebuilding the whole tank model
|
||||
- This fix above fixes an issue where the whole tank flashed red when switching shells
|
||||
@@ -0,0 +1,26 @@
|
||||
# BlitzKit 1.25.3
|
||||
|
||||
## Features
|
||||
|
||||
- Added a "popular tanks" list under the Tankopedia link on the homepage
|
||||
- The render engine has been sped up by about 50% thanks to cheaper lighting
|
||||
- Added a caliber discriminator for the antagonist gun selector in the Tankopedia sandbox
|
||||
- Added 30+ new stats to the Session tool
|
||||
- Added relative stat bars to the Tankopedia tank pages
|
||||
- This compares each stat against other tanks of the same class & tier, tier, or every other tank
|
||||
- Added a recently viewed tanks list to the Tankopedia tank pages
|
||||
|
||||
## Fixes
|
||||
|
||||
- The shot result card is now displayed in the sandbox even on mobile devices now
|
||||
- Removed ad settings and referenced from the policies prompt
|
||||
- Removed draco compression as it usually only saved about 0.7mb per tank but added an extra 1mb to the decompressor
|
||||
- The tank type colors are back in the tank search
|
||||
- Frames are once again rendered when posing tanks
|
||||
- Removed the "ghost column" in the Session tool
|
||||
- The "total" cell is now sticky too much-like the tank name cells
|
||||
- The reset button in the tank search now resets the sort as well
|
||||
- The provisions list is now centered on smaller screens
|
||||
- The navbar can once again be scrolled
|
||||
- Provisions and consumables are no longer off by 1
|
||||
- Allow up to 24 hours for this to update as BlitzKit re-syncs with the game
|
||||
@@ -0,0 +1,15 @@
|
||||
# BlitzKit 1.25.4
|
||||
|
||||
## Features
|
||||
|
||||
- The popular tanks list on the homepage now uses a better algorithm such that it doesn't exclude low tier
|
||||
|
||||
## Fixes
|
||||
|
||||
- Clipping potential is once again rounded to the nearest integer
|
||||
- Raw hard terrain coefficients are now flagged as "lower the better," hence bringing it to parity with the terrain percentages
|
||||
- The renderer now doesn't brighten the tank too much
|
||||
- The recently viewed tanks is list no longer displayed in compact mode (in places like the Compare tool)
|
||||
- Tank ids once again populate the URL making it easily shareable
|
||||
- The number of tanks no longer double each time a file is saved in dev mode
|
||||
- Lol tankopedia once had 662 \* 2 ^ 18 = 173 million tanks loaded on my dying pc
|
||||
@@ -0,0 +1,7 @@
|
||||
# BlitzKit 1.25.5
|
||||
|
||||
## Fixes
|
||||
|
||||
- The Compare tool now has a vertically clipping table
|
||||
- Custom shells that are not HE no longer have an explosion radius
|
||||
- Performance tool table row titles are now fully clickable instead of just the icons
|
||||
@@ -0,0 +1,19 @@
|
||||
# BlitzKit 1.26.0
|
||||
|
||||
## Features
|
||||
|
||||
- Added the Tier list tool
|
||||
- Migrated the bot to use BlitzKit 1.26.0
|
||||
- The hamburger menu has been move to the right of the screen
|
||||
- The Gallery tool now has a larger number of loading skeletons
|
||||
- Added some extra details when pasting Tankopedia links in Discord
|
||||
|
||||
## Fixes
|
||||
|
||||
- Rewrote the rating leaderboard archiver and commands making use of protobufs
|
||||
- The navbar is once again sticky to the top of the page
|
||||
- Added missing page titles to the Compare tool, Tankopedia pages, and the various docs
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Commands that accept a player account input now use just the player id instead of including the region
|
||||
@@ -0,0 +1,9 @@
|
||||
# BlitzKit 1.26.1
|
||||
|
||||
The auctions are here!
|
||||
|
||||
## Features
|
||||
|
||||
- Added the `/auction` command
|
||||
- No need to login or go to the official website, just use `/auction`
|
||||
- Everything built into Discord, one step at a time!
|
||||
@@ -0,0 +1,22 @@
|
||||
# BlitzKit 1.26.2
|
||||
|
||||
Two updates in a day! Why? Well, these two updates were being cooked separately in parallel and happened to have matured on the same day. Merry early Christmas!
|
||||
|
||||
## Features
|
||||
|
||||
- Highly optimized the component rerenders of the Tank Sandbox
|
||||
- Implemented Google Analytics into the homepage to more accurately show the most popular tanks
|
||||
- Optimized page load speeds and memory consumption by loading all data in parallel instead of sequentially
|
||||
|
||||
## Fixes
|
||||
|
||||
- Dynamic armor is now loaded in React Suspense to avoid race conditions
|
||||
- Re-ordered cards on the home page so that it makes a little bit more sense
|
||||
- The warnings section of the Tankopedia pages are now padded on the sides
|
||||
- The calibers in the antagonist gun selector are now rounded correctly
|
||||
- Tank class icons are now colored and sized properly again in the header
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Removed the extreme JPEG compression for the tank textures
|
||||
- Buffers of the same length are now assumed to be identical when diffing lmao I hope this doesn't go wrong
|
||||
@@ -0,0 +1,19 @@
|
||||
# BlitzKit 1.26.3
|
||||
|
||||
## Features
|
||||
|
||||
- The bot now notifies you if your username/clan search query is too long or short instead of just showing a generic no results message
|
||||
- Reduced the popular tanks list on the home page back to 8 tanks
|
||||
- `/owned-tanks` now links to the corresponding Tankopedia pages
|
||||
- Added more funky rich presence statuses
|
||||
|
||||
## Fixes
|
||||
|
||||
- The website no longer crashes when turning on Static Armor mode
|
||||
- `/stats` and other commands with tank filter commands now work properly once again
|
||||
- The swap button in the Tankopedia pages no longer crashes switching between tech tree and non-tech tree tanks
|
||||
- `/owned-tanks` and `/auction` now chunk text better to meet Discord's 2000 character limit
|
||||
- Tanks with fixes camouflages like the M60 no longer have the option to disable the camouflage of in the Compare tool
|
||||
- The pointer cursor and underscore once again appear now in the tank search in the Compare tool
|
||||
- Opaque mode in the Dynamic armor mode once again works instantly
|
||||
- The rich presence/status/bio of the bot once again counts all servers instead of just the ones the single shard is responsible for
|
||||
@@ -0,0 +1,15 @@
|
||||
# BlitzKit 1.26.4
|
||||
|
||||
## Features
|
||||
|
||||
- `/auction` now warns if a tank stock is at or below 500 and now strikes through the tank name if its out
|
||||
- Added advanced armor highlighting mode
|
||||
- Green: penetration
|
||||
- Red: blocked
|
||||
- Pink: ricochet
|
||||
- Cyan: penetration with 3 calibers rule
|
||||
- Optimized the armor highlighting for about a 15% increase in frame rate
|
||||
|
||||
## Fixes
|
||||
|
||||
- Added 5000 doses of adrenaline, incase the BOT DECIDES TO DIE AGAIN FOR NO REASON
|
||||
@@ -0,0 +1,19 @@
|
||||
# BlitzKit 1.26.5
|
||||
|
||||
¡Ahora en 6 idiomas! This version of BlitzKit adds support for 4 new languages totalling up to 6! [Please help translate on Crowdin](https://crowdin.com/project/blitzkrieg).
|
||||
|
||||
## Features
|
||||
|
||||
- Added Croatian, Russian, Ukrainian, and Chinese
|
||||
- Pre-existing languages: English, Spanish
|
||||
- Added better lighting making tanks a little less yellow and a bit more realistic
|
||||
- Added custom tank icons (some may be missing when the update drops; just give them an hour or so to update)
|
||||
- Increased the maximum recently viewed tanks list size to 14
|
||||
- Tweaked the tank name in the hero section of the Tankopedia to allow the tank to be in the center of the page
|
||||
- The headers in the Performance tool are now sticky just like the Compare tool
|
||||
|
||||
## Fixes
|
||||
|
||||
- Removed unnecessary third party script that did absolutely nothing
|
||||
- Localizations are now stricter in what they allow, reducing errors in the Discord bot
|
||||
- Added 50 gallons of tomato soup to the bot in an attempt to keep it alive
|
||||
@@ -0,0 +1,15 @@
|
||||
# BlitzKit 1.26.6
|
||||
|
||||
This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added an option to hide the tank model beneath the armor
|
||||
|
||||
## Fixes
|
||||
|
||||
- 3RC is now only display when it is used to avoid a ricochet in the advanced armor highlighting mode
|
||||
- Fixed the excessively sharp lighting in static mode
|
||||
- Brightness for non-PBR tanks is a bit better now
|
||||
- Decimal places are now properly rounded in BlitzKit link embeds
|
||||
- The titles in the Tankopedia pages aren't too massive now
|
||||
@@ -0,0 +1,14 @@
|
||||
# BlitzKit 1.27.0
|
||||
|
||||
PLEASE HELP TRANSLATE BLITZKIT: https://crowdin.com/project/blitzkrieg
|
||||
|
||||
This update will be the last major update before the release of World of Tanks Blitz Unreal Engine.
|
||||
|
||||
## Features
|
||||
|
||||
- Added support for English, Spanish, French, Japanese, Polish, Portuguese, Russian, Ukrainian, and Chinese to the website and bot
|
||||
- You can switch languages through the home page, the footer of any page, or the settings page
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fixed the units for shell capacity
|
||||
@@ -0,0 +1,7 @@
|
||||
# BlitzKit 1.27.1
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fixed a crash that occurs if tanks are deleted in Blitz and were once available in BlitzKit
|
||||
- All tank icons are now back
|
||||
- The tank search once again returns results
|
||||
@@ -0,0 +1,7 @@
|
||||
# BlitzKit 1.27.2
|
||||
|
||||
This update only affects the website.
|
||||
|
||||
## Fixes
|
||||
|
||||
- The new Improved Vertical Stabilizer equipment which only affects the gun depression found on the Type 63 now works
|
||||
@@ -0,0 +1,9 @@
|
||||
# BlitzKit 1.27.3
|
||||
|
||||
This update only affects the bot.
|
||||
|
||||
## Fixes
|
||||
|
||||
- Added support for 64-bit IDs allowing users with new accounts to link with BlitzKit
|
||||
- This comes at the added cost of resetting the links of all other accounts
|
||||
- Just re-link and you're good to go
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This release of Blitzkrieg focuses mainly on **performance**. Blitzkrieg now uses **Satori** and **resvg** under the hood to render images resulting in a solid **2x to 8x performance boost** depending on the situation.
|
||||
|
||||
This only applies to `/today` and /stats` as they're the only commands that render an image currently.
|
||||
This only applies to `/today` and `/stats` as they're the only commands that render an image currently.
|
||||
|
||||
We're working further on **performance optimizations**. Our goal is to deliver a message within **3 seconds or less**. We're close and we'll get there!
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
# https://vitepress.dev/reference/default-theme-home-page
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: 'BlitzKit'
|
||||
text: Everything Blitz, right in Discord
|
||||
tagline: All-in-one Discord bot for everything World of Tanks Blitz
|
||||
image:
|
||||
src: '/assets/images/hero.png'
|
||||
alt: 'blitzkit'
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Add to Discord Server
|
||||
link: /guide/invite
|
||||
- theme: alt
|
||||
text: Guide
|
||||
link: /guide/introduction
|
||||
|
||||
features:
|
||||
- title: Clean and Efficient UI
|
||||
icon: 🚀
|
||||
details: BlitzKit is where concise meets efficient. Get the information you need in the way you want.
|
||||
- title: Endless Possibilities
|
||||
icon: 🛠
|
||||
details: With endless ways to customize the output, it's guaranteed that you'll always get the information you need.
|
||||
- title: Easy to Use
|
||||
icon: 💻
|
||||
details: Leveraging Discord's, Blitz Stars', and Wargaming's powerful APIS, Blitzkit does all the hard work for you.
|
||||
---
|
||||
@@ -130,6 +130,23 @@ Your consent to this Privacy Policy followed by Your submission of such informat
|
||||
|
||||
The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information.
|
||||
|
||||
### California Consumer Privacy Act (CCPA)
|
||||
|
||||
If you are a California resident, you have specific rights regarding your personal information under the California Consumer Privacy Act (CCPA). This section describes your CCPA rights and explains how to exercise those rights.
|
||||
|
||||
#### Rights under CCPA
|
||||
|
||||
Under CCPA, California residents have the following rights:
|
||||
|
||||
1. Right to Know: You have the right to request that we disclose certain information to you about our collection and use of your personal information over the past 12 months.
|
||||
2. Right to Delete: You have the right to request that we delete any of your personal information that we collected from you and retained, subject to certain exceptions.
|
||||
3. Right to Opt-Out of Sale: You have the right to opt-out of the sale of your personal information. Note that we do not sell personal information as defined by the CCPA.
|
||||
4. Right to Non-Discrimination: You have the right not to be discriminated against for exercising any of your CCPA rights.
|
||||
|
||||
#### Exercising Your CCPA Rights
|
||||
|
||||
To exercise your rights under CCPA and to opt-out of the sale of your personal information, you can click on the "Do not sell my personal information" link in the footer of any page on our website.
|
||||
|
||||
### Delete Your Personal Data
|
||||
|
||||
You have the right to delete or request that We assist in deleting the Personal Data that We have collected about You.
|
||||
@@ -188,4 +205,4 @@ You are advised to review this Privacy Policy periodically for any changes. Chan
|
||||
|
||||
If you have any questions about this Privacy Policy, You can contact us:
|
||||
|
||||
- By visiting this page on our website: [https://discord.gg/nDt7AjGJQH](https://discord.gg/nDt7AjGJQH)
|
||||
- By emailing blitzkriegautomation@gmail.com
|
||||
@@ -1,4 +1,4 @@
|
||||
# BLitzKit Terms and Conditions
|
||||
# BlitzKit Terms and Conditions
|
||||
|
||||
Last updated: May 23, 2024
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
@@ -1,181 +0,0 @@
|
||||

|
||||
|
||||
# BlitzKit Neutrality Index
|
||||
|
||||
> [!CAUTION]
|
||||
> This is a working draft and is incomplete. Do not implement.
|
||||
|
||||
## Why BkPM over WN8?
|
||||
|
||||
BkPM addresses a lot of issues with WN8:
|
||||
|
||||
- WN8 incorporates win rate into the metric; a metric like this must be a correlate of win rate, not a dependent
|
||||
- The weights and biases are not dynamic and their formulation is not transparent
|
||||
- WN8 values do not asymptote under extreme conditions resulting in meaninglessly large or negative values
|
||||
- WN8 has too many digits; it doesn't make sense to differentiate between players with sub-one-thousandth's worth of precision
|
||||
|
||||
## Preface
|
||||
|
||||
The goal of this paper is to deliver a numerical metric for judging player performance by converging all statistics down to a single, easy-to-consume, human-readable value. This must be a mathematically elegant process that yields a reasonable number that asymptotes under extreme situations. More specifically, this value should equal 0, on average across all players and tanks. Extreme cases should be mapped onto the range $[-1, 1]$. To attain the human readable value, we will be transforming the raw metric to a scale of $[0, 2s]$ using $M=\operatorname{round}\left(sR+s\right)$ where $M$ is the resulting human-readable metric, $s = 100$ is an arbitrary scaling factor, and $R$ is the raw metric.
|
||||
|
||||
Wargaming provides cumulative statistics for players and tanks. The big idea is to average all provided statistics together to get one unified value. We will also incorporate other composite values based on these default statistics into the average. However, averaging this way poses two problems:
|
||||
|
||||
1. All statistics do not scale equally. For example, good players performing with 3,000 damage per battle could also attain a kill-to-death ratio of 3. But averaging them as-is would imply damage per battle has weight 1000 times that of the kill ratio. In other words, damage per battle would totally diminish the impact of kill ratios on the average. Hence, there’s a need for normalization. Normalization, in most cases, simply means dividing by the corresponding averages.
|
||||
2. All statistics are not equally important. For example, dealing damage is arguably far more important than base capture; hence, it does not make sense to average them together. But this does not mean we totally discard this value as it does make an impact albeit very small. Instead, we will be incorporating weighted averages where the weights will be calculated through correlational analysis against win rate. Specifically, the weights of the statistics will be the corresponding correlation coefficient, r. One caveat to look out for is that r can be negative for statistics like damage received which must be minimized. Fortunately, negative weights are okay and make intuitive sense; after all, bleeding health should punish the metric.
|
||||
|
||||
## Computation
|
||||
|
||||
$\mu$ is a simple weighted average of statistics across all players where $C_{battles}$ is the number of player battles and $x_{i}$ is the statistic for player $i$.
|
||||
|
||||
$$
|
||||
\mu=\frac{\sum_{ }^{ }C_{battles}x_{i}}{\sum_{ }^{ }C_{battles}}
|
||||
$$
|
||||
|
||||
$\sigma$ is the standard deviation of the statistic across all players. Below is a refresher of the formula where $x_{i}$ is the statistic for player $i$ and $n$ is the number of players (or the sample size).
|
||||
|
||||
$$
|
||||
\sigma=\sqrt{\frac{\sum_{ }^{ }\left(x_{i}-\mu\right)^{2}}{n}}
|
||||
$$
|
||||
|
||||
A normalized atomic statistic is provided by the equation below where $x$ is the player's statistic being evaluated, $\mu$ is the mean of the statistic across all players, and $\sigma$ is the standard deviation of the statistic across all players. During computation, one may pre-compute and reuse $\gamma=x-\mu$.
|
||||
|
||||
$$
|
||||
A=\frac{x-\mu}{\left|x-\mu\right|}\left(1-e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}}\right)=\frac{\gamma}{\left|\gamma\right|}\left(1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}\right)
|
||||
$$
|
||||
|
||||
$r$ is the correlation coefficient of the statistic across all players. Below is a refresher of the formula where $x_{i}$ is the statistic for player, $y_{i}$ is the player's win rate, $\mu$ is the mean of the statistic across all players, and $\overline{y}$ is the average win rate across all players.
|
||||
|
||||
$$
|
||||
r=\frac{\sum_{ }^{ }\left(x_{i}-\mu\right)\left(y_{i}-\overline{y}\right)}{\sqrt{\sum_{ }^{ }\left(x_{i}-\mu\right)^{2}\sum_{ }^{ }\left(y_{i}-\overline{y}\right)^{2}}}
|
||||
$$
|
||||
|
||||
$m$ is the slope of the least squares regression line. Below is a refresher of the formula where $x_i$ is the player's statistic being evaluated, $y_i$ is the player's win rate, and $n$ is the number of players (or the sample size).
|
||||
|
||||
$$
|
||||
m=\frac{n\sum_{ }^{ }x_{i}y_{i}-\sum_{ }^{ }x_{i}\sum_{ }^{ }y_{i}}{n\sum_{ }^{ }x_{i}^{2}-\left(\sum_{ }^{ }x_{i}\right)^{2}}
|
||||
$$
|
||||
|
||||
The weight of an atomic statistic is $w$ where $r$ is the correlation coefficient between the statistic and win rate, $\mu$ is the mean of the statistic across all players, and $m$ is the slope of the least squares regression line.
|
||||
|
||||
$$
|
||||
w=\left|r\right|\mu m
|
||||
$$
|
||||
|
||||
The raw metric is the weighted average of all atomic statistics.
|
||||
|
||||
$$
|
||||
R=\frac{\sum_{ }^{ }wA}{\sum_{ }^{ }w}
|
||||
$$
|
||||
|
||||
The final human-readable metric will be passed through the following transformation where $s=100$.
|
||||
|
||||
$$
|
||||
M=\operatorname{round}\left(sR+s\right)
|
||||
$$
|
||||
|
||||
## Constants
|
||||
|
||||
A few constants that the rest of the paper depends on. Available under the “constants” object.
|
||||
|
||||
```ts
|
||||
players_per_team = 7;
|
||||
```
|
||||
|
||||
## Wargaming-Provided Statistics
|
||||
|
||||
Wargaming provides the following pieces of statistics for each player and tank. These are cumulative; in other words, they simply add up over time and it is up to the recorder to contrast two snapshots of said statistics in time to get periodical statistics. Available under the “all” object.
|
||||
|
||||
```ts
|
||||
battles;
|
||||
capture_points;
|
||||
damage_dealt;
|
||||
damage_received;
|
||||
dropped_capture_points;
|
||||
frags; // kills
|
||||
frags8p; // frags against tanks at or above tier 8
|
||||
hits;
|
||||
losses;
|
||||
max_frags;
|
||||
max_frags_tank_id;
|
||||
max_xp;
|
||||
max_xp_tank_id;
|
||||
shots;
|
||||
spotted;
|
||||
survived_battles;
|
||||
win_and_survived;
|
||||
wins;
|
||||
xp;
|
||||
```
|
||||
|
||||
## Composite Statistics
|
||||
|
||||
Raw statistics from Wargaming can be combined into more meaningful numeric snippets. Most of these values are divided by all.battles indicating they are the average across all battles in the given period. Assigned under the “composite” object.
|
||||
|
||||
```ts
|
||||
win_rate = all.wins / all.battles;
|
||||
capture_points = all.capture_points / all.battles;
|
||||
damage_dealt = all.damage_dealt / all.battles;
|
||||
damage_received = all.damage_received / all.battles;
|
||||
dropped_capture_points = all.dropped_capture_points / all.battles;
|
||||
frags = all.frags / all.battles;
|
||||
hits = all.hits / all.battles;
|
||||
shots = all.shots / all.battles;
|
||||
spotted = all.spotted / all.battles;
|
||||
survival_rate = all.survived_battles / all.battles;
|
||||
xp = all.xp / all.battles;
|
||||
damage_ratio = all.damage_dealt / all.damage_received;
|
||||
accuracy = all.hits / all.shots;
|
||||
damage_per_hit = composite.damage_dealt / composite.hits;
|
||||
```
|
||||
|
||||
## Normalized Statistics
|
||||
|
||||
We will be using the standard deviation and the mean of each metric supplied to this expression below to normalize each metric in the range $[-1, 1]$. The goal is to map the mean of the statistic to $0$, and the extrema to $-1$ and $1$ (whichever direction that may be in).
|
||||
|
||||
$$
|
||||
\frac{x-\mu}{\left|x-\mu\right|}\left[1-e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}}\right]
|
||||
$$
|
||||
|
||||
During computation, one may pre-compute and reuse $\gamma=x-\mu$ in:
|
||||
|
||||
$$
|
||||
\frac{\gamma}{\left|\gamma\right|}\left[1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}\right]
|
||||
$$
|
||||
|
||||
Here is an example of HisRoyalFatness scoring a very high $0.988$ with the frags metric with his [XM551 Sheridan](https://blitzkit.app/tools/tankopedia/20257). $\mu=0.7694$, $\sigma=0.2492$, and $x=1.5113$, HisRoyalFatness' average frags. At $x = 0$ (if the player manages to get no frags), the metric drops nearly to $-1$ and vice versa. And, at $x=\mu$, the metric is exactly $0$.
|
||||
|
||||

|
||||
|
||||
### Derivation
|
||||
|
||||
We start with the standard normal distribution formula
|
||||
|
||||
$$
|
||||
\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}}
|
||||
$$
|
||||
|
||||

|
||||
|
||||
We remove the coefficient to transform the range of the function from $\left(0,\frac{1}{\sigma\sqrt{2\pi}}\right]$ to $\left(0,1\right]$. From this point onwards, I will be using the substitution $\gamma=x-\mu$.
|
||||
|
||||
$$
|
||||
e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}
|
||||
$$
|
||||
|
||||

|
||||
|
||||
Then we mirror the function across $y=\frac{1}{2}$ to allow the function to be rewarding as you reach the extrema.
|
||||
|
||||
$$
|
||||
1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}
|
||||
$$
|
||||
|
||||

|
||||
|
||||
Finally, to punish the function as you approach the left extreme, we flip the sign of the function when $x<\mu$. One may choose to implement this as a piece-wise function (especially when implementing this in a computer), but I have chosen to represent it as one unified coefficient in this paper.
|
||||
|
||||
$$
|
||||
\frac{\gamma}{\left|\gamma\right|}\left[1-e^{-\frac{1}{2}\left(\frac{\gamma}{\sigma}\right)^{2}}\right]
|
||||
$$
|
||||
|
||||

|
||||
@@ -1,99 +0,0 @@
|
||||
# Cedilla Object Notation
|
||||
|
||||
1. JSON compressed as CDON, written directly to disk (a direct 50% reduction).
|
||||
2. CDON further compressed with LZ4 (a clean 90% reduction).
|
||||
3. The raw JSON file as fetched from a random data source.
|
||||
4. CDON decompressed once again to JSON. Note that this file is a little larger than the original JSON file as it contains a lot more decimal places due to float precision (this shouldn't affect the size in memory).
|
||||
|
||||

|
||||
|
||||
FS stands for "Fast String".
|
||||
|
||||
```cpp
|
||||
primary CedillaObjectNotation {
|
||||
utf8"CDON" magic;
|
||||
Header header;
|
||||
primary Body<header.fsFormat> body;
|
||||
}
|
||||
|
||||
Header {
|
||||
uint16 version; // always 1
|
||||
FSFormat fsFormat;
|
||||
StringTable<fsFormat> stringTable;
|
||||
}
|
||||
|
||||
FSFormat enum<uint8> {
|
||||
Format8,
|
||||
Format16,
|
||||
Format32,
|
||||
}
|
||||
|
||||
FSPrimitive<FSFormat fsFormat> match(fsFormat) {
|
||||
Format8: uint8;
|
||||
Format16: uint16;
|
||||
Format32: uint32;
|
||||
}
|
||||
|
||||
StringTable<FSFormat fsFormat> {
|
||||
FSPrimitive<fsFormat> count;
|
||||
String[count] strings;
|
||||
}
|
||||
|
||||
Body<FSFormat fsFormat> {
|
||||
primary Value<fsFormat> object;
|
||||
}
|
||||
|
||||
ValueType enum<uint8> {
|
||||
Null,
|
||||
Boolean,
|
||||
Uint8,
|
||||
Uint16,
|
||||
Uint32,
|
||||
Uint64,
|
||||
Int8,
|
||||
Int16,
|
||||
Int32,
|
||||
Int64,
|
||||
Float32,
|
||||
Float64,
|
||||
String,
|
||||
FS,
|
||||
Array,
|
||||
Object,
|
||||
}
|
||||
|
||||
String {
|
||||
uint32 length;
|
||||
primary utf8<length> value;
|
||||
}
|
||||
|
||||
StringValue Value & { (ValueType.String | ValueType.FS) type }
|
||||
|
||||
Value<FSFormat fsFormat> {
|
||||
ValueType type;
|
||||
match<type> {
|
||||
Boolean: { uint8 value; }
|
||||
Uint8: { uint8 value; }
|
||||
Uint16: { uint16 value; }
|
||||
Uint32: { uint32 value; }
|
||||
Uint64: { uint64 value; }
|
||||
Int8: { int8 value; }
|
||||
Int16: { int16 value; }
|
||||
Int32: { int32 value; }
|
||||
Int64: { int64 value; }
|
||||
Float32: { float32 value; }
|
||||
Float64: { float64 value; }
|
||||
String: { String value; }
|
||||
FS: { FSPrimitive<fsFormat> index; }
|
||||
Array: {
|
||||
uint32 count;
|
||||
Value[count] values;
|
||||
}
|
||||
Object: {
|
||||
uint32 count;
|
||||
StringValue[count] keys;
|
||||
Value[count] values;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,172 @@
|
||||
# KitScore
|
||||
|
||||
## Memo
|
||||
|
||||
KitScore is a performance metric that makes sense. This metric can be applied to any game, virtual or real. Specific pieces of information relating directly to World of Tanks Blitz will be provided within parentheses and with a "WoTB:" prefix.
|
||||
|
||||
## Consumption of Observations
|
||||
|
||||
KitScore is driven solely by the behavior of other players and finding meaning of a new observation within a pool of condensed data based on previously observed data. Generally, we will be provided with a number of statistics (the $x_i$ of an observation) per player (WoTB: $x_\text{frags}$, $x_\text{xp}$, $x_\text{spots}$, etc.) including a target statistic (the $x_j$ of an observation) that all other statistics try to maximize (WoTB: "winrate" which we will defined later as $x_j$).
|
||||
|
||||
If the statistics are cumulative, they will have to be normalized (WoTB: statistics fetched from Wargaming are indeed cumulative even for a single player; $x_\text{frags}=\frac{\Sigma x_\text{frags}}{\Sigma x_\text{battles}}$, $x_\text{spots}=\frac{\Sigma x_\text{spots}}{\Sigma x_\text{battles}}$, $x_j=\frac{\Sigma x_\text{wins}}{\Sigma x_\text{battles}}$, etc.). Each player will have such average statistics, giving us many points of data to work with. If the statistics are not cumulative, then you will be dealing with multiple observations per player which will only help improve accuracy.
|
||||
|
||||
## It's Impossible to "Find What Makes the Metric Tick"
|
||||
|
||||
WN8, a widely adopted metric in the World of Tanks and World of Tanks Blitz communities is plagued with problems. One of them being that people often find and exploit "what makes the metric tick." In other words, people easily exploit the rudimentary nature of WN8 to score undeservedly high.
|
||||
|
||||
In WN8, the gains of some rewarding categories overshadow the losses of others though that may not necessarily be in the best interest in maximizing winrate. KitScore makes this nearly impossible as it punishes a player for scoring well solely high in a certain category. You will never exploit KitScore. Period.
|
||||
|
||||
## Generating Reasonable Values
|
||||
|
||||
TODO: there's like no runaway cases
|
||||
|
||||
## Symbol Interpretation
|
||||
|
||||
| Symbol | Interpretation |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| $A_\text{human}$ | The human readable version of the raw score $A$. |
|
||||
| $A$ | The raw KitScore. |
|
||||
| $C$ | An arbitrary coefficient. |
|
||||
| $I$ | The number of statistics including the target statistic. This means that there are $I-1$ entries for $x_i$ and $1$ entry for $y$ for each observation. |
|
||||
| $i$ | The statistic index of where there are $I$ entries. |
|
||||
| $j$ | A discriminator for the target statistic. There may never be more than $1$ entries for $j$. |
|
||||
| $m$ | The degree of the polynomial regression. |
|
||||
| $n$ | The number of observations. |
|
||||
| $a$ | An "atomic" score which is a function of the $i$th statistic. |
|
||||
| $w$ | The weight of the $i$th atomic statistic. |
|
||||
|
||||
## Computing the Score
|
||||
|
||||
The final metric $A_\text{human}$ is an arbitrarily scaled value of the raw score $A$ where $C$ is any coefficient of your liking. BlitzKit uses $C=10^3$.
|
||||
|
||||
$$
|
||||
A_\text{human}=CA
|
||||
$$
|
||||
|
||||
The final metric $A$ is the weighted average of individual scores $a$ which are functions of the $i$th statistic excluding the target statistic $j$ itself.
|
||||
|
||||
$$
|
||||
A=\frac{\sum_{i \neq j} w_{i}a_{i}}{\sum_{i \neq j} w_{i}}
|
||||
$$
|
||||
|
||||
The "atomic" score $a$ is the difference between the predicted target statistic $P_{i \leftrightarrow j}(x_i)$ acquired using a polynomial regression of degree $m$ and the actual newly observed $x_j$.
|
||||
|
||||
$$
|
||||
a_i=x_j-P_{i \leftrightarrow j}(x_i)
|
||||
$$
|
||||
|
||||
The polynomial regression of $m$th degree can be written as follows:
|
||||
|
||||
$$
|
||||
P(x)=\beta_0x^0+\beta_1x^1+\beta_2x^2+\dots+\beta_mx^m
|
||||
$$
|
||||
|
||||
Polynomial regression coefficients $\beta$ can be acquired through basic linear algebra where an $m \times m$ of constants is multiplied with $m \times 1$ of unknowns which equals another $m \times 1$ of constants.
|
||||
|
||||
```math
|
||||
\begin{bmatrix}
|
||||
\sum_{k=1}^n x_i^0 & \sum_{k=1}^n x_i^1 & \sum_{k=1}^n x_i^2 & \dots & \sum_{k=1}^n x_i^m \\
|
||||
\sum_{k=1}^n x_i^1 & \sum_{k=1}^n x_i^2 & \sum_{k=1}^n x_i^3 & \dots & \sum_{k=1}^n x_i^{m+1} \\
|
||||
\sum_{k=1}^n x_i^2 & \sum_{k=1}^n x_i^3 & \sum_{k=1}^n x_i^4 & \dots & \sum_{k=1}^n x_i^{m+2} \\
|
||||
\vdots & \vdots & \vdots & \ddots & \vdots \\
|
||||
\sum_{k=1}^n x_i^m & \sum_{k=1}^n x_i^{m+1} & \sum_{k=1}^n x_i^{m+1} & \dots & \sum_{k=1}^n x_i^{2m} \\
|
||||
\end{bmatrix}
|
||||
|
||||
\begin{bmatrix}
|
||||
\beta_0 \\
|
||||
\beta_1 \\
|
||||
\beta_2 \\
|
||||
\vdots \\
|
||||
\beta_m
|
||||
\end{bmatrix}
|
||||
|
||||
=
|
||||
|
||||
\begin{bmatrix}
|
||||
\sum_{k=1}^n x_jx_i^0 \\
|
||||
\sum_{k=1}^n x_jx_i^1 \\
|
||||
\sum_{k=1}^n x_jx_i^2 \\
|
||||
\vdots \\
|
||||
\sum_{k=1}^n x_jx_i^m
|
||||
\end{bmatrix}
|
||||
```
|
||||
|
||||
The weight $w$ is a slice of the Pearson corelation matrix. The numerator is the corelation between the $i$th statistic and the target statistic $j$ while the denominator the sum of the corelations between the $i$th statistic and all statistics but the target statistic $j$.
|
||||
|
||||
$$
|
||||
w_{i}=\frac{r_{i\leftrightarrow j}^2}{\sum_{i_{k}\neq j}r_{i\leftrightarrow i_{k}}^2}
|
||||
$$
|
||||
|
||||
## Understanding the Corelation Matrix
|
||||
|
||||
Forming the corelation matrix will create an $I \times I$ matrix where. This matrix is best represented as a table. The example below illustrates a matrix/table for $I=4$ which includes $3$ entries for $i$ statistics and $1$ entry for the $j$ target statistic.
|
||||
|
||||
| | $x_1$ | $x_2$ | $x_3$ | $x_j$ |
|
||||
| ----- | --------------------------- | --------------------------- | --------------------------- | --------------------------- |
|
||||
| $x_1$ | $1$ | $r_{1 \leftrightarrow 2}^2$ | $r_{1 \leftrightarrow 3}^2$ | $r_{1 \leftrightarrow j}^2$ |
|
||||
| $x_2$ | $r_{1 \leftrightarrow 2}^2$ | $1$ | $r_{2 \leftrightarrow 3}^2$ | $r_{2 \leftrightarrow j}^2$ |
|
||||
| $x_3$ | $r_{1 \leftrightarrow 3}^2$ | $r_{2 \leftrightarrow 3}^2$ | $1$ | $r_{3 \leftrightarrow j}^2$ |
|
||||
| $x_j$ | $r_{1 \leftrightarrow j}^2$ | $r_{2 \leftrightarrow j}^2$ | $r_{3 \leftrightarrow j}^2$ | $1$ |
|
||||
|
||||
It should not be a surprise to find $r_{i \leftrightarrow i}^2=1$ which forms a neat diagonal across the table. Note that there are many duplicates within the $I^2$ entries. The "bottom-right triangle" can be eliminated to remove redundancies leaving us with only $\frac{I(I+1)}{2}$ fields occupied.
|
||||
|
||||
| | $x_1$ | $x_2$ | $x_3$ | $x_j$ |
|
||||
| ----- | ----- | --------------------------- | --------------------------- | --------------------------- |
|
||||
| $x_1$ | $1$ | $r_{1 \leftrightarrow 2}^2$ | $r_{1 \leftrightarrow 3}^2$ | $r_{1 \leftrightarrow j}^2$ |
|
||||
| $x_2$ | | $1$ | $r_{2 \leftrightarrow 3}^2$ | $r_{2 \leftrightarrow j}^2$ |
|
||||
| $x_3$ | | | $1$ | $r_{3 \leftrightarrow j}^2$ |
|
||||
| $x_j$ | | | | $1$ |
|
||||
|
||||
When programming this matrix into an array, $r_{i \leftrightarrow i}^2=1$ will be redundant. I recommend condensing the matrix into an array of size $\frac{I(I+1)}{2}+I=\frac{I(I-1)}{2}$ to avoid all redundant entries. For $I=4$, the array will look something like the one illustrated below (here, $j=4$).
|
||||
|
||||
$$
|
||||
[r_{1 \leftrightarrow 2}^2, r_{1 \leftrightarrow 3}^2, r_{1 \leftrightarrow 4}^2, r_{2 \leftrightarrow 3}^2, r_{2 \leftrightarrow 4}^2, r_{3 \leftrightarrow 4}^2]
|
||||
$$
|
||||
|
||||
## Understanding the Weights
|
||||
|
||||
Some may find the weight equation arbitrary; it evidently isn't. The goal of $w$ is to eliminate over-rewarding the same behavior represented in multiple statistics. It makes all atomic statistics concurrent by leveraging the Pearson corelation matrix.
|
||||
|
||||
A simplified example will clarify the idea. First, we compute a Pearson corelation matrix for $I=3$ statistics. We have $x_1$ and $x_2$, the statistics that are trying to maximize $x_j$. Reminder: a Pearson corelation matrix finds the $r$ value not only between $x_i$ and $x_j$ but also between all combinations of $x_i$ and themselves. Here, $r^2$ is calculated using polynomial regression corelation analysis to the $m$th degree.
|
||||
|
||||
| | $x_1$ | $x_2$ | $x_3$ | $x_j$ |
|
||||
| ----- | ----- | ----------- | ----- | ----- |
|
||||
| $x_1$ | $1$ | $\boxed{0}$ | $0$ | $1$ |
|
||||
| $x_2$ | | $1$ | $0$ | $1$ |
|
||||
| $x_3$ | | | $1$ | $1$ |
|
||||
| $x_j$ | | | | $1$ |
|
||||
|
||||
In the case above, $r^2_{1 \leftrightarrow 2}=0$ meaning that both statistics have absolutely nothing to do with each other. Hence, the player will be awarded for optimizing both individually. And since $r^2_{1 \leftrightarrow j}=r^2_{2 \leftrightarrow j}$, they should both be rewarded equally; in other words, they should have equal weights.
|
||||
|
||||
$$
|
||||
w_{1}=\frac{1}{1 + 0 + 0}=1
|
||||
$$
|
||||
|
||||
$$
|
||||
w_{2}=\frac{1}{0 + 1 + 0}=1
|
||||
$$
|
||||
|
||||
$$
|
||||
w_{3}=\frac{1}{0 + 0 + 1}=1
|
||||
$$
|
||||
|
||||
Now consider a case where $x_1$ and $x_2$ are fully correlated. It would be a bad idea to reward them equally; hence, their weights suffer.
|
||||
|
||||
| | $x_1$ | $x_2$ | $x_3$ | $x_j$ |
|
||||
| ----- | ----- | ----------- | ----- | ----- |
|
||||
| $x_1$ | $1$ | $\boxed{1}$ | $0$ | $1$ |
|
||||
| $x_2$ | | $1$ | $0$ | $1$ |
|
||||
| $x_3$ | | | $1$ | $1$ |
|
||||
| $x_j$ | | | | $1$ |
|
||||
|
||||
$$
|
||||
w_{1}=\frac{1}{1 + 1 + 0}=0.5
|
||||
$$
|
||||
|
||||
$$
|
||||
w_{2}=\frac{1}{1 + 1 + 0}=0.5
|
||||
$$
|
||||
|
||||
$$
|
||||
w_{3}=\frac{1}{0 + 0 + 1}=1
|
||||
$$
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
@@ -1,30 +0,0 @@
|
||||
import { createVanillaExtractPlugin } from '@vanilla-extract/next-plugin';
|
||||
|
||||
const withVanillaExtract = createVanillaExtractPlugin({ tests: /\.css$/ });
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
...withVanillaExtract({
|
||||
webpack: (config) => {
|
||||
config.module.rules.push({
|
||||
test: /\.glsl$/,
|
||||
type: 'asset/source',
|
||||
});
|
||||
return config;
|
||||
},
|
||||
}),
|
||||
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/(.*)?',
|
||||
headers: [{ key: 'X-Frame-Options', value: 'DENY' }],
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
distDir: 'dist/website',
|
||||
reactStrictMode: false,
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
+37
-97
@@ -1,114 +1,54 @@
|
||||
{
|
||||
"name": "blitzkit",
|
||||
"version": "1.20.3",
|
||||
"private": true,
|
||||
"version": "1.27.3",
|
||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||
"main": "src/server.ts",
|
||||
"type": "module",
|
||||
"types": "./types.d.ts",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build:averages": "bun scripts/averages",
|
||||
"build:db": "prisma generate",
|
||||
"build:bot": "vite-node --script scripts/build --production",
|
||||
"build:website": "yarn build:db && yarn build:sitemap && next build",
|
||||
"build:sitemap": "vite-node --script scripts/sitemap",
|
||||
"build:assets": "cd packages/scripts && bun run build:assets",
|
||||
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
||||
"build:bot": "cd packages/scripts && bun run build:bot",
|
||||
"build:website": "bun build:prisma --no-hints && cd packages/website && bun run build",
|
||||
"build:prisma": "prisma generate",
|
||||
"build:sitemap": "bun scripts/sitemap.ts",
|
||||
"build:docs": "vitepress build docs",
|
||||
"build:ratingleaderboard": "vite-node --script scripts/buildRatingLeaderboard",
|
||||
"build:assets": "vite-node --max_old_space_size=16384 --script scripts/buildAssets/index",
|
||||
"test": "vite-node --script scripts/test",
|
||||
"test2": "vite-node --script scripts/test2",
|
||||
"dev:bot": "vite-node --script scripts/build && yarn start:bot",
|
||||
"build:ratingleaderboard": "cd packages/scripts && bun run build:ratingleaderboard",
|
||||
"dev:bot": "bun run build:bot --dev && bun start:bot",
|
||||
"start:bot": "bun dist/bot/main.js",
|
||||
"dev:docs": "vitepress dev docs",
|
||||
"dev:website": "next dev",
|
||||
"start:bot": "node --enable-source-maps dist/bot/index.cjs",
|
||||
"start:website": "next start",
|
||||
"dev:website": "cd packages/website && bun run dev",
|
||||
"dev:api": "bun --filter=@blitzkit/api run dev",
|
||||
"setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader",
|
||||
"setup:patches": "bun --filter=@blitzkit/scripts run setup:patches",
|
||||
"start:website": "bun --filter=@blitzkit/website run start",
|
||||
"host:docs": "vitepress preview docs",
|
||||
"publish:ratingleaderboard": "vite-node --script scripts/buildRatingLeaderboard --publish",
|
||||
"setup:patches": "vite-node --script scripts/applyPatches",
|
||||
"lint": "npx tsc",
|
||||
"lint:website": "next lint",
|
||||
"lint": "tsc",
|
||||
"lint:website": "cd packages/website && bun run lint",
|
||||
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
|
||||
"lint:version": "vite-node --script scripts/checkVersionMissMatch",
|
||||
"knip": "knip",
|
||||
"update": "yarn upgrade --latest",
|
||||
"setup:depotdownloader": "vite-node --script scripts/setupDepotDownloader",
|
||||
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
||||
"discoverids": "scripts/discoverIds.ts"
|
||||
"discoverids": "scripts/discoverIds.ts",
|
||||
"build:protos": "bun packages/scripts/src/protos.ts",
|
||||
"preview:website": "cd packages/website && bun run preview",
|
||||
"build:reviews": "cd packages/scripts && bun build:reviews",
|
||||
"build:ids": "cd packages/scripts && bun build:ids",
|
||||
"prunestrings": "cd packages/scripts && bun prunestrings"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@gltf-transform/core": "^3.9.0",
|
||||
"@octokit/plugin-throttling": "^8.1.3",
|
||||
"@octokit/rest": "^20.0.1",
|
||||
"@prisma/client": "^5.4.1",
|
||||
"@radix-ui/colors": "^3.0.0",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/themes": "^3.0.1",
|
||||
"@react-three/drei": "^9.93.0",
|
||||
"@react-three/fiber": "^8.15.14",
|
||||
"@resvg/resvg-js": "^2.4.1",
|
||||
"@types/three": "^0.160.0",
|
||||
"@vanilla-extract/css": "^1.13.0",
|
||||
"adm-zip": "^0.5.12",
|
||||
"bepaint": "^0.1.0-beta.3",
|
||||
"decompress": "^4.2.1",
|
||||
"discord.js": "^14.13.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"esbuild": "^0.19.3",
|
||||
"express": "^4.18.2",
|
||||
"false": "^0.0.4",
|
||||
"fuzzysort": "^2.0.4",
|
||||
"googleapis": "^134.0.0",
|
||||
"immer": "^10.0.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"lz4js": "^0.2.0",
|
||||
"markdown-escape": "^2.0.0",
|
||||
"markdown-to-jsx": "^7.4.7",
|
||||
"next": "^14.1.0",
|
||||
"parse-dds": "^1.2.1",
|
||||
"pickleparser": "^0.2.1",
|
||||
"postprocessing": "^6.34.1",
|
||||
"progress": "^2.0.3",
|
||||
"protobufjs": "^7.2.6",
|
||||
"react": "^18.2.0",
|
||||
"react-device-detect": "^2.2.3",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-fuzzysort": "^1.0.1",
|
||||
"react-promise-suspense": "^0.3.4",
|
||||
"satori": "^0.10.13",
|
||||
"sharp": "^0.33.4",
|
||||
"three": "0.159.0",
|
||||
"three-stdlib": "^2.29.4",
|
||||
"vite-node": "^0.34.5",
|
||||
"vitepress": "^1.0.0-rc.20",
|
||||
"vitepress-plugin-auto-sidebar": "^1.1.0",
|
||||
"yaml": "^2.3.4",
|
||||
"zustand": "^4.4.1"
|
||||
"sharp": "^0.33.5",
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@total-typescript/ts-reset": "^0.5.1",
|
||||
"@types/adm-zip": "^0.5.5",
|
||||
"@types/decompress": "^4.2.7",
|
||||
"@types/escape-html": "^1.0.2",
|
||||
"@types/express": "^4.17.18",
|
||||
"@types/js-yaml": "^4.0.8",
|
||||
"@types/lodash": "^4.14.199",
|
||||
"@types/lz4": "^0.6.4",
|
||||
"@types/lz4js": "^0.2.1",
|
||||
"@types/markdown-escape": "^1.1.0",
|
||||
"@types/node": "^20.6.5",
|
||||
"@types/parse-dds": "^1.0.3",
|
||||
"@types/pngjs": "^6.0.4",
|
||||
"@types/progress": "^2.0.7",
|
||||
"@types/react": "^18.2.22",
|
||||
"@vanilla-extract/next-plugin": "^2.3.1",
|
||||
"compare-versions": "^6.1.0",
|
||||
"crc": "^4.3.2",
|
||||
"fast-xml-parser": "^4.3.2",
|
||||
"knip": "^3.4.0",
|
||||
"lz4": "^0.6.5",
|
||||
"prettier": "^3.0.3",
|
||||
"prisma": "^5.4.1",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"packageManager": "[email protected]"
|
||||
"@types/bun": "latest",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.5.4",
|
||||
"prettier": "^3.3.3",
|
||||
"prisma": "^6.0.0",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@blitzkit/bot",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"types": "src/types.d.ts",
|
||||
"dependencies": {
|
||||
"@blitzkit/core": "workspace:*",
|
||||
"@blitzkit/i18n": "workspace:*",
|
||||
"satori": "^0.10.14",
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"discord.js": "^14.16.3",
|
||||
"react": "^18.3.1",
|
||||
"@radix-ui/colors": "^3.0.0",
|
||||
"fuzzysort": "^2.0.4",
|
||||
"bepaint": "^0.1.0-beta.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"markdown-escape": "^2.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "bun --watch src/main.ts",
|
||||
"start": "bun src/main.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/markdown-escape": "^1.1.3"
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ const subcommands = [
|
||||
'introduction',
|
||||
'invite',
|
||||
'timezones',
|
||||
'creators',
|
||||
'credits',
|
||||
] as const;
|
||||
type Subcommand = (typeof subcommands)[number];
|
||||
|
||||
@@ -16,14 +16,11 @@ const DOCS: Record<Subcommand, string> = {
|
||||
introduction: 'guide/introduction',
|
||||
invite: 'guide/invite',
|
||||
timezones: 'guide/timezones',
|
||||
creators: 'guide/creators',
|
||||
credits: 'about/credits',
|
||||
};
|
||||
|
||||
export const aboutCommand = new Promise<CommandRegistry>(async (resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('about', [
|
||||
{ subcommand: 'commands' },
|
||||
...subcommands.map((subcommand) => ({ subcommand })),
|
||||
@@ -31,13 +28,12 @@ export const aboutCommand = new Promise<CommandRegistry>(async (resolve) => {
|
||||
|
||||
async handler(interaction) {
|
||||
const subcommand = interaction.options.getSubcommand();
|
||||
const { t } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
|
||||
if (subcommand === 'commands') {
|
||||
return t`bot.commands.about.subcommands.commands.body${(
|
||||
return `${strings.bot.commands.about.subcommands.commands.body}${(
|
||||
await Promise.all(COMMANDS_RAW)
|
||||
)
|
||||
.filter((registry) => registry.inPublic && registry.inProduction)
|
||||
.sort((a, b) =>
|
||||
(a.command.name_localizations?.[interaction.locale] ??
|
||||
a.command.name) <
|
||||
@@ -0,0 +1,144 @@
|
||||
import {
|
||||
BlitzTankClass,
|
||||
Region,
|
||||
regionToRegionSubdomain,
|
||||
} from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { tankDefinitions } from '../core/blitzkit/nonBlockingPromises';
|
||||
import { chunkLines } from '../core/discord/chunkLines';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
type Auction = null | {
|
||||
count: number;
|
||||
has_next: boolean;
|
||||
results: Result[];
|
||||
};
|
||||
|
||||
type Result =
|
||||
| {
|
||||
id?: number;
|
||||
type: 'vehicle';
|
||||
countable?: boolean;
|
||||
entity?: Entity;
|
||||
initial_count: number;
|
||||
current_count: number;
|
||||
saleable?: boolean;
|
||||
available_from?: Date;
|
||||
available_before?: Date;
|
||||
price?: Price;
|
||||
next_price: Price | null;
|
||||
available: true;
|
||||
display?: boolean;
|
||||
next_price_datetime: Date;
|
||||
next_price_timestamp: number;
|
||||
}
|
||||
| {
|
||||
available: false;
|
||||
type: 'vehicle';
|
||||
};
|
||||
|
||||
interface Entity {
|
||||
id: number;
|
||||
name: string;
|
||||
nation: string;
|
||||
subnation: string;
|
||||
use_subnation_flag: boolean;
|
||||
type_slug: BlitzTankClass;
|
||||
level: number;
|
||||
roman_level: string;
|
||||
user_string: string;
|
||||
image_url: string;
|
||||
preview_image_url: string;
|
||||
is_premium: boolean;
|
||||
is_collectible: boolean;
|
||||
}
|
||||
|
||||
interface Price {
|
||||
currency: Currency;
|
||||
value: number;
|
||||
}
|
||||
|
||||
interface Currency {
|
||||
name: 'gold';
|
||||
count: number;
|
||||
title: 'Gold';
|
||||
image_url: string;
|
||||
sizes: unknown;
|
||||
type: 'currency';
|
||||
}
|
||||
|
||||
const WARNING_COUNT = 500;
|
||||
|
||||
export const auctionCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
command: createLocalizedCommand('auction'),
|
||||
|
||||
async handler(interaction) {
|
||||
const { strings } = translator(interaction.locale);
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const region: Region = 'com';
|
||||
const pageSize = 80;
|
||||
const saleable = true;
|
||||
const data = await fetch(
|
||||
`https://${regionToRegionSubdomain(
|
||||
region,
|
||||
)}.wotblitz.com/en/api/events/items/auction/?page_size=${
|
||||
pageSize
|
||||
}&type[]=vehicle&saleable=${saleable}`,
|
||||
).then((response) => response.json() as Promise<Auction>);
|
||||
|
||||
if (data === null) {
|
||||
return strings.bot.commands.auction.errors.no_auction;
|
||||
}
|
||||
|
||||
const saleableTanks = data.results.filter((result) => result.available);
|
||||
const nextPricesTimestamp = saleableTanks[0].next_price_timestamp;
|
||||
|
||||
const title = `# ${strings.bot.commands.auction.body.title}`;
|
||||
const subtitle = `${literals(strings.bot.commands.auction.body.subtitle, [
|
||||
`${saleableTanks.length} / ${data.results.length}`,
|
||||
`<t:${nextPricesTimestamp}:R>`,
|
||||
'<https://wotblitz.com/auction/>',
|
||||
])}`;
|
||||
const body = saleableTanks.map((data, index) => {
|
||||
const tank = awaitedTankDefinitions.tanks[data.entity!.id];
|
||||
|
||||
if (!tank) return '';
|
||||
|
||||
const name = `[${tank.name}](<https://blitzkit.app/tools/tankopedia/${
|
||||
tank.id
|
||||
}>)`;
|
||||
const next =
|
||||
data.next_price === null
|
||||
? ''
|
||||
: `\n-# ${literals(strings.bot.commands.auction.body.next, [
|
||||
`<:gold:1317173197082333244> ${data.next_price.value.toLocaleString(
|
||||
interaction.locale,
|
||||
)}`,
|
||||
])}`;
|
||||
const available = literals(
|
||||
strings.bot.commands.auction.body.available,
|
||||
[
|
||||
data.current_count.toLocaleString(interaction.locale),
|
||||
data.initial_count.toLocaleString(interaction.locale),
|
||||
],
|
||||
);
|
||||
const isOut = data.current_count === 0;
|
||||
const outString = isOut ? '~~' : '';
|
||||
const isLow = data.current_count <= WARNING_COUNT;
|
||||
|
||||
return `${index + 1}. ${
|
||||
outString
|
||||
}${name} <:gold:1317173197082333244> ${data.price!.value.toLocaleString(
|
||||
interaction.locale,
|
||||
)}${outString}\n-#${isLow ? ' ‼️ ' : ' '}${available}${isOut ? '' : next}`;
|
||||
});
|
||||
const header = `${title}\n${subtitle}`;
|
||||
const lines = [header, ...body];
|
||||
|
||||
return chunkLines(lines, '\n\n');
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -1,27 +1,24 @@
|
||||
import { getBlitzStarsLinkButton } from '../../core/blitzstars/getBlitzStarsLinkButton';
|
||||
import addPeriodicFilterOptions from '../../core/discord/addPeriodicFilterOptions';
|
||||
import addUsernameChoices from '../../core/discord/addUsernameChoices';
|
||||
import autocompleteTanks from '../../core/discord/autocompleteTanks';
|
||||
import autocompleteUsername from '../../core/discord/autocompleteUsername';
|
||||
import { addPeriodicFilterOptions } from '../../core/discord/addPeriodicFilterOptions';
|
||||
import { addUsernameChoices } from '../../core/discord/addUsernameChoices';
|
||||
import { autocompleteTanks } from '../../core/discord/autocompleteTanks';
|
||||
import { autocompleteUsername } from '../../core/discord/autocompleteUsername';
|
||||
import { buttonRefresh } from '../../core/discord/buttonRefresh';
|
||||
import commandToURL from '../../core/discord/commandToURL';
|
||||
import { commandToURL } from '../../core/discord/commandToURL';
|
||||
import { createLocalizedCommand } from '../../core/discord/createLocalizedCommand';
|
||||
import { getCustomPeriodParams } from '../../core/discord/getCustomPeriodParams';
|
||||
import { getFiltersFromButton } from '../../core/discord/getFiltersFromButton';
|
||||
import { getFiltersFromCommand } from '../../core/discord/getFiltersFromCommand';
|
||||
import resolvePeriodFromButton from '../../core/discord/resolvePeriodFromButton';
|
||||
import resolvePeriodFromCommand from '../../core/discord/resolvePeriodFromCommand';
|
||||
import resolvePlayerFromButton from '../../core/discord/resolvePlayerFromButton';
|
||||
import resolvePlayerFromCommand from '../../core/discord/resolvePlayerFromCommand';
|
||||
import { resolvePeriodFromButton } from '../../core/discord/resolvePeriodFromButton';
|
||||
import { resolvePeriodFromCommand } from '../../core/discord/resolvePeriodFromCommand';
|
||||
import { resolvePlayerFromButton } from '../../core/discord/resolvePlayerFromButton';
|
||||
import { resolvePlayerFromCommand } from '../../core/discord/resolvePlayerFromCommand';
|
||||
import { CommandRegistry } from '../../events/interactionCreate';
|
||||
import { renderBreakdown } from './render';
|
||||
|
||||
export const breakdownCommand = new Promise<CommandRegistry>(
|
||||
async (resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: await addPeriodicFilterOptions(
|
||||
createLocalizedCommand('breakdown'),
|
||||
(option) => option.addStringOption(addUsernameChoices),
|
||||
+44
-39
@@ -1,26 +1,28 @@
|
||||
import { Locale } from 'discord.js';
|
||||
import { chunk } from 'lodash';
|
||||
import * as Breakdown from '../../components/Breakdown';
|
||||
import CommandWrapper from '../../components/CommandWrapper';
|
||||
import NoData from '../../components/NoData';
|
||||
import TitleBar from '../../components/TitleBar';
|
||||
import { AllStats, getAccountInfo } from '../../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../../core/blitz/getClanAccountInfo';
|
||||
import getTankStats from '../../core/blitz/getTankStats';
|
||||
import { filtersToDescription } from '../../core/blitzkit/filtersToDescription';
|
||||
import {
|
||||
BlitzStats,
|
||||
calculateWN8,
|
||||
getAccountInfo,
|
||||
getClanAccountInfo,
|
||||
getTankStats,
|
||||
getWN8Percentile,
|
||||
TankDefinition,
|
||||
tankDefinitions,
|
||||
} from '../../core/blitzkit/tankDefinitions';
|
||||
import getStatsInPeriod from '../../core/blitzstars/getStatsInPeriod';
|
||||
import { tankAverages } from '../../core/blitzstars/tankAverages';
|
||||
} from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { Locale } from 'discord.js';
|
||||
import { chunk } from 'lodash-es';
|
||||
import * as Breakdown from '../../components/Breakdown';
|
||||
import { CommandWrapper } from '../../components/CommandWrapper';
|
||||
import { NoData } from '../../components/NoData';
|
||||
import { TitleBar } from '../../components/TitleBar';
|
||||
import { filtersToDescription } from '../../core/blitzkit/filtersToDescription';
|
||||
import { tankDefinitions } from '../../core/blitzkit/nonBlockingPromises';
|
||||
import { UserError } from '../../core/blitzkit/userError';
|
||||
import { filterStats, StatFilters } from '../../core/blitzstars/filterStats';
|
||||
import { getStatsInPeriod } from '../../core/blitzstars/getStatsInPeriod';
|
||||
import { blitzStarsTankAverages } from '../../core/blitzstars/tankAverages';
|
||||
import { ResolvedPeriod } from '../../core/discord/resolvePeriodFromCommand';
|
||||
import { ResolvedPlayer } from '../../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../../core/localization/translator';
|
||||
import calculateWN8 from '../../core/statistics/calculateWN8';
|
||||
import { StatFilters, filterStats } from '../../core/statistics/filterStats';
|
||||
import getWN8Percentile from '../../core/statistics/getWN8Percentile';
|
||||
import { UserError } from '../../hooks/userError';
|
||||
|
||||
const ROWS_PER_PAGE = 8;
|
||||
const MAX_PAGES = 9;
|
||||
@@ -31,23 +33,23 @@ export async function renderBreakdown(
|
||||
filters: StatFilters,
|
||||
locale: Locale,
|
||||
) {
|
||||
const { t, translate } = translator(locale);
|
||||
const { strings, unwrap } = translator(locale);
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const awaitedTankAverages = await tankAverages;
|
||||
const awaitedTankAverages = await blitzStarsTankAverages;
|
||||
const statsInPeriod = await getStatsInPeriod(region, id, start, end, locale);
|
||||
const { filteredOrder } = await filterStats(statsInPeriod, filters);
|
||||
const accountInfo = await getAccountInfo(region, id);
|
||||
const clanData = await getClanAccountInfo(region, id, ['clan']);
|
||||
const tankStats = await getTankStats(region, id);
|
||||
const filterDescriptions = await filtersToDescription(filters, locale);
|
||||
const orderedCurrentStats: AllStats[] = [];
|
||||
const orderedCareerStats: AllStats[] = [];
|
||||
const orderedCurrentStats: BlitzStats[] = [];
|
||||
const orderedCareerStats: BlitzStats[] = [];
|
||||
const orderedCurrentWN8: (number | undefined)[] = [];
|
||||
const orderedCareerWN8: (number | undefined)[] = [];
|
||||
const orderedCareerWN8Full: (number | undefined)[] = [];
|
||||
|
||||
if (tankStats === null) {
|
||||
throw new UserError(t`bot.common.errors.no_tank_stats`);
|
||||
throw new UserError(strings.bot.common.errors.no_tank_stats);
|
||||
}
|
||||
|
||||
filteredOrder.forEach((id) => {
|
||||
@@ -134,22 +136,22 @@ export async function renderBreakdown(
|
||||
children.push(
|
||||
<Breakdown.Row
|
||||
key={id}
|
||||
type="summary"
|
||||
title={t`bot.commands.breakdown.body.total`}
|
||||
displayType="summary"
|
||||
title={strings.bot.commands.breakdown.body.total}
|
||||
stats={[
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.battles`,
|
||||
title: strings.bot.commands.breakdown.body.battles,
|
||||
current: currentBattles,
|
||||
career: careerBattles,
|
||||
},
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.winrate`,
|
||||
title: strings.bot.commands.breakdown.body.winrate,
|
||||
current: `${(100 * currentWinrate).toFixed(2)}%`,
|
||||
career: `${(100 * careerWinrate).toFixed(2)}%`,
|
||||
delta: currentWinrate - careerWinrate,
|
||||
},
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.wn8`,
|
||||
title: strings.bot.commands.breakdown.body.wn8,
|
||||
current:
|
||||
currentWN8 === undefined
|
||||
? undefined
|
||||
@@ -164,7 +166,7 @@ export async function renderBreakdown(
|
||||
: getWN8Percentile(currentWN8),
|
||||
},
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.damage`,
|
||||
title: strings.bot.commands.breakdown.body.damage,
|
||||
current: Math.round(currentDamage).toLocaleString(),
|
||||
career: Math.round(careerDamage).toLocaleString(),
|
||||
delta: currentDamage - careerDamage,
|
||||
@@ -174,7 +176,7 @@ export async function renderBreakdown(
|
||||
);
|
||||
|
||||
filteredOrder.forEach((id, index) => {
|
||||
const tankDefinition = awaitedTankDefinitions[id] as
|
||||
const tankDefinition = awaitedTankDefinitions.tanks[id] as
|
||||
| TankDefinition
|
||||
| undefined;
|
||||
const current = orderedCurrentStats[index];
|
||||
@@ -185,21 +187,24 @@ export async function renderBreakdown(
|
||||
children.push(
|
||||
<Breakdown.Row
|
||||
key={id}
|
||||
type="tank"
|
||||
tankType={tankDefinition?.class}
|
||||
treeType={tankDefinition?.treeType}
|
||||
displayType="tank"
|
||||
class={tankDefinition?.class}
|
||||
type={tankDefinition?.type}
|
||||
title={
|
||||
tankDefinition?.name ??
|
||||
translate('bot.commands.breakdown.body.unknown_tank', [`${id}`])
|
||||
tankDefinition
|
||||
? unwrap(tankDefinition.name)
|
||||
: literals(strings.bot.commands.breakdown.body.unknown_tank, [
|
||||
`${id}`,
|
||||
])
|
||||
}
|
||||
stats={[
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.battles`,
|
||||
title: strings.bot.commands.breakdown.body.battles,
|
||||
current: current.battles.toLocaleString(),
|
||||
career: career.battles.toLocaleString(),
|
||||
},
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.winrate`,
|
||||
title: strings.bot.commands.breakdown.body.winrate,
|
||||
current: `${(100 * (current.wins / current.battles)).toFixed(
|
||||
2,
|
||||
)}%`,
|
||||
@@ -208,7 +213,7 @@ export async function renderBreakdown(
|
||||
current.wins / current.battles - career.wins / career.battles,
|
||||
},
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.wn8`,
|
||||
title: strings.bot.commands.breakdown.body.wn8,
|
||||
current:
|
||||
currentWN8 === undefined
|
||||
? undefined
|
||||
@@ -223,7 +228,7 @@ export async function renderBreakdown(
|
||||
: getWN8Percentile(currentWN8),
|
||||
},
|
||||
{
|
||||
title: t`bot.commands.breakdown.body.damage`,
|
||||
title: strings.bot.commands.breakdown.body.damage,
|
||||
current: Math.round(
|
||||
current.damage_dealt / current.battles,
|
||||
).toLocaleString(),
|
||||
@@ -1,4 +1,4 @@
|
||||
import packageJSON from '../../package.json' assert { type: 'json' };
|
||||
import packageJSON from '../../../../package.json';
|
||||
import { client } from '../core/discord/client';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
@@ -8,23 +8,20 @@ const executionStart = new Date().getTime();
|
||||
|
||||
export const debugCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('debug'),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const currentTime = new Date().getTime();
|
||||
const uptime = currentTime - executionStart;
|
||||
const list = [
|
||||
[t`bot.commands.debug.body.version`, packageJSON.version],
|
||||
[strings.bot.commands.debug.body.version, packageJSON.version],
|
||||
[
|
||||
t`bot.commands.debug.body.shard`,
|
||||
client.shard?.ids[0] ?? t`bot.commands.debug.body.shard.default`,
|
||||
strings.bot.commands.debug.body.shard.label,
|
||||
client.shard?.ids[0] ?? strings.bot.commands.debug.body.shard.default,
|
||||
],
|
||||
[
|
||||
t`bot.commands.debug.body.uptime`,
|
||||
strings.bot.commands.debug.body.uptime,
|
||||
`${Math.floor((uptime / 1000 / 60 / 60) % 24)}h ${Math.floor(
|
||||
(uptime / 1000 / 60) % 60,
|
||||
)}m ${Math.floor((uptime / 1000) % 60)}s ${Math.floor(
|
||||
@@ -32,7 +29,7 @@ export const debugCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
)}ms`,
|
||||
],
|
||||
];
|
||||
return t`bot.commands.debug.body.title${list
|
||||
return `${strings.bot.commands.debug.body.title}${list
|
||||
.map(([key, value]) => `- ${key}: ${value}`)
|
||||
.join('\n')}`;
|
||||
},
|
||||
@@ -1,32 +1,32 @@
|
||||
import { emblemURL, getAccountInfo, getClanAccountInfo } from '@blitzkit/core';
|
||||
import { Locale, SlashCommandSubcommandGroupBuilder } from 'discord.js';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import * as Graph from '../components/Graph';
|
||||
import { LineColor } from '../components/Graph/components/Line/constants';
|
||||
import NoData from '../components/NoData';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import resolveTankId from '../core/blitz/resolveTankId';
|
||||
import { emblemURL } from '../core/blitzkit/emblemURL';
|
||||
import getTankHistories from '../core/blitzkit/getTankHistories';
|
||||
import { NoData } from '../components/NoData';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { resolveTankId } from '../core/blitz/resolveTankId';
|
||||
import { getBlitzStarsLinkButton } from '../core/blitzstars/getBlitzStarsLinkButton';
|
||||
import getPlayerHistories from '../core/blitzstars/getPlayerHistories';
|
||||
import { getPlayerHistories } from '../core/blitzstars/getPlayerHistories';
|
||||
import { getTankHistories } from '../core/blitzstars/getTankHistories';
|
||||
import { addPeriodSubCommands } from '../core/discord/addPeriodSubCommands';
|
||||
import addTankChoices from '../core/discord/addTankChoices';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteTanks from '../core/discord/autocompleteTanks';
|
||||
import autocompleteUsername from '../core/discord/autocompleteUsername';
|
||||
import { addTankChoices } from '../core/discord/addTankChoices';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { buttonRefresh } from '../core/discord/buttonRefresh';
|
||||
import commandToURL from '../core/discord/commandToURL';
|
||||
import { commandToURL } from '../core/discord/commandToURL';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { getCustomPeriodParams } from '../core/discord/getCustomPeriodParams';
|
||||
import resolvePeriodFromButton from '../core/discord/resolvePeriodFromButton';
|
||||
import resolvePeriodFromCommand, {
|
||||
import { resolvePeriodFromButton } from '../core/discord/resolvePeriodFromButton';
|
||||
import {
|
||||
ResolvedPeriod,
|
||||
resolvePeriodFromCommand,
|
||||
} from '../core/discord/resolvePeriodFromCommand';
|
||||
import resolvePlayerFromButton from '../core/discord/resolvePlayerFromButton';
|
||||
import resolvePlayerFromCommand, {
|
||||
import { resolvePlayerFromButton } from '../core/discord/resolvePlayerFromButton';
|
||||
import {
|
||||
ResolvedPlayer,
|
||||
resolvePlayerFromCommand,
|
||||
} from '../core/discord/resolvePlayerFromCommand';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
@@ -110,9 +110,6 @@ async function render(
|
||||
export const evolutionCommand = new Promise<CommandRegistry>(
|
||||
async (resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('evolution', [
|
||||
{
|
||||
group: 'player',
|
||||
@@ -1,35 +1,39 @@
|
||||
import {
|
||||
emblemURL,
|
||||
getAccountInfo,
|
||||
getClanAccountInfo,
|
||||
getTierWeights,
|
||||
} from '@blitzkit/core';
|
||||
import { Locale } from 'discord.js';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import GenericAllStats from '../components/GenericAllStats';
|
||||
import NoData from '../components/NoData';
|
||||
import TierWeights from '../components/TierWeights';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import { emblemURL } from '../core/blitzkit/emblemURL';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { GenericAllStats } from '../components/GenericAllStats';
|
||||
import { NoData } from '../components/NoData';
|
||||
import { TierWeights } from '../components/TierWeights';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { filtersToDescription } from '../core/blitzkit/filtersToDescription';
|
||||
import { filterStats, StatFilters } from '../core/blitzstars/filterStats';
|
||||
import { getBlitzStarsLinkButton } from '../core/blitzstars/getBlitzStarsLinkButton';
|
||||
import getStatsInPeriod from '../core/blitzstars/getStatsInPeriod';
|
||||
import addPeriodicFilterOptions from '../core/discord/addPeriodicFilterOptions';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteTanks from '../core/discord/autocompleteTanks';
|
||||
import autocompleteUsername from '../core/discord/autocompleteUsername';
|
||||
import { getStatsInPeriod } from '../core/blitzstars/getStatsInPeriod';
|
||||
import { addPeriodicFilterOptions } from '../core/discord/addPeriodicFilterOptions';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { buttonRefresh } from '../core/discord/buttonRefresh';
|
||||
import commandToURL from '../core/discord/commandToURL';
|
||||
import { commandToURL } from '../core/discord/commandToURL';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { getCustomPeriodParams } from '../core/discord/getCustomPeriodParams';
|
||||
import { getFiltersFromButton } from '../core/discord/getFiltersFromButton';
|
||||
import { getFiltersFromCommand } from '../core/discord/getFiltersFromCommand';
|
||||
import resolvePeriodFromButton from '../core/discord/resolvePeriodFromButton';
|
||||
import resolvePeriodFromCommand, {
|
||||
import { resolvePeriodFromButton } from '../core/discord/resolvePeriodFromButton';
|
||||
import {
|
||||
ResolvedPeriod,
|
||||
resolvePeriodFromCommand,
|
||||
} from '../core/discord/resolvePeriodFromCommand';
|
||||
import resolvePlayerFromButton from '../core/discord/resolvePlayerFromButton';
|
||||
import resolvePlayerFromCommand, {
|
||||
import { resolvePlayerFromButton } from '../core/discord/resolvePlayerFromButton';
|
||||
import {
|
||||
ResolvedPlayer,
|
||||
resolvePlayerFromCommand,
|
||||
} from '../core/discord/resolvePlayerFromCommand';
|
||||
import { StatFilters, filterStats } from '../core/statistics/filterStats';
|
||||
import { getTierWeights } from '../core/statistics/getTierWeights';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
async function render(
|
||||
@@ -81,9 +85,6 @@ async function render(
|
||||
export const fullStatsCommand = new Promise<CommandRegistry>(
|
||||
async (resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: await addPeriodicFilterOptions(
|
||||
createLocalizedCommand('full-stats'),
|
||||
(option) => option.addStringOption(addUsernameChoices),
|
||||
@@ -1,15 +1,15 @@
|
||||
import { getAccountInfo, getClanInfo } from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { Locale } from 'discord.js';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import GenericStats from '../components/GenericStats';
|
||||
import NoData from '../components/NoData';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanInfo } from '../core/blitz/getClanInfo';
|
||||
import addClanChoices from '../core/discord/addClanChoices';
|
||||
import autocompleteClan from '../core/discord/autocompleteClan';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { GenericStats } from '../components/GenericStats';
|
||||
import { NoData } from '../components/NoData';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { addClanChoices } from '../core/discord/addClanChoices';
|
||||
import { autocompleteClan } from '../core/discord/autocompleteClan';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { localizationObject } from '../core/discord/localizationObject';
|
||||
import resolveClanFromCommand from '../core/discord/resolveClanFromCommand';
|
||||
import { resolveClanFromCommand } from '../core/discord/resolveClanFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
@@ -17,32 +17,34 @@ const DEFAULT_THRESHOLD = 7;
|
||||
|
||||
export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('inactive')
|
||||
.addStringOption(addClanChoices)
|
||||
.addNumberOption((option) => {
|
||||
const { translate } = translator(Locale.EnglishUS);
|
||||
const { strings } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
.setName('threshold')
|
||||
.setNameLocalizations(
|
||||
localizationObject('bot.commands.inactive.options.threshold'),
|
||||
localizationObject(
|
||||
(strings) => strings.bot.commands.inactive.options.threshold.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
translate('bot.commands.inactive.options.threshold.description'),
|
||||
strings.bot.commands.inactive.options.threshold.description,
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.inactive.options.threshold.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.inactive.options.threshold.description,
|
||||
),
|
||||
)
|
||||
.setMinValue(0);
|
||||
}),
|
||||
|
||||
async handler(interaction) {
|
||||
const { translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const { region, id } = await resolveClanFromCommand(interaction);
|
||||
const threshold =
|
||||
interaction.options.getNumber('threshold')! ?? DEFAULT_THRESHOLD;
|
||||
@@ -63,7 +65,7 @@ export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
([name, days]) =>
|
||||
[
|
||||
name,
|
||||
translate('bot.commands.inactive.body.listing', [
|
||||
literals(strings.bot.commands.inactive.body.listing, [
|
||||
days.toFixed(0),
|
||||
]),
|
||||
] as [string, string],
|
||||
@@ -75,7 +77,10 @@ export const inactiveCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
<TitleBar
|
||||
title={clanInfo.name}
|
||||
image={`https://wotblitz-gc.gcdn.co/icons/clanEmblems1x/clan-icon-v2-${clanInfo.emblem_set_id}.png`}
|
||||
description={`${translate('bot.commands.inactive.body.subtitle', [`${threshold}`])} • ${new Date().toLocaleDateString(interaction.locale)}`}
|
||||
description={`${literals(
|
||||
strings.bot.commands.inactive.body.subtitle,
|
||||
[`${threshold}`],
|
||||
)} • ${new Date().toLocaleDateString(interaction.locale)}`}
|
||||
/>
|
||||
|
||||
{!hasInactiveMembers && (
|
||||
@@ -1,33 +1,28 @@
|
||||
import {
|
||||
getAccountInfo,
|
||||
getClanAccountInfo,
|
||||
linkBlitzAndDiscord,
|
||||
} from '@blitzkit/core';
|
||||
import { teal } from '@radix-ui/colors';
|
||||
import { GuildMemberRoleManager } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import discord from '../../discord.json' assert { type: 'json' };
|
||||
import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import { linkBlitzAndDiscord } from '../core/blitzkit/discordBlitzLink';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteUsername from '../core/discord/autocompleteUsername';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import embedInfo from '../core/discord/embedInfo';
|
||||
import embedNegative from '../core/discord/embedNegative';
|
||||
import resolvePlayerFromCommand from '../core/discord/resolvePlayerFromCommand';
|
||||
import { embedInfo } from '../core/discord/embedInfo';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
import { theme } from '../stitches.config';
|
||||
|
||||
export const verifyCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('link').addStringOption((option) =>
|
||||
addUsernameChoices(option).setRequired(true),
|
||||
),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const { id, region } = await resolvePlayerFromCommand(interaction);
|
||||
const discordId = BigInt(interaction.user.id);
|
||||
const accountInfo = await getAccountInfo(region, id);
|
||||
@@ -35,28 +30,6 @@ export const verifyCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
|
||||
await linkBlitzAndDiscord(discordId, id);
|
||||
|
||||
if (interaction.guildId === discord.sklld_guild_id) {
|
||||
if (!interaction.guild?.members.me?.permissions.has('ManageRoles')) {
|
||||
return embedNegative(
|
||||
translate(translate('bot.commands.link.body.no_role_permissions'), [
|
||||
markdownEscape(interaction.user.username),
|
||||
]),
|
||||
translate(
|
||||
translate(
|
||||
'bot.commands.link.body.no_role_permissions.description',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
await (interaction.member!.roles as GuildMemberRoleManager).remove(
|
||||
discord.sklld_verify_role,
|
||||
);
|
||||
await (interaction.member!.roles as GuildMemberRoleManager).add(
|
||||
discord.sklld_peasant_role,
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
<CommandWrapper fat>
|
||||
<div
|
||||
@@ -147,9 +120,9 @@ export const verifyCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
height: 16,
|
||||
}}
|
||||
/>
|
||||
<span
|
||||
style={{ fontSize: 16 }}
|
||||
>{t`bot.commands.link.body.accounts_linked`}</span>
|
||||
<span style={{ fontSize: 16 }}>
|
||||
{strings.bot.commands.link.body.accounts_linked}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -201,7 +174,7 @@ export const verifyCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
{clanAccountInfo?.clan
|
||||
? `[${clanAccountInfo?.clan?.tag}] • `
|
||||
: ''}
|
||||
{translate(`common.regions.normal.${region}`)}
|
||||
{strings.common.regions.normal[region]}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -212,8 +185,8 @@ export const verifyCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
</CommandWrapper>,
|
||||
|
||||
embedInfo(
|
||||
t`bot.commands.link.embed.title`,
|
||||
t`bot.commands.link.embed.description`,
|
||||
strings.bot.commands.link.embed.title,
|
||||
strings.bot.commands.link.embed.description,
|
||||
),
|
||||
];
|
||||
},
|
||||
@@ -1,50 +1,47 @@
|
||||
import { chunk } from 'lodash';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { TANK_CLASSES } from '../components/Tanks/components/Item/constants';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import getTankStats from '../core/blitz/getTankStats';
|
||||
import {
|
||||
NATIONS,
|
||||
TANK_CLASSES,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
TankDefinition,
|
||||
Tier,
|
||||
flags,
|
||||
getAccountInfo,
|
||||
getTankStats,
|
||||
} from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import {
|
||||
gameDefinitions,
|
||||
tankDefinitions,
|
||||
} from '../core/blitzkit/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS } from '../core/blitzkit/tankDefinitions/constants';
|
||||
import addTierChoices from '../core/discord/addTierChoices';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteUsername from '../core/discord/autocompleteUsername';
|
||||
} from '../core/blitzkit/nonBlockingPromises';
|
||||
import { addTierChoices } from '../core/discord/addTierChoices';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { chunkLines } from '../core/discord/chunkLines';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import resolvePlayerFromCommand from '../core/discord/resolvePlayerFromCommand';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
const TANKS_PER_MESSAGE = 64;
|
||||
|
||||
export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('owned-tanks')
|
||||
.addStringOption(addTierChoices)
|
||||
.addStringOption(addUsernameChoices),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings, unwrap } = translator(interaction.locale);
|
||||
const tier = Number(interaction.options.getString('tier'));
|
||||
const { id, region } = await resolvePlayerFromCommand(interaction);
|
||||
const accountInfo = await getAccountInfo(region, id);
|
||||
const tankStats = await getTankStats(region, id);
|
||||
|
||||
if (tankStats === null) {
|
||||
return t`bot.common.errors.no_tank_stats`;
|
||||
return strings.bot.common.errors.no_tank_stats;
|
||||
}
|
||||
|
||||
const filteredTanks = (
|
||||
await Promise.all(
|
||||
tankStats.map(async (tankData) => ({
|
||||
tankDefinitions: (await tankDefinitions)[tankData.tank_id]!,
|
||||
tankDefinitions: (await tankDefinitions).tanks[tankData.tank_id]!,
|
||||
id: tankData.tank_id,
|
||||
})),
|
||||
)
|
||||
@@ -62,9 +59,13 @@ export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
});
|
||||
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const awaitedNations = await NATIONS;
|
||||
const lines = tankStats
|
||||
.map(({ tank_id }) => awaitedTankDefinitions[tank_id])
|
||||
const awaitedGameDefinitions = await gameDefinitions;
|
||||
const title = literals(strings.bot.commands.owned_tanks.body.title, [
|
||||
markdownEscape(accountInfo.nickname),
|
||||
TIER_ROMAN_NUMERALS[tier],
|
||||
]);
|
||||
const tankList = tankStats
|
||||
.map(({ tank_id }) => awaitedTankDefinitions.tanks[tank_id])
|
||||
.filter((tank) => tank.tier === tier)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
@@ -72,18 +73,16 @@ export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
awaitedNations.indexOf(a.nation) - awaitedNations.indexOf(b.nation),
|
||||
awaitedGameDefinitions.nations.indexOf(a.nation) -
|
||||
awaitedGameDefinitions.nations.indexOf(b.nation),
|
||||
)
|
||||
.map((tank) => `${flags[tank.nation]} ${markdownEscape(tank.name)}`);
|
||||
.map(
|
||||
(tank) =>
|
||||
`[${flags[tank.nation]} ${markdownEscape(unwrap(tank.name))}](<https://blitzkit.app/tools/tankopedia/${tank.id}>)`,
|
||||
);
|
||||
const lines = [title, ...tankList];
|
||||
|
||||
return chunk(lines, TANKS_PER_MESSAGE).map((lines, index) =>
|
||||
index === 0
|
||||
? `${translate('bot.commands.owned_tanks.body.title', [
|
||||
markdownEscape(accountInfo.nickname),
|
||||
TIER_ROMAN_NUMERALS[tier as Tier],
|
||||
])}${lines.join('\n')}`
|
||||
: lines.join('\n'),
|
||||
);
|
||||
return chunkLines(lines);
|
||||
},
|
||||
|
||||
autocomplete: autocompleteUsername,
|
||||
@@ -1,35 +1,33 @@
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
export const permissionsCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('permissions'),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
// friday the 13th permissions easter egg
|
||||
const isFridayThe13th =
|
||||
new Date().getDay() === 5 && new Date().getDate() === 13;
|
||||
const permissions = [
|
||||
[
|
||||
interaction.appPermissions?.has('ViewChannel'),
|
||||
t`bot.commands.permissions.body.view_channels`,
|
||||
strings.bot.commands.permissions.body.view_channels,
|
||||
],
|
||||
[
|
||||
interaction.appPermissions?.has('ReadMessageHistory'),
|
||||
t`bot.commands.permissions.body.read_message_history`,
|
||||
strings.bot.commands.permissions.body.read_message_history,
|
||||
],
|
||||
[
|
||||
interaction.appPermissions?.has('AttachFiles'),
|
||||
t`bot.commands.permissions.body.attach_files`,
|
||||
strings.bot.commands.permissions.body.attach_files,
|
||||
],
|
||||
[
|
||||
interaction.appPermissions?.has('UseExternalEmojis'),
|
||||
t`bot.commands.permissions.body.external_emojis`,
|
||||
strings.bot.commands.permissions.body.external_emojis,
|
||||
],
|
||||
];
|
||||
const body = permissions
|
||||
@@ -42,7 +40,7 @@ export const permissionsCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
})
|
||||
.join('\n');
|
||||
|
||||
return translate('bot.commands.permissions.body.title', [body]);
|
||||
return literals(strings.bot.commands.permissions.body.title, [body]);
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -1,11 +1,10 @@
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
export const pingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
handlesInteraction: true,
|
||||
|
||||
command: createLocalizedCommand('ping', [
|
||||
@@ -14,19 +13,19 @@ export const pingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
]),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const subcommand = interaction.options.getSubcommand();
|
||||
const executionStart = Date.now();
|
||||
|
||||
if (subcommand === 'blitzkit') {
|
||||
await interaction.editReply(t`bot.commands.ping.body.pong`);
|
||||
await interaction.editReply(strings.bot.commands.ping.body.pong);
|
||||
} else {
|
||||
await fetch('https://api.wotblitz.com/');
|
||||
}
|
||||
|
||||
const executionTime = Date.now() - executionStart;
|
||||
interaction.editReply(
|
||||
translate('bot.commands.ping.body.pong_with_time', [
|
||||
literals(strings.bot.commands.ping.body.pong_with_time, [
|
||||
`${Math.round(executionTime)}`,
|
||||
]),
|
||||
);
|
||||
@@ -1,44 +1,42 @@
|
||||
import { getAccountInfo } from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteUsername from '../core/discord/autocompleteUsername';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import embedInfo from '../core/discord/embedInfo';
|
||||
import markdownTable from '../core/discord/markdownTable';
|
||||
import resolvePlayerFromCommand from '../core/discord/resolvePlayerFromCommand';
|
||||
import { embedInfo } from '../core/discord/embedInfo';
|
||||
import { markdownTable } from '../core/discord/markdownTable';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
export const playerInfoCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command:
|
||||
createLocalizedCommand('player-info').addStringOption(addUsernameChoices),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const account = await resolvePlayerFromCommand(interaction);
|
||||
const { id, region: region } = account;
|
||||
const accountInfo = await getAccountInfo(region, id);
|
||||
|
||||
return embedInfo(
|
||||
translate('bot.commands.player_info.body.title', [
|
||||
literals(strings.bot.commands.player_info.body.title, [
|
||||
markdownEscape(accountInfo.nickname),
|
||||
]),
|
||||
|
||||
markdownTable([
|
||||
[
|
||||
t`bot.commands.player_info.body.nickname`,
|
||||
strings.bot.commands.player_info.body.nickname,
|
||||
`${accountInfo.nickname}`,
|
||||
],
|
||||
[
|
||||
t`bot.commands.player_info.body.battles`,
|
||||
strings.bot.commands.player_info.body.battles,
|
||||
`${accountInfo.statistics.all.battles}`,
|
||||
],
|
||||
[
|
||||
t`bot.commands.player_info.body.winrate`,
|
||||
strings.bot.commands.player_info.body.winrate,
|
||||
`${(
|
||||
100 *
|
||||
(accountInfo.statistics.all.wins /
|
||||
@@ -47,17 +45,17 @@ export const playerInfoCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
],
|
||||
[],
|
||||
[
|
||||
t`bot.commands.player_info.body.account_id`,
|
||||
strings.bot.commands.player_info.body.account_id,
|
||||
`${accountInfo.account_id}`,
|
||||
],
|
||||
[
|
||||
t`bot.commands.player_info.body.created`,
|
||||
strings.bot.commands.player_info.body.created,
|
||||
new Date(accountInfo.created_at * 1000).toLocaleDateString(
|
||||
interaction.locale,
|
||||
),
|
||||
],
|
||||
[
|
||||
t`bot.commands.player_info.body.last_battle`,
|
||||
strings.bot.commands.player_info.body.last_battle,
|
||||
new Date(accountInfo.last_battle_time * 1000).toLocaleDateString(
|
||||
interaction.locale,
|
||||
),
|
||||
@@ -1,24 +1,27 @@
|
||||
import {
|
||||
deltaBkrlBlitzStats,
|
||||
emblemURL,
|
||||
getAccountInfo,
|
||||
getArchivedRatingLeaderboard,
|
||||
getClanAccountInfo,
|
||||
getLeagueFromScore,
|
||||
getRatingInfo,
|
||||
getRatingNeighbors,
|
||||
imgur,
|
||||
} from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { SlashCommandSubcommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { DeltaCaret } from '../components/DeltaCaret';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import { getLeagueFromScore } from '../core/blitz/getLeagueFromScore';
|
||||
import getRatingInfo from '../core/blitz/getRatingInfo';
|
||||
import { getRatingNeighbors } from '../core/blitz/getRatingNeighbors';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { normalizeLeagueIcon } from '../core/blitz/normalizeLeagueIcon';
|
||||
import { emblemURL } from '../core/blitzkit/emblemURL';
|
||||
import getArchivedRatingMidnightLeaderboard from '../core/blitzkit/getArchivedRatingMidnightLeaderboard';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import resolvePlayerFromCommand from '../core/discord/resolvePlayerFromCommand';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { deltaBkrlBlitzStats } from '../core/statistics/deltaBkrlBlitzStats';
|
||||
import { BkrlFormat } from '../core/streams/bkrl';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
import { theme } from '../stitches.config';
|
||||
|
||||
@@ -47,14 +50,11 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
},
|
||||
]),
|
||||
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
async handler(interaction) {
|
||||
const subcommand = interaction.options.getSubcommand(true) as
|
||||
| 'season'
|
||||
| 'today';
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const { id, region } = await resolvePlayerFromCommand(interaction);
|
||||
const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan;
|
||||
const clanImage = clan ? emblemURL(clan.emblem_set_id) : undefined;
|
||||
@@ -65,12 +65,12 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
throw new Error(`Rating info not available for ${region}`);
|
||||
}
|
||||
|
||||
const leaderboard = await getArchivedRatingMidnightLeaderboard(
|
||||
const leaderboard = await getArchivedRatingLeaderboard(
|
||||
region,
|
||||
ratingInfo.current_season - (subcommand === 'today' ? 0 : 1),
|
||||
);
|
||||
|
||||
if (leaderboard?.format === BkrlFormat.Base) {
|
||||
if (leaderboard.version!.$case === 'v1') {
|
||||
throw new Error(
|
||||
'Encountered bkrl minimal format in latest season. Wait till next cron?',
|
||||
);
|
||||
@@ -79,16 +79,18 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
const accountInfo = await getAccountInfo(region, id, [
|
||||
'statistics.rating',
|
||||
]);
|
||||
const statsIndex = leaderboard?.entries.findIndex(
|
||||
const statsIndex = leaderboard.version!.value.entries.findIndex(
|
||||
(entry) => entry.id === id,
|
||||
);
|
||||
const statsA = leaderboard ? leaderboard.entries[statsIndex!] : null;
|
||||
const statsA = leaderboard
|
||||
? leaderboard.version!.value.entries[statsIndex!]
|
||||
: null;
|
||||
const positionA = leaderboard ? statsIndex! + 1 : undefined;
|
||||
const statsB1 = accountInfo.statistics.rating!;
|
||||
const statsB2Array = (await getRatingNeighbors(region, id, 0)).neighbors;
|
||||
|
||||
if (statsB2Array === undefined) {
|
||||
return translate('bot.commands.rating.errors.no_participation', [
|
||||
return literals(strings.bot.commands.rating.errors.no_participation, [
|
||||
markdownEscape(accountInfo.nickname),
|
||||
]);
|
||||
}
|
||||
@@ -97,10 +99,10 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
const league = getLeagueFromScore(statsB2.score);
|
||||
|
||||
if (!statsA) {
|
||||
return t`bot.commands.rating.errors.unrecorded_stats`;
|
||||
return strings.bot.commands.rating.errors.unrecorded_stats;
|
||||
}
|
||||
if (!statsB1) {
|
||||
return translate('bot.commands.rating.errors.no_participation', [
|
||||
return literals(strings.bot.commands.rating.errors.no_participation, [
|
||||
markdownEscape(accountInfo.nickname),
|
||||
]);
|
||||
}
|
||||
@@ -119,15 +121,28 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
statsB2,
|
||||
);
|
||||
const leagueTheme = LEAGUE_ACCENT[league.index];
|
||||
let rewardImage = reward
|
||||
? reward.type === 'vehicle'
|
||||
? reward.vehicle.preview_image_url
|
||||
: reward.stuff.image_url
|
||||
: undefined;
|
||||
|
||||
if (rewardImage) {
|
||||
const { ok } = await fetch(rewardImage);
|
||||
|
||||
if (!ok) {
|
||||
rewardImage = imgur('kP88vqr');
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<CommandWrapper>
|
||||
<TitleBar
|
||||
title={accountInfo.nickname}
|
||||
image={clanImage}
|
||||
description={`${translate(`bot.commands.rating.body.subtitle.${subcommand}`)} • ${new Date().toLocaleDateString(
|
||||
interaction.locale,
|
||||
)}`}
|
||||
description={`${
|
||||
strings.bot.commands.rating.body.subtitle[subcommand]
|
||||
} • ${new Date().toLocaleDateString(interaction.locale)}`}
|
||||
/>
|
||||
|
||||
<div
|
||||
@@ -143,7 +158,9 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
padding: 16,
|
||||
backgroundColor: theme.colors[`appBackground2${leagueTheme}`],
|
||||
borderRadius: 4,
|
||||
border: `1px solid ${theme.colors[`componentInteractive${leagueTheme}`]}`,
|
||||
border: `1px solid ${
|
||||
theme.colors[`componentInteractive${leagueTheme}`]
|
||||
}`,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
@@ -323,11 +340,7 @@ export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
height: 64,
|
||||
objectFit: 'cover',
|
||||
}}
|
||||
src={await iconPng(
|
||||
reward.type === 'vehicle'
|
||||
? reward.vehicle.preview_image_url
|
||||
: reward.stuff.image_url,
|
||||
)}
|
||||
src={await iconPng(rewardImage!)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
+138
-182
@@ -1,123 +1,39 @@
|
||||
import {
|
||||
FIRST_MINIMAL_ARCHIVED_RATING_SEASON,
|
||||
getAccountInfo,
|
||||
getArchivedLatestSeasonNumber,
|
||||
getArchivedRatingLeaderboard,
|
||||
getClanAccountInfo,
|
||||
getRatingInfo,
|
||||
getRatingLeague,
|
||||
getRatingNeighbors,
|
||||
imgur,
|
||||
isOnGoingRatingSeason,
|
||||
LEAGUES,
|
||||
RatingInfo,
|
||||
RatingLeaderboard,
|
||||
Region,
|
||||
} from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import {
|
||||
APIApplicationCommandOptionChoice,
|
||||
Locale,
|
||||
SlashCommandSubcommandBuilder,
|
||||
} from 'discord.js';
|
||||
import { range } from 'lodash';
|
||||
import { range } from 'lodash-es';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import * as Leaderboard from '../components/Leaderboard';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { LEAGUES } from '../constants/leagues';
|
||||
import { FIRST_MINIMAL_ARCHIVED_RATING_SEASON } from '../constants/rating';
|
||||
import { Region } from '../constants/regions';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import getRatingInfo from '../core/blitz/getRatingInfo';
|
||||
import { getRatingLeague } from '../core/blitz/getRatingLeague';
|
||||
import { getRatingNeighbors } from '../core/blitz/getRatingNeighbors';
|
||||
import { isOnGoingRatingSeason } from '../core/blitz/isOnGoingRatingSeason';
|
||||
import { getArchivedLatestSeasonNumber } from '../core/blitzkit/getArchivedLatestSeasonNumber';
|
||||
import getArchivedRatingInfo from '../core/blitzkit/getArchivedRatingInfo';
|
||||
import { getArchivedRatingLeaderboard } from '../core/blitzkit/getArchivedRatingLeaderboard';
|
||||
import getArchivedRatingMidnightLeaderboard from '../core/blitzkit/getArchivedRatingMidnightLeaderboard';
|
||||
import addRegionChoices from '../core/discord/addRegionChoices';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteUsername from '../core/discord/autocompleteUsername';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { UserError } from '../core/blitzkit/userError';
|
||||
import { addRegionChoices } from '../core/discord/addRegionChoices';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { localizationObject } from '../core/discord/localizationObject';
|
||||
import resolvePlayerFromCommand from '../core/discord/resolvePlayerFromCommand';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { BkrlDiscriminatedEntries } from '../core/streams/bkrl';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
import { UserError } from '../hooks/userError';
|
||||
|
||||
export interface RatingPlayer {
|
||||
spa_id: number;
|
||||
mmr: number;
|
||||
season_number: number;
|
||||
calibrationBattlesLeft: number;
|
||||
number: number;
|
||||
percentile: number;
|
||||
skip: boolean;
|
||||
updated_at: string;
|
||||
score: number;
|
||||
nickname: string;
|
||||
clan_tag: string;
|
||||
}
|
||||
|
||||
export interface LeagueTop {
|
||||
result: RatingPlayer[];
|
||||
}
|
||||
|
||||
export type RatingReward = {
|
||||
from_position: number;
|
||||
to_position: number;
|
||||
count: number;
|
||||
} & (
|
||||
| {
|
||||
type: 'vehicle';
|
||||
|
||||
vehicle: {
|
||||
id: number;
|
||||
name: string;
|
||||
nation: string;
|
||||
subnation: string;
|
||||
use_subnation_flag: boolean;
|
||||
type_slug: string;
|
||||
level: number;
|
||||
roman_level: string;
|
||||
user_string: string;
|
||||
image_url: string;
|
||||
preview_image_url: string;
|
||||
is_premium: boolean;
|
||||
is_collectible: boolean;
|
||||
};
|
||||
}
|
||||
| {
|
||||
type: 'stuff';
|
||||
|
||||
stuff: {
|
||||
name: string;
|
||||
count: number;
|
||||
title: string;
|
||||
image_url: string;
|
||||
type: string;
|
||||
|
||||
sizes: {};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
export interface RatingLeague {
|
||||
title: string;
|
||||
small_icon: string;
|
||||
big_icon: string;
|
||||
background: string;
|
||||
index: number;
|
||||
percentile: number;
|
||||
}
|
||||
|
||||
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 } };
|
||||
|
||||
export interface RatingNeighbors {
|
||||
neighbors: RatingPlayer[];
|
||||
}
|
||||
|
||||
interface SimplifiedPlayer {
|
||||
id: number;
|
||||
@@ -139,26 +55,32 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
);
|
||||
|
||||
function addOptions(option: SlashCommandSubcommandBuilder) {
|
||||
const { t, translate } = translator(Locale.EnglishUS);
|
||||
const { strings } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
.addIntegerOption((option) =>
|
||||
option
|
||||
.setName(t`bot.commands.rating_leaderboard.options.limit`)
|
||||
.setName(strings.bot.commands.rating_leaderboard.options.limit.name)
|
||||
.setNameLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.limit',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options.limit.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
translate(
|
||||
'bot.commands.rating_leaderboard.options.limit.description',
|
||||
literals(
|
||||
strings.bot.commands.rating_leaderboard.options.limit
|
||||
.description,
|
||||
[`${DEFAULT_LIMIT}`],
|
||||
),
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.limit.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options.limit
|
||||
.description,
|
||||
[`${DEFAULT_LIMIT}`],
|
||||
),
|
||||
)
|
||||
@@ -168,20 +90,26 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName(t`bot.commands.rating_leaderboard.options.season`)
|
||||
.setName(
|
||||
strings.bot.commands.rating_leaderboard.options.season.name,
|
||||
)
|
||||
.setNameLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.season',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options.season.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
translate(
|
||||
'bot.commands.rating_leaderboard.options.season.description',
|
||||
),
|
||||
strings.bot.commands.rating_leaderboard.options.season
|
||||
.description,
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.season.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options.season
|
||||
.description,
|
||||
),
|
||||
)
|
||||
.setRequired(false)
|
||||
@@ -193,15 +121,18 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
|
||||
return {
|
||||
name: current
|
||||
? translate(
|
||||
'bot.commands.rating_leaderboard.options.season.choices.current',
|
||||
? literals(
|
||||
strings.bot.commands.rating_leaderboard.options.season
|
||||
.choices.current,
|
||||
[`${number}`],
|
||||
)
|
||||
: `${number}`,
|
||||
value: `${number}`,
|
||||
name_localizations: current
|
||||
? localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.season.choices.current',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options
|
||||
.season.choices.current,
|
||||
[`${number}`],
|
||||
)
|
||||
: undefined,
|
||||
@@ -213,9 +144,6 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
}
|
||||
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('rating-leaderboard', [
|
||||
{
|
||||
subcommand: 'neighbors',
|
||||
@@ -229,33 +157,45 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
modify(option: SlashCommandSubcommandBuilder) {
|
||||
option
|
||||
.addStringOption((option) => {
|
||||
const { t, translate } = translator(Locale.EnglishUS);
|
||||
const { strings } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
.setName(t`bot.commands.rating_leaderboard.options.league`)
|
||||
.setName(
|
||||
strings.bot.commands.rating_leaderboard.options.league.name,
|
||||
)
|
||||
.setNameLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.league',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options.league
|
||||
.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
translate(
|
||||
'bot.commands.rating_leaderboard.options.league.description',
|
||||
),
|
||||
strings.bot.commands.rating_leaderboard.options.league
|
||||
.description,
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.rating_leaderboard.options.league.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.rating_leaderboard.options.league
|
||||
.description,
|
||||
),
|
||||
)
|
||||
.addChoices(
|
||||
...LEAGUES.map(
|
||||
({ name }, value) =>
|
||||
({
|
||||
name: translate(`common.leagues.${name}`),
|
||||
name: (
|
||||
strings.common.leagues as Record<string, string>
|
||||
)[name],
|
||||
value: `${value}`,
|
||||
name_localizations: localizationObject(
|
||||
`common.leagues.${name}`,
|
||||
(strings) =>
|
||||
(
|
||||
strings.common.leagues as Record<string, string>
|
||||
)[name],
|
||||
),
|
||||
}) satisfies APIApplicationCommandOptionChoice<string>,
|
||||
),
|
||||
@@ -271,7 +211,7 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
// BIG TODO: title seems to be in english
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const subcommand = interaction.options.getSubcommand(true) as
|
||||
| 'league'
|
||||
| 'neighbors';
|
||||
@@ -288,9 +228,9 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
let titleDescription: string;
|
||||
let playersAfter: number;
|
||||
let players: SimplifiedPlayer[] | undefined;
|
||||
let midnightLeaderboard: BkrlDiscriminatedEntries | null;
|
||||
let archivedLeaderboard: RatingLeaderboard | null;
|
||||
let playerId: number | undefined;
|
||||
let regionRatingInfo: RatingInfo;
|
||||
let regionRatingInfo: RatingInfo | null;
|
||||
|
||||
if (subcommand === 'league') {
|
||||
const leagueIndex = parseInt(
|
||||
@@ -299,10 +239,15 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
const region = interaction.options.getString('region') as Region;
|
||||
regionRatingInfo = await (isCurrentSeason
|
||||
? getRatingInfo(region)
|
||||
: getArchivedRatingInfo(region, season!));
|
||||
: null);
|
||||
|
||||
if (regionRatingInfo.detail !== undefined)
|
||||
return t`bot.commands.rating_leaderboard.body.no_ongoing_season`;
|
||||
if (
|
||||
regionRatingInfo !== null &&
|
||||
regionRatingInfo.detail !== undefined
|
||||
) {
|
||||
return strings.bot.commands.rating_leaderboard.body
|
||||
.no_ongoing_season;
|
||||
}
|
||||
|
||||
const result = isCurrentSeason
|
||||
? await getRatingLeague(region, leagueIndex).then(async (result) =>
|
||||
@@ -322,12 +267,12 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
const firstPlayerIndex =
|
||||
leagueIndex === 0
|
||||
? 0
|
||||
: players.entries.findIndex(
|
||||
: players.version!.value.entries.findIndex(
|
||||
(player) =>
|
||||
player.score < LEAGUES[leagueIndex - 1].minScore,
|
||||
);
|
||||
const lastPlayerIndex = firstPlayerIndex + limit - 1;
|
||||
const trimmed = players.entries.slice(
|
||||
const trimmed = players.version!.value.entries.slice(
|
||||
firstPlayerIndex,
|
||||
lastPlayerIndex + 1,
|
||||
);
|
||||
@@ -346,45 +291,51 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
clan: clanData[player.id]?.clan?.tag,
|
||||
nickname:
|
||||
clanData[index]?.account_name ??
|
||||
translate(
|
||||
'bot.commands.rating_leaderboard.body.deleted_player',
|
||||
literals(
|
||||
strings.bot.commands.rating_leaderboard.body
|
||||
.deleted_player,
|
||||
[`${player.id}`],
|
||||
),
|
||||
}) satisfies SimplifiedPlayer,
|
||||
);
|
||||
},
|
||||
);
|
||||
const leagueInfo = regionRatingInfo.leagues[leagueIndex];
|
||||
midnightLeaderboard = isCurrentSeason
|
||||
? await getArchivedRatingMidnightLeaderboard(
|
||||
region,
|
||||
regionRatingInfo.current_season,
|
||||
)
|
||||
: await getArchivedRatingMidnightLeaderboard(region, season!);
|
||||
const leagueInfo = LEAGUES[leagueIndex];
|
||||
archivedLeaderboard = await getArchivedRatingLeaderboard(
|
||||
region,
|
||||
season,
|
||||
);
|
||||
|
||||
players = result;
|
||||
playersAfter =
|
||||
regionRatingInfo.count - result[result.length - 1].position;
|
||||
(regionRatingInfo === null
|
||||
? archivedLeaderboard.version!.value.entries.length
|
||||
: regionRatingInfo.count) - result[result.length - 1].position;
|
||||
titleName = `${
|
||||
leagueInfo
|
||||
? translate(`common.leagues.${LEAGUES[leagueInfo.index].name}`)
|
||||
? (strings.common.leagues as Record<string, string>)[
|
||||
LEAGUES[leagueInfo.index].name
|
||||
]
|
||||
: ''
|
||||
} - ${translate(`common.regions.short.${region}`)}`;
|
||||
titleImage = leagueInfo.big_icon.startsWith('http')
|
||||
? leagueInfo.big_icon
|
||||
: `https:${leagueInfo.big_icon}`;
|
||||
titleDescription = translate(
|
||||
'bot.commands.rating_leaderboard.body.top_players',
|
||||
} - ${strings.common.regions.short[region]}`;
|
||||
titleImage = imgur(leagueInfo.icon);
|
||||
titleDescription = literals(
|
||||
strings.bot.commands.rating_leaderboard.body.top_players,
|
||||
[`${limit}`],
|
||||
);
|
||||
} else {
|
||||
const { region, id } = await resolvePlayerFromCommand(interaction);
|
||||
regionRatingInfo = isCurrentSeason
|
||||
? await getRatingInfo(region)
|
||||
: await getArchivedRatingInfo(region, season!);
|
||||
: null;
|
||||
|
||||
if (regionRatingInfo.detail !== undefined)
|
||||
return t`bot.commands.rating_leaderboard.body.no_ongoing_season`;
|
||||
if (
|
||||
regionRatingInfo !== null &&
|
||||
regionRatingInfo.detail !== undefined
|
||||
) {
|
||||
return strings.bot.commands.rating_leaderboard.body
|
||||
.no_ongoing_season;
|
||||
}
|
||||
|
||||
const accountInfo = await getAccountInfo(region, id);
|
||||
const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan;
|
||||
@@ -404,21 +355,22 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
)
|
||||
: await getArchivedRatingLeaderboard(region, season!).then(
|
||||
async (players) => {
|
||||
const playerIndex = players.entries.findIndex(
|
||||
const playerIndex = players.version!.value.entries.findIndex(
|
||||
(player) => player.id === id,
|
||||
);
|
||||
|
||||
if (playerIndex === -1) {
|
||||
throw new UserError(
|
||||
translate(
|
||||
'bot.commands.rating_leaderboard.body.no_participation',
|
||||
literals(
|
||||
strings.bot.commands.rating_leaderboard.body
|
||||
.no_participation,
|
||||
[markdownEscape(accountInfo.nickname), `${season}`],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const halfRange = Math.round(limit / 2);
|
||||
const trimmed = players.entries.slice(
|
||||
const trimmed = players.version!.value.entries.slice(
|
||||
playerIndex - halfRange,
|
||||
playerIndex + halfRange + 1,
|
||||
);
|
||||
@@ -439,32 +391,36 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
}));
|
||||
},
|
||||
);
|
||||
midnightLeaderboard = isCurrentSeason
|
||||
? await getArchivedRatingMidnightLeaderboard(
|
||||
region,
|
||||
regionRatingInfo.current_season,
|
||||
)
|
||||
: await getArchivedRatingMidnightLeaderboard(region, season!);
|
||||
archivedLeaderboard = await getArchivedRatingLeaderboard(
|
||||
region,
|
||||
season,
|
||||
);
|
||||
|
||||
players = neighbors;
|
||||
titleImage = clan
|
||||
? `https://wotblitz-gc.gcdn.co/icons/clanEmblems1x/clan-icon-v2-${clan.emblem_set_id}.png`
|
||||
: undefined;
|
||||
titleName = neighbors ? accountInfo.nickname : '';
|
||||
titleDescription = t`bot.commands.rating_leaderboard.body.neighbors`;
|
||||
titleDescription =
|
||||
strings.bot.commands.rating_leaderboard.body.neighbors;
|
||||
playersAfter =
|
||||
regionRatingInfo.count - neighbors[neighbors.length - 1].position;
|
||||
(regionRatingInfo === null
|
||||
? archivedLeaderboard.version!.value.entries.length
|
||||
: regionRatingInfo.count) -
|
||||
neighbors[neighbors.length - 1].position;
|
||||
playerId = id;
|
||||
}
|
||||
|
||||
const items = players.map((player) => {
|
||||
const midnightIndex = midnightLeaderboard?.entries.findIndex(
|
||||
(item) => item.id === player.id,
|
||||
);
|
||||
const midnightIndex =
|
||||
archivedLeaderboard?.version!.value.entries.findIndex(
|
||||
(item) => item.id === player.id,
|
||||
);
|
||||
const midnightScore =
|
||||
midnightIndex === undefined
|
||||
? player.score
|
||||
: midnightLeaderboard!.entries[midnightIndex].score;
|
||||
: archivedLeaderboard!.version!.value.entries[midnightIndex]
|
||||
.score;
|
||||
const midnightPosition =
|
||||
midnightIndex === undefined ? player.position : midnightIndex + 1;
|
||||
|
||||
@@ -495,8 +451,8 @@ export const ratingLeaderboardCommand = new Promise<CommandRegistry>(
|
||||
{items}
|
||||
{playersAfter > 0 && (
|
||||
<Leaderboard.Gap
|
||||
message={translate(
|
||||
'bot.commands.rating_leaderboard.body.more',
|
||||
message={literals(
|
||||
strings.bot.commands.rating_leaderboard.body.more,
|
||||
[`${playersAfter.toLocaleString(interaction.locale)}`],
|
||||
)}
|
||||
/>
|
||||
@@ -1,19 +1,25 @@
|
||||
import { clamp } from 'lodash';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import { idToRegion } from '../core/blitz/idToRegion';
|
||||
import { emblemURL } from '../core/blitzkit/emblemURL';
|
||||
import {
|
||||
calculateWN8,
|
||||
emblemURL,
|
||||
getClanAccountInfo,
|
||||
idToRegion,
|
||||
tankIcon,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from '@blitzkit/core';
|
||||
import { Locale } from 'discord.js';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import { mapDefinitions } from '../core/blitzkit/mapDefinitions';
|
||||
import {
|
||||
mapDefinitions,
|
||||
tankDefinitions,
|
||||
} from '../core/blitzkit/nonBlockingPromises';
|
||||
import { RenderConfiguration } from '../core/blitzkit/renderConfiguration';
|
||||
import { tankDefinitions } from '../core/blitzkit/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS } from '../core/blitzkit/tankDefinitions/constants';
|
||||
import { tankIcon } from '../core/blitzkit/tankIcon';
|
||||
import { tankAverages } from '../core/blitzstars/tankAverages';
|
||||
import buttonLink from '../core/discord/buttonLink';
|
||||
import { blitzStarsTankAverages } from '../core/blitzstars/tankAverages';
|
||||
import { buttonLink } from '../core/discord/buttonLink';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import calculateWN8 from '../core/statistics/calculateWN8';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
import { theme } from '../stitches.config';
|
||||
|
||||
@@ -214,14 +220,16 @@ function stat(value: string | number, flex = 2) {
|
||||
}
|
||||
|
||||
async function playerListing(
|
||||
locale: Locale,
|
||||
player: WotInspectorReplayPlayerData,
|
||||
protagonistTeam: boolean,
|
||||
winningTeam: number,
|
||||
recordingPlayer = false,
|
||||
) {
|
||||
const awaitedTankAverages = await tankAverages;
|
||||
const { unwrap } = translator(locale);
|
||||
const awaitedTankAverages = await blitzStarsTankAverages;
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const tank = awaitedTankDefinitions[player.vehicle_descr];
|
||||
const tank = awaitedTankDefinitions.tanks[player.vehicle_descr];
|
||||
const blockAccent = recordingPlayer ? '_amber' : '';
|
||||
const healthAccent = protagonistTeam
|
||||
? recordingPlayer
|
||||
@@ -271,7 +279,7 @@ async function playerListing(
|
||||
}}
|
||||
>
|
||||
<img
|
||||
alt={tank.name}
|
||||
alt={unwrap(tank.name)}
|
||||
src={await iconPng(tankIcon(tank.id))}
|
||||
style={{
|
||||
width: 32,
|
||||
@@ -308,7 +316,7 @@ async function playerListing(
|
||||
fontSize: 16,
|
||||
}}
|
||||
>
|
||||
{tank.name}
|
||||
{unwrap(tank.name)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -453,8 +461,6 @@ function Header() {
|
||||
|
||||
export const replayCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
command: createLocalizedCommand('replay').addAttachmentOption((option) =>
|
||||
option.setName('file').setDescription('Replay file').setRequired(true),
|
||||
),
|
||||
@@ -502,7 +508,7 @@ export const replayCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
replayData.protagonist_team === replayData.winner_team
|
||||
? 'Victory'
|
||||
: 'Defeat'
|
||||
} • ${awaitedMapDefinitions[replayData.map_id].name}`}
|
||||
} • ${awaitedMapDefinitions.maps[replayData.map_id].name}`}
|
||||
/>
|
||||
|
||||
<div
|
||||
@@ -528,6 +534,7 @@ export const replayCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
)
|
||||
.map((player) =>
|
||||
playerListing(
|
||||
interaction.locale,
|
||||
player,
|
||||
true,
|
||||
replayData.winner_team,
|
||||
@@ -551,7 +558,12 @@ export const replayCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
players
|
||||
.filter((player) => player.team === antagonistTeamId)
|
||||
.map((player) =>
|
||||
playerListing(player, false, replayData.winner_team),
|
||||
playerListing(
|
||||
interaction.locale,
|
||||
player,
|
||||
false,
|
||||
replayData.winner_team,
|
||||
),
|
||||
),
|
||||
)}
|
||||
</div>
|
||||
@@ -1,51 +1,56 @@
|
||||
import { Locale, escapeMarkdown } from 'discord.js';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import { equipmentPriceMatrix } from '../constants/equipmentPrice';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import getTankStats from '../core/blitz/getTankStats';
|
||||
import resolveTankId from '../core/blitz/resolveTankId';
|
||||
import { asset } from '../core/blitzkit/asset';
|
||||
import { buildTechTreeLine } from '../core/blitzkit/buildTechTreeLine';
|
||||
import { emblemURL } from '../core/blitzkit/emblemURL';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import { resolveAncestry } from '../core/blitzkit/resolveAncestry';
|
||||
import { tankDefinitions } from '../core/blitzkit/tankDefinitions';
|
||||
import {
|
||||
asset,
|
||||
emblemURL,
|
||||
equipmentPriceMatrix,
|
||||
getAccountInfo,
|
||||
getClanAccountInfo,
|
||||
getTankStats,
|
||||
TANK_ICONS,
|
||||
TankType,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from '../core/blitzkit/tankDefinitions/constants';
|
||||
} from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { escapeMarkdown, Locale } from 'discord.js';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { resolveTankId } from '../core/blitz/resolveTankId';
|
||||
import { buildTechTreeLine } from '../core/blitzkit/buildTechTreeLine';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import { tankDefinitions } from '../core/blitzkit/nonBlockingPromises';
|
||||
import { resolveAncestry } from '../core/blitzkit/resolveAncestry';
|
||||
import { tankIconPng } from '../core/blitzkit/tankIconPng';
|
||||
import addUsernameChoices from '../core/discord/addUsernameChoices';
|
||||
import autocompleteTanks from '../core/discord/autocompleteTanks';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { localizationObject } from '../core/discord/localizationObject';
|
||||
import resolvePlayerFromCommand from '../core/discord/resolvePlayerFromCommand';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
import { theme } from '../stitches.config';
|
||||
|
||||
export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
const { t } = translator(Locale.EnglishUS);
|
||||
const { strings } = translator(Locale.EnglishUS);
|
||||
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('research')
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName(t`bot.commands.research.options.target_tank`)
|
||||
.setName(strings.bot.commands.research.options.target_tank.name)
|
||||
.setNameLocalizations(
|
||||
localizationObject('bot.commands.research.options.target_tank'),
|
||||
localizationObject(
|
||||
(strings) =>
|
||||
strings.bot.commands.research.options.target_tank.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
t`bot.commands.research.options.target_tank.description`,
|
||||
strings.bot.commands.research.options.target_tank.description,
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.research.options.target_tank.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.research.options.target_tank.description,
|
||||
),
|
||||
)
|
||||
.setAutocomplete(true)
|
||||
@@ -53,16 +58,22 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName(t`bot.commands.research.options.starting_tank`)
|
||||
.setName(strings.bot.commands.research.options.starting_tank.name)
|
||||
.setNameLocalizations(
|
||||
localizationObject('bot.commands.research.options.starting_tank'),
|
||||
localizationObject(
|
||||
(strings) =>
|
||||
strings.bot.commands.research.options.starting_tank.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
t`bot.commands.research.options.starting_tank.description`,
|
||||
strings.bot.commands.research.options.starting_tank.description,
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.research.options.starting_tank.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.research.options.starting_tank.description,
|
||||
),
|
||||
)
|
||||
.setAutocomplete(true)
|
||||
@@ -71,7 +82,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
.addStringOption(addUsernameChoices),
|
||||
|
||||
async handler(interaction) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
const { strings, unwrap } = translator(interaction.locale);
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const targetTankId = await resolveTankId(
|
||||
interaction.options.getString('target-tank', true),
|
||||
@@ -79,7 +90,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
true,
|
||||
);
|
||||
const startingTankRaw = interaction.options.getString('starting-tank');
|
||||
const targetTank = awaitedTankDefinitions[targetTankId];
|
||||
const targetTank = awaitedTankDefinitions.tanks[targetTankId];
|
||||
const { id, region } = await resolvePlayerFromCommand(interaction);
|
||||
let startingTankId: number;
|
||||
const targetTankAncestry = await resolveAncestry(targetTankId);
|
||||
@@ -92,55 +103,60 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
);
|
||||
|
||||
if (targetTankId === startingTankId) {
|
||||
return translate('bot.commands.research.errors.start_end_equal', [
|
||||
escapeMarkdown(targetTank.name),
|
||||
]);
|
||||
return literals(
|
||||
strings.bot.commands.research.errors.start_end_equal,
|
||||
[escapeMarkdown(unwrap(targetTank.name))],
|
||||
);
|
||||
}
|
||||
|
||||
const startingTank = awaitedTankDefinitions[startingTankId];
|
||||
const startingTank = awaitedTankDefinitions.tanks[startingTankId];
|
||||
|
||||
if (startingTank.tier > targetTank.tier) {
|
||||
return translate('bot.commands.research.errors.unordered', [
|
||||
escapeMarkdown(startingTank.name),
|
||||
escapeMarkdown(targetTank.name),
|
||||
escapeMarkdown(targetTank.name),
|
||||
return literals(strings.bot.commands.research.errors.unordered, [
|
||||
escapeMarkdown(unwrap(startingTank.name)),
|
||||
escapeMarkdown(unwrap(targetTank.name)),
|
||||
escapeMarkdown(unwrap(targetTank.name)),
|
||||
]);
|
||||
}
|
||||
|
||||
if (!targetTankAncestry.includes(startingTankId)) {
|
||||
return translate('bot.commands.research.errors.tanks_not_on_line', [
|
||||
escapeMarkdown(targetTank.name),
|
||||
escapeMarkdown(startingTank.name),
|
||||
]);
|
||||
return literals(
|
||||
strings.bot.commands.research.errors.tanks_not_on_line,
|
||||
[
|
||||
escapeMarkdown(unwrap(targetTank.name)),
|
||||
escapeMarkdown(unwrap(startingTank.name)),
|
||||
],
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (targetTank.treeType !== 'researchable') {
|
||||
return translate('bot.commands.research.errors.non_tech_tree', [
|
||||
escapeMarkdown(targetTank.name),
|
||||
if (targetTank.type !== TankType.RESEARCHABLE) {
|
||||
return literals(strings.bot.commands.research.errors.non_tech_tree, [
|
||||
escapeMarkdown(unwrap(targetTank.name)),
|
||||
]);
|
||||
}
|
||||
|
||||
if (targetTank.tier === 1) {
|
||||
return translate('bot.commands.research.errors.tier_1', [
|
||||
escapeMarkdown(targetTank.name),
|
||||
return literals(strings.bot.commands.research.errors.tier_1, [
|
||||
escapeMarkdown(unwrap(targetTank.name)),
|
||||
]);
|
||||
}
|
||||
|
||||
const tankStats = await getTankStats(region, id);
|
||||
|
||||
if (tankStats === null) {
|
||||
return t`bot.common.errors.no_tank_stats`;
|
||||
return strings.bot.common.errors.no_tank_stats;
|
||||
}
|
||||
|
||||
if (tankStats.some(({ tank_id }) => tank_id === targetTankId)) {
|
||||
return translate('bot.commands.research.errors.already_researched', [
|
||||
escapeMarkdown(targetTank.name),
|
||||
]);
|
||||
return literals(
|
||||
strings.bot.commands.research.errors.already_researched,
|
||||
[escapeMarkdown(unwrap(targetTank.name))],
|
||||
);
|
||||
}
|
||||
|
||||
const foundAncestor = targetTankAncestry.find(
|
||||
(id) =>
|
||||
awaitedTankDefinitions[id].tier === 1 ||
|
||||
awaitedTankDefinitions.tanks[id].tier === 1 ||
|
||||
tankStats.some(({ tank_id }) => tank_id === id),
|
||||
);
|
||||
|
||||
@@ -162,33 +178,59 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
const clanImage = clan ? emblemURL(clan.emblem_set_id) : undefined;
|
||||
const costs = await Promise.all(
|
||||
line.map(async (id) => {
|
||||
const tank = awaitedTankDefinitions[id];
|
||||
const tank = awaitedTankDefinitions.tanks[id];
|
||||
const turretXps = new Map<number, number>();
|
||||
const gunXps = new Map<number, number>();
|
||||
const engineXps = new Map<number, number>();
|
||||
const trackXps = new Map<number, number>();
|
||||
|
||||
tank.turrets.forEach((turret) => {
|
||||
if (turret.xp !== undefined) {
|
||||
turretXps.set(turret.id, turret.xp);
|
||||
if (
|
||||
turret.research_cost !== undefined &&
|
||||
typeof turret.research_cost.research_cost_type!.value === 'number'
|
||||
) {
|
||||
turretXps.set(
|
||||
turret.id,
|
||||
turret.research_cost.research_cost_type!.value,
|
||||
);
|
||||
}
|
||||
|
||||
turret.guns.forEach((gun) => {
|
||||
if (gun.xp !== undefined) {
|
||||
gunXps.set(gun.id, gun.xp);
|
||||
if (
|
||||
gun.gun_type!.value.base.research_cost !== undefined &&
|
||||
typeof gun.gun_type!.value.base.research_cost
|
||||
.research_cost_type!.value === 'number'
|
||||
) {
|
||||
gunXps.set(
|
||||
gun.gun_type!.value.base.id,
|
||||
gun.gun_type!.value.base.research_cost.research_cost_type!
|
||||
.value,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
tank.engines.forEach((engine) => {
|
||||
if (engine.xp !== undefined) {
|
||||
engineXps.set(engine.id, engine.xp);
|
||||
if (
|
||||
engine.research_cost !== undefined &&
|
||||
typeof engine.research_cost.research_cost_type!.value === 'number'
|
||||
) {
|
||||
engineXps.set(
|
||||
engine.id,
|
||||
engine.research_cost.research_cost_type!.value,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
tank.tracks.forEach((track) => {
|
||||
if (track.xp !== undefined) {
|
||||
trackXps.set(track.id, track.xp);
|
||||
if (
|
||||
track.research_cost !== undefined &&
|
||||
typeof track.research_cost.research_cost_type!.value === 'number'
|
||||
) {
|
||||
trackXps.set(
|
||||
track.id,
|
||||
track.research_cost.research_cost_type!.value,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -207,7 +249,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
});
|
||||
|
||||
return {
|
||||
research: tank.xp,
|
||||
research: tank.research_cost!.research_cost_type!.value as number,
|
||||
upgrades: moduleXp,
|
||||
purchase: tank.price.value,
|
||||
equipment: equipmentPriceMatrix[tank.tier].reduce(
|
||||
@@ -223,7 +265,9 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
<TitleBar
|
||||
title={nickname}
|
||||
image={clanImage}
|
||||
description={`${t`bot.commands.research.body.subtitle`} • ${targetTank.name}`}
|
||||
description={`${strings.bot.commands.research.body.subtitle} • ${
|
||||
targetTank.name
|
||||
}`}
|
||||
/>
|
||||
|
||||
<div
|
||||
@@ -258,7 +302,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
color: theme.colors.textHighContrast,
|
||||
}}
|
||||
>
|
||||
{t`bot.commands.research.body.total`}
|
||||
{strings.bot.commands.research.body.total}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -354,7 +398,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
|
||||
{await Promise.all(
|
||||
line.map(async (id, index) => {
|
||||
const tank = awaitedTankDefinitions[id];
|
||||
const tank = awaitedTankDefinitions.tanks[id];
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -418,7 +462,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
}}
|
||||
>
|
||||
<img
|
||||
alt={tank.name}
|
||||
alt={unwrap(tank.name)}
|
||||
src={TANK_ICONS[tank.class]}
|
||||
width={16}
|
||||
height={16}
|
||||
@@ -429,7 +473,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
color: theme.colors.textHighContrast,
|
||||
}}
|
||||
>
|
||||
{tank.name}
|
||||
{unwrap(tank.name)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -463,11 +507,14 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
color: theme.colors.textHighContrast,
|
||||
}}
|
||||
>
|
||||
{translate('bot.commands.research.body.research', [
|
||||
`${costs[index].research?.toLocaleString(
|
||||
interaction.locale,
|
||||
)}`,
|
||||
])}
|
||||
{literals(
|
||||
strings.bot.commands.research.body.research,
|
||||
[
|
||||
`${costs[index].research?.toLocaleString(
|
||||
interaction.locale,
|
||||
)}`,
|
||||
],
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -493,9 +540,10 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
color: theme.colors.textHighContrast,
|
||||
}}
|
||||
>
|
||||
{translate('bot.commands.research.body.upgrades', [
|
||||
costs[index].upgrades.toLocaleString(),
|
||||
])}
|
||||
{literals(
|
||||
strings.bot.commands.research.body.upgrades,
|
||||
[costs[index].upgrades.toLocaleString()],
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -521,11 +569,14 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
color: theme.colors.textHighContrast,
|
||||
}}
|
||||
>
|
||||
{translate('bot.commands.research.body.purchase', [
|
||||
costs[index].purchase.toLocaleString(
|
||||
interaction.locale,
|
||||
),
|
||||
])}
|
||||
{literals(
|
||||
strings.bot.commands.research.body.purchase,
|
||||
[
|
||||
costs[index].purchase.toLocaleString(
|
||||
interaction.locale,
|
||||
),
|
||||
],
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -550,11 +601,14 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
color: theme.colors.textHighContrast,
|
||||
}}
|
||||
>
|
||||
{translate('bot.commands.research.body.equipment', [
|
||||
costs[index].equipment.toLocaleString(
|
||||
interaction.locale,
|
||||
),
|
||||
])}
|
||||
{literals(
|
||||
strings.bot.commands.research.body.equipment,
|
||||
[
|
||||
costs[index].equipment.toLocaleString(
|
||||
interaction.locale,
|
||||
),
|
||||
],
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -568,7 +622,7 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
|
||||
return startingTankRaw
|
||||
? image
|
||||
: [t`bot.commands.research.body.estimation`, image];
|
||||
: [strings.bot.commands.research.body.estimation, image];
|
||||
},
|
||||
|
||||
autocomplete(interaction) {
|
||||
@@ -1,44 +1,46 @@
|
||||
import { ClanList, fetchBlitz, Region } from '@blitzkit/core';
|
||||
import { literals } from '@blitzkit/i18n';
|
||||
import { Locale } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { Region } from '../constants/regions';
|
||||
import fetchBlitz from '../core/blitz/fetchBlitz';
|
||||
import addClanChoices from '../core/discord/addClanChoices';
|
||||
import addRegionChoices from '../core/discord/addRegionChoices';
|
||||
import { addClanChoices } from '../core/discord/addClanChoices';
|
||||
import { addRegionChoices } from '../core/discord/addRegionChoices';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import embedInfo from '../core/discord/embedInfo';
|
||||
import { embedInfo } from '../core/discord/embedInfo';
|
||||
import { localizationObject } from '../core/discord/localizationObject';
|
||||
import { translator } from '../core/localization/translator';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
import { ClanList } from '../types/clanList';
|
||||
|
||||
const DEFAULT_LIMIT = 25;
|
||||
|
||||
export const searchClansCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
|
||||
command: createLocalizedCommand('search-clans')
|
||||
.addStringOption(addRegionChoices)
|
||||
.addStringOption((option) =>
|
||||
addClanChoices(option).setAutocomplete(false),
|
||||
)
|
||||
.addIntegerOption((option) => {
|
||||
const { t, translate } = translator(Locale.EnglishUS);
|
||||
const { strings } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
.setName(t`bot.commands.search_clans.options.limit`)
|
||||
.setName(strings.bot.commands.search_clans.options.limit.name)
|
||||
.setNameLocalizations(
|
||||
localizationObject('bot.commands.search_clans.options.limit'),
|
||||
localizationObject(
|
||||
(strings) => strings.bot.commands.search_clans.options.limit.name,
|
||||
undefined,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.setDescription(
|
||||
translate('bot.commands.search_clans.options.limit.description', [
|
||||
`${DEFAULT_LIMIT}`,
|
||||
]),
|
||||
literals(
|
||||
strings.bot.commands.search_clans.options.limit.description,
|
||||
[`${DEFAULT_LIMIT}`],
|
||||
),
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.commands.search_clans.options.limit.description',
|
||||
(strings) =>
|
||||
strings.bot.commands.search_clans.options.limit.description,
|
||||
[`${DEFAULT_LIMIT}`],
|
||||
),
|
||||
)
|
||||
@@ -47,7 +49,7 @@ export const searchClansCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
}),
|
||||
|
||||
async handler(interaction) {
|
||||
const { translate } = translator(interaction.locale);
|
||||
const { strings } = translator(interaction.locale);
|
||||
const region = interaction.options.getString('region') as Region;
|
||||
const clan = interaction.options.getString('clan')!;
|
||||
const limit = interaction.options.getInteger('limit') ?? DEFAULT_LIMIT;
|
||||
@@ -57,12 +59,12 @@ export const searchClansCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
});
|
||||
|
||||
return embedInfo(
|
||||
translate('bot.commands.search_clans.body.title', [
|
||||
literals(strings.bot.commands.search_clans.body.title, [
|
||||
markdownEscape(clan),
|
||||
translate(`common.regions.normal.${region}`),
|
||||
strings.common.regions.normal[region],
|
||||
]),
|
||||
clanList.length === 0
|
||||
? translate('bot.commands.search_clans.body.no_results')
|
||||
? strings.bot.commands.search_clans.body.no_results
|
||||
: `\`\`\`\n${clanList
|
||||
.map((clan) => `${clan.name} [${clan.tag}]`)
|
||||
.join('\n')}\n\`\`\``,
|
||||
Loaded 100 of 1006 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user