Enhance sheets

This commit is contained in:
LeRatierBretonnien 2023-02-14 15:45:59 +01:00
parent db8cf30e06
commit fc9a878f3a
4 changed files with 58 additions and 21 deletions

View File

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

View File

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

View File

@ -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"

View File

@ -20,7 +20,7 @@
<div class="ability-item">
<ul>
<li class="item flexrow list-item " data-item-id="{{race._id}}">
<label class="item-field-label-medium">Race</label>
<label class="item-field-label-medium">{{localize "WH.ui.race"}}</label>
<a class="item-edit"><img class="sheet-competence-img" src="{{race.img}}"></a>
<input type="text" class="item-field-label-medium" disabled value="{{race.name}}" data-dtype="String" />
<div class="item-controls item-controls-fixed">
@ -28,7 +28,7 @@
</div>
</li>
<li class="item flexrow list-item" data-item-id="{{class._id}}">
<label class="item-field-label-medium">Class</label>
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
<a class="item-edit"><img class="sheet-competence-img" src="{{class.img}}"></a>
<input type="text" class="item-field-label-medium" disabled value="{{class.name}}" data-dtype="String" />
<div class="item-controls item-controls-fixed">
@ -36,7 +36,7 @@
</div>
</li>
<li class="item flexrow list-item" >
<label class="item-field-label-medium">Religion</label>
<label class="item-field-label-medium">{{localize "WH.ui.religion"}}</label>
<input type="text" class="item-field-label-medium" name="system.biodata.religion" value="{{system.biodata.religion}}" data-dtype="String" />
</li>
</ul>
@ -96,10 +96,10 @@
<h3><label class="items-title-text">{{localize "WH.ui.competency"}}</label></h3>
</span>
</li>
{{#each competency.weapons as |flag key|}}
{{#if flag}}
{{#each competency.weapons as |cdata key|}}
{{#if cdata}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{language._id}}">
<span class="item-name-label-long">{{localize "WH.ui.weapons"}} {{key}}</span>
<span class="item-name-label-long">{{localize "WH.ui.weapons"}} {{localize cdata.label}}</span>
</li>
{{/if}}
{{/each}}