mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: united duel data
This commit is contained in:
1 parent
da767213cb
commit
7e92f8ac50
23 files changed
+249
-249
No files matched your search
@@ -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]);
|
||||
}
|
||||
Reference in new issue
Block a user