proper localization of item vals in char sheet

Additions:
- added TODOs
- added armor item list to char sheet
- proper overflow handling in tabs (now: scrollable)

Changes:
- proper localization of item values
- "Description" not abbreviated anymore
- cleaned up getData() of ActorSheet (data now truly const)
This commit is contained in:
Gesina Schwalbe 2020-12-29 19:06:17 +01:00
parent 2ae005f432
commit 48d8d6e44d
3 changed files with 18 additions and 9 deletions

View file

@ -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;
}