Skip to content

Commit

Permalink
Merge branch 'fix-allow-AE-to-change-status-effects-on-create-delete-…
Browse files Browse the repository at this point in the history
…' into feat-add-Cepheus-Universal-Support
  • Loading branch information
marvin9257 committed Sep 18, 2024
2 parents 01a28cc + 7620118 commit 8c4d6ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/module/entities/TwodsixActiveEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ export class TwodsixActiveEffect extends ActiveEffect {
}

async function checkEncumbranceStatus (activeEffect:TwodsixActiveEffect):void {
if (activeEffect.statuses.size === 0) {
await applyEncumberedEffect(activeEffect.parent);
} else {
const notEncumbered= !activeEffect.statuses.has('encumbered');
const notWounded = !activeEffect.statuses.has('wounded');
if (notEncumbered && notWounded) {
if (game.settings.get('twodsix', 'useEncumbranceStatusIndicators')) {
if (activeEffect.statuses.size === 0) {
await applyEncumberedEffect(activeEffect.parent);
} else {
const notEncumbered= !activeEffect.statuses.has('encumbered');
const notWounded = !activeEffect.statuses.has('wounded');
if (notEncumbered && notWounded) {
await applyEncumberedEffect(activeEffect.parent);
}
}
}
}

0 comments on commit 8c4d6ec

Please sign in to comment.