Fixed properties not being made inactive by toggles

This commit is contained in:
Stefan Zermatten
2021-03-02 13:56:53 +02:00
parent 89adda60ec
commit 2c0496b44b
8 changed files with 49 additions and 37 deletions

View File

@@ -3,4 +3,10 @@ import applyToggles from '/imports/api/creature/computation/engine/applyToggles.
export default function computeConstant(constant, memo){
// Apply any toggles
applyToggles(constant, memo);
if (constant.deactivatedByToggle) return;
if (
!memo.constantsByVariableName[constant.variableName]
){
memo.constantsByVariableName[constant.variableName] = constant
}
}