forked from public/foundryvtt-reve-de-dragon
Increase support
This commit is contained in:
@ -2,6 +2,9 @@
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
|
||||
export class RdDActorSheet extends ActorSheet {
|
||||
|
||||
/** @override */
|
||||
@ -16,6 +19,15 @@ export class RdDActorSheet extends ActorSheet {
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
_checkNull(items) {
|
||||
if (items && items.length) {
|
||||
return items;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
getData() {
|
||||
@ -33,7 +45,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
data.competenceByCategory = {};
|
||||
if (data.itemsByType.competence) {
|
||||
for (const item of data.itemsByType.competence) {
|
||||
console.log("Push...", item, item.data.categorie);
|
||||
//console.log("Push...", item, item.data.categorie);
|
||||
let list = data.competenceByCategory[item.data.categorie];
|
||||
if (!list) {
|
||||
list = [];
|
||||
@ -76,6 +88,12 @@ export class RdDActorSheet extends ActorSheet {
|
||||
li.slideUp(200, () => this.render(false));
|
||||
});
|
||||
|
||||
// Roll Skill
|
||||
html.find('.competence-label a').click((event) => {
|
||||
let compName = event.currentTarget.text;
|
||||
this.actor.rollCompetence( compName);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user