feat: united duel data

This commit is contained in:
TrèsAbhi committed 2024-02-22 16:41:42 -06:00
1 parent da767213cb
commit 7e92f8ac50
23 files changed
+249 -249

No files matched your search

+4 -2
View File
@@ -1,10 +1,12 @@
import { EquipmentPreset } from '../core/blitzkrieg/equipmentDefinitions';
import { EquipmentMatrix } from '../stores/tankopedia';
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]);
return preset
.flat()
.map((options, index) => options[flatMatrix[index] == 1 ? 1 : 0]);
}