mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
13 lines
334 B
TypeScript
13 lines
334 B
TypeScript
import { EquipmentPreset } from '@blitzkit/core';
|
|
import { 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]);
|
|
}
|