Improvements to level up and slot fill
- class level refs work with level up - Improve UI - Fixed level up backfill repeating levels when selecting higher levels multiple times - Allowed user to ignore slot fill condition - Auto load more if many disabled fillers
This commit is contained in:
@@ -18,23 +18,31 @@ export default function getSlotFillFilter({ slot, libraryIds }) {
|
||||
}]
|
||||
});
|
||||
} else if (slot.type === 'class') {
|
||||
filter.$and.push({
|
||||
$or: [{
|
||||
type: 'classLevel',
|
||||
}, {
|
||||
slotFillerType: 'classLevel',
|
||||
}]
|
||||
});
|
||||
const classLevelFilter = {
|
||||
type: 'classLevel',
|
||||
};
|
||||
const slotFillerFilter = {
|
||||
slotFillerType: 'classLevel',
|
||||
};
|
||||
|
||||
// Match variable name or tags
|
||||
if (slot.variableName) {
|
||||
filter.variableName = slot.variableName;
|
||||
classLevelFilter.variableName = slot.variableName;
|
||||
slotFillerFilter.libraryTags = slot.variableName;
|
||||
}
|
||||
|
||||
// Only search for levels the class needs
|
||||
if (slot.missingLevels && slot.missingLevels.length) {
|
||||
filter.level = { $in: slot.missingLevels };
|
||||
classLevelFilter.level = { $in: slot.missingLevels };
|
||||
slotFillerFilter['cache.node.level'] = { $in: slot.missingLevels };
|
||||
} else {
|
||||
filter.level = { $gt: slot.level || 0 };
|
||||
classLevelFilter.level = { $gt: slot.level || 0 };
|
||||
slotFillerFilter['cache.node.level'] = { $gt: slot.level || 0 };
|
||||
}
|
||||
|
||||
filter.$and.push({
|
||||
$or: [classLevelFilter, slotFillerFilter]
|
||||
});
|
||||
}
|
||||
let tagsOr = [];
|
||||
let tagsNin = [];
|
||||
|
||||
@@ -105,6 +105,8 @@ function insertPropertyFromNode(nodeId, ancestors, order) {
|
||||
|
||||
// Convert all references into actual nodes
|
||||
nodes = reifyNodeReferences(nodes);
|
||||
// Refetch the root node, it might have been reified
|
||||
node = nodes[0] || node;
|
||||
|
||||
// set libraryNodeIds
|
||||
storeLibraryNodeReferences(nodes);
|
||||
|
||||
Reference in New Issue
Block a user