mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: some linting for new proto 2
This commit is contained in:
1 parent
94f67e30f1
commit
79bc259565
22 files changed
+183
-163
No files matched your search
@@ -1,12 +1,12 @@
|
||||
import { EquipmentPreset } from '@blitzkit/core';
|
||||
import { EquipmentMatrix } from '../stores/duel';
|
||||
import type { EquipmentMatrix } from '../stores/duel';
|
||||
|
||||
export function useAppliedEquipments(
|
||||
matrix: EquipmentMatrix,
|
||||
preset: EquipmentPreset,
|
||||
) {
|
||||
const flatMatrix = matrix.flat();
|
||||
return preset
|
||||
.flat()
|
||||
.map((options, index) => options[flatMatrix[index] == 1 ? 1 : 0]);
|
||||
return preset.slots.map(
|
||||
(options, index) => options[flatMatrix[index] == 1 ? 'right' : 'left'],
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import { averageDefinitions, discoveredIdsDefinitions } from '@blitzkit/core';
|
||||
import {
|
||||
fetchAverageDefinitions,
|
||||
fetchDiscoveredIdsDefinitions,
|
||||
} from '@blitzkit/core';
|
||||
|
||||
const awaitedDiscoveredIdsDefinitions = await discoveredIdsDefinitions;
|
||||
const awaitedAverageDefinitions = await averageDefinitions;
|
||||
const awaitedDiscoveredIdsDefinitions = await fetchDiscoveredIdsDefinitions();
|
||||
const awaitedAverageDefinitions = await fetchAverageDefinitions();
|
||||
|
||||
export function useAveragesExclusionRatio() {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { equipmentDefinitions } from '@blitzkit/core';
|
||||
import { fetchEquipmentDefinitions } from '@blitzkit/core';
|
||||
import { useAwait } from './useAwait';
|
||||
|
||||
const equipmentDefinitions = useAwait(fetchEquipmentDefinitions());
|
||||
|
||||
export function useEquipmentPreset(preset: string) {
|
||||
const awaitedEquipmentDefinitions = useAwait(equipmentDefinitions);
|
||||
return awaitedEquipmentDefinitions.presets[preset];
|
||||
return equipmentDefinitions.presets[preset];
|
||||
}
|
||||
Reference in new issue
Block a user