diff --git a/src/module/actor/actor-sheet.ts b/src/module/actor/actor-sheet.ts index 7f26c5b3..29d5f878 100644 --- a/src/module/actor/actor-sheet.ts +++ b/src/module/actor/actor-sheet.ts @@ -13,11 +13,14 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor> { * @returns the data fed to the template of the actor sheet */ getData(): ActorSheetData<DS4ActorDataType, DS4Actor> { - const data = super.getData(); - // Add the items explicitly sorted by type to the data: - const itemsByType = this.actor.itemTypes; - data["itemsByType"] = itemsByType; - console.log("Shields:", data); + const data = { + ...super.getData(), + // Add the localization config to the data: + config: CONFIG.DS4, + // Add the items explicitly sorted by type to the data: + itemsByType: this.actor.itemTypes, + }; + console.log("Data:", data); return data; } diff --git a/src/scss/components/_apps.scss b/src/scss/components/_apps.scss index 3f8ba623..8a5d82f0 100644 --- a/src/scss/components/_apps.scss +++ b/src/scss/components/_apps.scss @@ -9,7 +9,10 @@ .tab { height: 100%; - overflow-y: auto; + overflow-y: scroll; align-content: flex-start; + ol { + overflow-y: visible; + } } } diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items.hbs index a2eca0a8..7aed8ee3 100644 --- a/src/templates/actor/partials/items.hbs +++ b/src/templates/actor/partials/items.hbs @@ -1,8 +1,11 @@ +{{!-- TODO: hover shows complete name of abbreviations --}} +{{!-- TODO: try to use alias for the item type via HBS with and lookup --}} +{{!-- TODO: Where possible use icons with complete names as hovers instead of long names --}} {{!-- Tab with overview and quick-actions on owned items --}} <div class="tab items" data-group="primary" data-tab="items"> {{!-- WEAPONS --}} - <h3>{{localize "DS4.ItemTypeWeapon"}}</h3> + <h3>{{localize "DS4.ItemTypeWeapon"}}</h3> {{!-- SPECIFIC --}} <ol class="items-list"> <li class="item flexrow item-header"> <div class="flexrow flex15"> @@ -16,7 +19,7 @@ <div>{{localize "DS4.WeaponBonusAbbr"}}</div> {{!-- SPECIFIC --}} <div>{{localize "DS4.OpponentDefenseAbbr"}}</div> {{!-- SPECIFIC --}} </div> - <div class="flex4">{{localize "DS4.DescriptionAbbr"}}</div> + <div class="flex4">{{localize "DS4.Description"}}</div> {{!-- add button --}} <div class="item-controls"> {{!-- SPECIFIC --}} <a class="item-control item-create" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> @@ -41,7 +44,7 @@ {{!-- name --}} <h4 class="item-name flex2">{{item.name}}</h4> {{!-- item specifics --}} - <div>{{itemData.attackType}}</div> {{!-- SPECIFIC --}} + <div>{{lookup ../../config.attackTypes itemData.attackType}}</div> {{!-- SPECIFIC --}} <div class="flexrow flex15"> <div>{{itemData.weaponBonus}}</div> {{!-- SPECIFIC --}} <div>{{itemData.opponentDefense}}</div> {{!-- SPECIFIC --}}