mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Fix] Subclass Links (#1069)
* Attempt at making subclass aware of its class * Update compendium classes/subclasses * Fixed multiclass * Update compenidum browser subclass class filter * Added migration for subclass.linkedClass * Using foundry's isNewer function rather than custom one * Added migration for existing actor features --------- Co-authored-by: Dapoolp <elcatnet@gmail.com>
This commit is contained in:
parent
0b2694b007
commit
46ea4addd0
41 changed files with 479 additions and 391 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { emitAsGM, GMUpdateEvent } from '../systemRegistration/socket.mjs';
|
||||
import { LevelOptionType } from '../data/levelTier.mjs';
|
||||
import DHFeature from '../data/item/feature.mjs';
|
||||
import { damageKeyToNumber, versionCompare } from '../helpers/utils.mjs';
|
||||
import { damageKeyToNumber } from '../helpers/utils.mjs';
|
||||
import DhCompanionLevelUp from '../applications/levelup/companionLevelup.mjs';
|
||||
|
||||
export default class DhpActor extends Actor {
|
||||
|
|
@ -164,10 +164,10 @@ export default class DhpActor extends Actor {
|
|||
if (multiclass) {
|
||||
const multiclassItem = this.items.find(x => x.uuid === multiclass.itemUuid);
|
||||
const multiclassFeatures = this.items.filter(
|
||||
x => x.system.originItemType === 'class' && x.system.identifier === 'multiclass'
|
||||
x => x.system.originItemType === 'class' && x.system.multiclassOrigin
|
||||
);
|
||||
const subclassFeatures = this.items.filter(
|
||||
x => x.system.originItemType === 'subclass' && x.system.identifier === 'multiclass'
|
||||
x => x.system.originItemType === 'subclass' && x.system.multiclassOrigin
|
||||
);
|
||||
|
||||
this.deleteEmbeddedDocuments(
|
||||
|
|
@ -759,7 +759,7 @@ export default class DhpActor extends Actor {
|
|||
}
|
||||
|
||||
const parsedJSON = JSON.parse(json);
|
||||
if (versionCompare(parsedJSON._stats.systemVersion, '1.1.0')) {
|
||||
if (foundry.utils.isNewerVersion('1.1.0', parsedJSON._stats.systemVersion)) {
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.localize('DAGGERHEART.ACTORS.Character.InvalidOldCharacterImportTitle')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue