From bfad3d1e5ff8d09bce273e281a8c331e136830c9 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 9 Mar 2023 13:53:19 +0100 Subject: [PATCH] Update --- lang/en.json | 1 + modules/warhero-actor-sheet.js | 2 +- modules/warhero-actor.js | 7 +++++- styles/simple.css | 5 ++++ system.json | 4 +-- templates/actor-sheet.html | 26 ++++++++++++-------- templates/partial-item-common-equipment.html | 4 +-- 7 files changed, 33 insertions(+), 16 deletions(-) diff --git a/lang/en.json b/lang/en.json index d9c6516..b984772 100644 --- a/lang/en.json +++ b/lang/en.json @@ -58,6 +58,7 @@ "WH.conf.yes": "Yes", "WH.conf.no": "No", "WH.conf.notapplicable": "Not applicable", + "WH.conf.undefined": "Not applicable", "WH.ui.level": "Level", "WH.ui.notes": "Notes", diff --git a/modules/warhero-actor-sheet.js b/modules/warhero-actor-sheet.js index caa0238..ef1ef06 100644 --- a/modules/warhero-actor-sheet.js +++ b/modules/warhero-actor-sheet.js @@ -57,7 +57,7 @@ export class WarheroActorSheet extends ActorSheet { subActors: duplicate(this.actor.getSubActors()), competency: this.actor.getCompetency(), race: duplicate(race), - class: duplicate(this.actor.getClass()), + classes: duplicate(this.actor.getClasses()), totalMoney: this.actor.computeTotalMoney(), //moneys: duplicate(this.actor.getMoneys()), description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}), diff --git a/modules/warhero-actor.js b/modules/warhero-actor.js index 7c20d10..5bc6b52 100644 --- a/modules/warhero-actor.js +++ b/modules/warhero-actor.js @@ -162,6 +162,11 @@ export class WarheroActor extends Actor { let classWH = this.items.filter(item => item.type == 'class') return classWH[0] ?? []; } + getClasses() { + let comp = duplicate(this.items.filter(item => item.type == "class") || []); + WarheroUtility.sortArrayObjectsByName(comp) + return comp; + } /* -------------------------------------------- */ checkAndPrepareEquipment(item) { } @@ -254,7 +259,7 @@ export class WarheroActor extends Actor { } /* -------------------------------------------- */ getNormalSkills() { - let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill) + let comp = this.items.filter(it => it.type == "skill" && !it.system.classskill && !it.system.raceskill) WarheroUtility.sortArrayObjectsByName(comp) return comp } diff --git a/styles/simple.css b/styles/simple.css index 441f3b4..da10a8e 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1491,6 +1491,11 @@ li { max-width: 22rem; min-width: 22rem; } +.item-name-label-long3 { + flex-grow: 2; + max-width: 32rem; + min-width: 32rem; +} .item-name-label-level2 { flex-grow: 2; max-width: 9rem; diff --git a/system.json b/system.json index 6a55056..6394c81 100644 --- a/system.json +++ b/system.json @@ -107,7 +107,7 @@ "styles": [ "styles/simple.css" ], - "version": "10.0.36", + "version": "10.0.37", "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.36.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.37.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 f04279b..f3588ea 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -27,14 +27,16 @@ -
  • - - - -
    - -
    -
  • + {{#each classes as |class idx|}} +
  • + + + +
    + +
    +
  • + {{/each}}
  • @@ -458,10 +460,10 @@
  • - + {{power.name}} - + {{power.system.level}}
     
    @@ -523,6 +525,10 @@
    + + + +
     
    diff --git a/templates/partial-item-common-equipment.html b/templates/partial-item-common-equipment.html index 738f748..4dc3704 100644 --- a/templates/partial-item-common-equipment.html +++ b/templates/partial-item-common-equipment.html @@ -12,8 +12,8 @@
  • - + {{#select system.isidentified}} {{#each config.identifiedState as |type key|}} {{/each}}