mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-06 08:13:09 +01:00
Compare commits
15
Commits
7e086cc639
...
f837aaf40a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f837aaf40a | ||
|
|
86e080aae9 | ||
|
|
57efde83df | ||
|
|
6b29584424 | ||
|
|
71e40a0113 | ||
|
|
b5e7170697 | ||
|
|
4122856024 | ||
|
|
5b4c85138e | ||
|
|
727ced967b | ||
|
|
4462ebe82c | ||
|
|
06ce263668 | ||
|
|
b6d6fa7212 | ||
|
|
dfa8be63b4 | ||
|
|
9eb6acc624 | ||
|
|
b6204b1c2c |
No files matched your search
@@ -26,8 +26,8 @@
|
||||
|
||||
"shells": {
|
||||
"ap": "AP",
|
||||
"apcr": "APCR",
|
||||
"heat": "HEAT",
|
||||
"ap_cr": "APCR",
|
||||
"hc": "HEAT",
|
||||
"he": "HE"
|
||||
},
|
||||
|
||||
@@ -759,11 +759,13 @@
|
||||
"count_singular": "1 tank",
|
||||
"count_plural": "{count} tanks",
|
||||
"sorting_by": "Sorting by {name}",
|
||||
|
||||
"no_tanks_found": {
|
||||
"body": "No tanks found.",
|
||||
"search_again": "Try searching again.",
|
||||
"clear_filters": "Try clearing filters."
|
||||
},
|
||||
|
||||
"sort": {
|
||||
"meta.none": "none",
|
||||
"survivability.health": "health",
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -429,7 +429,7 @@ export const TankSearch = memo<TankSearchProps>(
|
||||
}, [tankFilters, tankopediaSort]);
|
||||
|
||||
return (
|
||||
<Flex direction="column" gap="4" flexGrow="1" {...props}>
|
||||
<Flex direction="column" gap="2" flexGrow="1" {...props}>
|
||||
<SearchBar
|
||||
skeleton={skeleton}
|
||||
topResult={tanks?.[0]}
|
||||
|
||||
+2
-2
@@ -108,10 +108,10 @@ export function CustomShellButton() {
|
||||
{strings.common.shells.ap}
|
||||
</Select.Item>
|
||||
<Select.Item value={`${ShellType.APCR}`}>
|
||||
{strings.common.shells.apcr}
|
||||
{strings.common.shells.ap_cr}
|
||||
</Select.Item>
|
||||
<Select.Item value={`${ShellType.HEAT}`}>
|
||||
{strings.common.shells.heat}
|
||||
{strings.common.shells.hc}
|
||||
</Select.Item>
|
||||
<Select.Item value={`${ShellType.HE}`}>
|
||||
{strings.common.shells.he}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import type { TankDefinition } from "@blitzkit/core";
|
||||
import { checkConsumableProvisionInclusivity } from "@blitzkit/core/src/blitzkit/checkConsumableProvisionInclusivity";
|
||||
import { times } from "lodash-es";
|
||||
import { awaitableConsumableDefinitions } from "../../core/awaitables/consumableDefinitions";
|
||||
import type { TankFilters } from "../../stores/tankFilters";
|
||||
|
||||
const SHELLS = times(3, (index) => index);
|
||||
|
||||
const consumableDefinitions = await awaitableConsumableDefinitions;
|
||||
|
||||
export async function filterTank(
|
||||
filters: TankFilters,
|
||||
tank: TankDefinition,
|
||||
@@ -40,6 +44,18 @@ export async function filterTank(
|
||||
gun.shells[index].type === filters.shells[index]
|
||||
)
|
||||
)
|
||||
)
|
||||
) &&
|
||||
(filters.consumables.length === 0 ||
|
||||
filters.consumables.every((consumableId) =>
|
||||
tank.turrets.some((turret) =>
|
||||
turret.guns.some((gun) =>
|
||||
checkConsumableProvisionInclusivity(
|
||||
consumableDefinitions.consumables[consumableId],
|
||||
tank,
|
||||
gun
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
);
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export interface TankFilters {
|
||||
searching: boolean;
|
||||
gunType: CaseType<GunDefinition>[];
|
||||
shells: [ShellType | null, ShellType | null, ShellType | null];
|
||||
consumables: number[];
|
||||
|
||||
showTesting: boolean;
|
||||
showNonTesting: boolean;
|
||||
@@ -37,6 +38,7 @@ export const TankFilters = new Varuna<TankFilters>({
|
||||
searching: false,
|
||||
gunType: [],
|
||||
shells: [null, null, null],
|
||||
consumables: [],
|
||||
|
||||
showTesting: true,
|
||||
showNonTesting: true,
|
||||
|
||||
Reference in new issue
Block a user