feat: generalized include check

This commit is contained in:
TrèsAbhi committed 2024-01-26 12:58:41 -06:00
1 parent ba7e772e56
commit 5405da365b
3 files changed
+10 -3

No files matched your search

@@ -30,7 +30,6 @@ export function Provisions() {
<Flex>
{provisionsList.map((provision, index) => {
if (provision.id === 113) return null; // goofy useless provision
const selected = provisions.includes(provision.id);
return (
+9 -1
View File
@@ -38,7 +38,15 @@ export default function Page({ params }: { params: { id: string } }) {
mutateTankopediaTemporary((draft) => {
draft.model.pose.yaw = 0;
draft.model.pose.pitch = 0;
draft.mode = 'armor';
draft.mode = 'model';
draft.consumables = [];
draft.provisions = [];
draft.camouflage = false;
draft.equipmentMatrix = [
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
];
});
function handleKeyDown(event: KeyboardEvent) {
@@ -43,5 +43,5 @@ export function checkConsumableProvisionInclusivity(
}
});
return included && !excluded;
return consumableProvision.include.length > 0 && included && !excluded;
}