mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: shell capacity
This commit is contained in:
1 parent
c4fa6cebfa
commit
3da154b75d
9 files changed
+52
-1
No files matched your search
@@ -157,6 +157,12 @@ export function Body({ stats }: BodyProps) {
|
||||
value="shellRange"
|
||||
decimals={0}
|
||||
/>
|
||||
<CompareRow
|
||||
stats={stats}
|
||||
name="Shell capacity"
|
||||
value="shellCapacity"
|
||||
decimals={0}
|
||||
/>
|
||||
<CompareRow
|
||||
stats={stats}
|
||||
name="Aim time"
|
||||
|
||||
@@ -124,6 +124,14 @@ export function Sort() {
|
||||
>
|
||||
Shell range
|
||||
</DropdownMenu.CheckboxItem>
|
||||
<DropdownMenu.CheckboxItem
|
||||
checked={tankopediaSort.by === 'fire.shellCapacity'}
|
||||
onClick={() => {
|
||||
$tankopediaSort.setKey('by', 'fire.shellCapacity');
|
||||
}}
|
||||
>
|
||||
Shell capacity
|
||||
</DropdownMenu.CheckboxItem>
|
||||
<DropdownMenu.CheckboxItem
|
||||
checked={tankopediaSort.by === 'fire.aimTime'}
|
||||
onClick={() => {
|
||||
|
||||
@@ -275,6 +275,16 @@ export const TankSearch = memo<TankSearchProps>(
|
||||
);
|
||||
break;
|
||||
|
||||
case 'fire.shellCapacity':
|
||||
sorted = filtered.sort(
|
||||
(a, b) =>
|
||||
a.turrets.at(-1)!.guns.at(-1)!.gun_type!.value.base
|
||||
.shell_capacity -
|
||||
b.turrets.at(-1)!.guns.at(-1)!.gun_type!.value.base
|
||||
.shell_capacity,
|
||||
);
|
||||
break;
|
||||
|
||||
case 'fire.aimTime':
|
||||
sorted = filtered.sort(
|
||||
(a, b) =>
|
||||
|
||||
+3
-1
@@ -329,10 +329,12 @@ export function Characteristics() {
|
||||
<InfoWithDelta name="Shell velocity" unit="m/s" decimals={0}>
|
||||
{stats.shellVelocity}
|
||||
</InfoWithDelta>
|
||||
|
||||
<InfoWithDelta name="Shell range" unit="m/s" decimals={0}>
|
||||
{stats.shellRange}
|
||||
</InfoWithDelta>
|
||||
<InfoWithDelta name="Shell capacity" unit="m/s" decimals={0}>
|
||||
{stats.shellCapacity}
|
||||
</InfoWithDelta>
|
||||
<InfoWithDelta
|
||||
decimals={2}
|
||||
name="Aim time"
|
||||
|
||||
@@ -506,6 +506,7 @@ export function tankCharacteristics(
|
||||
const shellRicochet = isExplosive(shell.type) ? undefined : shell.ricochet;
|
||||
const crewCount = tank.crew.length;
|
||||
const shellRange = shell.range;
|
||||
const shellCapacity = gun.gun_type!.value.base.shell_capacity;
|
||||
|
||||
return {
|
||||
crewCount,
|
||||
@@ -570,5 +571,6 @@ export function tankCharacteristics(
|
||||
length,
|
||||
volume,
|
||||
shellRange,
|
||||
shellCapacity,
|
||||
};
|
||||
}
|
||||
@@ -16,6 +16,7 @@ export const SORT_UNITS: Record<TankopediaSortBy, string | undefined> = {
|
||||
'fire.reload': 's',
|
||||
'fire.shellVelocity': 'm/s',
|
||||
'fire.shellRange': 'm',
|
||||
'fire.shellCapacity': undefined,
|
||||
'fire.standardPenetration': 'mm',
|
||||
'maneuverability.backwardsSpeed': 'kph',
|
||||
'maneuverability.forwardsSpeed': 'kph',
|
||||
@@ -48,6 +49,7 @@ export const SORT_NAMES = {
|
||||
'fire.damage': 'damage',
|
||||
'fire.shellVelocity': 'shell velocity',
|
||||
'fire.shellRange': 'shell range',
|
||||
'fire.shellCapacity': 'shell capacity',
|
||||
'fire.aimTime': 'aim time',
|
||||
'fire.dispersionStill': 'dispersion still',
|
||||
'fire.dispersionMoving': 'dispersion moving',
|
||||
|
||||
Reference in new issue
Block a user