mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: premium dpm
This commit is contained in:
1 parent
1dc85253c9
commit
bb561847ad
4 files changed
+34
-2
No files matched your search
@@ -43,7 +43,17 @@ export function Sort() {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
DPM
|
Standard DPM
|
||||||
|
</DropdownMenu.CheckboxItem>
|
||||||
|
<DropdownMenu.CheckboxItem
|
||||||
|
checked={sort.by === 'fire.dpmPremium'}
|
||||||
|
onClick={() => {
|
||||||
|
mutateTankopediaFilters((draft) => {
|
||||||
|
draft.sort.by = 'fire.dpmPremium';
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Premium DPM
|
||||||
</DropdownMenu.CheckboxItem>
|
</DropdownMenu.CheckboxItem>
|
||||||
<DropdownMenu.CheckboxItem
|
<DropdownMenu.CheckboxItem
|
||||||
checked={sort.by === 'fire.reload'}
|
checked={sort.by === 'fire.reload'}
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ export function TankCard({ tank, onSelect }: TankCardProps) {
|
|||||||
return gun.dispersion.base.toFixed(3);
|
return gun.dispersion.base.toFixed(3);
|
||||||
case 'fire.dpm':
|
case 'fire.dpm':
|
||||||
return resolveDpm(gun, shell0).toFixed(0);
|
return resolveDpm(gun, shell0).toFixed(0);
|
||||||
|
case 'fire.dpmPremium':
|
||||||
|
return shell1 ? resolveDpm(gun, shell1).toFixed(0) : '--';
|
||||||
case 'fire.reload':
|
case 'fire.reload':
|
||||||
return resolveReload(gun).toFixed(2);
|
return resolveReload(gun).toFixed(2);
|
||||||
case 'fire.standardPenetration':
|
case 'fire.standardPenetration':
|
||||||
|
|||||||
@@ -180,6 +180,24 @@ export const TankSearch = memo<TankSearchProps>(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'fire.dpmPremium':
|
||||||
|
sorted = filtered.sort(
|
||||||
|
(a, b) =>
|
||||||
|
(a.turrets.at(-1)!.guns.at(-1)!.shells[1]
|
||||||
|
? resolveDpm(
|
||||||
|
a.turrets.at(-1)!.guns.at(-1)!,
|
||||||
|
a.turrets.at(-1)!.guns.at(-1)!.shells[1],
|
||||||
|
)
|
||||||
|
: 0) -
|
||||||
|
(b.turrets.at(-1)!.guns.at(-1)!.shells[1]
|
||||||
|
? resolveDpm(
|
||||||
|
b.turrets.at(-1)!.guns.at(-1)!,
|
||||||
|
b.turrets.at(-1)!.guns.at(-1)!.shells[1],
|
||||||
|
)
|
||||||
|
: 0),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'fire.reload':
|
case 'fire.reload':
|
||||||
sorted = filtered.sort(
|
sorted = filtered.sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ export const SORT_NAMES = {
|
|||||||
'survivability.camouflageShooting': 'camouflage shooting',
|
'survivability.camouflageShooting': 'camouflage shooting',
|
||||||
'survivability.volume': 'volume',
|
'survivability.volume': 'volume',
|
||||||
'survivability.length': 'length',
|
'survivability.length': 'length',
|
||||||
'fire.dpm': 'DPM',
|
'fire.dpm': 'standard DPM',
|
||||||
|
'fire.dpmPremium': 'premium DPM',
|
||||||
'fire.reload': 'reload',
|
'fire.reload': 'reload',
|
||||||
'fire.caliber': 'caliber',
|
'fire.caliber': 'caliber',
|
||||||
'fire.standardPenetration': 'standard penetration',
|
'fire.standardPenetration': 'standard penetration',
|
||||||
@@ -143,6 +144,7 @@ export const SORT_UNITS: Record<TankopediaSortBy, string | undefined> = {
|
|||||||
'fire.dispersionMoving': 'm',
|
'fire.dispersionMoving': 'm',
|
||||||
'fire.dispersionStill': 'm',
|
'fire.dispersionStill': 'm',
|
||||||
'fire.dpm': undefined,
|
'fire.dpm': undefined,
|
||||||
|
'fire.dpmPremium': undefined,
|
||||||
'fire.gunDepression': '°',
|
'fire.gunDepression': '°',
|
||||||
'fire.gunElevation': '°',
|
'fire.gunElevation': '°',
|
||||||
'fire.premiumPenetration': 'mm',
|
'fire.premiumPenetration': 'mm',
|
||||||
|
|||||||
Reference in new issue
Block a user