Cleaned up uses of 'mode' for activeEffects in configs (#2076)

This commit is contained in:
WBHarry 2026-07-11 22:51:44 +02:00 committed by GitHub
parent 2c98070836
commit c6411ef0fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 315 additions and 260 deletions

View file

@ -315,15 +315,15 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
const beastformEffect = selected.effects.find(x => x.type === 'beastform');
for (const traitBonus of app.modifications.traitBonuses) {
const existingChange = beastformEffect.changes.find(
const existingChange = beastformEffect.system.changes.find(
x => x.key === `system.traits.${traitBonus.trait}.value`
);
if (existingChange) {
existingChange.value = Number.parseInt(existingChange.value) + traitBonus.bonus;
} else {
beastformEffect.changes.push({
beastformEffect.system.changes.push({
key: `system.traits.${traitBonus.trait}.value`,
mode: 2,
type: 'add',
priority: null,
value: traitBonus.bonus
});