Skip to content

Commit

Permalink
migrate ammunition damage modifier to number
Browse files Browse the repository at this point in the history
  • Loading branch information
Stexinator committed Aug 25, 2024
1 parent de721bd commit 6a860f6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions script/data/item/ammunitionData.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,15 @@ export default class AmmunitionData extends EquipmentItemData {
}
}

/** @inheritdoc */
static migrateData(source) {
super.migrateData(source);

this.migrateDamageModifier(source);
}

static migrateDamageModifier(source) {
source.effect.damage.modifier = parseInt(source.effect.damage?.modifier) || 0;
}

}

0 comments on commit 6a860f6

Please sign in to comment.