Skip to content

Commit

Permalink
Merge pull request #60 from ahandleman/main
Browse files Browse the repository at this point in the history
Small fix - clicking an agenda ability opens that abilitiy instead of the agenda
  • Loading branch information
diabeatz96 authored Sep 5, 2024
2 parents e793c38 + 2309fc2 commit e3fb601
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions module/sheets/actor-sheet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ export class CainActorSheet extends ActorSheet {
});

html.find('.agenda-ability').on('click', (event) => {
const itemId = this.actor.system.currentAgenda; // Get the current agenda ID
this._openAgendaItemSheet(itemId);
const itemId = event.currentTarget.dataset.id;
this._openAgendaItemSheet(event.currentTarget.dataset.id);
});

// Event delegation for blasphemy-passive
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"thumbnail": "systems/cain/assets/cain.png"
}
],
"version": "1.1.0",
"version": "1.1.1",
"compatibility": {
"minimum": 11,
"verified": "12"
Expand Down
2 changes: 1 addition & 1 deletion templates/actor/parts/actor-abilities.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<ul id="editable-agenda-abilities" class="items-list">
{{#each currentAgendaAbilities}}
<li>
<span data-index="{{@index}}" class="agenda-ability" title="{{this.system.abilityDescription}}">{{this.system.abilityName}}</span>
<span data-index="{{@index}}" data-id="{{this.id}}" class="agenda-ability" title="{{this.system.abilityDescription}}">{{this.system.abilityName}}</span>
<a class="item-control agenda-ability-to-chat" data-index="{{@index}}" title="Send to Chat">
<i class="fas fa-comment"></i>
</a>
Expand Down

0 comments on commit e3fb601

Please sign in to comment.