From fc9a878f3a46bdd5a272dee08f92aec2db054962 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 14 Feb 2023 15:45:59 +0100 Subject: [PATCH] Enhance sheets --- lang/it.json | 46 +++++++++++++++++++++++++++++++++----- modules/warhero-actor.js | 17 +++++++------- system.json | 4 ++-- templates/actor-sheet.html | 12 +++++----- 4 files changed, 58 insertions(+), 21 deletions(-) diff --git a/lang/it.json b/lang/it.json index 186f221..b092fea 100644 --- a/lang/it.json +++ b/lang/it.json @@ -81,11 +81,47 @@ "WH.ui.maxuse": "Usi Massimi", "WH.ui.languages": "Lingue", "WH.ui.languagesbonus": "Bonus a linguaggi conosciuti (men/2)", - "WH.ui.competency": "Competeze", - "WH.ui.conditions": "Condizioni", - "WH.ui.effect": "Effetti", + "WH.ui.competency": "Competenze", + "WH.ui.conditions": "Condizione", + "WH.ui.effect": "Effetto", - "WH.ui.magicschool": "Sfera di magia", + "WH.ui.main": "Principale", + "WH.ui.combat": "Combattimento", + "WH.ui.skillstab": "Abilitá ed effetti", + "WH.ui.powers": "Poteri", + "WH.ui.equipment": "Equipaggiamento", + "WH.ui.biography": "Biografia", + "WH.ui.race": "Razza", + "WH.ui.class": "Classe", + "WH.ui.religion": "Religione", + "WH.ui.origin": "Origine", + "WH.ui.age": "Etá", + "WH.ui.height": "Altezza", + "WH.ui.eyes": "Occhi", + "WH.ui.hair": "Capelli", + "WH.ui.preferredhand": "Mano preferita", + "WH.ui.size": "Taglia", + "WH.ui.gender": "Sesso", + "WH.ui.background": "Storia", + "WH.ui.type": "Tipo", + "WH.ui.description": "Descrizione", + "WH.ui.rawroll": "Formula TXC (ex: 1d20+@statistics.str.value)", + "WH.ui.rawdamage": "Formula Danni (ex: 1d6+(@statistics.str.value/2))", + "WH.ui.damage": "Danno", + "WH.ui.2hdamage": "Danno a 2 mani", + "WH.ui.slotlocation": "Slot", + "WH.ui.quantity": "Quantitá", + "WH.ui.cost": "Costo", + "WH.ui.details": "Dettagli", - "WH.chat.save": "Salva" + "WH.chat.save": "Tiro salvezza", + "WH.chat.mweaponmalus": "Malus nell uso di due armi", + "WH.chat.diceresult": "Risultato del dado", + "WH.chat.result": "Risultato", + "WH.chat.parysuccess": "Hai parato con successo", + "WH.chat.paryfailed": "Hai fallito azione di parata", + "WH.chat.rollformula": "Formula per il tiro di dado", + "WH.chat.useshield":"Usa lo scudo?", + "WH.chat.power": "Potere", + "WH.chat.powerlevel": "Livello di potere" } \ No newline at end of file diff --git a/modules/warhero-actor.js b/modules/warhero-actor.js index 304db6d..fc2fd7f 100644 --- a/modules/warhero-actor.js +++ b/modules/warhero-actor.js @@ -390,10 +390,11 @@ export class WarheroActor extends Actor { return Number(dmgRoll.total) } /* -------------------------------------------- */ - updateCompetency(competency, obj) { + updateCompetency(competency, obj, labelTab) { for(let key in obj) { if (obj[key]) { - competency[key] = true + //console.log("Parsing", key) //game.system.warhero.config.weaponTypes[key].label) + competency[key] = { enabled: true, label: labelTab[key].label } } } } @@ -402,12 +403,12 @@ export class WarheroActor extends Actor { let myClass = this.getClass() let competency = { weapons: {}, armors: {}, shields: {}} if ( myRace.system && myClass.system) { - this.updateCompetency(competency.weapons, myRace.system.weapons) - this.updateCompetency(competency.armors, myRace.system.armors) - this.updateCompetency(competency.shields, myRace.system.shields) - this.updateCompetency(competency.weapons, myClass.system.weapons) - this.updateCompetency(competency.armors, myClass.system.armors) - this.updateCompetency(competency.shields, myClass.system.shields) + this.updateCompetency(competency.weapons, myRace.system.weapons, game.system.warhero.config.weaponTypes) + this.updateCompetency(competency.armors, myRace.system.armors, game.system.warhero.config.armorTypes) + this.updateCompetency(competency.shields, myRace.system.shields, game.system.warhero.config.shieldTypes) + this.updateCompetency(competency.weapons, myClass.system.weapons, game.system.warhero.config.weaponTypes) + this.updateCompetency(competency.armors, myClass.system.armors, game.system.warhero.config.armorTypes) + this.updateCompetency(competency.shields, myClass.system.shields, game.system.warhero.config.shieldTypes) } return competency } diff --git a/system.json b/system.json index 9774592..21e3b72 100644 --- a/system.json +++ b/system.json @@ -107,7 +107,7 @@ "styles": [ "styles/simple.css" ], - "version": "10.0.26", + "version": "10.0.27", "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.26.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.27.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 09877ba..090ca98 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -20,7 +20,7 @@
@@ -96,10 +96,10 @@

- {{#each competency.weapons as |flag key|}} - {{#if flag}} + {{#each competency.weapons as |cdata key|}} + {{#if cdata}}
  • - {{localize "WH.ui.weapons"}} {{key}} + {{localize "WH.ui.weapons"}} {{localize cdata.label}}
  • {{/if}} {{/each}}