Skip to content

Award XP outside of encounters#334

Open
HarmlessHarm wants to merge 3 commits intodevelopfrom
feat/issue-332__award-xp-outside
Open

Award XP outside of encounters#334
HarmlessHarm wants to merge 3 commits intodevelopfrom
feat/issue-332__award-xp-outside

Conversation

@HarmlessHarm
Copy link
Collaborator

@HarmlessHarm HarmlessHarm commented Mar 13, 2026

Summary

  • Enable the "Award XP" button on the campaign Players view by converting isXpAdvancement from a hardcoded false data property to a computed property that checks campaign.advancement !== "milestone"
  • Fix pre-existing bug in calcColspan that referenced undefined this.settings instead of this.userSettings.general
  • Use optional chaining for userSettings.general checks in both templateColumns and calcColspan

Fixes #332

Test plan

  • Verify "XP" button appears in campaign Players toolbar for XP-based campaigns
  • Verify "XP" button is hidden for milestone-based campaigns
  • Verify clicking "XP" opens the Award XP drawer with player selection
  • Verify XP can be awarded to individual, multiple, or all players
  • Verify XP bars update correctly after awarding
  • Verify no errors when userSettings.general is undefined

Split the actions array display into regular and bonus action sections
by filtering on an optional timing field. Bonus actions share the
existing actions[] array; timing: "bonus_action" routes items to a
separate UI section with its own header, add button, and draggable list.

- hk-npc-schema.json: allow timing field on action items
- npcs/Actions.vue: 5-entry config, filtered draggables, timing dropdown
- CardActions.vue: split entity.actions into two labeled sections
- Monster.vue: same split for compendium display
Enable the "Award XP" button on the campaign Players view by converting
isXpAdvancement from a hardcoded false to a computed property that checks
campaign.advancement !== "milestone". Also fix calcColspan referencing
undefined this.settings instead of this.userSettings.general, and use
optional chaining throughout both computed properties.

Refs #332
@sonarqubecloud
Copy link

@HarmlessHarm HarmlessHarm requested a review from Lakeyzer March 13, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant