From 6148f7388808c8f0f7e4d81a816b7b7a668921ac Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Sun, 26 Mar 2023 08:57:44 +0200 Subject: [PATCH] ALl items list --- lang/en.json | 3 ++- modules/warhero-actor-sheet.js | 1 + modules/warhero-actor.js | 5 +++++ styles/simple.css | 2 +- system.json | 4 ++-- templates/actor-sheet.html | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 44 insertions(+), 4 deletions(-) diff --git a/lang/en.json b/lang/en.json index a248b7c..f50d770 100644 --- a/lang/en.json +++ b/lang/en.json @@ -212,7 +212,8 @@ "WH.ui.chargelimited": "Limited", "WH.ui.magiccharge": "Magic charges", "WH.ui.chargevalue": "Charge value", - + "WH.ui.allitems": "All items", + "WH.ui.bodyslots": "Body", "WH.ui.containerslot": "Containers", diff --git a/modules/warhero-actor-sheet.js b/modules/warhero-actor-sheet.js index 67f5afa..cb43777 100644 --- a/modules/warhero-actor-sheet.js +++ b/modules/warhero-actor-sheet.js @@ -55,6 +55,7 @@ export class WarheroActorSheet extends ActorSheet { equippedArmors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedArmors())), equippedShields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedShields())), powers: this.actor.sortPowers(), + allItems: this.actor.getAllItems(), subActors: duplicate(this.actor.getSubActors()), competency: this.actor.getCompetency(), race: duplicate(race), diff --git a/modules/warhero-actor.js b/modules/warhero-actor.js index 30ec74b..bb3daf7 100644 --- a/modules/warhero-actor.js +++ b/modules/warhero-actor.js @@ -151,6 +151,11 @@ export class WarheroActor extends Actor { } return schools } + getAllItems() { + let comp = duplicate(this.items || []); + WarheroUtility.sortArrayObjectsByName(comp) + return comp; + } /* -------------------------------------------- */ getEquippedShields() { let comp = duplicate(this.items.filter(item => item.type == 'shield' && item.system.slotlocation == "shield") || []); diff --git a/styles/simple.css b/styles/simple.css index 03957c6..091bd1c 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1543,7 +1543,7 @@ li { } .alternate-list { margin-top: 4px; - fong2ex-wrap: nowrap; + flex-wrap: nowrap; } .item-filler { flex-grow: 6; diff --git a/system.json b/system.json index 364ee57..79eb8f6 100644 --- a/system.json +++ b/system.json @@ -107,7 +107,7 @@ "styles": [ "styles/simple.css" ], - "version": "10.0.47", + "version": "10.0.48", "compatibility": { "minimum": "10", "verified": "10", @@ -115,7 +115,7 @@ }, "title": "Warhero RPG", "manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.47.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.48.zip", "url": "https://www.uberwald.me/gitea/public/fvtt-warhero", "background": "images/ui/warhero_welcome_page.webp", "id": "fvtt-warhero" diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 937ea35..3ae773a 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -21,11 +21,15 @@