mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Refactor armoire content to be cached by day
This commit is contained in:
@@ -49,16 +49,17 @@ export function mountMasterProgress (mounts = {}) {
|
||||
|
||||
export function remainingGearInSet (userGear = {}, set) {
|
||||
const gear = filter(content.gear.flat, item => {
|
||||
const setMatches = item.klass === set;
|
||||
if (item.klass !== set) {
|
||||
return false;
|
||||
}
|
||||
const hasItem = userGear[item.key];
|
||||
if (has(item, 'released')) {
|
||||
return item.released && setMatches && !hasItem;
|
||||
return item.released && !hasItem;
|
||||
}
|
||||
return setMatches && !hasItem;
|
||||
return !hasItem;
|
||||
});
|
||||
|
||||
const count = size(gear);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user