mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +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
|
||||
checked={sort.by === 'fire.reload'}
|
||||
|
||||
@@ -51,6 +51,8 @@ export function TankCard({ tank, onSelect }: TankCardProps) {
|
||||
return gun.dispersion.base.toFixed(3);
|
||||
case 'fire.dpm':
|
||||
return resolveDpm(gun, shell0).toFixed(0);
|
||||
case 'fire.dpmPremium':
|
||||
return shell1 ? resolveDpm(gun, shell1).toFixed(0) : '--';
|
||||
case 'fire.reload':
|
||||
return resolveReload(gun).toFixed(2);
|
||||
case 'fire.standardPenetration':
|
||||
|
||||
@@ -180,6 +180,24 @@ export const TankSearch = memo<TankSearchProps>(
|
||||
);
|
||||
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':
|
||||
sorted = filtered.sort(
|
||||
(a, b) =>
|
||||
|
||||
Reference in new issue
Block a user