Fix ajout equipements

This commit is contained in:
LeRatierBretonnien 2022-12-19 10:15:46 +01:00
parent b3ddfb802e
commit 8760e3eb6e
3 changed files with 10 additions and 6 deletions

View File

@ -149,6 +149,10 @@ export class HawkmoonActorSheet extends ActorSheet {
this.actor.rollArmeDegats(armeId) this.actor.rollArmeDegats(armeId)
}) })
html.find('.item-add').click((event) => {
const itemType = $(event.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: `Nouveau ${itemType}`, type: itemType }], { renderSheet: true })
})
html.find('.lock-unlock-sheet').click((event) => { html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore; this.options.editScore = !this.options.editScore;

View File

@ -1,7 +1,7 @@
{ {
"id": "fvtt-hawkmoon-cyd", "id": "fvtt-hawkmoon-cyd",
"description": "Hawkmoon RPG for FoundryVTT (CYD system - French)", "description": "Hawkmoon RPG for FoundryVTT (CYD system - French)",
"version": "10.1.6", "version": "10.1.7",
"authors": [ "authors": [
{ {
"name": "Uberwald/LeRatierBretonnien", "name": "Uberwald/LeRatierBretonnien",
@ -35,7 +35,7 @@
"gridUnits": "m", "gridUnits": "m",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json", "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.6.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.1.7.zip",
"languages": [ "languages": [
{ {
"lang": "fr", "lang": "fr",

View File

@ -362,7 +362,7 @@
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="arme" title="Ajouter une arme"><i <a class="item-control item-add" data-type="monnaie" title="Ajouter une monnaie"><i
class="fas fa-plus"></i></a> class="fas fa-plus"></i></a>
</div> </div>
</li> </li>
@ -406,7 +406,7 @@
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="arme" title="Ajouter une arme"><i <a class="item-control item-add" data-type="equipement" title="Ajouter un équipement"><i
class="fas fa-plus"></i></a> class="fas fa-plus"></i></a>
</div> </div>
</li> </li>
@ -441,7 +441,7 @@
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="arme" title="Ajouter une arme"><i <a class="item-control item-add" data-type="artefact" title="Ajouter un artefact"><i
class="fas fa-plus"></i></a> class="fas fa-plus"></i></a>
</div> </div>
</li> </li>