From 85f4ba0e9907446d67fbe941ec54457fd39f01fe Mon Sep 17 00:00:00 2001 From: sladecraven Date: Wed, 9 Nov 2022 22:20:30 +0100 Subject: [PATCH] Module stuff and fixes on other items --- modules/avd12-item-sheet.js | 1 + modules/avd12-utility.js | 12 ++++++++++++ system.json | 4 ++-- templates/items/item-trait-sheet.hbs | 21 ++++++++------------- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/modules/avd12-item-sheet.js b/modules/avd12-item-sheet.js index bb78e88..50de955 100644 --- a/modules/avd12-item-sheet.js +++ b/modules/avd12-item-sheet.js @@ -72,6 +72,7 @@ export class Avd12ItemSheet extends ItemSheet { limited: this.object.limited, options: this.options, owner: this.document.isOwner, + bonusList: Avd12Utility.buildBonusList(), description: await TextEditor.enrichHTML(this.object.system.description, { async: true }), isGM: game.user.isGM } diff --git a/modules/avd12-utility.js b/modules/avd12-utility.js index 0a014c9..c58ccf0 100644 --- a/modules/avd12-utility.js +++ b/modules/avd12-utility.js @@ -62,6 +62,18 @@ export class Avd12Utility { return duplicate(this.shieldSkills) } + /* -------------------------------------------- */ + static buildBonusList() { + let bonusList = [] + for(let key in game.system.model.Actor.character.bonus) { + let bonuses = game.system.model.Actor.character.bonus[key] + for (let bonus in bonuses) { + bonusList.push( key + "." + bonus ) + } + } + return bonusList + } + /* -------------------------------------------- */ static async ready() { const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills") diff --git a/system.json b/system.json index 6756f87..99a680c 100644 --- a/system.json +++ b/system.json @@ -35,7 +35,7 @@ ], "title": "AnyVenture D12 RPG", "url": "https://www.uberwald.me/gitea/public/fvtt-avd12", - "version": "10.0.3", - "download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.3.zip", + "version": "10.0.4", + "download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.4.zip", "background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp" } \ No newline at end of file diff --git a/templates/items/item-trait-sheet.hbs b/templates/items/item-trait-sheet.hbs index 27286e4..2e4d04a 100644 --- a/templates/items/item-trait-sheet.hbs +++ b/templates/items/item-trait-sheet.hbs @@ -18,18 +18,8 @@