feat: enable gamemode exclusive

This commit is contained in:
TrèsAbhi committed 2026-01-02 11:32:27 -06:00
1 parent ee5461a297
commit 9df5efa422
2 files changed
+3 -16

No files matched your search

@@ -11,9 +11,7 @@ export function checkConsumableProvisionInclusivity(
tank: TankDefinition, tank: TankDefinition,
gun: GunDefinition gun: GunDefinition
) { ) {
const included = const included = consumableProvision.include?.every((rule) => {
!consumableProvision.game_mode_exclusive &&
consumableProvision.include?.every((rule) => {
switch (rule.filter_type!.$case) { switch (rule.filter_type!.$case) {
case "tiers": case "tiers":
return ( return (
@@ -31,9 +29,7 @@ export function checkConsumableProvisionInclusivity(
throw new SyntaxError("Category filtering found in include rule"); throw new SyntaxError("Category filtering found in include rule");
} }
}); });
const excluded = const excluded = consumableProvision.exclude?.some((rule) => {
consumableProvision.game_mode_exclusive ||
consumableProvision.exclude?.some((rule) => {
switch (rule.filter_type!.$case) { switch (rule.filter_type!.$case) {
case "tiers": case "tiers":
return ( return (
@@ -57,10 +53,5 @@ export function checkConsumableProvisionInclusivity(
} }
}); });
return ( return consumableProvision.include?.length > 0 && included && !excluded;
!consumableProvision.game_mode_exclusive &&
consumableProvision.include?.length > 0 &&
included &&
!excluded
);
} }
@@ -1557,7 +1557,6 @@ export async function definitions() {
const includeRaw = consumable.vehicleFilter?.include.vehicle; const includeRaw = consumable.vehicleFilter?.include.vehicle;
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle; const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
if (!entry.game_mode_exclusive) {
if (includeRaw) { if (includeRaw) {
entry.include = []; entry.include = [];
@@ -1639,7 +1638,6 @@ export async function definitions() {
}); });
} }
} }
}
}); });
Object.entries(provisions).forEach(([key, provision]) => { Object.entries(provisions).forEach(([key, provision]) => {
@@ -1657,7 +1655,6 @@ export async function definitions() {
const includeRaw = provision.vehicleFilter?.include.vehicle; const includeRaw = provision.vehicleFilter?.include.vehicle;
const excludeRaw = provision.vehicleFilter?.exclude?.vehicle; const excludeRaw = provision.vehicleFilter?.exclude?.vehicle;
if (!entry.game_mode_exclusive) {
if (includeRaw) { if (includeRaw) {
entry.include = []; entry.include = [];
@@ -1739,7 +1736,6 @@ export async function definitions() {
}); });
} }
} }
}
if (provision.script.bonusValues?.crewLevelIncrease !== undefined) { if (provision.script.bonusValues?.crewLevelIncrease !== undefined) {
provisionDefinitions.provisions[provision.id].crew = provisionDefinitions.provisions[provision.id].crew =