mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: migrated tankopedia search
This commit is contained in:
1 parent
73c7bdf0c0
commit
e1c8194beb
59 files changed
+146
-131
No files matched your search
@@ -38,7 +38,6 @@
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"@types/three": "^0.160.0",
|
||||
"@vanilla-extract/css": "^1.15.5",
|
||||
"@vanilla-extract/dynamic": "^2.1.2",
|
||||
"adm-zip": "^0.5.16",
|
||||
"bepaint": "^0.1.0-beta.3",
|
||||
"csv-parse": "^5.5.6",
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
export const TREE_TYPES = ['researchable', 'premium', 'collector'] as const;
|
||||
|
||||
export const TANK_CLASSES = [
|
||||
'lightTank',
|
||||
'mediumTank',
|
||||
'heavyTank',
|
||||
'AT-SPG',
|
||||
] as const;
|
||||
@@ -1 +1,3 @@
|
||||
export * from './constants';
|
||||
export * from './idToRegion';
|
||||
export * from './resolveNearPenetration';
|
||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
import { assertSecret } from '@blitzkit/core/src/blitzkit/assertSecret';
|
||||
import { ASSETS_REPO } from '../../constants/assets';
|
||||
import { ASSETS_REPO } from '../../../../src/constants/assets';
|
||||
|
||||
export function asset(path: string) {
|
||||
return `https://raw.githubusercontent.com/tresabhi/${ASSETS_REPO}/${assertSecret(
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { asset } from './asset';
|
||||
import { fetchCdonLz4 } from './fetchCdonLz4';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
import { fetchCdonLz4 } from '@blitzkit/core/src/blitzkit/fetchCdonLz4';
|
||||
|
||||
export type CamouflageDefinitions = Record<
|
||||
number,
|
||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
import { TankFilters } from '../../../packages/website/src/stores/tankFilters';
|
||||
import { TankFilters } from '../../../website/src/stores/tankFilters';
|
||||
import { TankDefinition } from './tankDefinitions';
|
||||
|
||||
export function filterTank(filters: TankFilters, tank: TankDefinition) {
|
||||
@@ -1,5 +1,5 @@
|
||||
import { asset } from '../../../../src/core/blitzkit/asset';
|
||||
import { fetchCdonLz4 } from '../../../../src/core/blitzkit/fetchCdonLz4';
|
||||
import { asset } from './asset';
|
||||
import { fetchCdonLz4 } from './fetchCdonLz4';
|
||||
|
||||
interface GameMode {
|
||||
name: string;
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
export * from './assertSecret';
|
||||
export * from './asset';
|
||||
export * from './camouflageDefinitions';
|
||||
export * from './fetchCdonLz4';
|
||||
export * from './filterTank';
|
||||
export * from './gameDefinitions';
|
||||
export * from './modelDefinitions';
|
||||
export * from './superCompress';
|
||||
export * from './superDecompress';
|
||||
export * from './tankDefinitions';
|
||||
export * from './tankIcon';
|
||||
export * from './tankNames';
|
||||
File renamed without changes.
+12
-1
@@ -1,5 +1,4 @@
|
||||
import { CrewMember, GunDefinition, ShellType, Tier } from '.';
|
||||
import { TankClass } from '../../../components/Tanks';
|
||||
|
||||
export const SHELL_NAMES: Record<ShellType, string> = {
|
||||
ap: 'AP',
|
||||
@@ -59,3 +58,15 @@ export const TIER_ROMAN_NUMERALS: Record<Tier, string> = {
|
||||
9: 'IX',
|
||||
10: 'X',
|
||||
};
|
||||
|
||||
export const flags: Record<string, string> = {
|
||||
ussr: '<:ussr:1218421042033197197>',
|
||||
germany: '🇩🇪',
|
||||
usa: '🇺🇸',
|
||||
china: '🇨🇳',
|
||||
uk: '🇬🇧',
|
||||
france: '🇫🇷',
|
||||
japan: '🇯🇵',
|
||||
european: '🇪🇺',
|
||||
other: '<:other:1218421572243558482>',
|
||||
};
|
||||
+1
-11
@@ -179,14 +179,4 @@ export const tankDefinitionsArray = tankDefinitions.then((tanks) =>
|
||||
);
|
||||
export type Tier = (typeof TIERS)[number];
|
||||
|
||||
export const flags: Record<string, string> = {
|
||||
ussr: '<:ussr:1218421042033197197>',
|
||||
germany: '🇩🇪',
|
||||
usa: '🇺🇸',
|
||||
china: '🇨🇳',
|
||||
uk: '🇬🇧',
|
||||
france: '🇫🇷',
|
||||
japan: '🇯🇵',
|
||||
european: '🇪🇺',
|
||||
other: '<:other:1218421572243558482>',
|
||||
};
|
||||
export * from './constants';
|
||||
@@ -1,4 +1,4 @@
|
||||
import { asset } from './asset';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
|
||||
export function tankIcon(id: number, size: 'big' | 'small' = 'big') {
|
||||
return asset(`icons/tanks/${size}/${id}.webp`);
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
import { deburr } from 'lodash';
|
||||
import { tankDefinitionsArray } from '.';
|
||||
import { camouflageDefinitions } from '../camouflageDefinitions';
|
||||
import { camouflageDefinitions, tankDefinitionsArray } from '.';
|
||||
|
||||
export const tankNames = Promise.all([
|
||||
tankDefinitionsArray,
|
||||
@@ -20,6 +20,7 @@
|
||||
"react-dom": "^18.3.1",
|
||||
"react-fuzzysort": "^1.0.1",
|
||||
"immer": "^10.1.1",
|
||||
"@vanilla-extract/dynamic": "^2.1.2",
|
||||
"zustand": "^4.5.5",
|
||||
"react-promise-suspense": "^0.3.4"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
asset,
|
||||
gameDefinitions,
|
||||
TANK_CLASSES,
|
||||
Tier,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from '@blitzkit/core';
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { ReloadIcon } from '@radix-ui/react-icons';
|
||||
import { Box, Flex, IconButton, Text, Tooltip } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
@@ -9,12 +17,6 @@ import { ExperimentIcon } from '../../../../components/ExperimentIcon';
|
||||
import { ResearchedIcon } from '../../../../components/ResearchedIcon';
|
||||
import { ScienceIcon } from '../../../../components/ScienceIcon';
|
||||
import { ScienceOffIcon } from '../../../../components/ScienceOffIcon';
|
||||
import { TANK_CLASSES } from '../../../../components/Tanks/components/Item/constants';
|
||||
import { asset } from '../../../../core/blitzkit/asset';
|
||||
import { gameDefinitions } from '../../../../core/blitzkit/gameDefinitions';
|
||||
import { Tier } from '../../../../core/blitzkit/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS } from '../../../../core/blitzkit/tankDefinitions/constants';
|
||||
import strings from '../../../../lang/en-US.json';
|
||||
import * as TankFilters from '../../../../stores/tankFilters';
|
||||
|
||||
interface FilterControlProps {
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import {
|
||||
asset,
|
||||
modelDefinitions,
|
||||
resolveNearPenetration,
|
||||
TankDefinition,
|
||||
tankIcon,
|
||||
} from '@blitzkit/core';
|
||||
import { Flex, Text } from '@radix-ui/themes';
|
||||
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
||||
import Link from 'next/link';
|
||||
import { use, useMemo } from 'react';
|
||||
import { classIcons } from '../../../../components/ClassIcon';
|
||||
import { resolveNearPenetration } from '../../../../core/blitz/resolveNearPenetration';
|
||||
import { asset } from '../../../../core/blitzkit/asset';
|
||||
import { modelDefinitions } from '../../../../core/blitzkit/modelDefinitions';
|
||||
import { normalizeBoundingBox } from '../../../../core/blitzkit/normalizeBoundingBox';
|
||||
import { resolveDpm } from '../../../../core/blitzkit/resolveDpm';
|
||||
import { resolveReload } from '../../../../core/blitzkit/resolveReload';
|
||||
import { TankDefinition } from '../../../../core/blitzkit/tankDefinitions';
|
||||
import { tankIcon } from '../../../../core/blitzkit/tankIcon';
|
||||
import { unionBoundingBox } from '../../../../core/blitzkit/unionBoundingBox';
|
||||
import * as TankopediaSort from '../../../../stores/tankopediaSort';
|
||||
import * as styles from './TankCard.css';
|
||||
|
||||
@@ -139,14 +137,16 @@ export function TankCard({ tank, onSelect }: TankCardProps) {
|
||||
tank.treeType === 'collector'
|
||||
? 'blue'
|
||||
: tank.treeType === 'premium'
|
||||
? 'amber'
|
||||
: 'gray'
|
||||
? 'amber'
|
||||
: 'gray'
|
||||
}
|
||||
highContrast={tank.treeType === 'researchable'}
|
||||
onClick={onSelect ? () => onSelect(tank) : undefined}
|
||||
className={styles.card}
|
||||
style={assignInlineVars({
|
||||
[styles.cardBackgroundVar]: `top left / contain no-repeat url(${asset(`flags/scratched/${tank.nation}.webp`)})`,
|
||||
[styles.cardBackgroundVar]: `top left / contain no-repeat url(${asset(
|
||||
`flags/scratched/${tank.nation}.webp`,
|
||||
)})`,
|
||||
})}
|
||||
>
|
||||
<Link
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
TANK_CLASSES,
|
||||
TankDefinition,
|
||||
filterTank,
|
||||
gameDefinitions,
|
||||
modelDefinitions,
|
||||
resolveNearPenetration,
|
||||
tankDefinitions,
|
||||
tankDefinitionsArray,
|
||||
tankNames,
|
||||
} from '@blitzkit/core';
|
||||
import { Callout, Flex, FlexProps, Link, Text } from '@radix-ui/themes';
|
||||
import { go } from 'fuzzysort';
|
||||
import { times } from 'lodash';
|
||||
import { Fragment, memo, use, useEffect, useMemo, useState } from 'react';
|
||||
import { AdMidSectionResponsive } from '../../../../../components/AdMidSectionResponsive';
|
||||
import { ExperimentIcon } from '../../../../../components/ExperimentIcon';
|
||||
import { TANK_CLASSES } from '../../../../../components/Tanks/components/Item/constants';
|
||||
import { resolveNearPenetration } from '../../../../../core/blitz/resolveNearPenetration';
|
||||
import { filterTank } from '../../../../../core/blitzkit/filterTank';
|
||||
import { gameDefinitions } from '../../../../../core/blitzkit/gameDefinitions';
|
||||
import { modelDefinitions } from '../../../../../core/blitzkit/modelDefinitions';
|
||||
import { normalizeBoundingBox } from '../../../../../core/blitzkit/normalizeBoundingBox';
|
||||
import { resolveDpm } from '../../../../../core/blitzkit/resolveDpm';
|
||||
import { resolveReload } from '../../../../../core/blitzkit/resolveReload';
|
||||
import {
|
||||
TankDefinition,
|
||||
tankDefinitions,
|
||||
tankDefinitionsArray,
|
||||
} from '../../../../../core/blitzkit/tankDefinitions';
|
||||
import { tankNames } from '../../../../../core/blitzkit/tankDefinitions/tankNames';
|
||||
import { unionBoundingBox } from '../../../../../core/blitzkit/unionBoundingBox';
|
||||
import { useAdExempt } from '../../../../../hooks/useAdExempt';
|
||||
import * as TankFilters from '../../../../../stores/tankFilters';
|
||||
import {
|
||||
|
||||
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,7 +1,7 @@
|
||||
import { assertSecret } from '@blitzkit/core';
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { Button, ButtonProps, Dialog, Flex } from '@radix-ui/themes';
|
||||
import { REGIONS } from '../../../../../../src/constants/regions';
|
||||
import strings from '../../../../../../src/lang/en-US.json';
|
||||
import { Link } from '../../Link';
|
||||
import { WargamingIcon } from '../../WargamingIcon';
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,6 @@
|
||||
import { ObjectMap, useLoader } from '@react-three/fiber';
|
||||
import { Mesh, MeshStandardMaterial } from 'three';
|
||||
import { GLTF, GLTFLoader } from 'three-stdlib';
|
||||
import { asset } from '../core/blitzkit/asset';
|
||||
|
||||
const cache: Record<
|
||||
number,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Tier, createNextSafeStore } from '@blitzkit/core';
|
||||
import { create } from 'zustand';
|
||||
import { TankClass, TreeType } from '../components/Tanks';
|
||||
import { Tier } from '../core/blitzkit/tankDefinitions';
|
||||
import { createNextSafeStore } from '../core/zustand/createNextSafeStore';
|
||||
|
||||
export interface TankFilters {
|
||||
tiers: Tier[];
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { createNextSafeStore } from '@blitzkit/core';
|
||||
import { merge } from 'lodash';
|
||||
import { create } from 'zustand';
|
||||
import { persist, subscribeWithSelector } from 'zustand/middleware';
|
||||
import { ENVIRONMENTS } from '../../app/tools/tankopedia/[id]/components/Lighting';
|
||||
import { TankClass, TreeType } from '../../components/Tanks';
|
||||
import { Tier } from '../../core/blitzkit/tankDefinitions';
|
||||
import { createNextSafeStore } from '../../core/zustand/createNextSafeStore';
|
||||
import { SORT_NAMES, TankopediaDisplay } from './constants';
|
||||
|
||||
export type TankopediaSortBy = keyof typeof SORT_NAMES;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { createNextSafeStore } from '@blitzkit/core';
|
||||
import { create } from 'zustand';
|
||||
import { createNextSafeStore } from '../core/zustand/createNextSafeStore';
|
||||
import {
|
||||
TankopediaSortBy,
|
||||
TankopediaSortDirection,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { tankIcon } from '@blitzkit/core/src/blitzkit/tankIcon';
|
||||
import { clamp } from 'lodash';
|
||||
import CommandWrapper from '../components/CommandWrapper';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
@@ -9,7 +10,6 @@ import { mapDefinitions } from '../core/blitzkit/mapDefinitions';
|
||||
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 { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitzkit/resolveNearPenetration';
|
||||
import { useFrame } from '@react-three/fiber';
|
||||
import { useEffect } from 'react';
|
||||
import { MeshBasicMaterial, Object3D, ShaderMaterial, Vector2 } from 'three';
|
||||
@@ -6,7 +7,6 @@ import * as Duel from '../../../../../packages/website/src/stores/duel';
|
||||
import * as TankopediaPersistent from '../../../../../packages/website/src/stores/tankopediaPersistent';
|
||||
import { canSplash } from '../../../../core/blitz/canSplash';
|
||||
import { isExplosive } from '../../../../core/blitz/isExplosive';
|
||||
import { resolveNearPenetration } from '../../../../core/blitz/resolveNearPenetration';
|
||||
import { resolvePenetrationCoefficient } from '../../../../core/blitz/resolvePenetrationCoefficient';
|
||||
import { hasEquipment } from '../../../../core/blitzkit/hasEquipment';
|
||||
import { jsxTree } from '../../../../core/blitzkit/jsxTree';
|
||||
|
||||
+1
-1
@@ -1,3 +1,4 @@
|
||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitzkit/resolveNearPenetration';
|
||||
import { useEffect } from 'react';
|
||||
import {
|
||||
AdditiveBlending,
|
||||
@@ -8,7 +9,6 @@ import {
|
||||
} from 'three';
|
||||
import { ArmorUserData, ExternalModuleVariant } from '../..';
|
||||
import * as Duel from '../../../../../../../packages/website/src/stores/duel';
|
||||
import { resolveNearPenetration } from '../../../../../../core/blitz/resolveNearPenetration';
|
||||
import { resolvePenetrationCoefficient } from '../../../../../../core/blitz/resolvePenetrationCoefficient';
|
||||
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment';
|
||||
import { jsxTree } from '../../../../../../core/blitzkit/jsxTree';
|
||||
|
||||
+1
-1
@@ -1,3 +1,4 @@
|
||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitzkit/resolveNearPenetration';
|
||||
import { useEffect } from 'react';
|
||||
import {
|
||||
AdditiveBlending,
|
||||
@@ -9,7 +10,6 @@ import { degToRad } from 'three/src/math/MathUtils';
|
||||
import { ArmorUserData } from '../..';
|
||||
import * as Duel from '../../../../../../../packages/website/src/stores/duel';
|
||||
import { isExplosive } from '../../../../../../core/blitz/isExplosive';
|
||||
import { resolveNearPenetration } from '../../../../../../core/blitz/resolveNearPenetration';
|
||||
import { resolvePenetrationCoefficient } from '../../../../../../core/blitz/resolvePenetrationCoefficient';
|
||||
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment';
|
||||
import { jsxTree } from '../../../../../../core/blitzkit/jsxTree';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitzkit/resolveNearPenetration';
|
||||
import { useThree } from '@react-three/fiber';
|
||||
import { useCallback } from 'react';
|
||||
import {
|
||||
@@ -14,7 +15,6 @@ import { degToRad } from 'three/src/math/MathUtils';
|
||||
import * as Duel from '../../../../../packages/website/src/stores/duel';
|
||||
import * as TankopediaEphemeral from '../../../../../packages/website/src/stores/tankopediaEphemeral';
|
||||
import { isExplosive } from '../../../../core/blitz/isExplosive';
|
||||
import { resolveNearPenetration } from '../../../../core/blitz/resolveNearPenetration';
|
||||
import { resolvePenetrationCoefficient } from '../../../../core/blitz/resolvePenetrationCoefficient';
|
||||
import { hasEquipment } from '../../../../core/blitzkit/hasEquipment';
|
||||
import { jsxTree } from '../../../../core/blitzkit/jsxTree';
|
||||
@@ -190,8 +190,8 @@ export function SpacedArmorSceneComponent({
|
||||
shell.type === ShellType.HE
|
||||
? 'blocked'
|
||||
: blocked
|
||||
? 'blocked'
|
||||
: 'penetration',
|
||||
? 'blocked'
|
||||
: 'penetration',
|
||||
variant: layer.variant,
|
||||
});
|
||||
} else {
|
||||
@@ -241,8 +241,8 @@ export function SpacedArmorSceneComponent({
|
||||
shell.type === ShellType.HE && layer.type !== ArmorType.Primary
|
||||
? 'blocked'
|
||||
: blocked
|
||||
? 'blocked'
|
||||
: 'penetration',
|
||||
? 'blocked'
|
||||
: 'penetration',
|
||||
angle,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { asset } from '../core/blitzkit/asset';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
|
||||
interface FlagProps {
|
||||
nation: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { asset } from '../../core/blitzkit/asset';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
import { GenericTankComponentButton } from './GenericTankComponentButton';
|
||||
import { TankComponentButtonProps } from './TankComponentButton';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { tankIcon } from '@blitzkit/core/src/blitzkit/tankIcon';
|
||||
import { classIcons } from '../../packages/website/src/components/ClassIcon';
|
||||
import { TankDefinition } from '../core/blitzkit/tankDefinitions';
|
||||
import { tankIcon } from '../core/blitzkit/tankIcon';
|
||||
import { classIcons } from './ClassIcon';
|
||||
import { ExperimentIcon } from './ExperimentIcon';
|
||||
import { Link } from './Link';
|
||||
import { StickyRowHeaderCell } from './StickyRowHeaderCell';
|
||||
@@ -36,8 +36,8 @@ export function TankRowHeaderCell({ tank }: TankRowHeaderCellProps) {
|
||||
tank.treeType === 'collector'
|
||||
? 'blue'
|
||||
: tank.treeType === 'premium'
|
||||
? 'amber'
|
||||
: 'gray'
|
||||
? 'amber'
|
||||
: 'gray'
|
||||
}
|
||||
highContrast={tank.treeType === 'researchable'}
|
||||
underline="hover"
|
||||
|
||||
@@ -5,15 +5,6 @@ import {
|
||||
TANK_ICONS_PREMIUM,
|
||||
} from '../../../../core/blitzkit/tankDefinitions/constants';
|
||||
|
||||
export const TREE_TYPES = ['researchable', 'premium', 'collector'] as const; // BIG TODO: REMOVE THIS AFTER LOCALIZATION
|
||||
|
||||
export const TANK_CLASSES = [
|
||||
'lightTank',
|
||||
'mediumTank',
|
||||
'heavyTank',
|
||||
'AT-SPG',
|
||||
] as const;
|
||||
|
||||
export const TREE_TYPE_NAMES: Record<TreeType, string> = {
|
||||
researchable: 'Tech tree',
|
||||
premium: 'Premium',
|
||||
|
||||
@@ -2,6 +2,10 @@ import { amberDark, blueDark } from '@radix-ui/colors';
|
||||
import { Flex, Text } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { ReactNode } from 'react';
|
||||
import { ClassHeavy } from '../../packages/website/src/components/ClassIcon/components/ClassHeavy';
|
||||
import { ClassLight } from '../../packages/website/src/components/ClassIcon/components/ClassLight';
|
||||
import { ClassMedium } from '../../packages/website/src/components/ClassIcon/components/ClassMedium';
|
||||
import { ClassTankDestroyer } from '../../packages/website/src/components/ClassIcon/components/ClassTankDestroyer';
|
||||
import { useEmbedStateCurry } from '../../packages/website/src/stores/embedState/utilities';
|
||||
import { breakdownConfig } from '../app/tools/embed/configurations/breakdown';
|
||||
import { toRadiusVar } from '../app/tools/embed/utilities';
|
||||
@@ -9,10 +13,6 @@ import { TankDefinition } from '../core/blitzkit/tankDefinitions';
|
||||
import { previewCompositeStat } from '../core/statistics/compositeStats';
|
||||
import { CompositeStatsKey } from '../core/statistics/compositeStats/constants';
|
||||
import strings from '../lang/en-US.json';
|
||||
import { ClassHeavy } from './ClassIcon/components/ClassHeavy';
|
||||
import { ClassLight } from './ClassIcon/components/ClassLight';
|
||||
import { ClassMedium } from './ClassIcon/components/ClassMedium';
|
||||
import { ClassTankDestroyer } from './ClassIcon/components/ClassTankDestroyer';
|
||||
|
||||
interface BreakdownEmbedWrapperProps {
|
||||
children: ReactNode;
|
||||
@@ -62,14 +62,14 @@ export function BreakdownEmbedCard({ tank }: BreakdownEmbedCardProps) {
|
||||
tank === null
|
||||
? undefined
|
||||
: tank.treeType === 'researchable' ||
|
||||
!useState('cardTitleTypeColor')
|
||||
? undefined
|
||||
: {
|
||||
color:
|
||||
tank.treeType === 'premium'
|
||||
? amberDark.amber11
|
||||
: blueDark.blue11,
|
||||
},
|
||||
!useState('cardTitleTypeColor')
|
||||
? undefined
|
||||
: {
|
||||
color:
|
||||
tank.treeType === 'premium'
|
||||
? amberDark.amber11
|
||||
: blueDark.blue11,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Flex align="center" gap="1">
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import {
|
||||
PitchLimits,
|
||||
YawLimits,
|
||||
} from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
||||
import { clamp } from 'lodash';
|
||||
import { degToRad } from 'three/src/math/MathUtils';
|
||||
import { PitchLimits, YawLimits } from '../blitzkit/modelDefinitions';
|
||||
import { normalizeAngleRad } from '../math/normalizeAngleRad';
|
||||
|
||||
export function applyPitchYawLimits(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { asset } from './asset';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
|
||||
export interface DiscoveredIdsDefinitions {
|
||||
time: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { asset } from './asset';
|
||||
import { fetchCdonLz4 } from './fetchCdonLz4';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
import { fetchCdonLz4 } from '@blitzkit/core/src/blitzkit/fetchCdonLz4';
|
||||
|
||||
export interface MapDefinitions {
|
||||
[id: number]: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BoundingBox } from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
||||
import { Vector3Tuple } from 'three';
|
||||
import { BoundingBox } from './modelDefinitions';
|
||||
|
||||
export function normalizeBoundingBox(boundingBox: BoundingBox) {
|
||||
return boundingBox.max.map(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ModelArmor } from './modelDefinitions';
|
||||
import { ModelArmor } from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
||||
|
||||
export function resolveArmor(armor: ModelArmor, index: number) {
|
||||
const spaced = armor.spaced?.includes(index) ?? false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { decode } from '../protobuf/decode';
|
||||
import { asset } from './asset';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
|
||||
export interface Reviews {
|
||||
reviews: Record<number, Review>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TankClass } from '../../components/Tanks';
|
||||
import { asset } from './asset';
|
||||
import { fetchCdonLz4 } from './fetchCdonLz4';
|
||||
import { asset } from '@blitzkit/core/src/blitzkit/asset';
|
||||
import { fetchCdonLz4 } from '@blitzkit/core/src/blitzkit/fetchCdonLz4';
|
||||
|
||||
export interface SkillDefinitions {
|
||||
classes: Record<TankClass, string[]>;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ModelDefinition } from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
||||
import { resolveNearPenetration } from '@blitzkit/core/src/blitzkit/resolveNearPenetration';
|
||||
import { EquipmentMatrix } from '../../../packages/website/src/stores/duel';
|
||||
import { isExplosive } from '../blitz/isExplosive';
|
||||
import { resolveNearPenetration } from '../blitz/resolveNearPenetration';
|
||||
import { resolvePenetrationCoefficient } from '../blitz/resolvePenetrationCoefficient';
|
||||
import { coefficient } from './coefficient';
|
||||
import { degressiveStat } from './degressiveStat';
|
||||
import { EquipmentDefinitions } from './equipmentDefinitions';
|
||||
import { ModelDefinition } from './modelDefinitions';
|
||||
import { normalizeBoundingBox } from './normalizeBoundingBox';
|
||||
import { progressiveStat } from './progressiveStat';
|
||||
import { ProvisionDefinitions } from './provisionDefinitions';
|
||||
@@ -238,10 +238,10 @@ export function tankCharacteristics(
|
||||
tank.class === 'heavyTank'
|
||||
? 0.06
|
||||
: tank.class === 'mediumTank'
|
||||
? 0.08
|
||||
: tank.class === 'lightTank'
|
||||
? 0.11
|
||||
: 0.04,
|
||||
? 0.08
|
||||
: tank.class === 'lightTank'
|
||||
? 0.11
|
||||
: 0.04,
|
||||
]) * coefficient([true, progressiveStat(commanderMastery)]);
|
||||
const fireChanceCoefficient = coefficient([hasProtectiveKit, -0.2]);
|
||||
|
||||
@@ -263,8 +263,8 @@ export function tankCharacteristics(
|
||||
tank.class === 'AT-SPG'
|
||||
? 0.04
|
||||
: tank.class === 'heavyTank'
|
||||
? 0.03
|
||||
: 0.02,
|
||||
? 0.03
|
||||
: 0.02,
|
||||
]),
|
||||
],
|
||||
[
|
||||
@@ -272,10 +272,10 @@ export function tankCharacteristics(
|
||||
tank.class === 'heavyTank'
|
||||
? 0.02
|
||||
: tank.class === 'mediumTank'
|
||||
? 0.04
|
||||
: tank.class === 'lightTank'
|
||||
? 0.07
|
||||
: 0.1,
|
||||
? 0.04
|
||||
: tank.class === 'lightTank'
|
||||
? 0.07
|
||||
: 0.1,
|
||||
],
|
||||
);
|
||||
const camouflageCoefficientStill = sum(
|
||||
@@ -287,8 +287,8 @@ export function tankCharacteristics(
|
||||
tank.class === 'AT-SPG'
|
||||
? 0.04
|
||||
: tank.class === 'heavyTank'
|
||||
? 0.03
|
||||
: 0.02,
|
||||
? 0.03
|
||||
: 0.02,
|
||||
],
|
||||
[true, crewSkills.camouflage * (3 / 100)],
|
||||
),
|
||||
@@ -298,10 +298,10 @@ export function tankCharacteristics(
|
||||
tank.class === 'heavyTank'
|
||||
? 0.04
|
||||
: tank.class === 'mediumTank'
|
||||
? 0.08
|
||||
: tank.class === 'lightTank'
|
||||
? 0.14
|
||||
: 0.2,
|
||||
? 0.08
|
||||
: tank.class === 'lightTank'
|
||||
? 0.14
|
||||
: 0.2,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { tankIcon } from '@blitzkit/core/src/blitzkit/tankIcon';
|
||||
import { iconPng } from './iconPng';
|
||||
import { tankIcon } from './tankIcon';
|
||||
|
||||
export function tankIconPng(id: number) {
|
||||
return iconPng(tankIcon(id));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BoundingBox } from '@blitzkit/core/src/blitzkit/modelDefinitions';
|
||||
import { Vector3Tuple } from 'three';
|
||||
import { BoundingBox } from './modelDefinitions';
|
||||
|
||||
export function unionBoundingBox(a: BoundingBox, b: BoundingBox) {
|
||||
return {
|
||||
|
||||
+12
-2
@@ -37,7 +37,17 @@
|
||||
"packages/website/src/components/Party3.tsx",
|
||||
"packages/website/src/components/PageWrapper.tsx",
|
||||
"packages/core/src/blitzkit/gameDefinitions.ts",
|
||||
"packages/core/src/zustand/createNextSafeStore.tsx"
|
||||
, "packages/core/src/blitzkit/superDecompress.ts", "packages/core/src/blitzkit/superCompress.ts" ],
|
||||
"packages/core/src/zustand/createNextSafeStore.tsx",
|
||||
"packages/core/src/blitzkit/superDecompress.ts",
|
||||
"packages/core/src/blitzkit/superCompress.ts",
|
||||
"packages/website/src/components/ClassIcon",
|
||||
"packages/core/src/blitzkit/asset.ts",
|
||||
"packages/core/src/blitzkit/fetchCdonLz4.ts",
|
||||
"packages/core/src/blitz/resolveNearPenetration.ts",
|
||||
"packages/core/src/blitzkit/modelDefinitions.ts",
|
||||
"packages/core/src/blitzkit/camouflageDefinitions.ts",
|
||||
"packages/core/src/blitzkit/filterTank.ts",
|
||||
"packages/core/src/blitzkit/tankIcon.ts"
|
||||
],
|
||||
"exclude": ["node_modules/**/*", "dist", "scripts"]
|
||||
}
|
||||
Reference in new issue
Block a user