Overhauled computations to allow for toggles :'( that sucked
This commit is contained in:
11
app/imports/api/creature/computation/applyToggles.js
Normal file
11
app/imports/api/creature/computation/applyToggles.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import computeToggle from '/imports/api/creature/computation/computeToggle.js';
|
||||
|
||||
export default function applyToggles(prop, memo){
|
||||
prop.computationDetails.toggleAncestors.forEach(toggleId => {
|
||||
let toggle = memo.togglesById[toggleId];
|
||||
computeToggle(toggle, memo);
|
||||
if (!toggle.toggleResult){
|
||||
prop.computationDetails.disabledByToggle = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user