From d2022aa5f8f8271ccbb575a38654029bb2417fce Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Sat, 19 Sep 2020 20:28:46 +0200 Subject: [PATCH] fix: All item sheets should have description and shortDescription on them, including skills (for which I added a migration). --- src/module/migration.ts | 6 ++++++ static/template.json | 4 +++- static/templates/items/armor-sheet.html | 11 +++++++++++ static/templates/items/augment-sheet.html | 6 ++++++ static/templates/items/skills-sheet.html | 10 ++++++++++ static/templates/items/weapon-sheet.html | 7 +++++++ 6 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/module/migration.ts b/src/module/migration.ts index bd09051ef..f7e017c0c 100644 --- a/src/module/migration.ts +++ b/src/module/migration.ts @@ -61,6 +61,12 @@ export class Migration { } } + if (before(systemMigrationVersion, "0.6.23")) { + if (item.type === 'skills') { + updateData['data.description'] = ""; + updateData['data.shortDesc'] = ""; + } + } return updateData; } diff --git a/static/template.json b/static/template.json index 802ab7117..fe8932ac5 100644 --- a/static/template.json +++ b/static/template.json @@ -351,7 +351,9 @@ "name": "Skill Name", "value": -3, "characteristic": "STR", - "type": "skills" + "type": "skills", + "description": "", + "shortdescr": "" } } } diff --git a/static/templates/items/armor-sheet.html b/static/templates/items/armor-sheet.html index 04e677771..03e376cab 100644 --- a/static/templates/items/armor-sheet.html +++ b/static/templates/items/armor-sheet.html @@ -19,5 +19,16 @@ + +
+ +
+ +
+ {{localize "TWODSIX.Items.Equipment.Description"}} +
{{{data.description}}}
+
diff --git a/static/templates/items/augment-sheet.html b/static/templates/items/augment-sheet.html index bef533935..792ca477b 100644 --- a/static/templates/items/augment-sheet.html +++ b/static/templates/items/augment-sheet.html @@ -29,6 +29,12 @@ +
+ +
+
{{localize "TWODSIX.Items.Equipment.Description"}}
{{{data.description}}}
diff --git a/static/templates/items/skills-sheet.html b/static/templates/items/skills-sheet.html index b71694ab9..2e3b7a7c0 100644 --- a/static/templates/items/skills-sheet.html +++ b/static/templates/items/skills-sheet.html @@ -24,6 +24,16 @@
+
+ +
+ +
+ {{localize "TWODSIX.Items.Equipment.Description"}} +
{{{data.description}}}
+
diff --git a/static/templates/items/weapon-sheet.html b/static/templates/items/weapon-sheet.html index 1cded7588..e821c123e 100644 --- a/static/templates/items/weapon-sheet.html +++ b/static/templates/items/weapon-sheet.html @@ -35,9 +35,16 @@ +
+ +
+
{{localize "TWODSIX.Items.Equipment.Description"}}
{{{data.description}}}
+