abbr for armor type&material in item overview
Additions: - further abbreviations included in localization Changes: - now not full armor type / material expression displayed in char sheet, but only an abbreviation with tooltip - description now smaller for weapon and armor
This commit is contained in:
parent
0b93f5ff9e
commit
9da168afa6
4 changed files with 57 additions and 12 deletions
|
@ -38,12 +38,21 @@
|
||||||
"DS4.ArmorValue": "Armor Value",
|
"DS4.ArmorValue": "Armor Value",
|
||||||
"DS4.ArmorValueAbbr": "AV",
|
"DS4.ArmorValueAbbr": "AV",
|
||||||
"DS4.ArmorTypeBody": "Body",
|
"DS4.ArmorTypeBody": "Body",
|
||||||
|
"DS4.ArmorTypeBodyAbbr": "Body",
|
||||||
"DS4.ArmorTypeHelmet": "Helmet",
|
"DS4.ArmorTypeHelmet": "Helmet",
|
||||||
|
"DS4.ArmorTypeHelmetAbbr": "Helm",
|
||||||
"DS4.ArmorTypeVambrace": "Vambrace",
|
"DS4.ArmorTypeVambrace": "Vambrace",
|
||||||
|
"DS4.ArmorTypeVambraceAbbr": "Vambr",
|
||||||
"DS4.ArmorTypeGreaves": "Greaves",
|
"DS4.ArmorTypeGreaves": "Greaves",
|
||||||
|
"DS4.ArmorTypeGreavesAbbr": "Greav",
|
||||||
"DS4.ArmorTypeVambraceGreaves": "Vambrace + Greaves",
|
"DS4.ArmorTypeVambraceGreaves": "Vambrace + Greaves",
|
||||||
|
"DS4.ArmorTypeVambraceGreavesAbbr": "V+G",
|
||||||
"DS4.ArmorMaterialTypeCloth": "Cloth",
|
"DS4.ArmorMaterialTypeCloth": "Cloth",
|
||||||
|
"DS4.ArmorMaterialTypeClothAbbr": "Cloth",
|
||||||
"DS4.ArmorMaterialTypeLeather": "Leather",
|
"DS4.ArmorMaterialTypeLeather": "Leather",
|
||||||
|
"DS4.ArmorMaterialTypeLeatherAbbr": "Leath",
|
||||||
"DS4.ArmorMaterialTypeChain": "Chain",
|
"DS4.ArmorMaterialTypeChain": "Chain",
|
||||||
"DS4.ArmorMaterialTypePlate": "Plate"
|
"DS4.ArmorMaterialTypeChainAbbr": "Chain",
|
||||||
|
"DS4.ArmorMaterialTypePlate": "Plate",
|
||||||
|
"DS4.ArmorMaterialTypePlateAbbr": "Plate"
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,16 @@ export const DS4 = {
|
||||||
meleeRanged: "DS4.AttackTypeMeleeRanged",
|
meleeRanged: "DS4.AttackTypeMeleeRanged",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * Define the file paths to icon images
|
||||||
|
* @type {Object}
|
||||||
|
*/
|
||||||
|
attackTypesIcons: {
|
||||||
|
melee: "systems/ds4/assets/DS4-MAT.png",
|
||||||
|
meleeRanged: "systems/ds4/assets/DS4-MRA.png",
|
||||||
|
ranged: "systems/ds4/assets/DS4-RAT.png",
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the set of item availabilties
|
* Define the set of item availabilties
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
|
@ -56,6 +66,18 @@ export const DS4 = {
|
||||||
vambraceGreaves: "DS4.ArmorTypeVambraceGreaves",
|
vambraceGreaves: "DS4.ArmorTypeVambraceGreaves",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * Define abbreviations for the armor types
|
||||||
|
* @type {Object}
|
||||||
|
*/
|
||||||
|
armorTypesAbbr: {
|
||||||
|
body: "DS4.ArmorTypeBodyAbbr",
|
||||||
|
helmet: "DS4.ArmorTypeHelmetAbbr",
|
||||||
|
vambrace: "DS4.ArmorTypeVambraceAbbr",
|
||||||
|
greaves: "DS4.ArmorTypeGreavesAbbr",
|
||||||
|
vambraceGreaves: "DS4.ArmorTypeVambraceGreavesAbbr",
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * Define the set of armor materials, used to determine if a characer may wear the armor without additional penalties
|
* * Define the set of armor materials, used to determine if a characer may wear the armor without additional penalties
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
|
@ -68,12 +90,13 @@ export const DS4 = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * Define the file paths to icon images
|
* * Define the abbreviations of armor materials
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
attackTypesIcons: {
|
armorMaterialTypesAbbr: {
|
||||||
melee: "systems/ds4/assets/DS4-MAT.png",
|
cloth: "DS4.ArmorMaterialTypeClothAbbr",
|
||||||
meleeRanged: "systems/ds4/assets/DS4-MRA.png",
|
leather: "DS4.ArmorMaterialTypeLeatherAbbr",
|
||||||
ranged: "systems/ds4/assets/DS4-RAT.png",
|
chain: "DS4.ArmorMaterialTypeChainAbbr",
|
||||||
|
plate: "DS4.ArmorMaterialTypePlateAbbr",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,7 +50,15 @@ async function registerHandlebarsPartials() {
|
||||||
*/
|
*/
|
||||||
Hooks.once("setup", function () {
|
Hooks.once("setup", function () {
|
||||||
// Localize CONFIG objects once up-front
|
// Localize CONFIG objects once up-front
|
||||||
const toLocalize = ["attackTypes", "itemAvailabilities", "itemTypes", "armorTypes", "armorMaterialTypes"];
|
const toLocalize = [
|
||||||
|
"attackTypes",
|
||||||
|
"itemAvailabilities",
|
||||||
|
"itemTypes",
|
||||||
|
"armorTypes",
|
||||||
|
"armorTypesAbbr",
|
||||||
|
"armorMaterialTypes",
|
||||||
|
"armorMaterialTypesAbbr",
|
||||||
|
];
|
||||||
|
|
||||||
// Exclude some from sorting where the default order matters
|
// Exclude some from sorting where the default order matters
|
||||||
const noSort = [];
|
const noSort = [];
|
||||||
|
|
|
@ -79,9 +79,10 @@
|
||||||
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div> {{!--
|
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div> {{!--
|
||||||
SPECIFIC --}}
|
SPECIFIC --}}
|
||||||
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div> {{!-- SPECIFIC --}}
|
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div> {{!-- SPECIFIC --}}
|
||||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">{{localize 'DS4.ArmorValueAbbr'}}
|
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||||
|
{{localize 'DS4.ArmorValueAbbr'}}
|
||||||
</div> {{!-- SPECIFIC --}}
|
</div> {{!-- SPECIFIC --}}
|
||||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
||||||
{{!-- add button --}}
|
{{!-- add button --}}
|
||||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||||
<a class="item-control item-create" title="Create item" data-type="armor" {{!-- SPECIFIC --}}>
|
<a class="item-control item-create" title="Create item" data-type="armor" {{!-- SPECIFIC --}}>
|
||||||
|
@ -107,11 +108,15 @@
|
||||||
{{!-- name --}}
|
{{!-- name --}}
|
||||||
<h4 class="item-name flex3">{{item.name}}</h4>
|
<h4 class="item-name flex3">{{item.name}}</h4>
|
||||||
{{!-- item specifics --}}
|
{{!-- item specifics --}}
|
||||||
<div>{{lookup ../../config.armorMaterialTypes itemData.armorMaterialType}}</div> {{!-- SPECIFIC --}}
|
<div title="{{lookup ../../config.armorMaterialTypes itemData.armorMaterialType}}">
|
||||||
<div>{{lookup ../../config.armorTypes itemData.armorType}}</div> {{!-- SPECIFIC --}}
|
{{lookup ../../config.armorMaterialTypesAbbr itemData.armorMaterialType}}
|
||||||
|
</div> {{!-- SPECIFIC --}}
|
||||||
|
<div title="{{lookup ../../config.armorTypes itemData.armorType}}">
|
||||||
|
{{lookup ../../config.armorTypesAbbr itemData.armorType}}
|
||||||
|
</div> {{!-- SPECIFIC --}}
|
||||||
<div class="flex05 item-num-val">{{itemData.armorValue}}</div> {{!-- SPECIFIC --}}
|
<div class="flex05 item-num-val">{{itemData.armorValue}}</div> {{!-- SPECIFIC --}}
|
||||||
{{!-- description --}}
|
{{!-- description --}}
|
||||||
<div class="flex4 item-description">{{{itemData.description}}}</div>
|
<div class="flex3 item-description">{{{itemData.description}}}</div>
|
||||||
{{!-- edit & delete buttons --}}
|
{{!-- edit & delete buttons --}}
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||||
|
|
Loading…
Reference in a new issue