Resolves #4. Allows clicking on action image and sends it to chat. The foundations laid here could be further used to get data directly from PF2E system, for example to determine the MAP penalties. To implement that, this PR:
Adds ActionsIndex which indexes the 7 actions we support from PF2E compendium by label.
Adds global definition of ItemPF2e because typescript.
Add definition for ItemConstructor because otherwise typescript doesn't allow new this.constructor().
Add itemLabel property to SkillAction.
On image click find action in ActionsIndex based on itemLabel, create a new instance with actor as the parent and send it to chat.
Resolves #4. Allows clicking on action image and sends it to chat. The foundations laid here could be further used to get data directly from PF2E system, for example to determine the MAP penalties. To implement that, this PR:
ActionsIndex
which indexes the 7 actions we support from PF2E compendium by label.ItemPF2e
because typescript.ItemConstructor
because otherwise typescript doesn't allownew this.constructor()
.itemLabel
property toSkillAction
.ActionsIndex
based onitemLabel
, create a new instance with actor as the parent and send it to chat.