Item structure
This commit is contained in:
parent
e205ca186a
commit
f10691af65
@ -17,7 +17,7 @@ export class VadentisActorSheet extends ActorSheet {
|
|||||||
height: 720,
|
height: 720,
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
|
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
|
editScore: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +28,9 @@ export class VadentisActorSheet extends ActorSheet {
|
|||||||
data.stats = this.actor.stats;
|
data.stats = this.actor.stats;
|
||||||
data.combat = this.actor.combat;
|
data.combat = this.actor.combat;
|
||||||
data.magie = this.actor.magie;
|
data.magie = this.actor.magie;
|
||||||
|
data.editScore = this.options.editScore;
|
||||||
|
console.log("Edit : ", data.editScore);
|
||||||
|
data.isGM = game.user.isGM;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -37,8 +40,6 @@ export class VadentisActorSheet extends ActorSheet {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
//HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
|
|
||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
if (!this.options.editable) return;
|
if (!this.options.editable) return;
|
||||||
|
|
||||||
@ -89,36 +90,8 @@ export class VadentisActorSheet extends ActorSheet {
|
|||||||
//console.log("Competence changed :", skillName);
|
//console.log("Competence changed :", skillName);
|
||||||
this.actor.updateSkillExperience(skillName, parseInt(event.target.value));
|
this.actor.updateSkillExperience(skillName, parseInt(event.target.value));
|
||||||
});
|
});
|
||||||
html.find('.wound-value').change((event) => {
|
|
||||||
let woundName = event.currentTarget.attributes.woundname.value;
|
|
||||||
//console.log("Competence changed :", skillName);
|
|
||||||
this.actor.updateWound(woundName, parseInt(event.target.value));
|
|
||||||
});
|
|
||||||
html.find('.reset-deck-full').click((event) => {
|
|
||||||
this.actor.resetDeckFull();
|
|
||||||
this.render(true);
|
|
||||||
});
|
|
||||||
html.find('.draw-new-edge').click((event) => {
|
|
||||||
this.actor.drawNewEdge();
|
|
||||||
this.render(true);
|
|
||||||
});
|
|
||||||
html.find('.reset-deck').click((event) => {
|
|
||||||
this.actor.resetDeck();
|
|
||||||
this.render(true);
|
|
||||||
});
|
|
||||||
html.find('.discard-card').click((event) => {
|
|
||||||
const cardName = $(event.currentTarget).data("discard");
|
|
||||||
this.actor.discardEdge( cardName );
|
|
||||||
});
|
|
||||||
html.find('.consequence-severity').click((event) => {
|
|
||||||
const li = $(event.currentTarget).parents(".item");
|
|
||||||
const item = this.actor.getOwnedItem(li.data("item-id"));
|
|
||||||
let severity = $(event.currentTarget).val();
|
|
||||||
this.actor.updateOwnedItem( { _id: item._id, 'data.severity': severity});
|
|
||||||
this.render(true);
|
|
||||||
});
|
|
||||||
html.find('.lock-unlock-sheet').click((event) => {
|
html.find('.lock-unlock-sheet').click((event) => {
|
||||||
this.options.editStatSkill = !this.options.editStatSkill;
|
this.options.editScore = !this.options.editScore;
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
html.find('.item-link a').click((event) => {
|
html.find('.item-link a').click((event) => {
|
||||||
|
@ -11,6 +11,8 @@ export class VadentisUtility extends Entity {
|
|||||||
'systems/foundryvtt-vadentis/templates/actor-sheet.html',
|
'systems/foundryvtt-vadentis/templates/actor-sheet.html',
|
||||||
'systems/foundryvtt-vadentis/templates/item-sheet.html',
|
'systems/foundryvtt-vadentis/templates/item-sheet.html',
|
||||||
'systems/foundryvtt-vadentis/templates/score-option-list.html',
|
'systems/foundryvtt-vadentis/templates/score-option-list.html',
|
||||||
|
'systems/foundryvtt-vadentis/templates/malus-option-list.html',
|
||||||
|
'systems/foundryvtt-vadentis/templates/bonus-option-list.html',
|
||||||
'systems/foundryvtt-vadentis/templates/editor-notes-gm.html'
|
'systems/foundryvtt-vadentis/templates/editor-notes-gm.html'
|
||||||
]
|
]
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
|
Loading…
Reference in New Issue
Block a user