Skip to content

Commit

Permalink
Merge pull request #143 from Silvertower/main
Browse files Browse the repository at this point in the history
Fix #142
  • Loading branch information
Silvertower authored May 10, 2024
2 parents a8a02c4 + 021fb50 commit cc2e0b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/action-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,20 +662,20 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
const actions = []

if (this.actorType !== 'hazard') {
const perception = this.actor ? this.actor.system.perception : coreModule.api.Utils.i18n('PF2E.PerceptionLabel')
const initiative = this.actor ? this.actor.system.initiative : coreModule.api.Utils.i18n('PF2E.PerceptionLabel')
const fullName = coreModule.api.Utils.i18n('PF2E.PerceptionLabel')
const name = this.abbreviatedSkills ? SKILL_ABBREVIATION.perception ?? fullName : fullName
const actionTypeName = `${coreModule.api.Utils.i18n(ACTION_TYPE[actionType])}: ` ?? ''
const listName = `${actionTypeName}${name}`
const encodedValue = [actionType, 'perception'].join(this.delimiter)
const active = (initiativeStatistic === 'perception') ? ' active' : ''
const cssClass = `toggle${active}`
const modifier = coreModule.api.Utils.getModifier(perception?.totalModifier)
const modifier = coreModule.api.Utils.getModifier(initiative?.totalModifier)
const info1 = this.actor ? { text: modifier } : ''
const tooltipName = `${fullName}${(this.actor && modifier) ? ` ${modifier}` : ''}`
const tooltipData = {
name: tooltipName,
modifiers: perception?.modifiers
modifiers: initiative?.modifiers
}
const tooltip = this.actor ? await this.#getTooltip(actionType, tooltipData) : null

Expand Down

0 comments on commit cc2e0b5

Please sign in to comment.