diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js
index 08afd9e..201570b 100644
--- a/module/actor/actor-sheet.js
+++ b/module/actor/actor-sheet.js
@@ -47,13 +47,24 @@ export class DeltaGreenActorSheet extends ActorSheet {
}
/** @override */
- getData() {
+ async getData() {
const data = super.getData();
// Prepare items.
if (this.actor.type == 'agent') {
this._prepareCharacterItems(data);
}
+
+ switch (this.actor.type) {
+ case "agent":
+ data.enrichedDescription = await TextEditor.enrichHTML(this.object.system.physicalDescription, {async: true});
+ break;
+ case "npc":
+ case "unnatural":
+ data.enrichedDescription = await TextEditor.enrichHTML(this.object.system.notes, {async: true});
+ break;
+ default:
+ }
return data;
}
diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js
index 29f8ad1..277eb31 100644
--- a/module/item/item-sheet.js
+++ b/module/item/item-sheet.js
@@ -25,8 +25,9 @@ export class DeltaGreenItemSheet extends ItemSheet {
/* -------------------------------------------- */
/** @override */
- getData() {
+ async getData() {
const data = super.getData();
+ data.enrichedDescription = await TextEditor.enrichHTML(this.object.system.description, {async: true});
return data;
}
diff --git a/templates/actor/cv-partial.html b/templates/actor/cv-partial.html
index 148b02a..336975f 100644
--- a/templates/actor/cv-partial.html
+++ b/templates/actor/cv-partial.html
@@ -50,5 +50,5 @@
- {{editor actor.system.physicalDescription target="system.physicalDescription" button=true owner=owner editable=editable}}
+ {{editor enrichedDescription target="system.physicalDescription" button=true owner=owner editable=editable}}
\ No newline at end of file
diff --git a/templates/actor/limited-sheet.html b/templates/actor/limited-sheet.html
index 8126f1b..9400c44 100644
--- a/templates/actor/limited-sheet.html
+++ b/templates/actor/limited-sheet.html
@@ -13,7 +13,7 @@
-
+
diff --git a/templates/actor/npc-sheet.html b/templates/actor/npc-sheet.html
index aa0da74..c0173a2 100644
--- a/templates/actor/npc-sheet.html
+++ b/templates/actor/npc-sheet.html
@@ -1,5 +1,4 @@
diff --git a/templates/item/item-gear-sheet.html b/templates/item/item-gear-sheet.html
index 79de9c4..2a816b3 100644
--- a/templates/item/item-gear-sheet.html
+++ b/templates/item/item-gear-sheet.html
@@ -12,15 +12,15 @@
{{localize 'DG.ItemWindow.Gear.Expense'}}:
- {{localize 'DG.Gear.Expense.Incidental'}}
- {{localize 'DG.Gear.Expense.Standard'}}
- {{localize 'DG.Gear.Expense.Unusual'}}
- {{localize 'DG.Gear.Expense.Major'}}
- {{localize 'DG.Gear.Expense.Extreme'}}
+ {{localize 'DG.Gear.Expense.Incidental'}}
+ {{localize 'DG.Gear.Expense.Standard'}}
+ {{localize 'DG.Gear.Expense.Unusual'}}
+ {{localize 'DG.Gear.Expense.Major'}}
+ {{localize 'DG.Gear.Expense.Extreme'}}
{{localize 'DG.ItemWindow.Gear.Equipped'}}:
-
+
@@ -38,7 +38,7 @@
{{!-- Description Tab --}}
- {{editor system.description target="system.description" button=true owner=owner editable=editable}}
+ {{editor enrichedDescription target="system.description" button=true owner=owner editable=editable}}
diff --git a/templates/item/item-motivation-sheet.html b/templates/item/item-motivation-sheet.html
index 4a07283..94e8e2a 100644
--- a/templates/item/item-motivation-sheet.html
+++ b/templates/item/item-motivation-sheet.html
@@ -13,7 +13,7 @@
{{localize 'DG.ItemWindow.Motivations.IsDisorder'}}:
-
@@ -25,7 +25,7 @@
title="{{localize 'DG.ItemWindow.Motivations.MotivationNameTooltip'}}"
{{!-- If a motivation has been crossed off after a breaking point, do a strikeout on it and disable it. --}}
- {{#if system.crossedOut}}
+ {{#if item.system.crossedOut}}
style="text-decoration: line-through;"
disabled
{{/if}}
@@ -33,17 +33,17 @@
{{!-- Only Show the Disorders Section if Motivation Lost Checked --}}
- {{#if system.crossedOut}}
+ {{#if item.system.crossedOut}}
{{localize 'DG.ItemWindow.Motivations.Disorder'}}:
-
{{localize 'DG.ItemWindow.Motivations.DisorderHasBeenCured'}}:
-
@@ -54,7 +54,7 @@
- {{editor system.description target="system.description" button=true owner=owner editable=editable}}
+ {{editor enrichedDescription target="system.description" button=true owner=owner editable=editable}}
diff --git a/templates/item/item-weapon-sheet.html b/templates/item/item-weapon-sheet.html
index e85a2ba..c8e0c49 100644
--- a/templates/item/item-weapon-sheet.html
+++ b/templates/item/item-weapon-sheet.html
@@ -11,15 +11,15 @@
{{localize 'DG.ItemWindow.Weapons.Expense'}}:
- {{localize 'DG.Gear.Expense.Incidental'}}
- {{localize 'DG.Gear.Expense.Standard'}}
- {{localize 'DG.Gear.Expense.Unusual'}}
- {{localize 'DG.Gear.Expense.Major'}}
- {{localize 'DG.Gear.Expense.Extreme'}}
+ {{localize 'DG.Gear.Expense.Incidental'}}
+ {{localize 'DG.Gear.Expense.Standard'}}
+ {{localize 'DG.Gear.Expense.Unusual'}}
+ {{localize 'DG.Gear.Expense.Major'}}
+ {{localize 'DG.Gear.Expense.Extreme'}}
{{localize 'DG.ItemWindow.Gear.Equipped'}}:
-
+
@@ -30,56 +30,56 @@
{{localize 'DG.ItemWindow.Weapons.Skill'}}:
- {{localize 'DG.Skills.firearms'}}
- {{localize 'DG.Skills.melee_weapons'}}
- {{localize 'DG.Skills.unarmed_combat'}}
- {{localize 'DG.Skills.heavy_weapons'}}
- {{localize 'DG.Skills.athletics'}}
- {{localize 'DG.Skills.demolitions'}}
- {{localize 'DG.Skills.artillery'}}
- {{localize 'DG.Attributes.str'}}x5
- {{localize 'DG.Attributes.con'}}x5
- {{localize 'DG.Attributes.dex'}}x5
- {{localize 'DG.Attributes.int'}}x5
- {{localize 'DG.Attributes.pow'}}x5
- {{localize 'DG.Attributes.cha'}}x5
+ {{localize 'DG.Skills.firearms'}}
+ {{localize 'DG.Skills.melee_weapons'}}
+ {{localize 'DG.Skills.unarmed_combat'}}
+ {{localize 'DG.Skills.heavy_weapons'}}
+ {{localize 'DG.Skills.athletics'}}
+ {{localize 'DG.Skills.demolitions'}}
+ {{localize 'DG.Skills.artillery'}}
+ {{localize 'DG.Attributes.str'}}x5
+ {{localize 'DG.Attributes.con'}}x5
+ {{localize 'DG.Attributes.dex'}}x5
+ {{localize 'DG.Attributes.int'}}x5
+ {{localize 'DG.Attributes.pow'}}x5
+ {{localize 'DG.Attributes.cha'}}x5
{{localize 'DG.ItemWindow.Weapons.IsLethality'}}:
-
{{localize 'DG.ItemWindow.Weapons.KillRadius'}}:
-
+
{{localize 'DG.ItemWindow.Weapons.Range'}}:
-
+
{{!-- If a weapon is 'Lethal', need to show the d100% Lethality input, otherwise only show the regular Damage formula (e.g. 1D6, 1D4+2, etc...) --}}
- {{#unless system.isLethal}}
+ {{#unless item.system.isLethal}}
{{localize 'DG.ItemWindow.Weapons.Damage'}}:
-
+
{{/unless}}
- {{#if system.isLethal}}
+ {{#if item.system.isLethal}}
{{localize 'DG.ItemWindow.Weapons.Lethality'}} %:
-
{{/if}}
{{localize 'DG.ItemWindow.Weapons.ArmorPiercing'}}:
-
+
@@ -87,7 +87,7 @@
{{localize 'DG.ItemWindow.Weapons.Ammo'}}:
-
+
@@ -103,7 +103,7 @@
{{!-- Description Tab --}}
- {{editor system.description target="system.description" button=true owner=owner editable=editable}}
+ {{editor enrichedDescription target="system.description" button=true owner=owner editable=editable}}