mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Updated migrations
This commit is contained in:
parent
33fb7bcc69
commit
cd4a8069fc
2 changed files with 8 additions and 35 deletions
|
|
@ -153,10 +153,8 @@ export default class DHArmor extends AttachableItem {
|
|||
|
||||
/** @inheritDoc */
|
||||
static migrateDocumentData(source) {
|
||||
if (source.system.baseScore !== undefined && !source.effects.some(x => x.type === 'armor')) {
|
||||
if (!source.flags) source.flags = {};
|
||||
if (!source.flags.daggerheart) source.flags.daggerheart = {};
|
||||
source.flags.daggerheart.baseScoreMigrationValue = source.system.baseScore;
|
||||
if (!source.system.armor) {
|
||||
source.system.armor = { current: source.system.marks ?? 0, max: source.system.baseScore ?? 0 };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue