@ -194,6 +194,12 @@ export class RdDActorSheet extends ActorSheet {
|
||||
new Dialog( dialogData ).render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async createEmptyTache( ) {
|
||||
let emptyTache = await Item.create( { name: 'Nouvelle tache', type: 'tache'} );
|
||||
await this.actor.createOwnedItem( emptyTache.data, { renderSheet: true } );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
@ -226,6 +232,9 @@ export class RdDActorSheet extends ActorSheet {
|
||||
this.actor.remiseANeuf();
|
||||
}
|
||||
});
|
||||
html.find('#creer-tache').click(ev => {
|
||||
this.createEmptyTache();
|
||||
});
|
||||
|
||||
// Blessure control
|
||||
html.find('.blessure-control').click(ev => {
|
||||
@ -280,7 +289,12 @@ export class RdDActorSheet extends ActorSheet {
|
||||
let compName = event.currentTarget.text;
|
||||
this.actor.rollCompetence( compName);
|
||||
});
|
||||
|
||||
html.find('.tache-label a').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
let tacheId = li.data('item-id');
|
||||
this.actor.rollTache( tacheId );
|
||||
});
|
||||
|
||||
// Points de reve actuel
|
||||
html.find('.ptreve-actuel a').click((event) => {
|
||||
this.actor.rollCarac( 'reve-actuel' );
|
||||
|
Reference in New Issue
Block a user