mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: module damage
This commit is contained in:
1 parent
3b933f2cbc
commit
e4a35600a4
4 files changed
+22
No files matched your search
@@ -108,6 +108,14 @@ export function Sort() {
|
|||||||
>
|
>
|
||||||
Damage
|
Damage
|
||||||
</DropdownMenu.CheckboxItem>
|
</DropdownMenu.CheckboxItem>
|
||||||
|
<DropdownMenu.CheckboxItem
|
||||||
|
checked={tankopediaSort.by === 'fire.moduleDamage'}
|
||||||
|
onClick={() => {
|
||||||
|
$tankopediaSort.setKey('by', 'fire.moduleDamage');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Module damage
|
||||||
|
</DropdownMenu.CheckboxItem>
|
||||||
<DropdownMenu.CheckboxItem
|
<DropdownMenu.CheckboxItem
|
||||||
checked={tankopediaSort.by === 'fire.shellVelocity'}
|
checked={tankopediaSort.by === 'fire.shellVelocity'}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ export function TankCard({ tank, onSelect }: TankCardProps) {
|
|||||||
return shell0.caliber.toFixed(0);
|
return shell0.caliber.toFixed(0);
|
||||||
case 'fire.damage':
|
case 'fire.damage':
|
||||||
return shell0.armor_damage.toFixed(0);
|
return shell0.armor_damage.toFixed(0);
|
||||||
|
case 'fire.moduleDamage':
|
||||||
|
return shell0.armor_damage.toFixed(0);
|
||||||
case 'fire.dispersionMoving':
|
case 'fire.dispersionMoving':
|
||||||
return tracks.dispersion_move.toFixed(3);
|
return tracks.dispersion_move.toFixed(3);
|
||||||
case 'fire.dispersionStill':
|
case 'fire.dispersionStill':
|
||||||
|
|||||||
@@ -255,6 +255,16 @@ export const TankSearch = memo<TankSearchProps>(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'fire.moduleDamage':
|
||||||
|
sorted = filtered.sort(
|
||||||
|
(a, b) =>
|
||||||
|
a.turrets.at(-1)!.guns.at(-1)!.gun_type!.value.base.shells[0]
|
||||||
|
.module_damage -
|
||||||
|
b.turrets.at(-1)!.guns.at(-1)!.gun_type!.value.base.shells[0]
|
||||||
|
.module_damage,
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'fire.shellVelocity':
|
case 'fire.shellVelocity':
|
||||||
sorted = filtered.sort(
|
sorted = filtered.sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export const SORT_UNITS: Record<TankopediaSortBy, string | undefined> = {
|
|||||||
'fire.aimTime': 's',
|
'fire.aimTime': 's',
|
||||||
'fire.caliber': 'mm',
|
'fire.caliber': 'mm',
|
||||||
'fire.damage': 'hp',
|
'fire.damage': 'hp',
|
||||||
|
'fire.moduleDamage': 'hp',
|
||||||
'fire.dispersionMoving': 'm',
|
'fire.dispersionMoving': 'm',
|
||||||
'fire.dispersionStill': 'm',
|
'fire.dispersionStill': 'm',
|
||||||
'fire.dpm': undefined,
|
'fire.dpm': undefined,
|
||||||
@@ -47,6 +48,7 @@ export const SORT_NAMES = {
|
|||||||
'fire.standardPenetration': 'standard penetration',
|
'fire.standardPenetration': 'standard penetration',
|
||||||
'fire.premiumPenetration': 'premium penetration',
|
'fire.premiumPenetration': 'premium penetration',
|
||||||
'fire.damage': 'damage',
|
'fire.damage': 'damage',
|
||||||
|
'fire.moduleDamage': 'module damage',
|
||||||
'fire.shellVelocity': 'shell velocity',
|
'fire.shellVelocity': 'shell velocity',
|
||||||
'fire.shellRange': 'shell range',
|
'fire.shellRange': 'shell range',
|
||||||
'fire.shellCapacity': 'shell capacity',
|
'fire.shellCapacity': 'shell capacity',
|
||||||
|
|||||||
Reference in new issue
Block a user