mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-26 12:09:50 +01:00
feat: migration 2
This commit is contained in:
1 parent
e1c8194beb
commit
6285f33989
305 files changed
+414
-414
No files matched your search
@@ -38,7 +38,6 @@
|
|||||||
"@resvg/resvg-js": "^2.6.2",
|
"@resvg/resvg-js": "^2.6.2",
|
||||||
"@types/three": "^0.160.0",
|
"@types/three": "^0.160.0",
|
||||||
"@vanilla-extract/css": "^1.15.5",
|
"@vanilla-extract/css": "^1.15.5",
|
||||||
"adm-zip": "^0.5.16",
|
|
||||||
"bepaint": "^0.1.0-beta.3",
|
"bepaint": "^0.1.0-beta.3",
|
||||||
"csv-parse": "^5.5.6",
|
"csv-parse": "^5.5.6",
|
||||||
"decompress": "^4.2.1",
|
"decompress": "^4.2.1",
|
||||||
@@ -53,10 +52,8 @@
|
|||||||
"markdown-escape": "^2.0.0",
|
"markdown-escape": "^2.0.0",
|
||||||
"markdown-to-jsx": "^7.5.0",
|
"markdown-to-jsx": "^7.5.0",
|
||||||
"parse-dds": "^1.2.1",
|
"parse-dds": "^1.2.1",
|
||||||
"pickleparser": "^0.2.1",
|
|
||||||
"postprocessing": "^6.36.0",
|
"postprocessing": "^6.36.0",
|
||||||
"progress": "^2.0.3",
|
"progress": "^2.0.3",
|
||||||
"protobufjs": "^7.4.0",
|
|
||||||
"satori": "^0.10.14",
|
"satori": "^0.10.14",
|
||||||
"sharp": "^0.33.5",
|
"sharp": "^0.33.5",
|
||||||
"three-stdlib": "^2.32.2",
|
"three-stdlib": "^2.32.2",
|
||||||
@@ -65,7 +62,6 @@
|
|||||||
},
|
},
|
||||||
"_devDependencies": {
|
"_devDependencies": {
|
||||||
"@total-typescript/ts-reset": "^0.5.1",
|
"@total-typescript/ts-reset": "^0.5.1",
|
||||||
"@types/adm-zip": "^0.5.5",
|
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
"@types/decompress": "^4.2.7",
|
"@types/decompress": "^4.2.7",
|
||||||
"@types/escape-html": "^1.0.4",
|
"@types/escape-html": "^1.0.4",
|
||||||
|
|||||||
+5
-3
@@ -1,10 +1,10 @@
|
|||||||
import { Locale } from 'discord.js';
|
import { Locale } from 'discord.js';
|
||||||
import { Region } from '../../../constants/regions';
|
import { Region } from '../../../../../src/constants/regions';
|
||||||
import getTankHistories, {
|
import getTankHistories, {
|
||||||
TankHistories,
|
TankHistories,
|
||||||
TankHistoryRaw,
|
TankHistoryRaw,
|
||||||
} from '../../blitzkit/getTankHistories';
|
} from '../../../../../src/core/blitzkit/getTankHistories';
|
||||||
import { BlitzStats } from '../../statistics/compositeStats/constants';
|
import { BlitzStats } from '../../../../../src/core/statistics/compositeStats/constants';
|
||||||
import { emptyAllStats } from './constants';
|
import { emptyAllStats } from './constants';
|
||||||
|
|
||||||
const emptyTankHistoryNode: TankHistoryRaw = {
|
const emptyTankHistoryNode: TankHistoryRaw = {
|
||||||
@@ -106,3 +106,5 @@ export default async function getStatsInPeriod(
|
|||||||
|
|
||||||
return { diff, order } satisfies DiffedTankStats;
|
return { diff, order } satisfies DiffedTankStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export * from './constants';
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from './getStatsInPeriod';
|
||||||
@@ -2,7 +2,7 @@ import AdmZip from 'adm-zip';
|
|||||||
import { readFile, writeFile } from 'fs/promises';
|
import { readFile, writeFile } from 'fs/promises';
|
||||||
import { Parser } from 'pickleparser';
|
import { Parser } from 'pickleparser';
|
||||||
import protobuf from 'protobufjs';
|
import protobuf from 'protobufjs';
|
||||||
import { ReadStream } from './buffer';
|
import { ReadStream } from '../../../../core/src/streams/buffer';
|
||||||
|
|
||||||
interface WotbReplayMetaJson {
|
interface WotbReplayMetaJson {
|
||||||
version: string;
|
version: string;
|
||||||
@@ -8,9 +8,13 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"@prisma/client": "^5.19.1",
|
"@prisma/client": "^5.19.1",
|
||||||
"@octokit/plugin-throttling": "^8.2.0",
|
"@octokit/plugin-throttling": "^8.2.0",
|
||||||
"lz4js": "^0.2.0"
|
"protobufjs": "^7.4.0",
|
||||||
|
"lz4js": "^0.2.0",
|
||||||
|
"pickleparser": "^0.2.1",
|
||||||
|
"adm-zip": "^0.5.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/adm-zip": "^0.5.5",
|
||||||
"@types/lodash": "^4.17.7",
|
"@types/lodash": "^4.17.7",
|
||||||
"@types/lz4js": "^0.2.1"
|
"@types/lz4js": "^0.2.1"
|
||||||
}
|
}
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,3 +6,23 @@ export const TANK_CLASSES = [
|
|||||||
'heavyTank',
|
'heavyTank',
|
||||||
'AT-SPG',
|
'AT-SPG',
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
export const emptyAllStats: BlitzStats = {
|
||||||
|
battles: 0,
|
||||||
|
capture_points: 0,
|
||||||
|
damage_dealt: 0,
|
||||||
|
damage_received: 0,
|
||||||
|
dropped_capture_points: 0,
|
||||||
|
frags: 0,
|
||||||
|
frags8p: 0,
|
||||||
|
hits: 0,
|
||||||
|
losses: 0,
|
||||||
|
max_frags: 0,
|
||||||
|
max_xp: 0,
|
||||||
|
shots: 0,
|
||||||
|
spotted: 0,
|
||||||
|
survived_battles: 0,
|
||||||
|
xp: 0,
|
||||||
|
win_and_survived: 0,
|
||||||
|
wins: 0,
|
||||||
|
};
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
export * from './constants';
|
export * from './constants';
|
||||||
export * from './idToRegion';
|
export * from './idToRegion';
|
||||||
|
export * from './permanentSkills';
|
||||||
export * from './resolveNearPenetration';
|
export * from './resolveNearPenetration';
|
||||||
File renamed without changes.
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
|
import { ProvisionDefinitions } from '@blitzkit/core/src/blitzkit/provisionDefinitions';
|
||||||
import { checkConsumableProvisionInclusivity } from './checkConsumableProvisionInclusivity';
|
import { checkConsumableProvisionInclusivity } from './checkConsumableProvisionInclusivity';
|
||||||
import { ProvisionDefinitions } from './provisionDefinitions';
|
|
||||||
import { GunDefinition, TankDefinition } from './tankDefinitions';
|
import { GunDefinition, TankDefinition } from './tankDefinitions';
|
||||||
|
|
||||||
export function availableProvisions(
|
export function availableProvisions(
|
||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
import { Samples } from '.';
|
import { Samples } from '.';
|
||||||
import { emptyAllStats } from '../../blitzstars/getStatsInPeriod/constants';
|
import { emptyAllStats } from '../../blitz/constants';
|
||||||
import { BlitzkitStats } from '../../statistics/compositeStats/constants';
|
|
||||||
|
|
||||||
export const emptyAverageDefinitionsAllStats: BlitzkitStats = {
|
export const emptyAverageDefinitionsAllStats: BlitzkitStats = {
|
||||||
...emptyAllStats,
|
...emptyAllStats,
|
||||||
+6
-4
@@ -1,5 +1,5 @@
|
|||||||
import { decode } from '../../protobuf/decode';
|
import { BlitzkitStats } from '../../../../../src/core/statistics/compositeStats/constants';
|
||||||
import { BlitzkitStats } from '../../statistics/compositeStats/constants';
|
import { decodeProtobuf } from '../../protobuf/decodeProtobuf';
|
||||||
import { asset } from '../asset';
|
import { asset } from '../asset';
|
||||||
|
|
||||||
export interface AverageDefinitionsEntry {
|
export interface AverageDefinitionsEntry {
|
||||||
@@ -51,7 +51,7 @@ export const averageDefinitions = fetch(asset('averages/manifest.json'), {
|
|||||||
.then((manifest) => fetch(asset(`averages/${manifest.latest}.pb`)))
|
.then((manifest) => fetch(asset(`averages/${manifest.latest}.pb`)))
|
||||||
.then((response) => response.arrayBuffer())
|
.then((response) => response.arrayBuffer())
|
||||||
.then((buffer) =>
|
.then((buffer) =>
|
||||||
decode<AverageDefinitions>(
|
decodeProtobuf<AverageDefinitions>(
|
||||||
'average_definitions',
|
'average_definitions',
|
||||||
'blitzkit.AverageDefinitions',
|
'blitzkit.AverageDefinitions',
|
||||||
new Uint8Array(buffer),
|
new Uint8Array(buffer),
|
||||||
@@ -65,7 +65,9 @@ export const averageDefinitionsArray = averageDefinitions.then((data) =>
|
|||||||
({
|
({
|
||||||
id: Number(key),
|
id: Number(key),
|
||||||
...(value as AverageDefinitionsEntry),
|
...(value as AverageDefinitionsEntry),
|
||||||
}) satisfies AverageDefinitionsEntryWithId,
|
} satisfies AverageDefinitionsEntryWithId),
|
||||||
)
|
)
|
||||||
.filter((tank) => tank.mu.battles > 0),
|
.filter((tank) => tank.mu.battles > 0),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export * from './constants';
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { ConsumableEntry } from './consumableDefinitions';
|
import { ConsumableEntry } from '@blitzkit/core/src/blitzkit/consumableDefinitions';
|
||||||
import { ProvisionEntry } from './provisionDefinitions';
|
import { ProvisionEntry } from '@blitzkit/core/src/blitzkit/provisionDefinitions';
|
||||||
import { GunDefinition, TankDefinition } from './tankDefinitions';
|
import { GunDefinition, TankDefinition } from './tankDefinitions';
|
||||||
|
|
||||||
export function checkConsumableProvisionInclusivity(
|
export function checkConsumableProvisionInclusivity(
|
||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { permanentSkills } from '../../app/tools/tankopedia/[id]/components/Characteristics/components/Skills/constants';
|
import { SkillDefinitions } from '@blitzkit/core/src/blitzkit/skillDefinitions';
|
||||||
import { SkillDefinitions } from './skillDefinitions';
|
import { permanentSkills } from '../blitz/permanentSkills';
|
||||||
|
|
||||||
export function createDefaultSkills(skillDefinitions: SkillDefinitions) {
|
export function createDefaultSkills(skillDefinitions: SkillDefinitions) {
|
||||||
const skills: Record<string, number> = {};
|
const skills: Record<string, number> = {};
|
||||||
File renamed without changes.
File renamed without changes.
@@ -1,12 +1,30 @@
|
|||||||
export * from './assertSecret';
|
export * from './assertSecret';
|
||||||
export * from './asset';
|
export * from './asset';
|
||||||
|
export * from './availableProvisions';
|
||||||
|
export * from './averageDefinitions';
|
||||||
export * from './camouflageDefinitions';
|
export * from './camouflageDefinitions';
|
||||||
|
export * from './checkConsumableProvisionInclusivity';
|
||||||
|
export * from './coefficient';
|
||||||
|
export * from './consumableDefinitions';
|
||||||
|
export * from './createDefaultSkills';
|
||||||
|
export * from './equipmentDefinitions';
|
||||||
|
export * from './eventManager';
|
||||||
export * from './fetchCdonLz4';
|
export * from './fetchCdonLz4';
|
||||||
export * from './filterTank';
|
export * from './filterTank';
|
||||||
export * from './gameDefinitions';
|
export * from './gameDefinitions';
|
||||||
|
export * from './isExplosive';
|
||||||
export * from './modelDefinitions';
|
export * from './modelDefinitions';
|
||||||
|
export * from './pose';
|
||||||
|
export * from './provisionDefinitions';
|
||||||
|
export * from './resolvePenetrationCoefficient';
|
||||||
|
export * from './reviews';
|
||||||
|
export * from './skillDefinitions';
|
||||||
|
export * from './sum';
|
||||||
export * from './superCompress';
|
export * from './superCompress';
|
||||||
export * from './superDecompress';
|
export * from './superDecompress';
|
||||||
|
export * from './tankCharacteristics';
|
||||||
export * from './tankDefinitions';
|
export * from './tankDefinitions';
|
||||||
export * from './tankIcon';
|
export * from './tankIcon';
|
||||||
export * from './tankNames';
|
export * from './tankNames';
|
||||||
|
export * from './uniqueGuns';
|
||||||
|
export * from './youtubers';
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ShellDefinition, ShellType } from '../blitzkit/tankDefinitions';
|
import { ShellDefinition, ShellType } from '@blitzkit/core';
|
||||||
|
|
||||||
export function isExplosive(
|
export function isExplosive(
|
||||||
type: ShellDefinition['type'],
|
type: ShellDefinition['type'],
|
||||||
File renamed without changes.
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
|
import { TankFilterDefinition } from '@blitzkit/core/src/blitzkit/consumableDefinitions';
|
||||||
import { asset } from './asset';
|
import { asset } from './asset';
|
||||||
import { TankFilterDefinition } from './consumableDefinitions';
|
|
||||||
import { fetchCdonLz4 } from './fetchCdonLz4';
|
import { fetchCdonLz4 } from './fetchCdonLz4';
|
||||||
|
|
||||||
export type ProvisionEntry = {
|
export type ProvisionEntry = {
|
||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
import { decode } from '../protobuf/decode';
|
|
||||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||||
|
import { decodeProtobuf } from '../protobuf';
|
||||||
|
|
||||||
export interface Reviews {
|
export interface Reviews {
|
||||||
reviews: Record<number, Review>;
|
reviews: Record<number, Review>;
|
||||||
@@ -18,5 +18,9 @@ export interface Video {
|
|||||||
export const reviews = fetch(asset('definitions/reviews.pb'))
|
export const reviews = fetch(asset('definitions/reviews.pb'))
|
||||||
.then((response) => response.arrayBuffer())
|
.then((response) => response.arrayBuffer())
|
||||||
.then((buffer) =>
|
.then((buffer) =>
|
||||||
decode<Reviews>('reviews', 'blitzkit.Reviews', new Uint8Array(buffer)),
|
decodeProtobuf<Reviews>(
|
||||||
|
'reviews',
|
||||||
|
'blitzkit.Reviews',
|
||||||
|
new Uint8Array(buffer),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { TankClass } from '../../components/Tanks';
|
|
||||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||||
import { fetchCdonLz4 } from '@blitzkit/core/src/blitzkit/fetchCdonLz4';
|
import { fetchCdonLz4 } from '@blitzkit/core/src/blitzkit/fetchCdonLz4';
|
||||||
|
import { TankClass } from '../../../../src/components/Tanks';
|
||||||
|
|
||||||
export interface SkillDefinitions {
|
export interface SkillDefinitions {
|
||||||
classes: Record<TankClass, string[]>;
|
classes: Record<TankClass, string[]>;
|
||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
import { compress } from 'lz4js';
|
import { compress } from 'lz4js';
|
||||||
import { CdonWriteStream } from '../../../../src/core/streams/cdon';
|
import { CdonWriteStream } from '../streams';
|
||||||
|
|
||||||
export function superCompress(object: any) {
|
export function superCompress(object: any) {
|
||||||
const write = new CdonWriteStream().cdon(object);
|
const write = new CdonWriteStream().cdon(object);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { decompress } from 'lz4js';
|
import { decompress } from 'lz4js';
|
||||||
import { CdonReadStream } from '../../../../src/core/streams/cdon';
|
import { CdonReadStream } from '../streams';
|
||||||
|
|
||||||
export function superDecompress<Type>(buffer: ArrayBuffer) {
|
export function superDecompress<Type>(buffer: ArrayBuffer) {
|
||||||
const decompressed = decompress(new Uint8Array(buffer)).buffer as ArrayBuffer;
|
const decompressed = decompress(new Uint8Array(buffer)).buffer as ArrayBuffer;
|
||||||
|
|||||||
+6
-11
@@ -1,15 +1,11 @@
|
|||||||
|
import { EquipmentDefinitions } from '@blitzkit/core/src/blitzkit/equipmentDefinitions';
|
||||||
import { ModelDefinition } from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
import { ModelDefinition } from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
||||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitzkit/resolveNearPenetration';
|
import { ProvisionDefinitions } from '@blitzkit/core/src/blitzkit/provisionDefinitions';
|
||||||
import { EquipmentMatrix } from '../../../packages/website/src/stores/duel';
|
import { EquipmentMatrix } from '../../../website/src/stores/duel';
|
||||||
import { isExplosive } from '../blitz/isExplosive';
|
import { resolveNearPenetration } from '../blitz/resolveNearPenetration';
|
||||||
import { resolvePenetrationCoefficient } from '../blitz/resolvePenetrationCoefficient';
|
|
||||||
import { coefficient } from './coefficient';
|
import { coefficient } from './coefficient';
|
||||||
import { degressiveStat } from './degressiveStat';
|
import { isExplosive } from './isExplosive';
|
||||||
import { EquipmentDefinitions } from './equipmentDefinitions';
|
import { resolvePenetrationCoefficient } from './resolvePenetrationCoefficient';
|
||||||
import { normalizeBoundingBox } from './normalizeBoundingBox';
|
|
||||||
import { progressiveStat } from './progressiveStat';
|
|
||||||
import { ProvisionDefinitions } from './provisionDefinitions';
|
|
||||||
import { resolveDpm } from './resolveDpm';
|
|
||||||
import { sum } from './sum';
|
import { sum } from './sum';
|
||||||
import {
|
import {
|
||||||
EngineDefinition,
|
EngineDefinition,
|
||||||
@@ -19,7 +15,6 @@ import {
|
|||||||
TrackDefinition,
|
TrackDefinition,
|
||||||
TurretDefinition,
|
TurretDefinition,
|
||||||
} from './tankDefinitions';
|
} from './tankDefinitions';
|
||||||
import { unionBoundingBox } from './unionBoundingBox';
|
|
||||||
|
|
||||||
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
|
export type TankCharacteristics = ReturnType<typeof tankCharacteristics>;
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,10 @@
|
|||||||
export * from './blitz';
|
export * from './blitz';
|
||||||
export * from './blitzkit';
|
export * from './blitzkit';
|
||||||
export * from './imgur';
|
export * from './imgur';
|
||||||
|
export * from './math';
|
||||||
export * from './patreon';
|
export * from './patreon';
|
||||||
|
export * from './protobuf';
|
||||||
|
export * from './radix';
|
||||||
|
export * from './statistics';
|
||||||
|
export * from './streams';
|
||||||
export * from './zustand';
|
export * from './zustand';
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,7 @@
|
|||||||
|
export * from './axis';
|
||||||
|
export * from './formatCompact';
|
||||||
|
export * from './isNumber';
|
||||||
|
export * from './NaNFallback';
|
||||||
|
export * from './normalizeAngleRad';
|
||||||
|
export * from './normalToEuler';
|
||||||
|
export * from './numberToRomanNumeral';
|
||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
import { Euler, Quaternion, Vector3 } from 'three';
|
import { Euler, Quaternion, Vector3 } from 'three';
|
||||||
import { J_HAT } from '../../constants/axis';
|
import { J_HAT } from './axis';
|
||||||
|
|
||||||
const quaternion = new Quaternion();
|
const quaternion = new Quaternion();
|
||||||
const axis = new Vector3();
|
const axis = new Vector3();
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,9 @@
|
|||||||
|
import { lookupProtobufType, ProtoSource } from './lookupProtobufType';
|
||||||
|
|
||||||
|
export function decodeProtobuf<Type>(
|
||||||
|
source: ProtoSource,
|
||||||
|
type: string,
|
||||||
|
data: Uint8Array,
|
||||||
|
) {
|
||||||
|
return lookupProtobufType(source, type).decode(data).toJSON() as Type;
|
||||||
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import { lookup, ProtoSource } from './lookup';
|
import { lookupProtobufType, ProtoSource } from './lookupProtobufType';
|
||||||
|
|
||||||
export function encode(
|
export function encodeProtobuf(
|
||||||
source: ProtoSource,
|
source: ProtoSource,
|
||||||
type: string,
|
type: string,
|
||||||
data: Record<string, any>,
|
data: Record<string, any>,
|
||||||
) {
|
) {
|
||||||
const message = lookup(source, type);
|
const message = lookupProtobufType(source, type);
|
||||||
const verification = message.verify(data);
|
const verification = message.verify(data);
|
||||||
|
|
||||||
if (verification !== null) throw new Error(verification);
|
if (verification !== null) throw new Error(verification);
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { encodeProtobuf } from './encodeProtobuf';
|
||||||
|
import { ProtoSource } from './lookupProtobufType';
|
||||||
|
|
||||||
|
export async function encodeProtobufToBase64(
|
||||||
|
source: ProtoSource,
|
||||||
|
type: string,
|
||||||
|
data: any,
|
||||||
|
) {
|
||||||
|
const array = encodeProtobuf(source, type, data);
|
||||||
|
return Buffer.from(array).toString('base64');
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export * from './decodeProtobuf';
|
||||||
|
export * from './encodeProtobuf';
|
||||||
|
export * from './encodeProtobufToBase64';
|
||||||
|
export * from './lookupProtobufType';
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { parse } from 'protobufjs';
|
||||||
|
import average_definitions from '../../protos/average_definitions.proto';
|
||||||
|
import reviews from '../../protos/reviews.proto';
|
||||||
|
|
||||||
|
export type ProtoSource = keyof typeof protos;
|
||||||
|
|
||||||
|
const protos = { reviews, average_definitions };
|
||||||
|
|
||||||
|
export function lookupProtobufType(source: ProtoSource, type: string) {
|
||||||
|
return parse(protos[source]).root.lookupType(type);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from './var';
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+7
-1
@@ -52,10 +52,16 @@ export function compositeStats(stats: BlitzkitStats, average: BlitzkitStats) {
|
|||||||
export function formatCompositeStat(value: number, key: CompositeStatsKey) {
|
export function formatCompositeStat(value: number, key: CompositeStatsKey) {
|
||||||
const formatting = compositeStatsFormatting[key];
|
const formatting = compositeStatsFormatting[key];
|
||||||
const resolvedValue = (formatting.coefficient ?? 1) * value;
|
const resolvedValue = (formatting.coefficient ?? 1) * value;
|
||||||
return `${formatting.localeFormat ? resolvedValue.toLocaleString() : resolvedValue.toFixed(formatting.fixed)}${formatting.unit ?? ''}`;
|
return `${
|
||||||
|
formatting.localeFormat
|
||||||
|
? resolvedValue.toLocaleString()
|
||||||
|
: resolvedValue.toFixed(formatting.fixed)
|
||||||
|
}${formatting.unit ?? ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function previewCompositeStat(key: CompositeStatsKey) {
|
export function previewCompositeStat(key: CompositeStatsKey) {
|
||||||
const { preview } = compositeStatsFormatting[key];
|
const { preview } = compositeStatsFormatting[key];
|
||||||
return formatCompositeStat(preview, key);
|
return formatCompositeStat(preview, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export * from './constants';
|
||||||
File renamed without changes.
@@ -1,8 +1,3 @@
|
|||||||
import {
|
|
||||||
emptyIndividualTankStats,
|
|
||||||
IndividualTankStats,
|
|
||||||
} from '../../types/tanksStats';
|
|
||||||
|
|
||||||
export function deltaTankStats(
|
export function deltaTankStats(
|
||||||
tanksA: IndividualTankStats[],
|
tanksA: IndividualTankStats[],
|
||||||
tanksB: IndividualTankStats[],
|
tanksB: IndividualTankStats[],
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
import { TreeType } from '../../components/Tanks';
|
|
||||||
import { SupplementaryStats } from '../blitz/getAccountInfo';
|
|
||||||
import { tankDefinitions } from '../blitzkit/tankDefinitions';
|
import { tankDefinitions } from '../blitzkit/tankDefinitions';
|
||||||
import { DiffedTankStats } from '../blitzstars/getStatsInPeriod';
|
|
||||||
import { tankAverages } from '../blitzstars/tankAverages';
|
|
||||||
import calculateWN8 from './calculateWN8';
|
import calculateWN8 from './calculateWN8';
|
||||||
import sumStats from './sumStats';
|
import sumStats from './sumStats';
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Percentile } from '../../constants/percentiles';
|
import { Percentile } from './percentiles';
|
||||||
|
|
||||||
const WN8_PERCENTILES: [number, Percentile][] = [
|
const WN8_PERCENTILES: [number, Percentile][] = [
|
||||||
[0, Percentile.VeryBad],
|
[0, Percentile.VeryBad],
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
export * from './calculateWN8';
|
||||||
|
export * from './compositeStats';
|
||||||
|
export * from './deltaBkrlBlitzStats';
|
||||||
|
export * from './deltaTankStats';
|
||||||
|
export * from './filterStats';
|
||||||
|
export * from './getBkniPercentile';
|
||||||
|
export * from './getTierWeights';
|
||||||
|
export * from './getWN8Percentile';
|
||||||
|
export * from './percentiles';
|
||||||
|
export * from './sumStats';
|
||||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
|||||||
import { emptyAllStats } from '../blitzstars/getStatsInPeriod/constants';
|
|
||||||
import { BlitzStats } from './compositeStats/constants';
|
import { BlitzStats } from './compositeStats/constants';
|
||||||
|
|
||||||
export default function sumStats(allStatsCollection: BlitzStats[]) {
|
export default function sumStats(allStatsCollection: BlitzStats[]) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
|
|||||||
|
export * from './bkrl';
|
||||||
|
export * from './buffer';
|
||||||
|
export * from './cdon';
|
||||||
|
export * from './dds';
|
||||||
|
export * from './dids';
|
||||||
|
export * from './pvr';
|
||||||
|
export * from './rts';
|
||||||
|
export * from './sc2';
|
||||||
|
export * from './scg';
|
||||||
|
export * from './scpg';
|
||||||
|
export * from './windows';
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,6 @@
|
|||||||
|
// MIGRATION TODO: i added this use client, it makes stuff work again?
|
||||||
|
'use client';
|
||||||
|
|
||||||
import { Draft, produce } from 'immer';
|
import { Draft, produce } from 'immer';
|
||||||
import {
|
import {
|
||||||
createContext,
|
createContext,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { permanentSkills } from '@blitzkit/core/src/blitz/permanentSkills';
|
||||||
import { ComponentPlaceholderIcon } from '@radix-ui/react-icons';
|
import { ComponentPlaceholderIcon } from '@radix-ui/react-icons';
|
||||||
import { Button, Flex, Popover, Slider, Table, Text } from '@radix-ui/themes';
|
import { Button, Flex, Popover, Slider, Table, Text } from '@radix-ui/themes';
|
||||||
import { debounce, times } from 'lodash';
|
import { debounce, times } from 'lodash';
|
||||||
@@ -21,7 +22,6 @@ import { BlitzkitButtonGray } from '../../../../icons/BlitzkitButtonGray';
|
|||||||
import { theme } from '../../../../stitches.config';
|
import { theme } from '../../../../stitches.config';
|
||||||
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
||||||
import { EquipmentMatrix } from '../../../../stores/duel';
|
import { EquipmentMatrix } from '../../../../stores/duel';
|
||||||
import { permanentSkills } from '../../tankopedia/[id]/components/Characteristics/components/Skills/constants';
|
|
||||||
import { Body } from './Body';
|
import { Body } from './Body';
|
||||||
import { InsertionMarker } from './IntersectionMarker';
|
import { InsertionMarker } from './IntersectionMarker';
|
||||||
import { TankCard } from './TankCard';
|
import { TankCard } from './TankCard';
|
||||||
@@ -101,8 +101,8 @@ export function CompareTable({ stats }: CompareTableProps) {
|
|||||||
crewSkills[skill] === 0
|
crewSkills[skill] === 0
|
||||||
? theme.colors.textLowContrast
|
? theme.colors.textLowContrast
|
||||||
: permanentSkills.includes(skill)
|
: permanentSkills.includes(skill)
|
||||||
? theme.colors.textLowContrast_crimson
|
? theme.colors.textLowContrast_crimson
|
||||||
: theme.colors.textLowContrast_amber,
|
: theme.colors.textLowContrast_amber,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
+4
-2
@@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
checkConsumableProvisionInclusivity,
|
||||||
|
consumableDefinitions,
|
||||||
|
} from '@blitzkit/core';
|
||||||
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -9,8 +13,6 @@ import {
|
|||||||
} from '@radix-ui/themes';
|
} from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { ConsumablesManager } from '../../../../../../../components/ConsumablesManager';
|
import { ConsumablesManager } from '../../../../../../../components/ConsumablesManager';
|
||||||
import { checkConsumableProvisionInclusivity } from '../../../../../../../core/blitzkit/checkConsumableProvisionInclusivity';
|
|
||||||
import { consumableDefinitions } from '../../../../../../../core/blitzkit/consumableDefinitions';
|
|
||||||
import { useEquipment } from '../../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../../hooks/useEquipment';
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
import { equipmentDefinitions } from '@blitzkit/core';
|
||||||
import { Button, Flex, Heading } from '@radix-ui/themes';
|
import { Button, Flex, Heading } from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { EquipmentManager } from '../../../../../../../components/EquipmentManager';
|
import { EquipmentManager } from '../../../../../../../components/EquipmentManager';
|
||||||
import { equipmentDefinitions } from '../../../../../../../core/blitzkit/equipmentDefinitions';
|
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
||||||
|
|
||||||
|
|||||||
+3
-8
@@ -1,14 +1,12 @@
|
|||||||
import { CaretDownIcon, CaretUpIcon } from '@radix-ui/react-icons';
|
import { CaretDownIcon, CaretUpIcon } from '@radix-ui/react-icons';
|
||||||
import { Flex, Text } from '@radix-ui/themes';
|
import { Flex, Text } from '@radix-ui/themes';
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { theme } from '../../../../../../../stitches.config';
|
|
||||||
|
|
||||||
export interface InfoProps {
|
export interface InfoProps {
|
||||||
name: ReactNode;
|
name: ReactNode;
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
unit?: string;
|
unit?: string;
|
||||||
indent?: boolean;
|
indent?: boolean;
|
||||||
highlight?: boolean;
|
|
||||||
delta?: number;
|
delta?: number;
|
||||||
decimals?: number;
|
decimals?: number;
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
@@ -20,7 +18,6 @@ export function Info({
|
|||||||
children,
|
children,
|
||||||
unit,
|
unit,
|
||||||
indent = false,
|
indent = false,
|
||||||
highlight,
|
|
||||||
delta,
|
delta,
|
||||||
decimals,
|
decimals,
|
||||||
prefix,
|
prefix,
|
||||||
@@ -32,7 +29,7 @@ export function Info({
|
|||||||
style={{ width: '100%', paddingLeft: indent ? 24 : 0 }}
|
style={{ width: '100%', paddingLeft: indent ? 24 : 0 }}
|
||||||
gap="4"
|
gap="4"
|
||||||
>
|
>
|
||||||
<Text color={highlight ? 'amber' : 'gray'}>
|
<Text color="gray">
|
||||||
{name}
|
{name}
|
||||||
{unit != undefined && (
|
{unit != undefined && (
|
||||||
<>
|
<>
|
||||||
@@ -49,9 +46,7 @@ export function Info({
|
|||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
height: 1,
|
height: 1,
|
||||||
backgroundColor: highlight
|
backgroundColor: 'red',
|
||||||
? theme.colors.componentCallToActionInteractive_amberAlpha
|
|
||||||
: theme.colors.componentCallToActionInteractive_alpha,
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -82,7 +77,7 @@ export function Info({
|
|||||||
</Text>
|
</Text>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Text color={highlight ? 'amber' : undefined}>
|
<Text>
|
||||||
{prefix}
|
{prefix}
|
||||||
{decimals !== undefined && typeof children === 'number'
|
{decimals !== undefined && typeof children === 'number'
|
||||||
? children.toFixed(decimals)
|
? children.toFixed(decimals)
|
||||||
|
|||||||
+5
-5
@@ -1,8 +1,8 @@
|
|||||||
|
import { asset } from '@blitzkit/core';
|
||||||
import { Flex, Heading, Slider, TextField } from '@radix-ui/themes';
|
import { Flex, Heading, Slider, TextField } from '@radix-ui/themes';
|
||||||
import { clamp, debounce } from 'lodash';
|
import { clamp, debounce } from 'lodash';
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { GenericTankComponentButton } from '../../../../../../../components/ModuleButtons/GenericTankComponentButton';
|
import { GenericTankComponentButton } from '../../../../../../../components/ModuleButtons/GenericTankComponentButton';
|
||||||
import { asset } from '../../../../../../../core/blitzkit/asset';
|
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
||||||
|
|
||||||
@@ -61,10 +61,10 @@ export function Miscellaneous() {
|
|||||||
cooldownBooster === 0
|
cooldownBooster === 0
|
||||||
? undefined
|
? undefined
|
||||||
: cooldownBooster === 1
|
: cooldownBooster === 1
|
||||||
? '#afb0abc0'
|
? '#afb0abc0'
|
||||||
: cooldownBooster === 2
|
: cooldownBooster === 2
|
||||||
? '#5f72cbc0'
|
? '#5f72cbc0'
|
||||||
: '#9b3cc0c0'
|
: '#9b3cc0c0'
|
||||||
}
|
}
|
||||||
iconStyles={{
|
iconStyles={{
|
||||||
transform: 'translate(-50%, -50%) scale(0.8)',
|
transform: 'translate(-50%, -50%) scale(0.8)',
|
||||||
|
|||||||
+22
-25
@@ -1,3 +1,10 @@
|
|||||||
|
import {
|
||||||
|
asset,
|
||||||
|
formatCompact,
|
||||||
|
tankDefinitions,
|
||||||
|
tankIcon,
|
||||||
|
TIER_ROMAN_NUMERALS,
|
||||||
|
} from '@blitzkit/core';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
ChevronDownIcon,
|
ChevronDownIcon,
|
||||||
@@ -8,18 +15,6 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
} from '@radix-ui/themes';
|
} from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { asset } from '../../../../../../../core/blitzkit/asset';
|
|
||||||
import {
|
|
||||||
ModuleDefinition,
|
|
||||||
ModuleType,
|
|
||||||
TankDefinition,
|
|
||||||
tankDefinitions,
|
|
||||||
Tier,
|
|
||||||
Unlock,
|
|
||||||
} from '../../../../../../../core/blitzkit/tankDefinitions';
|
|
||||||
import { TIER_ROMAN_NUMERALS } from '../../../../../../../core/blitzkit/tankDefinitions/constants';
|
|
||||||
import { tankIcon } from '../../../../../../../core/blitzkit/tankIcon';
|
|
||||||
import { formatCompact } from '../../../../../../../core/math/formatCompact';
|
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
||||||
|
|
||||||
@@ -222,7 +217,9 @@ export function Modules() {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: 'currentcolor',
|
backgroundColor: 'currentcolor',
|
||||||
width: `calc(${central ? 100 : 50}% + ${central ? 8 : 4}px)`,
|
width: `calc(${central ? 100 : 50}% + ${
|
||||||
|
central ? 8 : 4
|
||||||
|
}px)`,
|
||||||
height: 1,
|
height: 1,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: first ? 0 : undefined,
|
right: first ? 0 : undefined,
|
||||||
@@ -262,23 +259,23 @@ export function Modules() {
|
|||||||
(unlock.type === 'turret'
|
(unlock.type === 'turret'
|
||||||
? turret.id
|
? turret.id
|
||||||
: unlock.type === 'gun'
|
: unlock.type === 'gun'
|
||||||
? gun.id
|
? gun.id
|
||||||
: unlock.type === 'engine'
|
: unlock.type === 'engine'
|
||||||
? engine.id
|
? engine.id
|
||||||
: unlock.type === 'chassis'
|
: unlock.type === 'chassis'
|
||||||
? track.id
|
? track.id
|
||||||
: -1) === unlock.id
|
: -1) === unlock.id
|
||||||
}
|
}
|
||||||
top={
|
top={
|
||||||
unlock.type === 'turret'
|
unlock.type === 'turret'
|
||||||
? module.id == topTurret.id
|
? module.id == topTurret.id
|
||||||
: unlock.type === 'gun'
|
: unlock.type === 'gun'
|
||||||
? module.id === topGun.id
|
? module.id === topGun.id
|
||||||
: unlock.type === 'engine'
|
: unlock.type === 'engine'
|
||||||
? module.id === topEngine.id
|
? module.id === topEngine.id
|
||||||
: unlock.type === 'chassis'
|
: unlock.type === 'chassis'
|
||||||
? module.id === topTrack.id
|
? module.id === topTrack.id
|
||||||
: false
|
: false
|
||||||
}
|
}
|
||||||
onClick={() => setByUnlock(unlock)}
|
onClick={() => setByUnlock(unlock)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+1
-2
@@ -1,8 +1,7 @@
|
|||||||
|
import { availableProvisions, provisionDefinitions } from '@blitzkit/core';
|
||||||
import { Button, Flex, Heading } from '@radix-ui/themes';
|
import { Button, Flex, Heading } from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { ProvisionsManager } from '../../../../../../../components/ProvisionsManager';
|
import { ProvisionsManager } from '../../../../../../../components/ProvisionsManager';
|
||||||
import { availableProvisions } from '../../../../../../../core/blitzkit/availableProvisions';
|
|
||||||
import { provisionDefinitions } from '../../../../../../../core/blitzkit/provisionDefinitions';
|
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -1,3 +1,4 @@
|
|||||||
|
import { createDefaultSkills, skillDefinitions } from '@blitzkit/core';
|
||||||
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -10,8 +11,6 @@ import {
|
|||||||
} from '@radix-ui/themes';
|
} from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { CrewSkillManager } from '../../../../../../../../components/CrewSkillManager';
|
import { CrewSkillManager } from '../../../../../../../../components/CrewSkillManager';
|
||||||
import { createDefaultSkills } from '../../../../../../../../core/blitzkit/createDefaultSkills';
|
|
||||||
import { skillDefinitions } from '../../../../../../../../core/blitzkit/skillDefinitions';
|
|
||||||
import * as TankopediaEphemeral from '../../../../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../../../../stores/tankopediaEphemeral';
|
||||||
import { ConfigurationChildWrapper } from '../ConfigurationChildWrapper';
|
import { ConfigurationChildWrapper } from '../ConfigurationChildWrapper';
|
||||||
|
|
||||||
|
|||||||
+14
-13
@@ -1,3 +1,14 @@
|
|||||||
|
import {
|
||||||
|
asset,
|
||||||
|
coefficient,
|
||||||
|
CREW_MEMBER_NAMES,
|
||||||
|
equipmentDefinitions,
|
||||||
|
GUN_TYPE_NAMES,
|
||||||
|
isExplosive,
|
||||||
|
provisionDefinitions,
|
||||||
|
resolvePenetrationCoefficient,
|
||||||
|
tankCharacteristics,
|
||||||
|
} from '@blitzkit/core';
|
||||||
import { AccessibilityIcon, InfoCircledIcon } from '@radix-ui/react-icons';
|
import { AccessibilityIcon, InfoCircledIcon } from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
Flex,
|
Flex,
|
||||||
@@ -13,18 +24,6 @@ import { debounce } from 'lodash';
|
|||||||
import { Fragment, use, useEffect, useRef, useState } from 'react';
|
import { Fragment, use, useEffect, useRef, useState } from 'react';
|
||||||
import { lerp } from 'three/src/math/MathUtils';
|
import { lerp } from 'three/src/math/MathUtils';
|
||||||
import { Ad, AdType } from '../../../../../../components/Ad';
|
import { Ad, AdType } from '../../../../../../components/Ad';
|
||||||
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
|
||||||
import { isExplosive } from '../../../../../../core/blitz/isExplosive';
|
|
||||||
import { resolvePenetrationCoefficient } from '../../../../../../core/blitz/resolvePenetrationCoefficient';
|
|
||||||
import { asset } from '../../../../../../core/blitzkit/asset';
|
|
||||||
import { coefficient } from '../../../../../../core/blitzkit/coefficient';
|
|
||||||
import { equipmentDefinitions } from '../../../../../../core/blitzkit/equipmentDefinitions';
|
|
||||||
import { provisionDefinitions } from '../../../../../../core/blitzkit/provisionDefinitions';
|
|
||||||
import { tankCharacteristics } from '../../../../../../core/blitzkit/tankCharacteristics';
|
|
||||||
import {
|
|
||||||
CREW_MEMBER_NAMES,
|
|
||||||
GUN_TYPE_NAMES,
|
|
||||||
} from '../../../../../../core/blitzkit/tankDefinitions/constants';
|
|
||||||
import { useAdExempt } from '../../../../../../hooks/useAdExempt';
|
import { useAdExempt } from '../../../../../../hooks/useAdExempt';
|
||||||
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
||||||
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
||||||
@@ -463,7 +462,9 @@ export function Characteristics() {
|
|||||||
<Fragment key={member.type}>
|
<Fragment key={member.type}>
|
||||||
<InfoWithDelta
|
<InfoWithDelta
|
||||||
key={`${member.type}-root`}
|
key={`${member.type}-root`}
|
||||||
name={`${CREW_MEMBER_NAMES[member.type]}${count > 1 ? ` x ${count}` : ''}`}
|
name={`${CREW_MEMBER_NAMES[member.type]}${
|
||||||
|
count > 1 ? ` x ${count}` : ''
|
||||||
|
}`}
|
||||||
unit="%"
|
unit="%"
|
||||||
decimals={0}
|
decimals={0}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
|
import { Pose } from '@blitzkit/core';
|
||||||
import { OrbitControls } from '@react-three/drei';
|
import { OrbitControls } from '@react-three/drei';
|
||||||
import { useThree } from '@react-three/fiber';
|
import { useThree } from '@react-three/fiber';
|
||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import { Vector3 } from 'three';
|
import { Vector3 } from 'three';
|
||||||
import { OrbitControls as OrbitControlsClass } from 'three-stdlib';
|
import { OrbitControls as OrbitControlsClass } from 'three-stdlib';
|
||||||
import { applyPitchYawLimits } from '../../../../../core/blitz/applyPitchYawLimits';
|
|
||||||
import { hasEquipment } from '../../../../../core/blitzkit/hasEquipment';
|
|
||||||
import { modelDefinitions } from '../../../../../core/blitzkit/modelDefinitions';
|
|
||||||
import { Pose, poseEvent } from '../../../../../core/blitzkit/pose';
|
|
||||||
import { useAwait } from '../../../../../hooks/useAwait';
|
import { useAwait } from '../../../../../hooks/useAwait';
|
||||||
import * as Duel from '../../../../../stores/duel';
|
import * as Duel from '../../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../stores/tankopediaEphemeral';
|
||||||
|
|||||||
+12
-6
@@ -1,9 +1,11 @@
|
|||||||
|
import {
|
||||||
|
asset,
|
||||||
|
consumableDefinitions,
|
||||||
|
gameDefinitions,
|
||||||
|
provisionDefinitions,
|
||||||
|
} from '@blitzkit/core';
|
||||||
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { asset } from '../../../../../../core/blitzkit/asset';
|
|
||||||
import { consumableDefinitions } from '../../../../../../core/blitzkit/consumableDefinitions';
|
|
||||||
import { gameDefinitions } from '../../../../../../core/blitzkit/gameDefinitions';
|
|
||||||
import { provisionDefinitions } from '../../../../../../core/blitzkit/provisionDefinitions';
|
|
||||||
import * as Duel from '../../../../../../stores/duel';
|
import * as Duel from '../../../../../../stores/duel';
|
||||||
|
|
||||||
export function GameModeSection() {
|
export function GameModeSection() {
|
||||||
@@ -33,7 +35,9 @@ export function GameModeSection() {
|
|||||||
direction="column"
|
direction="column"
|
||||||
style={{
|
style={{
|
||||||
borderRadius: 'var(--radius-3)',
|
borderRadius: 'var(--radius-3)',
|
||||||
background: `url(${asset(`icons/game_mode_banners/${id}.webp`)})`,
|
background: `url(${asset(
|
||||||
|
`icons/game_mode_banners/${id}.webp`,
|
||||||
|
)})`,
|
||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
}}
|
}}
|
||||||
@@ -41,7 +45,9 @@ export function GameModeSection() {
|
|||||||
<Box
|
<Box
|
||||||
flexGrow="1"
|
flexGrow="1"
|
||||||
style={{
|
style={{
|
||||||
background: `url(${asset(`icons/game_mode_banners/${id}.webp`)})`,
|
background: `url(${asset(
|
||||||
|
`icons/game_mode_banners/${id}.webp`,
|
||||||
|
)})`,
|
||||||
backgroundSize: 'cover',
|
backgroundSize: 'cover',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
|
import { resolveNearPenetration, tankDefinitions, Var } from '@blitzkit/core';
|
||||||
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
||||||
import { Suspense, use, useEffect, useMemo, useRef, useState } from 'react';
|
import { Suspense, use, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { ThicknessRange } from '../../../../../../components/Armor/components/StaticArmor';
|
|
||||||
import { classIcons } from '../../../../../../components/ClassIcon';
|
import { classIcons } from '../../../../../../components/ClassIcon';
|
||||||
import { NAVBAR_HEIGHT } from '../../../../../../components/Navbar/index.css';
|
import { NAVBAR_HEIGHT } from '../../../../../../components/Navbar/index.css';
|
||||||
import { resolveNearPenetration } from '../../../../../../core/blitz/resolveNearPenetration';
|
|
||||||
import { tankDefinitions } from '../../../../../../core/blitzkit/tankDefinitions';
|
|
||||||
import { Var } from '../../../../../../core/blitzkit/var';
|
|
||||||
import { useFullScreen } from '../../../../../../hooks/useFullScreen';
|
import { useFullScreen } from '../../../../../../hooks/useFullScreen';
|
||||||
import * as Duel from '../../../../../../stores/duel';
|
import * as Duel from '../../../../../../stores/duel';
|
||||||
import { TankSandbox } from './TankSandbox';
|
import { TankSandbox } from './TankSandbox';
|
||||||
@@ -22,8 +19,8 @@ export function HeroSection() {
|
|||||||
protagonist.treeType === 'collector'
|
protagonist.treeType === 'collector'
|
||||||
? 'blue'
|
? 'blue'
|
||||||
: protagonist.treeType === 'premium'
|
: protagonist.treeType === 'premium'
|
||||||
? 'amber'
|
? 'amber'
|
||||||
: undefined;
|
: undefined;
|
||||||
const awaitedTankDefinitions = use(tankDefinitions);
|
const awaitedTankDefinitions = use(tankDefinitions);
|
||||||
const thicknessRange = useMemo(() => {
|
const thicknessRange = useMemo(() => {
|
||||||
const entries = Object.values(awaitedTankDefinitions);
|
const entries = Object.values(awaitedTankDefinitions);
|
||||||
|
|||||||
+20
-11
@@ -1,15 +1,16 @@
|
|||||||
|
import {
|
||||||
|
assertSecret,
|
||||||
|
asset,
|
||||||
|
modelDefinitions,
|
||||||
|
provisionDefinitions,
|
||||||
|
} from '@blitzkit/core';
|
||||||
|
import strings from '@blitzkit/core/lang/en-US.json';
|
||||||
import { ChevronLeftIcon, MixIcon, UpdateIcon } from '@radix-ui/react-icons';
|
import { ChevronLeftIcon, MixIcon, UpdateIcon } from '@radix-ui/react-icons';
|
||||||
import { Button, Code, Dialog, Flex } from '@radix-ui/themes';
|
import { Button, Code, Dialog, Flex } from '@radix-ui/themes';
|
||||||
import { use, useState } from 'react';
|
import { use, useState } from 'react';
|
||||||
import { classIcons } from '../../../../../../../components/ClassIcon';
|
import { classIcons } from '../../../../../../../components/ClassIcon';
|
||||||
import { Link } from '../../../../../../../components/Link';
|
import { Link } from '../../../../../../../components/Link';
|
||||||
import { ScienceIcon } from '../../../../../../../components/ScienceIcon';
|
import { ScienceIcon } from '../../../../../../../components/ScienceIcon';
|
||||||
import { asset } from '../../../../../../../core/blitzkit/asset';
|
|
||||||
import { modelDefinitions } from '../../../../../../../core/blitzkit/modelDefinitions';
|
|
||||||
import { provisionDefinitions } from '../../../../../../../core/blitzkit/provisionDefinitions';
|
|
||||||
import { assertSecret } from '../../../../../../../core/blitzkit/secret';
|
|
||||||
import { tankToDuelMember } from '../../../../../../../core/blitzkit/tankToDuelMember';
|
|
||||||
import strings from '../../../../../../../lang/en-US.json';
|
|
||||||
import * as App from '../../../../../../../stores/app';
|
import * as App from '../../../../../../../stores/app';
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../../../stores/tankopediaEphemeral';
|
||||||
@@ -132,8 +133,8 @@ export function MetaSection() {
|
|||||||
protagonist.treeType === 'collector'
|
protagonist.treeType === 'collector'
|
||||||
? 'blue'
|
? 'blue'
|
||||||
: protagonist.treeType === 'premium'
|
: protagonist.treeType === 'premium'
|
||||||
? 'amber'
|
? 'amber'
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{strings.common.tree_type[protagonist.treeType]}
|
{strings.common.tree_type[protagonist.treeType]}
|
||||||
@@ -159,7 +160,11 @@ export function MetaSection() {
|
|||||||
</Listing>
|
</Listing>
|
||||||
)}
|
)}
|
||||||
<Listing
|
<Listing
|
||||||
label={`${protagonist.treeType === 'researchable' ? 'Purchase' : 'Restoration'} price`}
|
label={`${
|
||||||
|
protagonist.treeType === 'researchable'
|
||||||
|
? 'Purchase'
|
||||||
|
: 'Restoration'
|
||||||
|
} price`}
|
||||||
>
|
>
|
||||||
<Flex align="center" gap="1">
|
<Flex align="center" gap="1">
|
||||||
{protagonist.price.value.toLocaleString()}
|
{protagonist.price.value.toLocaleString()}
|
||||||
@@ -167,7 +172,9 @@ export function MetaSection() {
|
|||||||
style={{ width: '1em', height: '1em' }}
|
style={{ width: '1em', height: '1em' }}
|
||||||
alt={protagonist.price.type}
|
alt={protagonist.price.type}
|
||||||
src={asset(
|
src={asset(
|
||||||
`icons/currencies/${protagonist.price.type === 'gold' ? 'gold' : 'silver'}.webp`,
|
`icons/currencies/${
|
||||||
|
protagonist.price.type === 'gold' ? 'gold' : 'silver'
|
||||||
|
}.webp`,
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -179,7 +186,9 @@ export function MetaSection() {
|
|||||||
style={{ width: '1em', height: '1em' }}
|
style={{ width: '1em', height: '1em' }}
|
||||||
alt={protagonist.price.type}
|
alt={protagonist.price.type}
|
||||||
src={asset(
|
src={asset(
|
||||||
`icons/currencies/${protagonist.price.type === 'gold' ? 'gold' : 'silver'}.webp`,
|
`icons/currencies/${
|
||||||
|
protagonist.price.type === 'gold' ? 'gold' : 'silver'
|
||||||
|
}.webp`,
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
@@ -9,13 +9,7 @@ import {
|
|||||||
import { Armor } from '../../../../../../components/Armor';
|
import { Armor } from '../../../../../../components/Armor';
|
||||||
import { ArmorPlateDisplay } from '../../../../../../components/Armor/components/ArmorPlateDisplay';
|
import { ArmorPlateDisplay } from '../../../../../../components/Armor/components/ArmorPlateDisplay';
|
||||||
import { ShotDisplay } from '../../../../../../components/Armor/components/ShotDisplay';
|
import { ShotDisplay } from '../../../../../../components/Armor/components/ShotDisplay';
|
||||||
import {
|
import { StaticArmor } from '../../../../../../components/Armor/components/StaticArmor';
|
||||||
StaticArmor,
|
|
||||||
ThicknessRange,
|
|
||||||
} from '../../../../../../components/Armor/components/StaticArmor';
|
|
||||||
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
|
||||||
import { modelTransformEvent } from '../../../../../../core/blitzkit/modelTransform';
|
|
||||||
import { Pose, poseEvent } from '../../../../../../core/blitzkit/pose';
|
|
||||||
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
||||||
import useOnScreen from '../../../../../../hooks/useOnScreen';
|
import useOnScreen from '../../../../../../hooks/useOnScreen';
|
||||||
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
|
import { tankIcon } from '@blitzkit/core';
|
||||||
import { Flex, FlexProps, Progress } from '@radix-ui/themes';
|
import { Flex, FlexProps, Progress } from '@radix-ui/themes';
|
||||||
import { useProgress } from '@react-three/drei';
|
import { useProgress } from '@react-three/drei';
|
||||||
import { tankIcon } from '../../../../../../core/blitzkit/tankIcon';
|
|
||||||
|
|
||||||
type TankSandboxLoaderProps = Omit<FlexProps, 'id'> & {
|
type TankSandboxLoaderProps = Omit<FlexProps, 'id'> & {
|
||||||
id: number;
|
id: number;
|
||||||
|
|||||||
+7
-5
@@ -1,11 +1,13 @@
|
|||||||
|
import {
|
||||||
|
asset,
|
||||||
|
averageDefinitions,
|
||||||
|
formatCompact,
|
||||||
|
tankDefinitions,
|
||||||
|
TIER_ROMAN_NUMERALS,
|
||||||
|
} from '@blitzkit/core';
|
||||||
import { Box, Flex, Text } from '@radix-ui/themes';
|
import { Box, Flex, Text } from '@radix-ui/themes';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { asset } from '../../../../../../../../core/blitzkit/asset';
|
|
||||||
import { averageDefinitions } from '../../../../../../../../core/blitzkit/averageDefinitions';
|
|
||||||
import { tankDefinitions } from '../../../../../../../../core/blitzkit/tankDefinitions';
|
|
||||||
import { TIER_ROMAN_NUMERALS } from '../../../../../../../../core/blitzkit/tankDefinitions/constants';
|
|
||||||
import { formatCompact } from '../../../../../../../../core/math/formatCompact';
|
|
||||||
import * as TankopediaEphemeral from '../../../../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../../../../stores/tankopediaEphemeral';
|
||||||
|
|
||||||
interface NodeProps {
|
interface NodeProps {
|
||||||
|
|||||||
+1
-3
@@ -1,9 +1,7 @@
|
|||||||
|
import { asset, imgur, tankDefinitions } from '@blitzkit/core';
|
||||||
import { CaretLeftIcon, CaretRightIcon, PlusIcon } from '@radix-ui/react-icons';
|
import { CaretLeftIcon, CaretRightIcon, PlusIcon } from '@radix-ui/react-icons';
|
||||||
import { Flex, Heading, IconButton, ScrollArea, Text } from '@radix-ui/themes';
|
import { Flex, Heading, IconButton, ScrollArea, Text } from '@radix-ui/themes';
|
||||||
import { Fragment, use, useEffect, useMemo, useRef, useState } from 'react';
|
import { Fragment, use, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { asset } from '../../../../../../../core/blitzkit/asset';
|
|
||||||
import { imgur } from '../../../../../../../core/blitzkit/imgur';
|
|
||||||
import { tankDefinitions } from '../../../../../../../core/blitzkit/tankDefinitions';
|
|
||||||
import * as Duel from '../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../../../stores/tankopediaEphemeral';
|
||||||
import { Arrow } from './components/Arrow';
|
import { Arrow } from './components/Arrow';
|
||||||
|
|||||||
-1
@@ -1,6 +1,5 @@
|
|||||||
import { IconButton } from '@radix-ui/themes';
|
import { IconButton } from '@radix-ui/themes';
|
||||||
import { invalidate } from '@react-three/fiber';
|
import { invalidate } from '@react-three/fiber';
|
||||||
import { asset } from '../../../../../../../../../core/blitzkit/asset';
|
|
||||||
import { useArmor } from '../../../../../../../../../hooks/useArmor';
|
import { useArmor } from '../../../../../../../../../hooks/useArmor';
|
||||||
import * as Duel from '../../../../../../../../../stores/duel';
|
import * as Duel from '../../../../../../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../../../../../stores/tankopediaEphemeral';
|
||||||
|
|||||||
+1
-11
@@ -1,3 +1,4 @@
|
|||||||
|
import { imgur, uniqueGuns } from '@blitzkit/core';
|
||||||
import {
|
import {
|
||||||
CameraIcon,
|
CameraIcon,
|
||||||
CopyIcon,
|
CopyIcon,
|
||||||
@@ -21,17 +22,6 @@ import {
|
|||||||
} from '@radix-ui/themes';
|
} from '@radix-ui/themes';
|
||||||
import { invalidate } from '@react-three/fiber';
|
import { invalidate } from '@react-three/fiber';
|
||||||
import { RefObject, useEffect, useState } from 'react';
|
import { RefObject, useEffect, useState } from 'react';
|
||||||
import { ThicknessRange } from '../../../../../../../../components/Armor/components/StaticArmor';
|
|
||||||
import { ModuleButton } from '../../../../../../../../components/ModuleButtons/ModuleButton';
|
|
||||||
import { SmallTankIcon } from '../../../../../../../../components/SmallTankIcon';
|
|
||||||
import { resolveNearPenetration } from '../../../../../../../../core/blitz/resolveNearPenetration';
|
|
||||||
import { resolvePenetrationCoefficient } from '../../../../../../../../core/blitz/resolvePenetrationCoefficient';
|
|
||||||
import { asset } from '../../../../../../../../core/blitzkit/asset';
|
|
||||||
import { imgur } from '../../../../../../../../core/blitzkit/imgur';
|
|
||||||
import { Pose, poseEvent } from '../../../../../../../../core/blitzkit/pose';
|
|
||||||
import { TIER_ROMAN_NUMERALS } from '../../../../../../../../core/blitzkit/tankDefinitions/constants';
|
|
||||||
import { uniqueGuns } from '../../../../../../../../core/blitzkit/uniqueGuns';
|
|
||||||
import { useArmor } from '../../../../../../../../hooks/useArmor';
|
|
||||||
import { useEquipment } from '../../../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../../../hooks/useEquipment';
|
||||||
import { useFullScreen } from '../../../../../../../../hooks/useFullScreen';
|
import { useFullScreen } from '../../../../../../../../hooks/useFullScreen';
|
||||||
import { useFullscreenAvailability } from '../../../../../../../../hooks/useFullscreenAvailability';
|
import { useFullscreenAvailability } from '../../../../../../../../hooks/useFullscreenAvailability';
|
||||||
|
|||||||
-6
@@ -1,12 +1,6 @@
|
|||||||
import { invalidate, ThreeEvent, useThree } from '@react-three/fiber';
|
import { invalidate, ThreeEvent, useThree } from '@react-three/fiber';
|
||||||
import { memo, useRef } from 'react';
|
import { memo, useRef } from 'react';
|
||||||
import { Group, Mesh, MeshStandardMaterial, Vector2 } from 'three';
|
import { Group, Mesh, MeshStandardMaterial, Vector2 } from 'three';
|
||||||
import { ModelTankWrapper } from '../../../../../../../components/Armor/components/ModelTankWrapper';
|
|
||||||
import { applyPitchYawLimits } from '../../../../../../../core/blitz/applyPitchYawLimits';
|
|
||||||
import { hasEquipment } from '../../../../../../../core/blitzkit/hasEquipment';
|
|
||||||
import { jsxTree } from '../../../../../../../core/blitzkit/jsxTree';
|
|
||||||
import { modelTransformEvent } from '../../../../../../../core/blitzkit/modelTransform';
|
|
||||||
import { normalizeAngleRad } from '../../../../../../../core/math/normalizeAngleRad';
|
|
||||||
import { useModel } from '../../../../../../../hooks/useModel';
|
import { useModel } from '../../../../../../../hooks/useModel';
|
||||||
import { useTankModelDefinition } from '../../../../../../../hooks/useTankModelDefinition';
|
import { useTankModelDefinition } from '../../../../../../../hooks/useTankModelDefinition';
|
||||||
import { useTankTransform } from '../../../../../../../hooks/useTankTransform';
|
import { useTankTransform } from '../../../../../../../hooks/useTankTransform';
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
|
import { modelTransformEvent, ModelTransformEventData } from '@blitzkit/core';
|
||||||
import { HeightIcon, WidthIcon } from '@radix-ui/react-icons';
|
import { HeightIcon, WidthIcon } from '@radix-ui/react-icons';
|
||||||
import { Flex, TextField } from '@radix-ui/themes';
|
import { Flex, TextField } from '@radix-ui/themes';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import { degToRad, radToDeg } from 'three/src/math/MathUtils';
|
import { degToRad, radToDeg } from 'three/src/math/MathUtils';
|
||||||
import { applyPitchYawLimits } from '../../../../../../core/blitz/applyPitchYawLimits';
|
|
||||||
import {
|
|
||||||
modelTransformEvent,
|
|
||||||
ModelTransformEventData,
|
|
||||||
} from '../../../../../../core/blitzkit/modelTransform';
|
|
||||||
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
||||||
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
import { useTankModelDefinition } from '../../../../../../hooks/useTankModelDefinition';
|
||||||
import * as Duel from '../../../../../../stores/duel';
|
import * as Duel from '../../../../../../stores/duel';
|
||||||
@@ -23,11 +19,6 @@ export function QuickInputs() {
|
|||||||
const gunModelDefinition = turretModelDefinition.guns[protagonist.gun.id];
|
const gunModelDefinition = turretModelDefinition.guns[protagonist.gun.id];
|
||||||
const initialGunPitch = tankModelDefinition.turretRotation?.pitch ?? 0;
|
const initialGunPitch = tankModelDefinition.turretRotation?.pitch ?? 0;
|
||||||
const hasImprovedVerticalStabilizer = useEquipment(122);
|
const hasImprovedVerticalStabilizer = useEquipment(122);
|
||||||
const antagonist = Duel.use((state) => state.antagonist.tank);
|
|
||||||
const compareTanks =
|
|
||||||
protagonist.tank.id === antagonist.id
|
|
||||||
? [protagonist.tank.id]
|
|
||||||
: [protagonist.tank.id, antagonist.id];
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
yawInput.current!.value = radToDeg(protagonist.yaw).toFixed(1);
|
yawInput.current!.value = radToDeg(protagonist.yaw).toFixed(1);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Flex } from '@radix-ui/themes';
|
import { Flex } from '@radix-ui/themes';
|
||||||
import { ShotDisplayCard } from '../../../../../components/Armor/components/ShotDisplayCard';
|
|
||||||
import * as TankEphemeral from '../../../../../stores/tankopediaEphemeral';
|
import * as TankEphemeral from '../../../../../stores/tankopediaEphemeral';
|
||||||
|
|
||||||
export function ShotDisplaySection() {
|
export function ShotDisplaySection() {
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
|
import { reviews, Var, youtubers } from '@blitzkit/core';
|
||||||
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
||||||
import { use } from 'react';
|
import { use } from 'react';
|
||||||
import { Link } from '../../../../../components/Link';
|
import { Link } from '../../../../../components/Link';
|
||||||
import PageWrapper from '../../../../../components/PageWrapper';
|
import PageWrapper from '../../../../../components/PageWrapper';
|
||||||
import { VerifiedIcon } from '../../../../../components/VerifiedIcon';
|
import { VerifiedIcon } from '../../../../../components/VerifiedIcon';
|
||||||
import { youtubers } from '../../../../../constants/youtubers';
|
|
||||||
import { reviews } from '../../../../../core/blitzkit/reviews';
|
|
||||||
import { Var } from '../../../../../core/blitzkit/var';
|
|
||||||
import * as Duel from '../../../../../stores/duel';
|
import * as Duel from '../../../../../stores/duel';
|
||||||
|
|
||||||
export function VideoSection() {
|
export function VideoSection() {
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
import {
|
||||||
|
modelDefinitions,
|
||||||
|
provisionDefinitions,
|
||||||
|
tankDefinitions,
|
||||||
|
tankIcon,
|
||||||
|
TIER_ROMAN_NUMERALS,
|
||||||
|
} from '@blitzkit/core';
|
||||||
|
import strings from '@blitzkit/core/lang/en-US.json';
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { modelDefinitions } from '../../../../core/blitzkit/modelDefinitions';
|
|
||||||
import { provisionDefinitions } from '../../../../core/blitzkit/provisionDefinitions';
|
|
||||||
import { tankDefinitions } from '../../../../core/blitzkit/tankDefinitions';
|
|
||||||
import { TIER_ROMAN_NUMERALS } from '../../../../core/blitzkit/tankDefinitions/constants';
|
|
||||||
import { tankIcon } from '../../../../core/blitzkit/tankIcon';
|
|
||||||
import strings from '../../../../lang/en-US.json';
|
|
||||||
import * as Duel from '../../../../stores/duel';
|
import * as Duel from '../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral';
|
||||||
|
|
||||||
|
|||||||
Loaded 100 of 305 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user