Ajout Artefacts et syntaxe item/acteurs

This commit is contained in:
LeRatierBretonnien 2022-12-06 07:27:51 +01:00
parent dd3f13f095
commit b9d12843a5
5 changed files with 81 additions and 2 deletions

31
lang/fr.json Normal file
View File

@ -0,0 +1,31 @@
{
"ACTOR": {
"TypePersonnage": "Personnage",
"TypeCellule": "Cellule",
"TypeCreature": "Créature"
},
"ITEM": {
"TypeArtefact": "Artefact",
"TypeArme": "Arme",
"TypeTalent": "Talent",
"TypeHistorique": "Historique",
"TypeProfil": "Profil",
"TypeCompetence": "Compétence",
"TypeProtection": "Protection",
"TypeMonnaie": "Monnaie",
"TypeEquipement": "Equipement",
"TypeRessource": "Ressource",
"TypeContact": "Contact"
},
"HAWKMOON": {
"ui": {
"editContact": "Modifier le contact",
"deleteContact": "Supprimer le contact",
"editTrait": "Modifier le trait",
"deleteTrait": "Supprimer le trait"
}
}
}

View File

@ -48,6 +48,7 @@ export class HawkmoonActorSheet extends ActorSheet {
profils: duplicate(this.actor.getProfils() || {}),
combat: this.actor.getCombatValues(),
equipements: duplicate(this.actor.getEquipments()),
artefacts: duplicate(this.actor.getArtefacts()),
monnaies: duplicate(this.actor.getMonnaies()),
richesse: this.actor.computeRichesse(),
valeurEquipement: this.actor.computeValeurEquipement(),

View File

@ -117,6 +117,10 @@ export class HawkmoonActor extends Actor {
return this.items.filter(item => item.type == "equipement")
}
/* ----------------------- --------------------- */
getArtefacts() {
return this.items.filter(item => item.type == "artefact")
}
/* ----------------------- --------------------- */
getMonnaies() {
return this.items.filter(item => item.type == "monnaie")
}

View File

@ -1,7 +1,7 @@
{
"id": "fvtt-hawkmoon-cyd",
"description": "Hawmoon RPG for FoundryVTT (CYD system - French)",
"version": "10.1.4",
"version": "10.1.5",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@ -35,7 +35,15 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.1.4.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.1.5.zip",
"languages": [
{
"lang": "fr",
"name": "French",
"path": "lang/fr.json",
"flags": {}
}
],
"packs": [
{
"type": "Item",

View File

@ -428,6 +428,41 @@
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Artefacts</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Quantité</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="arme" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each artefacts as |artefact key|}}
<li class="item flexrow " data-item-id="{{artefact._id}}" data-item-type="artefact">
<img class="item-name-img" src="{{artefact.img}}" />
<span class="item-name-label competence-name">{{artefact.name}}</span>
<span class="item-name-label competence-name item-field-label-medium">{{artefact.system.quantite}}
<a class="quantity-modify plus-minus-button" data-quantite-value="-1">-</a>
<a class="quantity-modify plus-minus-button" data-quantite-value="+1">+</a>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>