Bouton Ajout de compétence créature
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Grammar } from "../grammar.js";
|
||||
import { ITEM_TYPES } from "../item.js";
|
||||
import { RdDSheetUtility } from "../rdd-sheet-utility.js";
|
||||
import { RdDBaseActorSheet } from "./base-actor-sheet.js";
|
||||
|
||||
@ -36,6 +37,16 @@ export class RdDBaseActorReveSheet extends RdDBaseActorSheet {
|
||||
this.html.find('.delete-active-effect').click(async event => this.actor.removeEffect(this.html.find(event.currentTarget).parents(".active-effect").data('effect')));
|
||||
this.html.find('.enlever-tous-effets').click(async event => await this.actor.removeEffects());
|
||||
}
|
||||
this.html.find('.competence-add').click(async event =>
|
||||
await this.actor.createEmbeddedDocuments("Item", [{
|
||||
type: ITEM_TYPES.competencecreature,
|
||||
name: 'Nouvelle competence',
|
||||
img: 'systems/foundryvtt-reve-de-dragon/icons/compcreature-serres.webp',
|
||||
system: {
|
||||
carac_value: this.actor.getForce(),
|
||||
}
|
||||
}], { renderSheet: true })
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user