From 7262ec0421aec01f9943b71af44df5e173d5b972 Mon Sep 17 00:00:00 2001 From: wrycu Date: Sat, 22 Oct 2022 03:55:55 -0700 Subject: [PATCH] fix(v10): crits (#1094) * fix critical injuries and damage not being able to be applied to actors #1092 --- modules/actors/actor-sheet-ffg.js | 4 ++-- templates/parts/actor/ffg-criticalinjury.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/actors/actor-sheet-ffg.js b/modules/actors/actor-sheet-ffg.js index 619af8a4..f3416c0d 100644 --- a/modules/actors/actor-sheet-ffg.js +++ b/modules/actors/actor-sheet-ffg.js @@ -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; } diff --git a/templates/parts/actor/ffg-criticalinjury.html b/templates/parts/actor/ffg-criticalinjury.html index 342521d7..e307adc9 100644 --- a/templates/parts/actor/ffg-criticalinjury.html +++ b/templates/parts/actor/ffg-criticalinjury.html @@ -18,7 +18,7 @@
{{item.name}}
-
{{renderMultiple item.data.severity ''}}
+
{{renderMultiple item.system.severity ''}}