Initial system development

This commit is contained in:
2021-01-18 22:05:02 +01:00
parent ca29af6b61
commit e78b2ac67d
15 changed files with 481 additions and 363 deletions

View File

@ -16,14 +16,17 @@ export class SoSActorSheet extends ActorSheet {
width: 640,
//height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }]
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editStatSkill: false
});
}
/* -------------------------------------------- */
getData() {
let data = super.getData();
data.data.edgecard = this.actor.getEdgesCard();
data.data.editStatSkill = this.options.editStatSkill;
console.log("stats", data);
//data.stats = duplicate(this.actor.stats);
//data.scores = duplicate(this.actor.scores);
@ -58,6 +61,21 @@ export class SoSActorSheet extends ActorSheet {
const li = $(ev.currentTarget).parents(".item");
RdDUtility.confirmerSuppression(this, li);
});
html.find('.stat-label a').click((event) => {
let statName = event.currentTarget.attributes.name.value;
this.actor.rollStat(statName);
});
html.find('.edge-draw').click((event) => {
this.actor.drawEdge();
this.render(true);
});
html.find('.lock-unlock-sheet').click((event) => {
this.options.editStatSkill = !this.options.editStatSkill;
this.render(true);
});
}
/* -------------------------------------------- */