mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: more values batch 1
This commit is contained in:
1 parent
1a19e56523
commit
b811be4284
12 files changed
+94
-46
No files matched your search
@@ -10,6 +10,6 @@
|
|||||||
- Maddox: game file decompression
|
- Maddox: game file decompression
|
||||||
- Pyogenics: tank model decompression
|
- Pyogenics: tank model decompression
|
||||||
- Aeson: game files layout
|
- Aeson: game files layout
|
||||||
- minitelrose, ChickenMan7777: 3-caliber rule edge cases
|
- Minitelrose, ChickenMan7777: 3-caliber rule edge cases
|
||||||
- \_34, HisRoyalFatness, Synx, xkdkw: embed UX
|
- \_34, HisRoyalFatness, Synx, xkdkw: embed UX
|
||||||
- [OPTML], Aeson, \_34, Droodles: beta testing tankopedia
|
- [OPTML], Aeson, \_34, Droodles: beta testing tankopedia
|
||||||
@@ -88,6 +88,11 @@ interface VehicleDefinitions {
|
|||||||
};
|
};
|
||||||
chassis: {
|
chassis: {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
|
rotationSpeed: number;
|
||||||
|
shotDispersionFactors: {
|
||||||
|
vehicleMovement: number;
|
||||||
|
vehicleRotation: number;
|
||||||
|
};
|
||||||
hullPosition: string;
|
hullPosition: string;
|
||||||
armor: {
|
armor: {
|
||||||
leftTrack:
|
leftTrack:
|
||||||
@@ -112,6 +117,7 @@ interface VehicleDefinitions {
|
|||||||
};
|
};
|
||||||
turrets0: {
|
turrets0: {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
|
rotationSpeed: number;
|
||||||
circularVisionRadius: number;
|
circularVisionRadius: number;
|
||||||
maxHealth: number;
|
maxHealth: number;
|
||||||
armor: VehicleDefinitionArmor;
|
armor: VehicleDefinitionArmor;
|
||||||
@@ -136,6 +142,13 @@ interface VehicleDefinitions {
|
|||||||
};
|
};
|
||||||
invisibilityFactorAtShot: number | number[];
|
invisibilityFactorAtShot: number | number[];
|
||||||
reloadTime: number;
|
reloadTime: number;
|
||||||
|
aimingTime?: number;
|
||||||
|
shotDispersionRadius: number;
|
||||||
|
shotDispersionFactors?: {
|
||||||
|
turretRotation: number;
|
||||||
|
afterShot: number;
|
||||||
|
whileGunDamaged: number;
|
||||||
|
};
|
||||||
maxAmmo: number;
|
maxAmmo: number;
|
||||||
extraPitchLimits?: {
|
extraPitchLimits?: {
|
||||||
front?: string;
|
front?: string;
|
||||||
@@ -177,6 +190,12 @@ interface GunDefinitionsList {
|
|||||||
ids: Record<string, number>;
|
ids: Record<string, number>;
|
||||||
shared: {
|
shared: {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
|
shotDispersionFactors: {
|
||||||
|
turretRotation: number;
|
||||||
|
afterShot: number;
|
||||||
|
whileGunDamaged: number;
|
||||||
|
};
|
||||||
|
aimingTime: number;
|
||||||
userString: string;
|
userString: string;
|
||||||
tags: string;
|
tags: string;
|
||||||
level: number;
|
level: number;
|
||||||
@@ -254,7 +273,7 @@ const consumableProvisionEffectSuffixes = [
|
|||||||
'Percent',
|
'Percent',
|
||||||
];
|
];
|
||||||
const blitzTankTypeToBlitzkrieg: Record<BlitzTankType, TankType> = {
|
const blitzTankTypeToBlitzkrieg: Record<BlitzTankType, TankType> = {
|
||||||
'AT-SPG': 'tank_destroyer',
|
'AT-SPG': 'tankDestroyer',
|
||||||
lightTank: 'light',
|
lightTank: 'light',
|
||||||
mediumTank: 'medium',
|
mediumTank: 'medium',
|
||||||
heavyTank: 'heavy',
|
heavyTank: 'heavy',
|
||||||
@@ -392,9 +411,9 @@ export async function definitions(production: boolean) {
|
|||||||
(tank.shortUserString
|
(tank.shortUserString
|
||||||
? strings[tank.shortUserString]
|
? strings[tank.shortUserString]
|
||||||
: undefined) ?? strings[tank.userString],
|
: undefined) ?? strings[tank.userString],
|
||||||
name_full: strings[tank.userString],
|
nameFull: strings[tank.userString],
|
||||||
nation,
|
nation,
|
||||||
tree_type: tankTags.includes('collectible')
|
treeType: tankTags.includes('collectible')
|
||||||
? 'collector'
|
? 'collector'
|
||||||
: (typeof tank.price === 'number' ? false : 'gold' in tank.price)
|
: (typeof tank.price === 'number' ? false : 'gold' in tank.price)
|
||||||
? 'premium'
|
? 'premium'
|
||||||
@@ -410,12 +429,15 @@ export async function definitions(production: boolean) {
|
|||||||
},
|
},
|
||||||
turrets: [],
|
turrets: [],
|
||||||
engines: [],
|
engines: [],
|
||||||
|
dispersion: {
|
||||||
|
move: defaultChassis.shotDispersionFactors.vehicleMovement,
|
||||||
|
traverse: defaultChassis.shotDispersionFactors.vehicleRotation,
|
||||||
|
},
|
||||||
|
traverseSpeed: defaultChassis.rotationSpeed,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (tankDefinitions[tankId].name === tankDefinitions[tankId].nameFull) {
|
||||||
tankDefinitions[tankId].name === tankDefinitions[tankId].name_full
|
delete tankDefinitions[tankId].nameFull;
|
||||||
) {
|
|
||||||
delete tankDefinitions[tankId].name_full;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
modelDefinitions[tankId] = {
|
modelDefinitions[tankId] = {
|
||||||
@@ -494,6 +516,7 @@ export async function definitions(production: boolean) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tankDefinitions[tankId].turrets.push({
|
tankDefinitions[tankId].turrets.push({
|
||||||
|
traverseSpeed: turret.rotationSpeed,
|
||||||
id: turretId,
|
id: turretId,
|
||||||
name:
|
name:
|
||||||
strings[turret.userString] ??
|
strings[turret.userString] ??
|
||||||
@@ -503,7 +526,7 @@ export async function definitions(production: boolean) {
|
|||||||
tier: turret.level as Tier,
|
tier: turret.level as Tier,
|
||||||
guns: [],
|
guns: [],
|
||||||
health: turret.maxHealth,
|
health: turret.maxHealth,
|
||||||
view_range: turret.circularVisionRadius,
|
viewRange: turret.circularVisionRadius,
|
||||||
});
|
});
|
||||||
|
|
||||||
modelDefinitions[tankId].turrets[turretId] = {
|
modelDefinitions[tankId].turrets[turretId] = {
|
||||||
@@ -567,6 +590,9 @@ export async function definitions(production: boolean) {
|
|||||||
: turretGunEntry.extraPitchLimits.transition.at(-1)!
|
: turretGunEntry.extraPitchLimits.transition.at(-1)!
|
||||||
: undefined;
|
: undefined;
|
||||||
const gunArmor: ModelArmor = { thickness: {} };
|
const gunArmor: ModelArmor = { thickness: {} };
|
||||||
|
const shotDispersionFactors =
|
||||||
|
turretGunEntry.shotDispersionFactors ??
|
||||||
|
gunListEntry.shotDispersionFactors;
|
||||||
|
|
||||||
Object.keys(turretGunEntry.armor)
|
Object.keys(turretGunEntry.armor)
|
||||||
.filter((name) => name.startsWith('armor_'))
|
.filter((name) => name.startsWith('armor_'))
|
||||||
@@ -599,6 +625,13 @@ export async function definitions(production: boolean) {
|
|||||||
typeof turretGunEntry.invisibilityFactorAtShot === 'number'
|
typeof turretGunEntry.invisibilityFactorAtShot === 'number'
|
||||||
? turretGunEntry.invisibilityFactorAtShot
|
? turretGunEntry.invisibilityFactorAtShot
|
||||||
: turretGunEntry.invisibilityFactorAtShot.at(-1)!,
|
: turretGunEntry.invisibilityFactorAtShot.at(-1)!,
|
||||||
|
aimTime: turretGunEntry.aimingTime ?? gunListEntry.aimingTime,
|
||||||
|
dispersion: {
|
||||||
|
base: turretGunEntry.shotDispersionRadius,
|
||||||
|
damaged: shotDispersionFactors.whileGunDamaged,
|
||||||
|
shot: shotDispersionFactors.afterShot,
|
||||||
|
traverse: shotDispersionFactors.turretRotation,
|
||||||
|
},
|
||||||
} as GunDefinition);
|
} as GunDefinition);
|
||||||
|
|
||||||
modelDefinitions[tankId].turrets[turretId].guns[gunId] = {
|
modelDefinitions[tankId].turrets[turretId].guns[gunId] = {
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ export default function SessionPage() {
|
|||||||
}
|
}
|
||||||
type="tank"
|
type="tank"
|
||||||
tankType={tankDefinitions?.type}
|
tankType={tankDefinitions?.type}
|
||||||
treeType={tankDefinitions?.tree_type}
|
treeType={tankDefinitions?.treeType}
|
||||||
stats={session.customColumns.map((customColumn) => {
|
stats={session.customColumns.map((customColumn) => {
|
||||||
const rowStat = rowStats[customColumn.display];
|
const rowStat = rowStats[customColumn.display];
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export function Characteristics() {
|
|||||||
{Math.round(engine.fire_chance * 100)}
|
{Math.round(engine.fire_chance * 100)}
|
||||||
</Info>
|
</Info>
|
||||||
<Info name="View range" unit="m">
|
<Info name="View range" unit="m">
|
||||||
{turret.view_range}
|
{turret.viewRange}
|
||||||
</Info>
|
</Info>
|
||||||
<Info name="Camouflage" unit="%" />
|
<Info name="Camouflage" unit="%" />
|
||||||
<Info indent name="Still">
|
<Info indent name="Still">
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ export function Title() {
|
|||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<Heading
|
<Heading
|
||||||
color={
|
color={
|
||||||
protagonist.tank.tree_type === 'premium'
|
protagonist.tank.treeType === 'premium'
|
||||||
? 'amber'
|
? 'amber'
|
||||||
: protagonist.tank.tree_type === 'collector'
|
: protagonist.tank.treeType === 'collector'
|
||||||
? 'blue'
|
? 'blue'
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ export function Title() {
|
|||||||
<Flex align="center" gap="2">
|
<Flex align="center" gap="2">
|
||||||
<img
|
<img
|
||||||
src={
|
src={
|
||||||
TREE_TYPE_ICONS[protagonist.tank.tree_type][
|
TREE_TYPE_ICONS[protagonist.tank.treeType][
|
||||||
protagonist.tank.type
|
protagonist.tank.type
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -29,7 +29,7 @@ export function CompactSearchResultRow({
|
|||||||
{TIER_ROMAN_NUMERALS[tank.tier]}
|
{TIER_ROMAN_NUMERALS[tank.tier]}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text color={tank.tree_type === 'collector' ? 'blue' : 'amber'}>
|
<Text color={tank.treeType === 'collector' ? 'blue' : 'amber'}>
|
||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<SmallTankIcon id={tank.id} size={16} />
|
<SmallTankIcon id={tank.id} size={16} />
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ export function CompactSearchResultRow({
|
|||||||
style={{
|
style={{
|
||||||
display: 'block',
|
display: 'block',
|
||||||
color:
|
color:
|
||||||
tank.tree_type === 'researchable' ? 'white' : undefined,
|
tank.treeType === 'researchable' ? 'white' : undefined,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{tank.name}
|
{tank.name}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export function TankSearch({ compact, onSelect = () => {} }: TankSearchProps) {
|
|||||||
: filters.types.includes(tank.type)) &&
|
: filters.types.includes(tank.type)) &&
|
||||||
(filters.treeTypes.length === 0
|
(filters.treeTypes.length === 0
|
||||||
? true
|
? true
|
||||||
: filters.treeTypes.includes(tank.tree_type)) &&
|
: filters.treeTypes.includes(tank.treeType)) &&
|
||||||
(filters.nations.length === 0
|
(filters.nations.length === 0
|
||||||
? true
|
? true
|
||||||
: filters.nations.includes(tank.nation)) &&
|
: filters.nations.includes(tank.nation)) &&
|
||||||
@@ -266,9 +266,9 @@ export function TankSearch({ compact, onSelect = () => {} }: TankSearchProps) {
|
|||||||
<Flex align="center" justify="center" gap="1">
|
<Flex align="center" justify="center" gap="1">
|
||||||
<img
|
<img
|
||||||
src={
|
src={
|
||||||
(tank.tree_type === 'collector'
|
(tank.treeType === 'collector'
|
||||||
? TANK_ICONS_COLLECTOR
|
? TANK_ICONS_COLLECTOR
|
||||||
: tank.tree_type === 'premium'
|
: tank.treeType === 'premium'
|
||||||
? TANK_ICONS_PREMIUM
|
? TANK_ICONS_PREMIUM
|
||||||
: TANK_ICONS)[tank.type]
|
: TANK_ICONS)[tank.type]
|
||||||
}
|
}
|
||||||
@@ -277,16 +277,16 @@ export function TankSearch({ compact, onSelect = () => {} }: TankSearchProps) {
|
|||||||
<Text
|
<Text
|
||||||
size="4"
|
size="4"
|
||||||
color={
|
color={
|
||||||
tank.tree_type === 'collector'
|
tank.treeType === 'collector'
|
||||||
? 'blue'
|
? 'blue'
|
||||||
: tank.tree_type === 'premium'
|
: tank.treeType === 'premium'
|
||||||
? 'amber'
|
? 'amber'
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
weight="medium"
|
weight="medium"
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
tank.tree_type === 'researchable'
|
tank.treeType === 'researchable'
|
||||||
? slateDark.slate12
|
? slateDark.slate12
|
||||||
: undefined,
|
: undefined,
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export const ownedTanksCommand: CommandRegistry = {
|
|||||||
name={tank.name}
|
name={tank.name}
|
||||||
tankType={tank.type}
|
tankType={tank.type}
|
||||||
image={tankIcon(tank.id)}
|
image={tankIcon(tank.id)}
|
||||||
treeType={tank.tree_type}
|
treeType={tank.treeType}
|
||||||
/>
|
/>
|
||||||
)),
|
)),
|
||||||
)}
|
)}
|
||||||
@@ -110,7 +110,7 @@ export const ownedTanksCommand: CommandRegistry = {
|
|||||||
name={tank.name}
|
name={tank.name}
|
||||||
tankType={tank.type}
|
tankType={tank.type}
|
||||||
image={tankIcon(tank.id)}
|
image={tankIcon(tank.id)}
|
||||||
treeType={tank.tree_type}
|
treeType={tank.treeType}
|
||||||
/>
|
/>
|
||||||
)),
|
)),
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
import { theme } from '../../../stitches.config';
|
import { theme } from '../../../stitches.config';
|
||||||
|
|
||||||
export const TANK_TYPES = [
|
export const TANK_TYPES = [
|
||||||
'tank_destroyer',
|
'tankDestroyer',
|
||||||
'light',
|
'light',
|
||||||
'medium',
|
'medium',
|
||||||
'heavy',
|
'heavy',
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { tankDefinitions } from '../blitzkrieg/tankDefinitions';
|
|||||||
export default async function getTreeType(id: number): Promise<TreeType> {
|
export default async function getTreeType(id: number): Promise<TreeType> {
|
||||||
const entry = (await tankDefinitions)[id];
|
const entry = (await tankDefinitions)[id];
|
||||||
|
|
||||||
if (entry.tree_type === 'collector') return 'collector';
|
if (entry.treeType === 'collector') return 'collector';
|
||||||
if (entry.tree_type === 'premium') return 'premium';
|
if (entry.treeType === 'premium') return 'premium';
|
||||||
|
|
||||||
return 'researchable';
|
return 'researchable';
|
||||||
}
|
}
|
||||||
@@ -18,8 +18,8 @@ export interface TankDefinition {
|
|||||||
health: number;
|
health: number;
|
||||||
nation: string;
|
nation: string;
|
||||||
name: string;
|
name: string;
|
||||||
name_full?: string;
|
nameFull?: string;
|
||||||
tree_type: TreeType;
|
treeType: TreeType;
|
||||||
consumables: number;
|
consumables: number;
|
||||||
provisions: number;
|
provisions: number;
|
||||||
tier: Tier;
|
tier: Tier;
|
||||||
@@ -33,6 +33,11 @@ export interface TankDefinition {
|
|||||||
moving: number;
|
moving: number;
|
||||||
onFire: number;
|
onFire: number;
|
||||||
};
|
};
|
||||||
|
traverseSpeed: number;
|
||||||
|
dispersion: {
|
||||||
|
move: number;
|
||||||
|
traverse: number;
|
||||||
|
};
|
||||||
equipment: string;
|
equipment: string;
|
||||||
}
|
}
|
||||||
export interface EngineDefinition {
|
export interface EngineDefinition {
|
||||||
@@ -46,33 +51,43 @@ export type TankDefinitionPrice =
|
|||||||
| { type: 'gold'; value: number };
|
| { type: 'gold'; value: number };
|
||||||
export interface TurretDefinition {
|
export interface TurretDefinition {
|
||||||
health: number;
|
health: number;
|
||||||
view_range: number;
|
viewRange: number;
|
||||||
|
traverseSpeed: number;
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
tier: Tier;
|
tier: Tier;
|
||||||
guns: GunDefinition[];
|
guns: GunDefinition[];
|
||||||
}
|
}
|
||||||
export type GunDefinition = GunDefinitionBase &
|
export type GunDefinition =
|
||||||
(GunDefinitionRegular | GunDefinitionAutoLoader | GunDefinitionAutoReloader);
|
| GunDefinitionRegular
|
||||||
|
| GunDefinitionAutoLoader
|
||||||
|
| GunDefinitionAutoReloader;
|
||||||
interface GunDefinitionBase {
|
interface GunDefinitionBase {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
tier: Tier;
|
tier: Tier;
|
||||||
shells: ShellDefinition[];
|
shells: ShellDefinition[];
|
||||||
camouflageLoss: number;
|
camouflageLoss: number;
|
||||||
|
aimTime: number;
|
||||||
|
dispersion: {
|
||||||
|
base: number;
|
||||||
|
traverse: number;
|
||||||
|
shot: number;
|
||||||
|
damaged: number;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
interface GunDefinitionRegular {
|
interface GunDefinitionRegular extends GunDefinitionBase {
|
||||||
type: 'regular';
|
type: 'regular';
|
||||||
reload: number;
|
reload: number;
|
||||||
}
|
}
|
||||||
interface GunDefinitionAutoLoader {
|
interface GunDefinitionAutoLoader extends GunDefinitionBase {
|
||||||
type: 'auto_loader';
|
type: 'autoLoader';
|
||||||
reload: number;
|
reload: number;
|
||||||
interClip: number;
|
interClip: number;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
interface GunDefinitionAutoReloader {
|
interface GunDefinitionAutoReloader extends GunDefinitionBase {
|
||||||
type: 'auto_reloader';
|
type: 'autoReloader';
|
||||||
reload: number[];
|
reload: number[];
|
||||||
interClip: number;
|
interClip: number;
|
||||||
count: number;
|
count: number;
|
||||||
@@ -93,8 +108,8 @@ export type ShellDefinition = {
|
|||||||
|
|
||||||
export const GUN_TYPE_NAMES: Record<GunDefinition['type'], string> = {
|
export const GUN_TYPE_NAMES: Record<GunDefinition['type'], string> = {
|
||||||
regular: 'Regular',
|
regular: 'Regular',
|
||||||
auto_loader: 'Auto loader',
|
autoLoader: 'Auto loader',
|
||||||
auto_reloader: 'Auto reloader',
|
autoReloader: 'Auto reloader',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const tankDefinitions = fetch(asset('definitions/tanks.json'), {
|
export const tankDefinitions = fetch(asset('definitions/tanks.json'), {
|
||||||
@@ -117,28 +132,28 @@ export const tankNames = tanksDefinitionsArray.then((tanks) =>
|
|||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
original: tank.name,
|
original: tank.name,
|
||||||
combined: `${tank.name}${deburr(tank.name)}${tank.name_full ? `${tank.name_full}${deburr(tank.name_full)}` : ''}`,
|
combined: `${tank.name}${deburr(tank.name)}${tank.nameFull ? `${tank.nameFull}${deburr(tank.nameFull)}` : ''}`,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
export const TANK_ICONS: Record<TankType, string> = {
|
export const TANK_ICONS: Record<TankType, string> = {
|
||||||
tank_destroyer: 'https://i.imgur.com/BIHSEH0.png',
|
tankDestroyer: 'https://i.imgur.com/BIHSEH0.png',
|
||||||
light: 'https://i.imgur.com/CSNha5V.png',
|
light: 'https://i.imgur.com/CSNha5V.png',
|
||||||
medium: 'https://i.imgur.com/wvf3ltm.png',
|
medium: 'https://i.imgur.com/wvf3ltm.png',
|
||||||
heavy: 'https://i.imgur.com/ECeqlZa.png',
|
heavy: 'https://i.imgur.com/ECeqlZa.png',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TANK_ICONS_PREMIUM: Record<TankType, string> = {
|
export const TANK_ICONS_PREMIUM: Record<TankType, string> = {
|
||||||
tank_destroyer: 'https://i.imgur.com/TCu3EdR.png',
|
tankDestroyer: 'https://i.imgur.com/TCu3EdR.png',
|
||||||
light: 'https://i.imgur.com/zdkpTRb.png',
|
light: 'https://i.imgur.com/zdkpTRb.png',
|
||||||
medium: 'https://i.imgur.com/3z7eHX6.png',
|
medium: 'https://i.imgur.com/3z7eHX6.png',
|
||||||
heavy: 'https://i.imgur.com/P3vbmyA.png',
|
heavy: 'https://i.imgur.com/P3vbmyA.png',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TANK_ICONS_COLLECTOR: Record<TankType, string> = {
|
export const TANK_ICONS_COLLECTOR: Record<TankType, string> = {
|
||||||
tank_destroyer: 'https://i.imgur.com/WTjeirB.png',
|
tankDestroyer: 'https://i.imgur.com/WTjeirB.png',
|
||||||
light: 'https://i.imgur.com/EwhtKkU.png',
|
light: 'https://i.imgur.com/EwhtKkU.png',
|
||||||
medium: 'https://i.imgur.com/u8YDMBh.png',
|
medium: 'https://i.imgur.com/u8YDMBh.png',
|
||||||
heavy: 'https://i.imgur.com/8xRf3nc.png',
|
heavy: 'https://i.imgur.com/8xRf3nc.png',
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ export async function filterStats(
|
|||||||
(filters.tier === undefined || entry.tier === filters.tier) &&
|
(filters.tier === undefined || entry.tier === filters.tier) &&
|
||||||
(filters.tankType === undefined || entry.type === filters.tankType) &&
|
(filters.tankType === undefined || entry.type === filters.tankType) &&
|
||||||
(filters.treeType === undefined ||
|
(filters.treeType === undefined ||
|
||||||
(filters.treeType === 'collector' && entry.tree_type === 'collector') ||
|
(filters.treeType === 'collector' && entry.treeType === 'collector') ||
|
||||||
(filters.treeType === 'premium' && entry.tree_type === 'premium') ||
|
(filters.treeType === 'premium' && entry.treeType === 'premium') ||
|
||||||
(filters.treeType === 'researchable' &&
|
(filters.treeType === 'researchable' &&
|
||||||
entry.tree_type === 'researchable')) &&
|
entry.treeType === 'researchable')) &&
|
||||||
(filters.tank === undefined || entry.id === filters.tank)
|
(filters.tank === undefined || entry.id === filters.tank)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user