Fixed toggled off spells showing in spell list
This commit is contained in:
@@ -10,8 +10,6 @@ export default function computeToggleDependencies(node, dependencyGraph){
|
||||
prop.enabled
|
||||
) return;
|
||||
walkDown(node.children, child => {
|
||||
// Only for children that aren't inactive
|
||||
if (child.node.inactive) return;
|
||||
// The child nodes depend on the toggle condition compuation
|
||||
child.node._computationDetails.toggleAncestors.push(prop);
|
||||
dependencyGraph.addLink(child.node._id, prop._id, 'toggle');
|
||||
|
||||
@@ -4,7 +4,7 @@ export default function evaluateToggles(computation, node){
|
||||
let toggles = prop._computationDetails?.toggleAncestors;
|
||||
if (!toggles) return;
|
||||
toggles.forEach(toggle => {
|
||||
if (prop.inactive || !toggle.condition) return;
|
||||
if (!toggle.condition) return;
|
||||
if (!toggle.condition.value){
|
||||
prop.inactive = true;
|
||||
prop.deactivatedByToggle = true;
|
||||
|
||||
Reference in New Issue
Block a user