Skip to content

Commit

Permalink
fix(v10): crits (#1094)
Browse files Browse the repository at this point in the history
* fix critical injuries and damage not being able to be applied to actors

#1092
  • Loading branch information
wrycu authored Oct 22, 2022
1 parent 3432eb8 commit 7262ec0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/actors/actor-sheet-ffg.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ export class ActorSheetFFG extends ActorSheet {
}

// Critical Damage can only be added to "vehicle" actors and Critical Injury can only be added to "character" actors.
if (item.type === "criticaldamage" && actor.system.type !== "vehicle") {
if (item.type === "criticaldamage" && actor.type !== "vehicle") {
ui.notifications.warn("Critical Damage can only be added to 'vehicle' actor types.");
return false;
}
if (item.type === "criticalinjury" && actor.system.type !== "character") {
if (item.type === "criticalinjury" && actor.type !== "character") {
ui.notifications.warn("Critical Injuries can only be added to 'character' actor types.");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/parts/actor/ffg-criticalinjury.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="item-name">
{{item.name}}
</div>
<div class="severity">{{renderMultiple item.data.severity '<img class="severity-img" src="systems/starwarsffg/images/dice/starwars/purple.png" />'}}</div>
<div class="severity">{{renderMultiple item.system.severity '<img class="severity-img" src="systems/starwarsffg/images/dice/starwars/purple.png" />'}}</div>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
Expand Down

0 comments on commit 7262ec0

Please sign in to comment.