mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: provision filtering
This commit is contained in:
1 parent
5bbe93bcec
commit
8f8c91e0b0
7 files changed
+123
-24
No files matched your search
@@ -15,6 +15,9 @@ export function checkConsumableProvisionInclusivity(
|
||||
case 'ids':
|
||||
return rule.ids.includes(tank.id);
|
||||
|
||||
case 'nation':
|
||||
return rule.nations.includes(tank.nation);
|
||||
|
||||
case 'category':
|
||||
throw new SyntaxError('Category filtering found in include rule');
|
||||
}
|
||||
@@ -27,6 +30,9 @@ export function checkConsumableProvisionInclusivity(
|
||||
case 'ids':
|
||||
return rule.ids.includes(tank.id);
|
||||
|
||||
case 'nation':
|
||||
return rule.nations.includes(tank.nation);
|
||||
|
||||
case 'category':
|
||||
return rule.categories.some((category) => {
|
||||
switch (category) {
|
||||
|
||||
@@ -15,6 +15,10 @@ export type TankFilterDefinition =
|
||||
| {
|
||||
type: 'category';
|
||||
categories: TankFilterDefinitionCategory[];
|
||||
}
|
||||
| {
|
||||
type: 'nation';
|
||||
nations: string[];
|
||||
};
|
||||
|
||||
export interface ConsumableEntry {
|
||||
|
||||
Reference in new issue
Block a user