mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
[Fix] Cleanup RangeDependant (#2039)
* Made the RangeDependent setting for ActiveEffects Nullable * Removed all RangeDependent data from SRD where enabled was false before * Fixed random flickerfly SRD
This commit is contained in:
parent
2782b62793
commit
b2eeed7bb7
280 changed files with 1692 additions and 3605 deletions
|
|
@ -57,11 +57,6 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
|
|||
description: new fields.HTMLField({ label: 'DAGGERHEART.GENERAL.description' })
|
||||
}),
|
||||
rangeDependence: new fields.SchemaField({
|
||||
enabled: new fields.BooleanField({
|
||||
required: true,
|
||||
initial: false,
|
||||
label: 'DAGGERHEART.GENERAL.enabled'
|
||||
}),
|
||||
type: new fields.StringField({
|
||||
required: true,
|
||||
choices: CONFIG.DH.GENERAL.rangeInclusion,
|
||||
|
|
@ -80,7 +75,7 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
|
|||
initial: CONFIG.DH.GENERAL.range.melee.id,
|
||||
label: 'DAGGERHEART.GENERAL.range'
|
||||
})
|
||||
}),
|
||||
}, { nullable: true, initial: null }),
|
||||
stacking: new fields.SchemaField(
|
||||
{
|
||||
value: new fields.NumberField({
|
||||
|
|
@ -146,14 +141,8 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
|
|||
description: '',
|
||||
transfer: options.transfer,
|
||||
statuses: [],
|
||||
changes: [],
|
||||
system: {
|
||||
rangeDependence: {
|
||||
enabled: false,
|
||||
type: CONFIG.DH.GENERAL.rangeInclusion.withinRange.id,
|
||||
target: CONFIG.DH.GENERAL.otherTargetTypes.hostile.id,
|
||||
range: CONFIG.DH.GENERAL.range.melee.id
|
||||
}
|
||||
changes: []
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -185,4 +174,12 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
|
|||
if (this.parent.actor && options.scrollingTextData)
|
||||
this.parent.actor.queueScrollText(options.scrollingTextData);
|
||||
}
|
||||
|
||||
static migrateData(source) {
|
||||
if (source.rangeDependence?.enabled === false) {
|
||||
source.rangeDependence = null;
|
||||
}
|
||||
|
||||
return super.migrateData(source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue