From 737a644ecd3b22d1aff435359267141c6238c4f5 Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Fri, 8 Jan 2021 23:54:41 +0100 Subject: [PATCH] added alphabet item - added to database and localization definitions - added sheet - added to talents & abilities tab - removed languages & alphabets from actor properties --- src/lang/en.json | 2 ++ src/module/config.ts | 1 + src/module/item/item-data.ts | 4 +++- src/template.json | 19 ++++++++++++++----- .../actor/partials/talents-overview.hbs | 8 ++++++++ src/templates/item/alphabet-sheet.hbs | 8 ++++++++ 6 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 src/templates/item/alphabet-sheet.hbs diff --git a/src/lang/en.json b/src/lang/en.json index f9a68048..78675926 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -46,6 +46,8 @@ "DS4.ItemTypeRacialAbilityPlural": "Racial Abilities", "DS4.ItemTypeLanguage": "Language", "DS4.ItemTypeLanguagePlural": "Languages", + "DS4.ItemTypeAlphabet": "Alphabet", + "DS4.ItemTypeAlphabetPlural": "Alphabets", "DS4.ArmorType": "Armor Type", "DS4.ArmorTypeAbbr": "AT", "DS4.ArmorMaterialType": "Material Type", diff --git a/src/module/config.ts b/src/module/config.ts index 38492901..03b2c9d5 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -51,6 +51,7 @@ export const DS4 = { talent: "DS4.ItemTypeTalent", racialAbility: "DS4.ItemTypeRacialAbility", language: "DS4.ItemTypeLanguage", + alphabet: "DS4.ItemTypeAlphabet", }, /** diff --git a/src/module/item/item-data.ts b/src/module/item/item-data.ts index 6a9cd8d2..23105eb6 100644 --- a/src/module/item/item-data.ts +++ b/src/module/item/item-data.ts @@ -8,7 +8,8 @@ export type DS4ItemDataType = | DS4Equipment | DS4Talent | DS4RacialAbility - | DS4Language; + | DS4Language + | DS4Alphabet; // types @@ -36,6 +37,7 @@ interface DS4Trinket extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable {} interface DS4Equipment extends DS4ItemBase, DS4ItemPhysical {} type DS4RacialAbility = DS4ItemBase; type DS4Language = DS4ItemBase; +type DS4Alphabet = DS4ItemBase; // templates diff --git a/src/template.json b/src/template.json index cc3e291e..eee8acee 100644 --- a/src/template.json +++ b/src/template.json @@ -97,10 +97,6 @@ "used": 0 } }, - "language": { - "languages": "", - "alphabets": "" - }, "profile": { "gender": "", "birthday": "", @@ -115,7 +111,17 @@ } }, "Item": { - "types": ["weapon", "armor", "shield", "trinket", "equipment", "talent", "racialAbility", "language"], + "types": [ + "weapon", + "armor", + "shield", + "trinket", + "equipment", + "talent", + "racialAbility", + "language", + "alphabet" + ], "templates": { "base": { "description": "" @@ -166,6 +172,9 @@ }, "language": { "templates": ["base"] + }, + "alphabet": { + "templates": ["base"] } } } diff --git a/src/templates/actor/partials/talents-overview.hbs b/src/templates/actor/partials/talents-overview.hbs index 753e16b9..7aa194e5 100644 --- a/src/templates/actor/partials/talents-overview.hbs +++ b/src/templates/actor/partials/talents-overview.hbs @@ -138,4 +138,12 @@ {{> baseItemListEntry item=item}} {{/each}} + +

{{localize 'DS4.ItemTypeAlphabetPlural'}}

+
    + {{> baseItemListHeader dataType='alphabet' }} + {{#each itemsByType.alphabet as |item id|}} + {{> baseItemListEntry item=item}} + {{/each}} +
\ No newline at end of file diff --git a/src/templates/item/alphabet-sheet.hbs b/src/templates/item/alphabet-sheet.hbs new file mode 100644 index 00000000..cfd63f9e --- /dev/null +++ b/src/templates/item/alphabet-sheet.hbs @@ -0,0 +1,8 @@ +
+ {{#> systems/ds4/templates/item/partials/sheet-header.hbs}} + {{/systems/ds4/templates/item/partials/sheet-header.hbs}} + + {{!-- Common Item body --}} + {{> systems/ds4/templates/item/partials/body.hbs}} + +
\ No newline at end of file