mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
13 lines
348 B
TypeScript
13 lines
348 B
TypeScript
import { EquipmentPreset } from '@blitzkit/core';
|
|
import type { EquipmentMatrix } from '../stores/duel';
|
|
|
|
export function useAppliedEquipments(
|
|
matrix: EquipmentMatrix,
|
|
preset: EquipmentPreset,
|
|
) {
|
|
const flatMatrix = matrix.flat();
|
|
return preset.slots.map(
|
|
(options, index) => options[flatMatrix[index] == 1 ? 'right' : 'left'],
|
|
);
|
|
}
|