diff --git a/src/system/documents/actor.ts b/src/system/documents/actor.ts index 8f3c585..8607752 100644 --- a/src/system/documents/actor.ts +++ b/src/system/documents/actor.ts @@ -693,7 +693,6 @@ export class CosmereActor< data: data as D20RollData, title: flavor, defaultAttribute: options.attribute ?? skill.attribute, - parts: [`@mod`].concat(options.parts ?? []), messageData: { speaker: options.speaker ?? @@ -706,6 +705,7 @@ export class CosmereActor< options, ); + rollData.parts = [`@mod`].concat(options.parts ?? []); rollData.messageData.flags[SYSTEM_ID] = { message: { type: MESSAGE_TYPES.SKILL, diff --git a/src/system/documents/item.ts b/src/system/documents/item.ts index 87b200c..f45663b 100644 --- a/src/system/documents/item.ts +++ b/src/system/documents/item.ts @@ -1059,11 +1059,8 @@ export class CosmereItem< const traitsNormal = []; const traitsExpert = []; const traits = []; - if (this.system.traits) { - for (const [key, value] of Object.entries( - this.system.traits as TraitsItemData, - )) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (this.hasTraits()) { + for (const [key, value] of Object.entries(this.system.traits)) { if (!value?.active) continue; const traitLoc = @@ -1071,7 +1068,6 @@ export class CosmereItem< CONFIG.COSMERE.traits.armorTraits[key as ArmorTraitId]; let label = game.i18n!.localize(traitLoc.label); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (value.expertise?.toggleActive) { label = `${label}`; traitsExpert.push(label); @@ -1084,8 +1080,10 @@ export class CosmereItem< } let action; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (this.system.activation?.cost?.value !== undefined) { + if ( + this.hasActivation() && + this.system.activation?.cost?.value !== undefined + ) { const activation = this.system.activation as Record< string, unknown diff --git a/src/system/types/cosmere.ts b/src/system/types/cosmere.ts index a6ab738..a002862 100644 --- a/src/system/types/cosmere.ts +++ b/src/system/types/cosmere.ts @@ -285,5 +285,6 @@ export const enum TurnSpeed { export const enum Theme { Default = 'default', + //TODO: Move to stormlight module Stormlight = 'stormlight', }