Skip to content

Commit

Permalink
Merge pull request #397 from fvtt-fria-ligan/01-14-fix_Surface_Critic…
Browse files Browse the repository at this point in the history
…al_Injuries_in_Monster_sheet

fix: 🐛 Surface Critical Injuries in Monster sheet
  • Loading branch information
aMediocreDad authored Jan 19, 2024
2 parents 1e05574 + 49d991f commit c363eef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-vans-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"forbidden-lands": patch
---

Surface Critical Injuries in Monster Sheet
6 changes: 2 additions & 4 deletions src/actor/actor-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ export class ForbiddenLandsActorSheet extends ActorSheet {
*/
async _onDrop(event, data) {
const dragData = JSON.parse(event.dataTransfer.getData("text/plain"));
if (dragData.type === "itemDrop") {
if (dragData.type === "itemDrop")
this.actor.createEmbeddedDocuments("Item", [dragData.item]);
} else {
super._onDrop(event, data);
}
else super._onDrop(event, data);
}

async _onSortItem(event, itemData) {
Expand Down
4 changes: 3 additions & 1 deletion templates/actor/monster/sheet-tabs/combat-tab.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
{{localize "HEADER.TALENT"}}
/
{{localize "HEADER.SPELL"}}
/
{{localize "HEADER.CRITICAL_INJURY"}}
</h2>
<div class="item-list">
<div class="header monster-talent flex row">
Expand All @@ -19,7 +21,7 @@
</div>
<div class="items">
{{#each items as |item|}}
{{#if (or item.isTalent item.isSpell)}}
{{#if (or item.isTalent item.isSpell item.isCriticalInjury)}}
<div class="monster-talent item flex row" data-item-id="{{item._id}}">
<div class="name">
<img src="{{item.img}}" width="32px" />
Expand Down

0 comments on commit c363eef

Please sign in to comment.