mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-16 06:06:11 +01:00
sorting
This commit is contained in:
1 parent
8ec7fcb90a
commit
b00a63a9f8
19 files changed
+340
-736
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { characteristics } from "../config/characteristics";
|
||||
import { characteristicsGroups } from "../config/characteristicsGroups";
|
||||
import {
|
||||
CharacteristicType,
|
||||
type CharacteristicName,
|
||||
} from "../types/characteristics";
|
||||
|
||||
const sortableCharacteristicTypes = new Set<CharacteristicType>([
|
||||
CharacteristicType.Number,
|
||||
CharacteristicType.NumberList,
|
||||
]);
|
||||
|
||||
export const sortableCharacteristics = new Set<CharacteristicName>();
|
||||
|
||||
for (const group of characteristicsGroups) {
|
||||
for (const config of group.order) {
|
||||
if (!("name" in config)) continue;
|
||||
|
||||
// TODO: remove this when all characteristics are defined
|
||||
if (!(config.name in characteristics)) continue;
|
||||
|
||||
const item = characteristics[config.name];
|
||||
|
||||
if (!sortableCharacteristicTypes.has(item.type)) continue;
|
||||
|
||||
sortableCharacteristics.add(config.name);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user